diff --git a/api_names.yaml b/api_names.yaml index d4dc3cda1..f3501b842 100644 --- a/api_names.yaml +++ b/api_names.yaml @@ -35934,3 +35934,282 @@ /dfareporting:v2.7/VideoSettings/kind: kind /dfareporting:v2.7/VideoSettings/skippableSettings: skippable_settings /dfareporting:v2.7/VideoSettings/transcodeSettings: transcode_settings +/cloudkms:v1beta1/fields: fields +/cloudkms:v1beta1/key: key +/cloudkms:v1beta1/quotaUser: quota_user +/cloudkms:v1beta1/cloudkms.projects.locations.list: list_project_locations +/cloudkms:v1beta1/cloudkms.projects.locations.list/filter: filter +/cloudkms:v1beta1/cloudkms.projects.locations.list/name: name +/cloudkms:v1beta1/cloudkms.projects.locations.list/pageToken: page_token +/cloudkms:v1beta1/cloudkms.projects.locations.list/pageSize: page_size +/cloudkms:v1beta1/cloudkms.projects.locations.get: get_project_location +/cloudkms:v1beta1/cloudkms.projects.locations.get/name: name +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.list: list_project_location_key_rings +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.list/pageToken: page_token +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.list/pageSize: page_size +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.list/parent: parent +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.setIamPolicy: set_key_ring_iam_policy +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.setIamPolicy/resource: resource +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.create: create_project_location_key_ring +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.create/parent: parent +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.create/keyRingId: key_ring_id +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.getIamPolicy: get_project_location_key_ring_iam_policy +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.getIamPolicy/resource: resource +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.get: get_project_location_key_ring +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.get/name: name +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.testIamPermissions: test_key_ring_iam_permissions +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.testIamPermissions/resource: resource +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.getIamPolicy: get_project_location_key_ring_crypto_key_iam_policy +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.getIamPolicy/resource: resource +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.get: get_project_location_key_ring_crypto_key +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.get/name: name +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.patch: patch_project_location_key_ring_crypto_key +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.patch/name: name +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.patch/updateMask: update_mask +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.testIamPermissions: test_crypto_key_iam_permissions +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.testIamPermissions/resource: resource +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.decrypt: decrypt_crypto_key +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.decrypt/name: name +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.list: list_project_location_key_ring_crypto_keys +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.list/pageToken: page_token +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.list/pageSize: page_size +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.list/parent: parent +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.encrypt: encrypt_crypto_key +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.encrypt/name: name +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.create: create_project_location_key_ring_crypto_key +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.create/parent: parent +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.create/cryptoKeyId: crypto_key_id +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.setIamPolicy: set_crypto_key_iam_policy +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.setIamPolicy/resource: resource +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.updatePrimaryVersion: update_project_location_key_ring_crypto_key_primary_version +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.updatePrimaryVersion/name: name +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.list: list_project_location_key_ring_crypto_key_crypto_key_versions +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.list/parent: parent +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.list/pageToken: page_token +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.list/pageSize: page_size +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.create: create_project_location_key_ring_crypto_key_crypto_key_version +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.create/parent: parent +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.destroy: destroy_crypto_key_version +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.destroy/name: name +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.restore: restore_crypto_key_version +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.restore/name: name +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.patch: patch_project_location_key_ring_crypto_key_crypto_key_version +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.patch/updateMask: update_mask +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.patch/name: name +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.get: get_project_location_key_ring_crypto_key_crypto_key_version +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.get/name: name +/cloudkms:v1beta1/CloudAuditOptions: cloud_audit_options +/cloudkms:v1beta1/Binding: binding +/cloudkms:v1beta1/Binding/members: members +/cloudkms:v1beta1/Binding/members/member: member +/cloudkms:v1beta1/Binding/role: role +/cloudkms:v1beta1/EncryptRequest: encrypt_request +/cloudkms:v1beta1/EncryptRequest/plaintext: plaintext +/cloudkms:v1beta1/EncryptRequest/additionalAuthenticatedData: additional_authenticated_data +/cloudkms:v1beta1/ListCryptoKeyVersionsResponse: list_crypto_key_versions_response +/cloudkms:v1beta1/ListCryptoKeyVersionsResponse/cryptoKeyVersions: crypto_key_versions +/cloudkms:v1beta1/ListCryptoKeyVersionsResponse/cryptoKeyVersions/crypto_key_version: crypto_key_version +/cloudkms:v1beta1/ListCryptoKeyVersionsResponse/nextPageToken: next_page_token +/cloudkms:v1beta1/ListCryptoKeyVersionsResponse/totalSize: total_size +/cloudkms:v1beta1/TestIamPermissionsResponse: test_iam_permissions_response +/cloudkms:v1beta1/TestIamPermissionsResponse/permissions: permissions +/cloudkms:v1beta1/TestIamPermissionsResponse/permissions/permission: permission +/cloudkms:v1beta1/DestroyCryptoKeyVersionRequest: destroy_crypto_key_version_request +/cloudkms:v1beta1/CryptoKey: crypto_key +/cloudkms:v1beta1/CryptoKey/name: name +/cloudkms:v1beta1/CryptoKey/purpose: purpose +/cloudkms:v1beta1/CryptoKey/nextRotationTime: next_rotation_time +/cloudkms:v1beta1/CryptoKey/createTime: create_time +/cloudkms:v1beta1/CryptoKey/rotationPeriod: rotation_period +/cloudkms:v1beta1/CryptoKey/primary: primary +/cloudkms:v1beta1/Rule: rule +/cloudkms:v1beta1/Rule/logConfig: log_config +/cloudkms:v1beta1/Rule/logConfig/log_config: log_config +/cloudkms:v1beta1/Rule/in: in +/cloudkms:v1beta1/Rule/in/in: in +/cloudkms:v1beta1/Rule/permissions: permissions +/cloudkms:v1beta1/Rule/permissions/permission: permission +/cloudkms:v1beta1/Rule/action: action +/cloudkms:v1beta1/Rule/notIn: not_in +/cloudkms:v1beta1/Rule/notIn/not_in: not_in +/cloudkms:v1beta1/Rule/description: description +/cloudkms:v1beta1/Rule/conditions: conditions +/cloudkms:v1beta1/Rule/conditions/condition: condition +/cloudkms:v1beta1/LogConfig: log_config +/cloudkms:v1beta1/LogConfig/dataAccess: data_access +/cloudkms:v1beta1/LogConfig/cloudAudit: cloud_audit +/cloudkms:v1beta1/LogConfig/counter: counter +/cloudkms:v1beta1/SetIamPolicyRequest: set_iam_policy_request +/cloudkms:v1beta1/SetIamPolicyRequest/updateMask: update_mask +/cloudkms:v1beta1/SetIamPolicyRequest/policy: policy +/cloudkms:v1beta1/DecryptRequest: decrypt_request +/cloudkms:v1beta1/DecryptRequest/ciphertext: ciphertext +/cloudkms:v1beta1/DecryptRequest/additionalAuthenticatedData: additional_authenticated_data +/cloudkms:v1beta1/Location: location +/cloudkms:v1beta1/Location/labels: labels +/cloudkms:v1beta1/Location/labels/label: label +/cloudkms:v1beta1/Location/name: name +/cloudkms:v1beta1/Location/locationId: location_id +/cloudkms:v1beta1/Location/metadata: metadata +/cloudkms:v1beta1/Location/metadata/metadatum: metadatum +/cloudkms:v1beta1/ListCryptoKeysResponse: list_crypto_keys_response +/cloudkms:v1beta1/ListCryptoKeysResponse/nextPageToken: next_page_token +/cloudkms:v1beta1/ListCryptoKeysResponse/cryptoKeys: crypto_keys +/cloudkms:v1beta1/ListCryptoKeysResponse/cryptoKeys/crypto_key: crypto_key +/cloudkms:v1beta1/ListCryptoKeysResponse/totalSize: total_size +/cloudkms:v1beta1/Condition: condition +/cloudkms:v1beta1/Condition/svc: svc +/cloudkms:v1beta1/Condition/sys: sys +/cloudkms:v1beta1/Condition/value: value +/cloudkms:v1beta1/Condition/values: values +/cloudkms:v1beta1/Condition/values/value: value +/cloudkms:v1beta1/Condition/iam: iam +/cloudkms:v1beta1/Condition/op: op +/cloudkms:v1beta1/CounterOptions: counter_options +/cloudkms:v1beta1/CounterOptions/metric: metric +/cloudkms:v1beta1/CounterOptions/field: field +/cloudkms:v1beta1/AuditLogConfig: audit_log_config +/cloudkms:v1beta1/AuditLogConfig/exemptedMembers: exempted_members +/cloudkms:v1beta1/AuditLogConfig/exemptedMembers/exempted_member: exempted_member +/cloudkms:v1beta1/AuditLogConfig/logType: log_type +/cloudkms:v1beta1/DecryptResponse: decrypt_response +/cloudkms:v1beta1/DecryptResponse/plaintext: plaintext +/cloudkms:v1beta1/TestIamPermissionsRequest: test_iam_permissions_request +/cloudkms:v1beta1/TestIamPermissionsRequest/permissions: permissions +/cloudkms:v1beta1/TestIamPermissionsRequest/permissions/permission: permission +/cloudkms:v1beta1/Policy: policy +/cloudkms:v1beta1/Policy/iamOwned: iam_owned +/cloudkms:v1beta1/Policy/rules: rules +/cloudkms:v1beta1/Policy/rules/rule: rule +/cloudkms:v1beta1/Policy/version: version +/cloudkms:v1beta1/Policy/auditConfigs: audit_configs +/cloudkms:v1beta1/Policy/auditConfigs/audit_config: audit_config +/cloudkms:v1beta1/Policy/bindings: bindings +/cloudkms:v1beta1/Policy/bindings/binding: binding +/cloudkms:v1beta1/Policy/etag: etag +/cloudkms:v1beta1/EncryptResponse: encrypt_response +/cloudkms:v1beta1/EncryptResponse/ciphertext: ciphertext +/cloudkms:v1beta1/EncryptResponse/name: name +/cloudkms:v1beta1/KeyRing: key_ring +/cloudkms:v1beta1/KeyRing/createTime: create_time +/cloudkms:v1beta1/KeyRing/name: name +/cloudkms:v1beta1/ListLocationsResponse: list_locations_response +/cloudkms:v1beta1/ListLocationsResponse/nextPageToken: next_page_token +/cloudkms:v1beta1/ListLocationsResponse/locations: locations +/cloudkms:v1beta1/ListLocationsResponse/locations/location: location +/cloudkms:v1beta1/UpdateCryptoKeyPrimaryVersionRequest: update_crypto_key_primary_version_request +/cloudkms:v1beta1/UpdateCryptoKeyPrimaryVersionRequest/cryptoKeyVersionId: crypto_key_version_id +/cloudkms:v1beta1/RestoreCryptoKeyVersionRequest: restore_crypto_key_version_request +/cloudkms:v1beta1/DataAccessOptions: data_access_options +/cloudkms:v1beta1/ListKeyRingsResponse: list_key_rings_response +/cloudkms:v1beta1/ListKeyRingsResponse/nextPageToken: next_page_token +/cloudkms:v1beta1/ListKeyRingsResponse/totalSize: total_size +/cloudkms:v1beta1/ListKeyRingsResponse/keyRings: key_rings +/cloudkms:v1beta1/ListKeyRingsResponse/keyRings/key_ring: key_ring +/cloudkms:v1beta1/AuditConfig: audit_config +/cloudkms:v1beta1/AuditConfig/auditLogConfigs: audit_log_configs +/cloudkms:v1beta1/AuditConfig/auditLogConfigs/audit_log_config: audit_log_config +/cloudkms:v1beta1/AuditConfig/exemptedMembers: exempted_members +/cloudkms:v1beta1/AuditConfig/exemptedMembers/exempted_member: exempted_member +/cloudkms:v1beta1/AuditConfig/service: service +/cloudkms:v1beta1/CryptoKeyVersion: crypto_key_version +/cloudkms:v1beta1/CryptoKeyVersion/createTime: create_time +/cloudkms:v1beta1/CryptoKeyVersion/state: state +/cloudkms:v1beta1/CryptoKeyVersion/name: name +/cloudkms:v1beta1/CryptoKeyVersion/destroyEventTime: destroy_event_time +/cloudkms:v1beta1/CryptoKeyVersion/destroyTime: destroy_time +/container:v1/container.projects.zones.clusters.nodePools.rollback: rollback_node_pool_upgrade +/container:v1/container.projects.zones.clusters.nodePools.rollback/projectId: project_id +/container:v1/container.projects.zones.clusters.nodePools.rollback/zone: zone +/container:v1/container.projects.zones.clusters.nodePools.rollback/clusterId: cluster_id +/container:v1/container.projects.zones.clusters.nodePools.rollback/nodePoolId: node_pool_id +/container:v1/container.projects.zones.clusters.nodePools.setManagement: set_project_zone_cluster_node_pool_management +/container:v1/container.projects.zones.clusters.nodePools.setManagement/projectId: project_id +/container:v1/container.projects.zones.clusters.nodePools.setManagement/zone: zone +/container:v1/container.projects.zones.clusters.nodePools.setManagement/clusterId: cluster_id +/container:v1/container.projects.zones.clusters.nodePools.setManagement/nodePoolId: node_pool_id +/container:v1/container.projects.zones.operations.cancel: cancel_operation +/container:v1/container.projects.zones.operations.cancel/projectId: project_id +/container:v1/container.projects.zones.operations.cancel/zone: zone +/container:v1/container.projects.zones.operations.cancel/operationId: operation_id +/container:v1/Cluster/enableKubernetesAlpha: enable_kubernetes_alpha +/container:v1/Cluster/expireTime: expire_time +/container:v1/NodeConfig/serviceAccount: service_account +/container:v1/NodeConfig/imageType: image_type +/container:v1/NodeConfig/labels: labels +/container:v1/NodeConfig/labels/label: label +/container:v1/NodeConfig/localSsdCount: local_ssd_count +/container:v1/NodeConfig/tags: tags +/container:v1/NodeConfig/tags/tag: tag +/container:v1/NodeConfig/preemptible: preemptible +/container:v1/NodePool/autoscaling: autoscaling +/container:v1/NodePool/management: management +/container:v1/NodePoolAutoscaling: node_pool_autoscaling +/container:v1/NodePoolAutoscaling/enabled: enabled +/container:v1/NodePoolAutoscaling/minNodeCount: min_node_count +/container:v1/NodePoolAutoscaling/maxNodeCount: max_node_count +/container:v1/NodeManagement: node_management +/container:v1/NodeManagement/autoUpgrade: auto_upgrade +/container:v1/NodeManagement/upgradeOptions: upgrade_options +/container:v1/AutoUpgradeOptions: auto_upgrade_options +/container:v1/AutoUpgradeOptions/autoUpgradeStartTime: auto_upgrade_start_time +/container:v1/AutoUpgradeOptions/description: description +/container:v1/ClusterUpdate/desiredImageType: desired_image_type +/container:v1/ClusterUpdate/desiredNodePoolAutoscaling: desired_node_pool_autoscaling +/container:v1/ClusterUpdate/desiredLocations: desired_locations +/container:v1/ClusterUpdate/desiredLocations/desired_location: desired_location +/container:v1/CancelOperationRequest: cancel_operation_request +/container:v1/Empty: empty +/container:v1/ServerConfig/defaultImageType: default_image_type +/container:v1/ServerConfig/validImageTypes: valid_image_types +/container:v1/ServerConfig/validImageTypes/valid_image_type: valid_image_type +/container:v1/ServerConfig/validMasterVersions: valid_master_versions +/container:v1/ServerConfig/validMasterVersions/valid_master_version: valid_master_version +/container:v1/RollbackNodePoolUpgradeRequest: rollback_node_pool_upgrade_request +/container:v1/SetNodePoolManagementRequest: set_node_pool_management_request +/container:v1/SetNodePoolManagementRequest/management: management +/manufacturers:v1/key: key +/manufacturers:v1/quotaUser: quota_user +/manufacturers:v1/fields: fields +/manufacturers:v1/manufacturers.accounts.products.get: get_account_product +/manufacturers:v1/manufacturers.accounts.products.get/parent: parent +/manufacturers:v1/manufacturers.accounts.products.get/name: name +/manufacturers:v1/manufacturers.accounts.products.list: list_account_products +/manufacturers:v1/manufacturers.accounts.products.list/pageSize: page_size +/manufacturers:v1/manufacturers.accounts.products.list/parent: parent +/manufacturers:v1/manufacturers.accounts.products.list/pageToken: page_token +/manufacturers:v1/ListProductsResponse: list_products_response +/manufacturers:v1/ListProductsResponse/nextPageToken: next_page_token +/manufacturers:v1/ListProductsResponse/products: products +/manufacturers:v1/ListProductsResponse/products/product: product +/manufacturers:v1/Issue: issue +/manufacturers:v1/Issue/severity: severity +/manufacturers:v1/Issue/description: description +/manufacturers:v1/Issue/attribute: attribute +/manufacturers:v1/Issue/type: type +/manufacturers:v1/Attributes: attributes +/manufacturers:v1/Attributes/productPageUrl: product_page_url +/manufacturers:v1/Attributes/mpn: mpn +/manufacturers:v1/Attributes/title: title +/manufacturers:v1/Attributes/productLine: product_line +/manufacturers:v1/Attributes/productName: product_name +/manufacturers:v1/Attributes/brand: brand +/manufacturers:v1/Attributes/productType: product_type +/manufacturers:v1/Attributes/productType/product_type: product_type +/manufacturers:v1/Attributes/gtin: gtin +/manufacturers:v1/Attributes/gtin/gtin: gtin +/manufacturers:v1/Product: product +/manufacturers:v1/Product/parent: parent +/manufacturers:v1/Product/targetCountry: target_country +/manufacturers:v1/Product/contentLanguage: content_language +/manufacturers:v1/Product/manuallyDeletedAttributes: manually_deleted_attributes +/manufacturers:v1/Product/manuallyDeletedAttributes/manually_deleted_attribute: manually_deleted_attribute +/manufacturers:v1/Product/productId: product_id +/manufacturers:v1/Product/finalAttributes: final_attributes +/manufacturers:v1/Product/issues: issues +/manufacturers:v1/Product/issues/issue: issue +/manufacturers:v1/Product/name: name +/manufacturers:v1/Product/uploadedAttributes: uploaded_attributes +/manufacturers:v1/Product/manuallyProvidedAttributes: manually_provided_attributes +/sqladmin:v1beta4/Settings/availabilityType: availability_type +/sqladmin:v1beta4/Settings/storageAutoResizeLimit: storage_auto_resize_limit diff --git a/api_names_out.yaml b/api_names_out.yaml index d4dc3cda1..f3501b842 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -35934,3 +35934,282 @@ /dfareporting:v2.7/VideoSettings/kind: kind /dfareporting:v2.7/VideoSettings/skippableSettings: skippable_settings /dfareporting:v2.7/VideoSettings/transcodeSettings: transcode_settings +/cloudkms:v1beta1/fields: fields +/cloudkms:v1beta1/key: key +/cloudkms:v1beta1/quotaUser: quota_user +/cloudkms:v1beta1/cloudkms.projects.locations.list: list_project_locations +/cloudkms:v1beta1/cloudkms.projects.locations.list/filter: filter +/cloudkms:v1beta1/cloudkms.projects.locations.list/name: name +/cloudkms:v1beta1/cloudkms.projects.locations.list/pageToken: page_token +/cloudkms:v1beta1/cloudkms.projects.locations.list/pageSize: page_size +/cloudkms:v1beta1/cloudkms.projects.locations.get: get_project_location +/cloudkms:v1beta1/cloudkms.projects.locations.get/name: name +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.list: list_project_location_key_rings +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.list/pageToken: page_token +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.list/pageSize: page_size +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.list/parent: parent +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.setIamPolicy: set_key_ring_iam_policy +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.setIamPolicy/resource: resource +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.create: create_project_location_key_ring +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.create/parent: parent +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.create/keyRingId: key_ring_id +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.getIamPolicy: get_project_location_key_ring_iam_policy +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.getIamPolicy/resource: resource +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.get: get_project_location_key_ring +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.get/name: name +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.testIamPermissions: test_key_ring_iam_permissions +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.testIamPermissions/resource: resource +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.getIamPolicy: get_project_location_key_ring_crypto_key_iam_policy +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.getIamPolicy/resource: resource +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.get: get_project_location_key_ring_crypto_key +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.get/name: name +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.patch: patch_project_location_key_ring_crypto_key +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.patch/name: name +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.patch/updateMask: update_mask +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.testIamPermissions: test_crypto_key_iam_permissions +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.testIamPermissions/resource: resource +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.decrypt: decrypt_crypto_key +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.decrypt/name: name +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.list: list_project_location_key_ring_crypto_keys +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.list/pageToken: page_token +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.list/pageSize: page_size +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.list/parent: parent +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.encrypt: encrypt_crypto_key +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.encrypt/name: name +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.create: create_project_location_key_ring_crypto_key +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.create/parent: parent +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.create/cryptoKeyId: crypto_key_id +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.setIamPolicy: set_crypto_key_iam_policy +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.setIamPolicy/resource: resource +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.updatePrimaryVersion: update_project_location_key_ring_crypto_key_primary_version +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.updatePrimaryVersion/name: name +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.list: list_project_location_key_ring_crypto_key_crypto_key_versions +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.list/parent: parent +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.list/pageToken: page_token +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.list/pageSize: page_size +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.create: create_project_location_key_ring_crypto_key_crypto_key_version +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.create/parent: parent +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.destroy: destroy_crypto_key_version +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.destroy/name: name +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.restore: restore_crypto_key_version +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.restore/name: name +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.patch: patch_project_location_key_ring_crypto_key_crypto_key_version +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.patch/updateMask: update_mask +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.patch/name: name +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.get: get_project_location_key_ring_crypto_key_crypto_key_version +/cloudkms:v1beta1/cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.get/name: name +/cloudkms:v1beta1/CloudAuditOptions: cloud_audit_options +/cloudkms:v1beta1/Binding: binding +/cloudkms:v1beta1/Binding/members: members +/cloudkms:v1beta1/Binding/members/member: member +/cloudkms:v1beta1/Binding/role: role +/cloudkms:v1beta1/EncryptRequest: encrypt_request +/cloudkms:v1beta1/EncryptRequest/plaintext: plaintext +/cloudkms:v1beta1/EncryptRequest/additionalAuthenticatedData: additional_authenticated_data +/cloudkms:v1beta1/ListCryptoKeyVersionsResponse: list_crypto_key_versions_response +/cloudkms:v1beta1/ListCryptoKeyVersionsResponse/cryptoKeyVersions: crypto_key_versions +/cloudkms:v1beta1/ListCryptoKeyVersionsResponse/cryptoKeyVersions/crypto_key_version: crypto_key_version +/cloudkms:v1beta1/ListCryptoKeyVersionsResponse/nextPageToken: next_page_token +/cloudkms:v1beta1/ListCryptoKeyVersionsResponse/totalSize: total_size +/cloudkms:v1beta1/TestIamPermissionsResponse: test_iam_permissions_response +/cloudkms:v1beta1/TestIamPermissionsResponse/permissions: permissions +/cloudkms:v1beta1/TestIamPermissionsResponse/permissions/permission: permission +/cloudkms:v1beta1/DestroyCryptoKeyVersionRequest: destroy_crypto_key_version_request +/cloudkms:v1beta1/CryptoKey: crypto_key +/cloudkms:v1beta1/CryptoKey/name: name +/cloudkms:v1beta1/CryptoKey/purpose: purpose +/cloudkms:v1beta1/CryptoKey/nextRotationTime: next_rotation_time +/cloudkms:v1beta1/CryptoKey/createTime: create_time +/cloudkms:v1beta1/CryptoKey/rotationPeriod: rotation_period +/cloudkms:v1beta1/CryptoKey/primary: primary +/cloudkms:v1beta1/Rule: rule +/cloudkms:v1beta1/Rule/logConfig: log_config +/cloudkms:v1beta1/Rule/logConfig/log_config: log_config +/cloudkms:v1beta1/Rule/in: in +/cloudkms:v1beta1/Rule/in/in: in +/cloudkms:v1beta1/Rule/permissions: permissions +/cloudkms:v1beta1/Rule/permissions/permission: permission +/cloudkms:v1beta1/Rule/action: action +/cloudkms:v1beta1/Rule/notIn: not_in +/cloudkms:v1beta1/Rule/notIn/not_in: not_in +/cloudkms:v1beta1/Rule/description: description +/cloudkms:v1beta1/Rule/conditions: conditions +/cloudkms:v1beta1/Rule/conditions/condition: condition +/cloudkms:v1beta1/LogConfig: log_config +/cloudkms:v1beta1/LogConfig/dataAccess: data_access +/cloudkms:v1beta1/LogConfig/cloudAudit: cloud_audit +/cloudkms:v1beta1/LogConfig/counter: counter +/cloudkms:v1beta1/SetIamPolicyRequest: set_iam_policy_request +/cloudkms:v1beta1/SetIamPolicyRequest/updateMask: update_mask +/cloudkms:v1beta1/SetIamPolicyRequest/policy: policy +/cloudkms:v1beta1/DecryptRequest: decrypt_request +/cloudkms:v1beta1/DecryptRequest/ciphertext: ciphertext +/cloudkms:v1beta1/DecryptRequest/additionalAuthenticatedData: additional_authenticated_data +/cloudkms:v1beta1/Location: location +/cloudkms:v1beta1/Location/labels: labels +/cloudkms:v1beta1/Location/labels/label: label +/cloudkms:v1beta1/Location/name: name +/cloudkms:v1beta1/Location/locationId: location_id +/cloudkms:v1beta1/Location/metadata: metadata +/cloudkms:v1beta1/Location/metadata/metadatum: metadatum +/cloudkms:v1beta1/ListCryptoKeysResponse: list_crypto_keys_response +/cloudkms:v1beta1/ListCryptoKeysResponse/nextPageToken: next_page_token +/cloudkms:v1beta1/ListCryptoKeysResponse/cryptoKeys: crypto_keys +/cloudkms:v1beta1/ListCryptoKeysResponse/cryptoKeys/crypto_key: crypto_key +/cloudkms:v1beta1/ListCryptoKeysResponse/totalSize: total_size +/cloudkms:v1beta1/Condition: condition +/cloudkms:v1beta1/Condition/svc: svc +/cloudkms:v1beta1/Condition/sys: sys +/cloudkms:v1beta1/Condition/value: value +/cloudkms:v1beta1/Condition/values: values +/cloudkms:v1beta1/Condition/values/value: value +/cloudkms:v1beta1/Condition/iam: iam +/cloudkms:v1beta1/Condition/op: op +/cloudkms:v1beta1/CounterOptions: counter_options +/cloudkms:v1beta1/CounterOptions/metric: metric +/cloudkms:v1beta1/CounterOptions/field: field +/cloudkms:v1beta1/AuditLogConfig: audit_log_config +/cloudkms:v1beta1/AuditLogConfig/exemptedMembers: exempted_members +/cloudkms:v1beta1/AuditLogConfig/exemptedMembers/exempted_member: exempted_member +/cloudkms:v1beta1/AuditLogConfig/logType: log_type +/cloudkms:v1beta1/DecryptResponse: decrypt_response +/cloudkms:v1beta1/DecryptResponse/plaintext: plaintext +/cloudkms:v1beta1/TestIamPermissionsRequest: test_iam_permissions_request +/cloudkms:v1beta1/TestIamPermissionsRequest/permissions: permissions +/cloudkms:v1beta1/TestIamPermissionsRequest/permissions/permission: permission +/cloudkms:v1beta1/Policy: policy +/cloudkms:v1beta1/Policy/iamOwned: iam_owned +/cloudkms:v1beta1/Policy/rules: rules +/cloudkms:v1beta1/Policy/rules/rule: rule +/cloudkms:v1beta1/Policy/version: version +/cloudkms:v1beta1/Policy/auditConfigs: audit_configs +/cloudkms:v1beta1/Policy/auditConfigs/audit_config: audit_config +/cloudkms:v1beta1/Policy/bindings: bindings +/cloudkms:v1beta1/Policy/bindings/binding: binding +/cloudkms:v1beta1/Policy/etag: etag +/cloudkms:v1beta1/EncryptResponse: encrypt_response +/cloudkms:v1beta1/EncryptResponse/ciphertext: ciphertext +/cloudkms:v1beta1/EncryptResponse/name: name +/cloudkms:v1beta1/KeyRing: key_ring +/cloudkms:v1beta1/KeyRing/createTime: create_time +/cloudkms:v1beta1/KeyRing/name: name +/cloudkms:v1beta1/ListLocationsResponse: list_locations_response +/cloudkms:v1beta1/ListLocationsResponse/nextPageToken: next_page_token +/cloudkms:v1beta1/ListLocationsResponse/locations: locations +/cloudkms:v1beta1/ListLocationsResponse/locations/location: location +/cloudkms:v1beta1/UpdateCryptoKeyPrimaryVersionRequest: update_crypto_key_primary_version_request +/cloudkms:v1beta1/UpdateCryptoKeyPrimaryVersionRequest/cryptoKeyVersionId: crypto_key_version_id +/cloudkms:v1beta1/RestoreCryptoKeyVersionRequest: restore_crypto_key_version_request +/cloudkms:v1beta1/DataAccessOptions: data_access_options +/cloudkms:v1beta1/ListKeyRingsResponse: list_key_rings_response +/cloudkms:v1beta1/ListKeyRingsResponse/nextPageToken: next_page_token +/cloudkms:v1beta1/ListKeyRingsResponse/totalSize: total_size +/cloudkms:v1beta1/ListKeyRingsResponse/keyRings: key_rings +/cloudkms:v1beta1/ListKeyRingsResponse/keyRings/key_ring: key_ring +/cloudkms:v1beta1/AuditConfig: audit_config +/cloudkms:v1beta1/AuditConfig/auditLogConfigs: audit_log_configs +/cloudkms:v1beta1/AuditConfig/auditLogConfigs/audit_log_config: audit_log_config +/cloudkms:v1beta1/AuditConfig/exemptedMembers: exempted_members +/cloudkms:v1beta1/AuditConfig/exemptedMembers/exempted_member: exempted_member +/cloudkms:v1beta1/AuditConfig/service: service +/cloudkms:v1beta1/CryptoKeyVersion: crypto_key_version +/cloudkms:v1beta1/CryptoKeyVersion/createTime: create_time +/cloudkms:v1beta1/CryptoKeyVersion/state: state +/cloudkms:v1beta1/CryptoKeyVersion/name: name +/cloudkms:v1beta1/CryptoKeyVersion/destroyEventTime: destroy_event_time +/cloudkms:v1beta1/CryptoKeyVersion/destroyTime: destroy_time +/container:v1/container.projects.zones.clusters.nodePools.rollback: rollback_node_pool_upgrade +/container:v1/container.projects.zones.clusters.nodePools.rollback/projectId: project_id +/container:v1/container.projects.zones.clusters.nodePools.rollback/zone: zone +/container:v1/container.projects.zones.clusters.nodePools.rollback/clusterId: cluster_id +/container:v1/container.projects.zones.clusters.nodePools.rollback/nodePoolId: node_pool_id +/container:v1/container.projects.zones.clusters.nodePools.setManagement: set_project_zone_cluster_node_pool_management +/container:v1/container.projects.zones.clusters.nodePools.setManagement/projectId: project_id +/container:v1/container.projects.zones.clusters.nodePools.setManagement/zone: zone +/container:v1/container.projects.zones.clusters.nodePools.setManagement/clusterId: cluster_id +/container:v1/container.projects.zones.clusters.nodePools.setManagement/nodePoolId: node_pool_id +/container:v1/container.projects.zones.operations.cancel: cancel_operation +/container:v1/container.projects.zones.operations.cancel/projectId: project_id +/container:v1/container.projects.zones.operations.cancel/zone: zone +/container:v1/container.projects.zones.operations.cancel/operationId: operation_id +/container:v1/Cluster/enableKubernetesAlpha: enable_kubernetes_alpha +/container:v1/Cluster/expireTime: expire_time +/container:v1/NodeConfig/serviceAccount: service_account +/container:v1/NodeConfig/imageType: image_type +/container:v1/NodeConfig/labels: labels +/container:v1/NodeConfig/labels/label: label +/container:v1/NodeConfig/localSsdCount: local_ssd_count +/container:v1/NodeConfig/tags: tags +/container:v1/NodeConfig/tags/tag: tag +/container:v1/NodeConfig/preemptible: preemptible +/container:v1/NodePool/autoscaling: autoscaling +/container:v1/NodePool/management: management +/container:v1/NodePoolAutoscaling: node_pool_autoscaling +/container:v1/NodePoolAutoscaling/enabled: enabled +/container:v1/NodePoolAutoscaling/minNodeCount: min_node_count +/container:v1/NodePoolAutoscaling/maxNodeCount: max_node_count +/container:v1/NodeManagement: node_management +/container:v1/NodeManagement/autoUpgrade: auto_upgrade +/container:v1/NodeManagement/upgradeOptions: upgrade_options +/container:v1/AutoUpgradeOptions: auto_upgrade_options +/container:v1/AutoUpgradeOptions/autoUpgradeStartTime: auto_upgrade_start_time +/container:v1/AutoUpgradeOptions/description: description +/container:v1/ClusterUpdate/desiredImageType: desired_image_type +/container:v1/ClusterUpdate/desiredNodePoolAutoscaling: desired_node_pool_autoscaling +/container:v1/ClusterUpdate/desiredLocations: desired_locations +/container:v1/ClusterUpdate/desiredLocations/desired_location: desired_location +/container:v1/CancelOperationRequest: cancel_operation_request +/container:v1/Empty: empty +/container:v1/ServerConfig/defaultImageType: default_image_type +/container:v1/ServerConfig/validImageTypes: valid_image_types +/container:v1/ServerConfig/validImageTypes/valid_image_type: valid_image_type +/container:v1/ServerConfig/validMasterVersions: valid_master_versions +/container:v1/ServerConfig/validMasterVersions/valid_master_version: valid_master_version +/container:v1/RollbackNodePoolUpgradeRequest: rollback_node_pool_upgrade_request +/container:v1/SetNodePoolManagementRequest: set_node_pool_management_request +/container:v1/SetNodePoolManagementRequest/management: management +/manufacturers:v1/key: key +/manufacturers:v1/quotaUser: quota_user +/manufacturers:v1/fields: fields +/manufacturers:v1/manufacturers.accounts.products.get: get_account_product +/manufacturers:v1/manufacturers.accounts.products.get/parent: parent +/manufacturers:v1/manufacturers.accounts.products.get/name: name +/manufacturers:v1/manufacturers.accounts.products.list: list_account_products +/manufacturers:v1/manufacturers.accounts.products.list/pageSize: page_size +/manufacturers:v1/manufacturers.accounts.products.list/parent: parent +/manufacturers:v1/manufacturers.accounts.products.list/pageToken: page_token +/manufacturers:v1/ListProductsResponse: list_products_response +/manufacturers:v1/ListProductsResponse/nextPageToken: next_page_token +/manufacturers:v1/ListProductsResponse/products: products +/manufacturers:v1/ListProductsResponse/products/product: product +/manufacturers:v1/Issue: issue +/manufacturers:v1/Issue/severity: severity +/manufacturers:v1/Issue/description: description +/manufacturers:v1/Issue/attribute: attribute +/manufacturers:v1/Issue/type: type +/manufacturers:v1/Attributes: attributes +/manufacturers:v1/Attributes/productPageUrl: product_page_url +/manufacturers:v1/Attributes/mpn: mpn +/manufacturers:v1/Attributes/title: title +/manufacturers:v1/Attributes/productLine: product_line +/manufacturers:v1/Attributes/productName: product_name +/manufacturers:v1/Attributes/brand: brand +/manufacturers:v1/Attributes/productType: product_type +/manufacturers:v1/Attributes/productType/product_type: product_type +/manufacturers:v1/Attributes/gtin: gtin +/manufacturers:v1/Attributes/gtin/gtin: gtin +/manufacturers:v1/Product: product +/manufacturers:v1/Product/parent: parent +/manufacturers:v1/Product/targetCountry: target_country +/manufacturers:v1/Product/contentLanguage: content_language +/manufacturers:v1/Product/manuallyDeletedAttributes: manually_deleted_attributes +/manufacturers:v1/Product/manuallyDeletedAttributes/manually_deleted_attribute: manually_deleted_attribute +/manufacturers:v1/Product/productId: product_id +/manufacturers:v1/Product/finalAttributes: final_attributes +/manufacturers:v1/Product/issues: issues +/manufacturers:v1/Product/issues/issue: issue +/manufacturers:v1/Product/name: name +/manufacturers:v1/Product/uploadedAttributes: uploaded_attributes +/manufacturers:v1/Product/manuallyProvidedAttributes: manually_provided_attributes +/sqladmin:v1beta4/Settings/availabilityType: availability_type +/sqladmin:v1beta4/Settings/storageAutoResizeLimit: storage_auto_resize_limit diff --git a/generated/google/apis/adexchangebuyer2_v2beta1.rb b/generated/google/apis/adexchangebuyer2_v2beta1.rb index 3c2bc9c9f..d8fbe66a7 100644 --- a/generated/google/apis/adexchangebuyer2_v2beta1.rb +++ b/generated/google/apis/adexchangebuyer2_v2beta1.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/ad-exchange/buyer-rest/guides/client-access/ module Adexchangebuyer2V2beta1 VERSION = 'V2beta1' - REVISION = '20170123' + REVISION = '20170126' # Manage your Ad Exchange buyer account configuration AUTH_ADEXCHANGE_BUYER = 'https://www.googleapis.com/auth/adexchange.buyer' diff --git a/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb b/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb index 9fc4eb70c..868f8a533 100644 --- a/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +++ b/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb @@ -22,64 +22,18 @@ module Google module Apis module Adexchangebuyer2V2beta1 - # A client user is created under a client buyer and has restricted access to - # the Ad Exchange Marketplace and certain other sections - # of the Ad Exchange Buyer UI based on the role - # granted to the associated client buyer. - # The only way a new client user can be created is via accepting an - # email invitation - # (see the - # accounts.clients.invitations.create - # method). - # All fields are required unless otherwise specified. - class ClientUser - include Google::Apis::Core::Hashable - - # User's email address. The value of this field - # is ignored in an update operation. - # Corresponds to the JSON property `email` - # @return [String] - attr_accessor :email - - # Numerical account ID of the client buyer - # with which the user is associated; the - # buyer must be a client of the current sponsor buyer. - # The value of this field is ignored in an update operation. - # Corresponds to the JSON property `clientAccountId` - # @return [String] - attr_accessor :client_account_id - - # The status of the client user. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # The unique numerical ID of the client user - # that has accepted an invitation. - # The value of this field is ignored in an update operation. - # Corresponds to the JSON property `userId` - # @return [String] - attr_accessor :user_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @email = args[:email] if args.key?(:email) - @client_account_id = args[:client_account_id] if args.key?(:client_account_id) - @status = args[:status] if args.key?(:status) - @user_id = args[:user_id] if args.key?(:user_id) - end - end - # An invitation for a new client user to get access to the Ad Exchange # Buyer UI. # All fields are required unless otherwise specified. class ClientUserInvitation include Google::Apis::Core::Hashable + # The unique numerical ID of the invitation that is sent to the user. + # The value of this field is ignored in create operations. + # Corresponds to the JSON property `invitationId` + # @return [String] + attr_accessor :invitation_id + # The email address to which the invitation is sent. Email # addresses should be unique among all client users under each sponsor # buyer. @@ -94,11 +48,36 @@ module Google # @return [String] attr_accessor :client_account_id - # The unique numerical ID of the invitation that is sent to the user. - # The value of this field is ignored in create operations. - # Corresponds to the JSON property `invitationId` + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @invitation_id = args[:invitation_id] if args.key?(:invitation_id) + @email = args[:email] if args.key?(:email) + @client_account_id = args[:client_account_id] if args.key?(:client_account_id) + end + end + + # + class ListClientsResponse + include Google::Apis::Core::Hashable + + # The returned list of clients. + # Corresponds to the JSON property `clients` + # @return [Array] + attr_accessor :clients + + # A token to retrieve the next page of results. + # Pass this value in the + # ListClientsRequest.pageToken + # field in the subsequent call to the + # accounts.clients.list method + # to retrieve the next page of results. + # Corresponds to the JSON property `nextPageToken` # @return [String] - attr_accessor :invitation_id + attr_accessor :next_page_token def initialize(**args) update!(**args) @@ -106,9 +85,39 @@ module Google # Update properties of this object def update!(**args) - @email = args[:email] if args.key?(:email) - @client_account_id = args[:client_account_id] if args.key?(:client_account_id) - @invitation_id = args[:invitation_id] if args.key?(:invitation_id) + @clients = args[:clients] if args.key?(:clients) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # + class ListClientUsersResponse + include Google::Apis::Core::Hashable + + # A token to retrieve the next page of results. + # Pass this value in the + # ListClientUsersRequest.pageToken + # field in the subsequent call to the + # clients.invitations.list + # method to retrieve the next + # page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The returned list of client users. + # Corresponds to the JSON property `users` + # @return [Array] + attr_accessor :users + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @users = args[:users] if args.key?(:users) end end @@ -143,37 +152,6 @@ module Google end end - # - class ListClientUsersResponse - include Google::Apis::Core::Hashable - - # The returned list of client users. - # Corresponds to the JSON property `users` - # @return [Array] - attr_accessor :users - - # A token to retrieve the next page of results. - # Pass this value in the - # ListClientUsersRequest.pageToken - # field in the subsequent call to the - # clients.invitations.list - # method to retrieve the next - # page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @users = args[:users] if args.key?(:users) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - # A client resource represents a client buyer—an agency, # a brand, or an advertiser customer of the sponsor buyer. # Users associated with the client buyer have restricted access to @@ -184,11 +162,18 @@ module Google class Client include Google::Apis::Core::Hashable - # Whether the client buyer will be visible to sellers. - # Corresponds to the JSON property `visibleToSeller` - # @return [Boolean] - attr_accessor :visible_to_seller - alias_method :visible_to_seller?, :visible_to_seller + # The globally-unique numerical ID of the client. + # The value of this field is ignored in create and update operations. + # Corresponds to the JSON property `clientAccountId` + # @return [String] + attr_accessor :client_account_id + + # The name of the entity. This field is automatically fetched based on + # the type and ID. + # The value of this field is ignored in create and update operations. + # Corresponds to the JSON property `entityName` + # @return [String] + attr_accessor :entity_name # The status of the client buyer. # Corresponds to the JSON property `status` @@ -200,13 +185,6 @@ module Google # @return [String] attr_accessor :entity_type - # The role which is assigned to the client buyer. Each role implies a set of - # permissions granted to the client. Must be one of `CLIENT_DEAL_VIEWER`, - # `CLIENT_DEAL_NEGOTIATOR` or `CLIENT_DEAL_APPROVER`. - # Corresponds to the JSON property `role` - # @return [String] - attr_accessor :role - # Name used to represent this client to publishers. # You may have multiple clients that map to the same entity, # but for each client the combination of `clientName` and entity @@ -216,11 +194,18 @@ module Google # @return [String] attr_accessor :client_name - # The globally-unique numerical ID of the client. - # The value of this field is ignored in create and update operations. - # Corresponds to the JSON property `clientAccountId` + # The role which is assigned to the client buyer. Each role implies a set of + # permissions granted to the client. Must be one of `CLIENT_DEAL_VIEWER`, + # `CLIENT_DEAL_NEGOTIATOR` or `CLIENT_DEAL_APPROVER`. + # Corresponds to the JSON property `role` # @return [String] - attr_accessor :client_account_id + attr_accessor :role + + # Whether the client buyer will be visible to sellers. + # Corresponds to the JSON property `visibleToSeller` + # @return [Boolean] + attr_accessor :visible_to_seller + alias_method :visible_to_seller?, :visible_to_seller # Numerical identifier of the client entity. # The entity can be an advertiser, a brand, or an agency. @@ -240,48 +225,61 @@ module Google # @return [String] attr_accessor :entity_id - # The name of the entity. This field is automatically fetched based on - # the type and ID. - # The value of this field is ignored in create and update operations. - # Corresponds to the JSON property `entityName` - # @return [String] - attr_accessor :entity_name - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @visible_to_seller = args[:visible_to_seller] if args.key?(:visible_to_seller) + @client_account_id = args[:client_account_id] if args.key?(:client_account_id) + @entity_name = args[:entity_name] if args.key?(:entity_name) @status = args[:status] if args.key?(:status) @entity_type = args[:entity_type] if args.key?(:entity_type) - @role = args[:role] if args.key?(:role) @client_name = args[:client_name] if args.key?(:client_name) - @client_account_id = args[:client_account_id] if args.key?(:client_account_id) + @role = args[:role] if args.key?(:role) + @visible_to_seller = args[:visible_to_seller] if args.key?(:visible_to_seller) @entity_id = args[:entity_id] if args.key?(:entity_id) - @entity_name = args[:entity_name] if args.key?(:entity_name) end end - # - class ListClientsResponse + # A client user is created under a client buyer and has restricted access to + # the Ad Exchange Marketplace and certain other sections + # of the Ad Exchange Buyer UI based on the role + # granted to the associated client buyer. + # The only way a new client user can be created is via accepting an + # email invitation + # (see the + # accounts.clients.invitations.create + # method). + # All fields are required unless otherwise specified. + class ClientUser include Google::Apis::Core::Hashable - # A token to retrieve the next page of results. - # Pass this value in the - # ListClientsRequest.pageToken - # field in the subsequent call to the - # accounts.clients.list method - # to retrieve the next page of results. - # Corresponds to the JSON property `nextPageToken` + # Numerical account ID of the client buyer + # with which the user is associated; the + # buyer must be a client of the current sponsor buyer. + # The value of this field is ignored in an update operation. + # Corresponds to the JSON property `clientAccountId` # @return [String] - attr_accessor :next_page_token + attr_accessor :client_account_id - # The returned list of clients. - # Corresponds to the JSON property `clients` - # @return [Array] - attr_accessor :clients + # The status of the client user. + # Corresponds to the JSON property `status` + # @return [String] + attr_accessor :status + + # The unique numerical ID of the client user + # that has accepted an invitation. + # The value of this field is ignored in an update operation. + # Corresponds to the JSON property `userId` + # @return [String] + attr_accessor :user_id + + # User's email address. The value of this field + # is ignored in an update operation. + # Corresponds to the JSON property `email` + # @return [String] + attr_accessor :email def initialize(**args) update!(**args) @@ -289,8 +287,10 @@ module Google # Update properties of this object def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @clients = args[:clients] if args.key?(:clients) + @client_account_id = args[:client_account_id] if args.key?(:client_account_id) + @status = args[:status] if args.key?(:status) + @user_id = args[:user_id] if args.key?(:user_id) + @email = args[:email] if args.key?(:email) end end end diff --git a/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb b/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb index 22e246715..56b0e70b4 100644 --- a/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +++ b/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb @@ -22,58 +22,66 @@ module Google module Apis module Adexchangebuyer2V2beta1 - class ClientUser - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class ClientUserInvitation class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ListClientUserInvitationsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListClientUsersResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Client - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class ListClientsResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class ListClientUsersResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListClientUserInvitationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Client + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ClientUser - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :email, as: 'email' - property :client_account_id, as: 'clientAccountId' - property :status, as: 'status' - property :user_id, as: 'userId' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ClientUserInvitation # @private class Representation < Google::Apis::Core::JsonRepresentation + property :invitation_id, as: 'invitationId' property :email, as: 'email' property :client_account_id, as: 'clientAccountId' - property :invitation_id, as: 'invitationId' + end + end + + class ListClientsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :clients, as: 'clients', class: Google::Apis::Adexchangebuyer2V2beta1::Client, decorator: Google::Apis::Adexchangebuyer2V2beta1::Client::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ListClientUsersResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :users, as: 'users', class: Google::Apis::Adexchangebuyer2V2beta1::ClientUser, decorator: Google::Apis::Adexchangebuyer2V2beta1::ClientUser::Representation + end end @@ -86,35 +94,27 @@ module Google end end - class ListClientUsersResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :users, as: 'users', class: Google::Apis::Adexchangebuyer2V2beta1::ClientUser, decorator: Google::Apis::Adexchangebuyer2V2beta1::ClientUser::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - class Client # @private class Representation < Google::Apis::Core::JsonRepresentation - property :visible_to_seller, as: 'visibleToSeller' + property :client_account_id, as: 'clientAccountId' + property :entity_name, as: 'entityName' property :status, as: 'status' property :entity_type, as: 'entityType' - property :role, as: 'role' property :client_name, as: 'clientName' - property :client_account_id, as: 'clientAccountId' + property :role, as: 'role' + property :visible_to_seller, as: 'visibleToSeller' property :entity_id, as: 'entityId' - property :entity_name, as: 'entityName' end end - class ListClientsResponse + class ClientUser # @private class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :clients, as: 'clients', class: Google::Apis::Adexchangebuyer2V2beta1::Client, decorator: Google::Apis::Adexchangebuyer2V2beta1::Client::Representation - + property :client_account_id, as: 'clientAccountId' + property :status, as: 'status' + property :user_id, as: 'userId' + property :email, as: 'email' end end end diff --git a/generated/google/apis/adexchangebuyer2_v2beta1/service.rb b/generated/google/apis/adexchangebuyer2_v2beta1/service.rb index dc52176fc..c12475544 100644 --- a/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +++ b/generated/google/apis/adexchangebuyer2_v2beta1/service.rb @@ -47,53 +47,16 @@ module Google super('https://adexchangebuyer.googleapis.com/', '') end - # Updates an existing client buyer. - # @param [String] account_id - # Unique numerical account ID for the buyer of which the client buyer - # is a customer; the sponsor buyer to update a client for. (required) - # @param [String] client_account_id - # Unique numerical account ID of the client to update. (required) - # @param [Google::Apis::Adexchangebuyer2V2beta1::Client] client_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::Client] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::Adexchangebuyer2V2beta1::Client] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_account_client(account_id, client_account_id, client_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:put, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}', options) - command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::Client::Representation - command.request_object = client_object - command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Client::Representation - command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Client - command.params['accountId'] = account_id unless account_id.nil? - command.params['clientAccountId'] = client_account_id unless client_account_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - # Gets a client buyer with a given client account ID. # @param [String] account_id # Numerical account ID of the client's sponsor buyer. (required) # @param [String] client_account_id # Numerical account ID of the client buyer to retrieve. (required) + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -106,48 +69,14 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_account_client(account_id, client_account_id, quota_user: nil, fields: nil, options: nil, &block) + def get_account_client(account_id, client_account_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}', options) command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Client::Representation command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Client command.params['accountId'] = account_id unless account_id.nil? command.params['clientAccountId'] = client_account_id unless client_account_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Creates a new client buyer. - # @param [String] account_id - # Unique numerical account ID for the buyer of which the client buyer - # is a customer; the sponsor buyer to create a client for. (required) - # @param [Google::Apis::Adexchangebuyer2V2beta1::Client] client_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::Client] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::Adexchangebuyer2V2beta1::Client] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_account_client(account_id, client_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/clients', options) - command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::Client::Representation - command.request_object = client_object - command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Client::Representation - command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Client - command.params['accountId'] = account_id unless account_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -163,11 +92,11 @@ module Google # ListClientsResponse.nextPageToken # returned from the previous call to the # accounts.clients.list method. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -180,93 +109,86 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_account_clients(account_id, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_account_clients(account_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/clients', options) command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ListClientsResponse::Representation command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ListClientsResponse command.params['accountId'] = account_id unless account_id.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - # Updates an existing client user. - # Only the user status can be changed on update. + # Updates an existing client buyer. # @param [String] account_id - # Numerical account ID of the client's sponsor buyer. (required) + # Unique numerical account ID for the buyer of which the client buyer + # is a customer; the sponsor buyer to update a client for. (required) # @param [String] client_account_id - # Numerical account ID of the client buyer that the user to be retrieved - # is associated with. (required) - # @param [String] user_id - # Numerical identifier of the user to retrieve. (required) - # @param [Google::Apis::Adexchangebuyer2V2beta1::ClientUser] client_user_object + # Unique numerical account ID of the client to update. (required) + # @param [Google::Apis::Adexchangebuyer2V2beta1::Client] client_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::ClientUser] parsed result object + # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::Client] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::Adexchangebuyer2V2beta1::ClientUser] + # @return [Google::Apis::Adexchangebuyer2V2beta1::Client] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_account_client_user(account_id, client_account_id, user_id, client_user_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:put, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}', options) - command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUser::Representation - command.request_object = client_user_object - command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUser::Representation - command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ClientUser + def update_account_client(account_id, client_account_id, client_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}', options) + command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::Client::Representation + command.request_object = client_object + command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Client::Representation + command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Client command.params['accountId'] = account_id unless account_id.nil? command.params['clientAccountId'] = client_account_id unless client_account_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - # Retrieves an existing client user. + # Creates a new client buyer. # @param [String] account_id - # Numerical account ID of the client's sponsor buyer. (required) - # @param [String] client_account_id - # Numerical account ID of the client buyer - # that the user to be retrieved is associated with. (required) - # @param [String] user_id - # Numerical identifier of the user to retrieve. (required) + # Unique numerical account ID for the buyer of which the client buyer + # is a customer; the sponsor buyer to create a client for. (required) + # @param [Google::Apis::Adexchangebuyer2V2beta1::Client] client_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::ClientUser] parsed result object + # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::Client] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::Adexchangebuyer2V2beta1::ClientUser] + # @return [Google::Apis::Adexchangebuyer2V2beta1::Client] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_account_client_user(account_id, client_account_id, user_id, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}', options) - command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUser::Representation - command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ClientUser + def create_account_client(account_id, client_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/clients', options) + command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::Client::Representation + command.request_object = client_object + command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Client::Representation + command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Client command.params['accountId'] = account_id unless account_id.nil? - command.params['clientAccountId'] = client_account_id unless client_account_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -281,20 +203,20 @@ module Google # numerical account identifier or the `-` character # to list all the client users for all the clients # of a given sponsor buyer. - # @param [Fixnum] page_size - # Requested page size. The server may return fewer clients than requested. - # If unspecified, the server will pick an appropriate default. # @param [String] page_token # A token identifying a page of results the server should return. # Typically, this is the value of # ListClientUsersResponse.nextPageToken # returned from the previous call to the # accounts.clients.users.list method. + # @param [Fixnum] page_size + # Requested page size. The server may return fewer clients than requested. + # If unspecified, the server will pick an appropriate default. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -307,54 +229,94 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_account_client_users(account_id, client_account_id, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_account_client_users(account_id, client_account_id, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/users', options) command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ListClientUsersResponse::Representation command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ListClientUsersResponse command.params['accountId'] = account_id unless account_id.nil? command.params['clientAccountId'] = client_account_id unless client_account_id.nil? - command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['pageSize'] = page_size unless page_size.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - # Creates and sends out an email invitation to access - # an Ad Exchange client buyer account. + # Retrieves an existing client user. # @param [String] account_id # Numerical account ID of the client's sponsor buyer. (required) # @param [String] client_account_id - # Numerical account ID of the client buyer that the user - # should be associated with. (required) - # @param [Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation] client_user_invitation_object + # Numerical account ID of the client buyer + # that the user to be retrieved is associated with. (required) + # @param [String] user_id + # Numerical identifier of the user to retrieve. (required) + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation] parsed result object + # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::ClientUser] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation] + # @return [Google::Apis::Adexchangebuyer2V2beta1::ClientUser] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_account_client_invitation(account_id, client_account_id, client_user_invitation_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations', options) - command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation::Representation - command.request_object = client_user_invitation_object - command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation::Representation - command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation + def get_account_client_user(account_id, client_account_id, user_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}', options) + command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUser::Representation + command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ClientUser command.params['accountId'] = account_id unless account_id.nil? command.params['clientAccountId'] = client_account_id unless client_account_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? + command.params['userId'] = user_id unless user_id.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates an existing client user. + # Only the user status can be changed on update. + # @param [String] account_id + # Numerical account ID of the client's sponsor buyer. (required) + # @param [String] client_account_id + # Numerical account ID of the client buyer that the user to be retrieved + # is associated with. (required) + # @param [String] user_id + # Numerical identifier of the user to retrieve. (required) + # @param [Google::Apis::Adexchangebuyer2V2beta1::ClientUser] client_user_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::ClientUser] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::Adexchangebuyer2V2beta1::ClientUser] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_account_client_user(account_id, client_account_id, user_id, client_user_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}', options) + command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUser::Representation + command.request_object = client_user_object + command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUser::Representation + command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ClientUser + command.params['accountId'] = account_id unless account_id.nil? + command.params['clientAccountId'] = client_account_id unless client_account_id.nil? + command.params['userId'] = user_id unless user_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -366,11 +328,11 @@ module Google # to be retrieved is associated with. (required) # @param [String] invitation_id # Numerical identifier of the user invitation to retrieve. (required) + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -383,15 +345,15 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_account_client_invitation(account_id, client_account_id, invitation_id, quota_user: nil, fields: nil, options: nil, &block) + def get_account_client_invitation(account_id, client_account_id, invitation_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations/{invitationId}', options) command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation::Representation command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation command.params['accountId'] = account_id unless account_id.nil? command.params['clientAccountId'] = client_account_id unless client_account_id.nil? command.params['invitationId'] = invitation_id unless invitation_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -416,11 +378,11 @@ module Google # returned from the previous call to the # clients.invitations.list # method. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -433,7 +395,7 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_account_client_invitations(account_id, client_account_id, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_account_client_invitations(account_id, client_account_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations', options) command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ListClientUserInvitationsResponse::Representation command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ListClientUserInvitationsResponse @@ -441,8 +403,46 @@ module Google command.params['clientAccountId'] = client_account_id unless client_account_id.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates and sends out an email invitation to access + # an Ad Exchange client buyer account. + # @param [String] account_id + # Numerical account ID of the client's sponsor buyer. (required) + # @param [String] client_account_id + # Numerical account ID of the client buyer that the user + # should be associated with. (required) + # @param [Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation] client_user_invitation_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_account_client_invitation(account_id, client_account_id, client_user_invitation_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations', options) + command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation::Representation + command.request_object = client_user_invitation_object + command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation::Representation + command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation + command.params['accountId'] = account_id unless account_id.nil? + command.params['clientAccountId'] = client_account_id unless client_account_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/adsense_v1_4.rb b/generated/google/apis/adsense_v1_4.rb index a945a3672..221b7f2ef 100644 --- a/generated/google/apis/adsense_v1_4.rb +++ b/generated/google/apis/adsense_v1_4.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/adsense/management/ module AdsenseV1_4 VERSION = 'V1_4' - REVISION = '20170123' + REVISION = '20170125' # View and manage your AdSense data AUTH_ADSENSE = 'https://www.googleapis.com/auth/adsense' diff --git a/generated/google/apis/adsensehost_v4_1.rb b/generated/google/apis/adsensehost_v4_1.rb index aa61c465b..84afe176a 100644 --- a/generated/google/apis/adsensehost_v4_1.rb +++ b/generated/google/apis/adsensehost_v4_1.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/adsense/host/ module AdsensehostV4_1 VERSION = 'V4_1' - REVISION = '20170123' + REVISION = '20170125' # View and manage your AdSense host data and associated accounts AUTH_ADSENSEHOST = 'https://www.googleapis.com/auth/adsensehost' diff --git a/generated/google/apis/calendar_v3.rb b/generated/google/apis/calendar_v3.rb index b3af88a87..715a48b5b 100644 --- a/generated/google/apis/calendar_v3.rb +++ b/generated/google/apis/calendar_v3.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/google-apps/calendar/firstapp module CalendarV3 VERSION = 'V3' - REVISION = '20170115' + REVISION = '20170124' # Manage your calendars AUTH_CALENDAR = 'https://www.googleapis.com/auth/calendar' diff --git a/generated/google/apis/cloudbuild_v1.rb b/generated/google/apis/cloudbuild_v1.rb index 835edbaa2..dbb368e64 100644 --- a/generated/google/apis/cloudbuild_v1.rb +++ b/generated/google/apis/cloudbuild_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/container-builder/docs/ module CloudbuildV1 VERSION = 'V1' - REVISION = '20170124' + REVISION = '20170126' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/cloudbuild_v1/classes.rb b/generated/google/apis/cloudbuild_v1/classes.rb index 812ae7269..5c6b5fd36 100644 --- a/generated/google/apis/cloudbuild_v1/classes.rb +++ b/generated/google/apis/cloudbuild_v1/classes.rb @@ -22,6 +22,264 @@ module Google module Apis module CloudbuildV1 + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # service Foo ` + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # ` + # The JSON representation for `Empty` is empty JSON object ````. + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Configuration for an automated build in response to source repository + # changes. + class BuildTrigger + include Google::Apis::Core::Hashable + + # Unique identifier of the trigger. + # @OutputOnly + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # A build resource in the Container Builder API. + # At a high level, a Build describes where to find source code, how to build + # it (for example, the builder image to run on the source), and what tag to + # apply to the built image when it is pushed to Google Container Registry. + # Fields can include the following variables which will be expanded when the + # build is created: + # - $PROJECT_ID: the project ID of the build. + # - $BUILD_ID: the autogenerated ID of the build. + # - $REPO_NAME: the source repository name specified by RepoSource. + # - $BRANCH_NAME: the branch name specified by RepoSource. + # - $TAG_NAME: the tag name specified by RepoSource. + # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or + # resolved from the specified branch or tag. + # Corresponds to the JSON property `build` + # @return [Google::Apis::CloudbuildV1::Build] + attr_accessor :build + + # Human-readable description of this trigger. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # If true, the trigger will never result in a build. + # Corresponds to the JSON property `disabled` + # @return [Boolean] + attr_accessor :disabled + alias_method :disabled?, :disabled + + # Time when the trigger was created. + # @OutputOnly + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Path, from the source root, to a file whose contents is used for the + # template. + # Corresponds to the JSON property `filename` + # @return [String] + attr_accessor :filename + + # RepoSource describes the location of the source in a Google Cloud Source + # Repository. + # Corresponds to the JSON property `triggerTemplate` + # @return [Google::Apis::CloudbuildV1::RepoSource] + attr_accessor :trigger_template + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @id = args[:id] if args.key?(:id) + @build = args[:build] if args.key?(:build) + @description = args[:description] if args.key?(:description) + @disabled = args[:disabled] if args.key?(:disabled) + @create_time = args[:create_time] if args.key?(:create_time) + @filename = args[:filename] if args.key?(:filename) + @trigger_template = args[:trigger_template] if args.key?(:trigger_template) + end + end + + # A build resource in the Container Builder API. + # At a high level, a Build describes where to find source code, how to build + # it (for example, the builder image to run on the source), and what tag to + # apply to the built image when it is pushed to Google Container Registry. + # Fields can include the following variables which will be expanded when the + # build is created: + # - $PROJECT_ID: the project ID of the build. + # - $BUILD_ID: the autogenerated ID of the build. + # - $REPO_NAME: the source repository name specified by RepoSource. + # - $BRANCH_NAME: the branch name specified by RepoSource. + # - $TAG_NAME: the tag name specified by RepoSource. + # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or + # resolved from the specified branch or tag. + class Build + include Google::Apis::Core::Hashable + + # Time at which execution of the build was started. + # @OutputOnly + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + # Provenance of the source. Ways to find the original source, or verify that + # some source was used for this build. + # Corresponds to the JSON property `sourceProvenance` + # @return [Google::Apis::CloudbuildV1::SourceProvenance] + attr_accessor :source_provenance + + # Time at which the request to create the build was received. + # @OutputOnly + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # A list of images to be pushed upon the successful completion of all build + # steps. + # The images will be pushed using the builder service account's credentials. + # The digests of the pushed images will be stored in the Build resource's + # results field. + # If any of the images fail to be pushed, the build is marked FAILURE. + # Corresponds to the JSON property `images` + # @return [Array] + attr_accessor :images + + # ID of the project. + # @OutputOnly. + # Corresponds to the JSON property `projectId` + # @return [String] + attr_accessor :project_id + + # URL to logs for this build in Google Cloud Logging. + # @OutputOnly + # Corresponds to the JSON property `logUrl` + # @return [String] + attr_accessor :log_url + + # Time at which execution of the build was finished. + # The difference between finish_time and start_time is the duration of the + # build's execution. + # @OutputOnly + # Corresponds to the JSON property `finishTime` + # @return [String] + attr_accessor :finish_time + + # Source describes the location of the source in a supported storage + # service. + # Corresponds to the JSON property `source` + # @return [Google::Apis::CloudbuildV1::Source] + attr_accessor :source + + # Optional arguments to enable specific features of builds. + # Corresponds to the JSON property `options` + # @return [Google::Apis::CloudbuildV1::BuildOptions] + attr_accessor :options + + # Customer-readable message about the current status. + # @OutputOnly + # Corresponds to the JSON property `statusDetail` + # @return [String] + attr_accessor :status_detail + + # Status of the build. + # @OutputOnly + # Corresponds to the JSON property `status` + # @return [String] + attr_accessor :status + + # Amount of time that this build should be allowed to run, to second + # granularity. If this amount of time elapses, work on the build will cease + # and the build status will be TIMEOUT. + # Default time is ten minutes. + # Corresponds to the JSON property `timeout` + # @return [String] + attr_accessor :timeout + + # Google Cloud Storage bucket where logs should be written (see + # [Bucket Name + # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements) + # ). + # Logs file names will be of the format `$`logs_bucket`/log-$`build_id`.txt`. + # Corresponds to the JSON property `logsBucket` + # @return [String] + attr_accessor :logs_bucket + + # Results describes the artifacts created by the build pipeline. + # Corresponds to the JSON property `results` + # @return [Google::Apis::CloudbuildV1::Results] + attr_accessor :results + + # Describes the operations to be performed on the workspace. + # Corresponds to the JSON property `steps` + # @return [Array] + attr_accessor :steps + + # The ID of the BuildTrigger that triggered this build, if it was + # triggered automatically. + # @OutputOnly + # Corresponds to the JSON property `buildTriggerId` + # @return [String] + attr_accessor :build_trigger_id + + # Unique identifier of the build. + # @OutputOnly + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @start_time = args[:start_time] if args.key?(:start_time) + @source_provenance = args[:source_provenance] if args.key?(:source_provenance) + @create_time = args[:create_time] if args.key?(:create_time) + @images = args[:images] if args.key?(:images) + @project_id = args[:project_id] if args.key?(:project_id) + @log_url = args[:log_url] if args.key?(:log_url) + @finish_time = args[:finish_time] if args.key?(:finish_time) + @source = args[:source] if args.key?(:source) + @options = args[:options] if args.key?(:options) + @status_detail = args[:status_detail] if args.key?(:status_detail) + @status = args[:status] if args.key?(:status) + @timeout = args[:timeout] if args.key?(:timeout) + @logs_bucket = args[:logs_bucket] if args.key?(:logs_bucket) + @results = args[:results] if args.key?(:results) + @steps = args[:steps] if args.key?(:steps) + @build_trigger_id = args[:build_trigger_id] if args.key?(:build_trigger_id) + @id = args[:id] if args.key?(:id) + end + end + + # Request to cancel an ongoing build. + class CancelBuildRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + # Response including listed builds. class ListBuildsResponse include Google::Apis::Core::Hashable @@ -167,24 +425,24 @@ module Google class Results include Google::Apis::Core::Hashable - # Images that were built as a part of the build. - # Corresponds to the JSON property `images` - # @return [Array] - attr_accessor :images - # List of build step digests, in order corresponding to build step indices. # Corresponds to the JSON property `buildStepImages` # @return [Array] attr_accessor :build_step_images + # Images that were built as a part of the build. + # Corresponds to the JSON property `images` + # @return [Array] + attr_accessor :images + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @images = args[:images] if args.key?(:images) @build_step_images = args[:build_step_images] if args.key?(:build_step_images) + @images = args[:images] if args.key?(:images) end end @@ -278,26 +536,6 @@ module Google class Operation include Google::Apis::Core::Hashable - # If the value is `false`, it means the operation is still in progress. - # If true, the operation is completed, and either `error` or `response` is - # available. - # Corresponds to the JSON property `done` - # @return [Boolean] - attr_accessor :done - alias_method :done?, :done - - # The normal response of the operation in case of success. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # Corresponds to the JSON property `response` - # @return [Hash] - attr_accessor :response - # The server-assigned name, which is only unique within the same service that # originally returns it. If you use the default HTTP mapping, the # `name` should have the format of `operations/some/unique/name`. @@ -356,17 +594,37 @@ module Google # @return [Hash] attr_accessor :metadata + # If the value is `false`, it means the operation is still in progress. + # If true, the operation is completed, and either `error` or `response` is + # available. + # Corresponds to the JSON property `done` + # @return [Boolean] + attr_accessor :done + alias_method :done?, :done + + # The normal response of the operation in case of success. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # Corresponds to the JSON property `response` + # @return [Hash] + attr_accessor :response + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @done = args[:done] if args.key?(:done) - @response = args[:response] if args.key?(:response) @name = args[:name] if args.key?(:name) @error = args[:error] if args.key?(:error) @metadata = args[:metadata] if args.key?(:metadata) + @done = args[:done] if args.key?(:done) + @response = args[:response] if args.key?(:response) end end @@ -419,6 +677,43 @@ module Google class BuildStep include Google::Apis::Core::Hashable + # Optional unique identifier for this build step, used in wait_for to + # reference this build step as a dependency. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Working directory (relative to project source root) to use when running + # this operation's container. + # Corresponds to the JSON property `dir` + # @return [String] + attr_accessor :dir + + # A list of environment variable definitions to be used when running a step. + # The elements are of the form "KEY=VALUE" for the environment variable "KEY" + # being given the value "VALUE". + # Corresponds to the JSON property `env` + # @return [Array] + attr_accessor :env + + # The ID(s) of the step(s) that this build step depends on. + # This build step will not start until all the build steps in wait_for + # have completed successfully. If wait_for is empty, this build step will + # start when all previous build steps in the Build.Steps list have completed + # successfully. + # Corresponds to the JSON property `waitFor` + # @return [Array] + attr_accessor :wait_for + + # A list of arguments that will be presented to the step when it is started. + # If the image used to run the step's container has an entrypoint, these args + # will be used as arguments to that entrypoint. If the image does not define + # an entrypoint, the first element in args will be used as the entrypoint, + # and the remainder will be used as arguments. + # Corresponds to the JSON property `args` + # @return [Array] + attr_accessor :args + # The name of the container image that will run this particular build step. # If the image is already available in the host's Docker daemon's cache, it # will be run directly. If not, the host will attempt to pull the image @@ -442,56 +737,19 @@ module Google # @return [String] attr_accessor :entrypoint - # Optional unique identifier for this build step, used in wait_for to - # reference this build step as a dependency. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Working directory (relative to project source root) to use when running - # this operation's container. - # Corresponds to the JSON property `dir` - # @return [String] - attr_accessor :dir - - # The ID(s) of the step(s) that this build step depends on. - # This build step will not start until all the build steps in wait_for - # have completed successfully. If wait_for is empty, this build step will - # start when all previous build steps in the Build.Steps list have completed - # successfully. - # Corresponds to the JSON property `waitFor` - # @return [Array] - attr_accessor :wait_for - - # A list of environment variable definitions to be used when running a step. - # The elements are of the form "KEY=VALUE" for the environment variable "KEY" - # being given the value "VALUE". - # Corresponds to the JSON property `env` - # @return [Array] - attr_accessor :env - - # A list of arguments that will be presented to the step when it is started. - # If the image used to run the step's container has an entrypoint, these args - # will be used as arguments to that entrypoint. If the image does not define - # an entrypoint, the first element in args will be used as the entrypoint, - # and the remainder will be used as arguments. - # Corresponds to the JSON property `args` - # @return [Array] - attr_accessor :args - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @name = args[:name] if args.key?(:name) - @entrypoint = args[:entrypoint] if args.key?(:entrypoint) @id = args[:id] if args.key?(:id) @dir = args[:dir] if args.key?(:dir) - @wait_for = args[:wait_for] if args.key?(:wait_for) @env = args[:env] if args.key?(:env) + @wait_for = args[:wait_for] if args.key?(:wait_for) @args = args[:args] if args.key?(:args) + @name = args[:name] if args.key?(:name) + @entrypoint = args[:entrypoint] if args.key?(:entrypoint) end end @@ -500,16 +758,6 @@ module Google class RepoSource include Google::Apis::Core::Hashable - # Name of the tag to build. - # Corresponds to the JSON property `tagName` - # @return [String] - attr_accessor :tag_name - - # Explicit commit SHA to build. - # Corresponds to the JSON property `commitSha` - # @return [String] - attr_accessor :commit_sha - # ID of the project that owns the repo. If omitted, the project ID requesting # the build is assumed. # Corresponds to the JSON property `projectId` @@ -526,17 +774,27 @@ module Google # @return [String] attr_accessor :branch_name + # Name of the tag to build. + # Corresponds to the JSON property `tagName` + # @return [String] + attr_accessor :tag_name + + # Explicit commit SHA to build. + # Corresponds to the JSON property `commitSha` + # @return [String] + attr_accessor :commit_sha + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @tag_name = args[:tag_name] if args.key?(:tag_name) - @commit_sha = args[:commit_sha] if args.key?(:commit_sha) @project_id = args[:project_id] if args.key?(:project_id) @repo_name = args[:repo_name] if args.key?(:repo_name) @branch_name = args[:branch_name] if args.key?(:branch_name) + @tag_name = args[:tag_name] if args.key?(:tag_name) + @commit_sha = args[:commit_sha] if args.key?(:commit_sha) end end @@ -656,264 +914,6 @@ module Google @code = args[:code] if args.key?(:code) end end - - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # service Foo ` - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # ` - # The JSON representation for `Empty` is empty JSON object ````. - class Empty - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # Configuration for an automated build in response to source repository - # changes. - class BuildTrigger - include Google::Apis::Core::Hashable - - # Time when the trigger was created. - # @OutputOnly - # Corresponds to the JSON property `createTime` - # @return [String] - attr_accessor :create_time - - # If true, the trigger will never result in a build. - # Corresponds to the JSON property `disabled` - # @return [Boolean] - attr_accessor :disabled - alias_method :disabled?, :disabled - - # RepoSource describes the location of the source in a Google Cloud Source - # Repository. - # Corresponds to the JSON property `triggerTemplate` - # @return [Google::Apis::CloudbuildV1::RepoSource] - attr_accessor :trigger_template - - # Path, from the source root, to a file whose contents is used for the - # template. - # Corresponds to the JSON property `filename` - # @return [String] - attr_accessor :filename - - # Unique identifier of the trigger. - # @OutputOnly - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # A build resource in the Container Builder API. - # At a high level, a Build describes where to find source code, how to build - # it (for example, the builder image to run on the source), and what tag to - # apply to the built image when it is pushed to Google Container Registry. - # Fields can include the following variables which will be expanded when the - # build is created: - # - $PROJECT_ID: the project ID of the build. - # - $BUILD_ID: the autogenerated ID of the build. - # - $REPO_NAME: the source repository name specified by RepoSource. - # - $BRANCH_NAME: the branch name specified by RepoSource. - # - $TAG_NAME: the tag name specified by RepoSource. - # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or - # resolved from the specified branch or tag. - # Corresponds to the JSON property `build` - # @return [Google::Apis::CloudbuildV1::Build] - attr_accessor :build - - # Human-readable description of this trigger. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @create_time = args[:create_time] if args.key?(:create_time) - @disabled = args[:disabled] if args.key?(:disabled) - @trigger_template = args[:trigger_template] if args.key?(:trigger_template) - @filename = args[:filename] if args.key?(:filename) - @id = args[:id] if args.key?(:id) - @build = args[:build] if args.key?(:build) - @description = args[:description] if args.key?(:description) - end - end - - # A build resource in the Container Builder API. - # At a high level, a Build describes where to find source code, how to build - # it (for example, the builder image to run on the source), and what tag to - # apply to the built image when it is pushed to Google Container Registry. - # Fields can include the following variables which will be expanded when the - # build is created: - # - $PROJECT_ID: the project ID of the build. - # - $BUILD_ID: the autogenerated ID of the build. - # - $REPO_NAME: the source repository name specified by RepoSource. - # - $BRANCH_NAME: the branch name specified by RepoSource. - # - $TAG_NAME: the tag name specified by RepoSource. - # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or - # resolved from the specified branch or tag. - class Build - include Google::Apis::Core::Hashable - - # Time at which the request to create the build was received. - # @OutputOnly - # Corresponds to the JSON property `createTime` - # @return [String] - attr_accessor :create_time - - # Provenance of the source. Ways to find the original source, or verify that - # some source was used for this build. - # Corresponds to the JSON property `sourceProvenance` - # @return [Google::Apis::CloudbuildV1::SourceProvenance] - attr_accessor :source_provenance - - # A list of images to be pushed upon the successful completion of all build - # steps. - # The images will be pushed using the builder service account's credentials. - # The digests of the pushed images will be stored in the Build resource's - # results field. - # If any of the images fail to be pushed, the build is marked FAILURE. - # Corresponds to the JSON property `images` - # @return [Array] - attr_accessor :images - - # ID of the project. - # @OutputOnly. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # URL to logs for this build in Google Cloud Logging. - # @OutputOnly - # Corresponds to the JSON property `logUrl` - # @return [String] - attr_accessor :log_url - - # Time at which execution of the build was finished. - # The difference between finish_time and start_time is the duration of the - # build's execution. - # @OutputOnly - # Corresponds to the JSON property `finishTime` - # @return [String] - attr_accessor :finish_time - - # Source describes the location of the source in a supported storage - # service. - # Corresponds to the JSON property `source` - # @return [Google::Apis::CloudbuildV1::Source] - attr_accessor :source - - # Optional arguments to enable specific features of builds. - # Corresponds to the JSON property `options` - # @return [Google::Apis::CloudbuildV1::BuildOptions] - attr_accessor :options - - # Customer-readable message about the current status. - # @OutputOnly - # Corresponds to the JSON property `statusDetail` - # @return [String] - attr_accessor :status_detail - - # Status of the build. - # @OutputOnly - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # Amount of time that this build should be allowed to run, to second - # granularity. If this amount of time elapses, work on the build will cease - # and the build status will be TIMEOUT. - # Default time is ten minutes. - # Corresponds to the JSON property `timeout` - # @return [String] - attr_accessor :timeout - - # Results describes the artifacts created by the build pipeline. - # Corresponds to the JSON property `results` - # @return [Google::Apis::CloudbuildV1::Results] - attr_accessor :results - - # Google Cloud Storage bucket where logs should be written (see - # [Bucket Name - # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements) - # ). - # Logs file names will be of the format `$`logs_bucket`/log-$`build_id`.txt`. - # Corresponds to the JSON property `logsBucket` - # @return [String] - attr_accessor :logs_bucket - - # Describes the operations to be performed on the workspace. - # Corresponds to the JSON property `steps` - # @return [Array] - attr_accessor :steps - - # The ID of the BuildTrigger that triggered this build, if it was - # triggered automatically. - # @OutputOnly - # Corresponds to the JSON property `buildTriggerId` - # @return [String] - attr_accessor :build_trigger_id - - # Unique identifier of the build. - # @OutputOnly - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Time at which execution of the build was started. - # @OutputOnly - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @create_time = args[:create_time] if args.key?(:create_time) - @source_provenance = args[:source_provenance] if args.key?(:source_provenance) - @images = args[:images] if args.key?(:images) - @project_id = args[:project_id] if args.key?(:project_id) - @log_url = args[:log_url] if args.key?(:log_url) - @finish_time = args[:finish_time] if args.key?(:finish_time) - @source = args[:source] if args.key?(:source) - @options = args[:options] if args.key?(:options) - @status_detail = args[:status_detail] if args.key?(:status_detail) - @status = args[:status] if args.key?(:status) - @timeout = args[:timeout] if args.key?(:timeout) - @results = args[:results] if args.key?(:results) - @logs_bucket = args[:logs_bucket] if args.key?(:logs_bucket) - @steps = args[:steps] if args.key?(:steps) - @build_trigger_id = args[:build_trigger_id] if args.key?(:build_trigger_id) - @id = args[:id] if args.key?(:id) - @start_time = args[:start_time] if args.key?(:start_time) - end - end - - # Request to cancel an ongoing build. - class CancelBuildRequest - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end end end end diff --git a/generated/google/apis/cloudbuild_v1/representations.rb b/generated/google/apis/cloudbuild_v1/representations.rb index b654e1ad5..d55ca82f5 100644 --- a/generated/google/apis/cloudbuild_v1/representations.rb +++ b/generated/google/apis/cloudbuild_v1/representations.rb @@ -22,6 +22,30 @@ module Google module Apis module CloudbuildV1 + class Empty + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BuildTrigger + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Build + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CancelBuildRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ListBuildsResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -125,27 +149,58 @@ module Google end class Empty - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end end class BuildTrigger - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :id, as: 'id' + property :build, as: 'build', class: Google::Apis::CloudbuildV1::Build, decorator: Google::Apis::CloudbuildV1::Build::Representation - include Google::Apis::Core::JsonObjectSupport + property :description, as: 'description' + property :disabled, as: 'disabled' + property :create_time, as: 'createTime' + property :filename, as: 'filename' + property :trigger_template, as: 'triggerTemplate', class: Google::Apis::CloudbuildV1::RepoSource, decorator: Google::Apis::CloudbuildV1::RepoSource::Representation + + end end class Build - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :start_time, as: 'startTime' + property :source_provenance, as: 'sourceProvenance', class: Google::Apis::CloudbuildV1::SourceProvenance, decorator: Google::Apis::CloudbuildV1::SourceProvenance::Representation - include Google::Apis::Core::JsonObjectSupport + property :create_time, as: 'createTime' + collection :images, as: 'images' + property :project_id, as: 'projectId' + property :log_url, as: 'logUrl' + property :finish_time, as: 'finishTime' + property :source, as: 'source', class: Google::Apis::CloudbuildV1::Source, decorator: Google::Apis::CloudbuildV1::Source::Representation + + property :options, as: 'options', class: Google::Apis::CloudbuildV1::BuildOptions, decorator: Google::Apis::CloudbuildV1::BuildOptions::Representation + + property :status_detail, as: 'statusDetail' + property :status, as: 'status' + property :timeout, as: 'timeout' + property :logs_bucket, as: 'logsBucket' + property :results, as: 'results', class: Google::Apis::CloudbuildV1::Results, decorator: Google::Apis::CloudbuildV1::Results::Representation + + collection :steps, as: 'steps', class: Google::Apis::CloudbuildV1::BuildStep, decorator: Google::Apis::CloudbuildV1::BuildStep::Representation + + property :build_trigger_id, as: 'buildTriggerId' + property :id, as: 'id' + end end class CancelBuildRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end end class ListBuildsResponse @@ -196,9 +251,9 @@ module Google class Results # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :build_step_images, as: 'buildStepImages' collection :images, as: 'images', class: Google::Apis::CloudbuildV1::BuiltImage, decorator: Google::Apis::CloudbuildV1::BuiltImage::Representation - collection :build_step_images, as: 'buildStepImages' end end @@ -231,12 +286,12 @@ module Google class Operation # @private class Representation < Google::Apis::Core::JsonRepresentation - property :done, as: 'done' - hash :response, as: 'response' property :name, as: 'name' property :error, as: 'error', class: Google::Apis::CloudbuildV1::Status, decorator: Google::Apis::CloudbuildV1::Status::Representation hash :metadata, as: 'metadata' + property :done, as: 'done' + hash :response, as: 'response' end end @@ -259,24 +314,24 @@ module Google class BuildStep # @private class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :entrypoint, as: 'entrypoint' property :id, as: 'id' property :dir, as: 'dir' - collection :wait_for, as: 'waitFor' collection :env, as: 'env' + collection :wait_for, as: 'waitFor' collection :args, as: 'args' + property :name, as: 'name' + property :entrypoint, as: 'entrypoint' end end class RepoSource # @private class Representation < Google::Apis::Core::JsonRepresentation - property :tag_name, as: 'tagName' - property :commit_sha, as: 'commitSha' property :project_id, as: 'projectId' property :repo_name, as: 'repoName' property :branch_name, as: 'branchName' + property :tag_name, as: 'tagName' + property :commit_sha, as: 'commitSha' end end @@ -304,61 +359,6 @@ module Google property :code, as: 'code' end end - - class Empty - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - class BuildTrigger - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :create_time, as: 'createTime' - property :disabled, as: 'disabled' - property :trigger_template, as: 'triggerTemplate', class: Google::Apis::CloudbuildV1::RepoSource, decorator: Google::Apis::CloudbuildV1::RepoSource::Representation - - property :filename, as: 'filename' - property :id, as: 'id' - property :build, as: 'build', class: Google::Apis::CloudbuildV1::Build, decorator: Google::Apis::CloudbuildV1::Build::Representation - - property :description, as: 'description' - end - end - - class Build - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :create_time, as: 'createTime' - property :source_provenance, as: 'sourceProvenance', class: Google::Apis::CloudbuildV1::SourceProvenance, decorator: Google::Apis::CloudbuildV1::SourceProvenance::Representation - - collection :images, as: 'images' - property :project_id, as: 'projectId' - property :log_url, as: 'logUrl' - property :finish_time, as: 'finishTime' - property :source, as: 'source', class: Google::Apis::CloudbuildV1::Source, decorator: Google::Apis::CloudbuildV1::Source::Representation - - property :options, as: 'options', class: Google::Apis::CloudbuildV1::BuildOptions, decorator: Google::Apis::CloudbuildV1::BuildOptions::Representation - - property :status_detail, as: 'statusDetail' - property :status, as: 'status' - property :timeout, as: 'timeout' - property :results, as: 'results', class: Google::Apis::CloudbuildV1::Results, decorator: Google::Apis::CloudbuildV1::Results::Representation - - property :logs_bucket, as: 'logsBucket' - collection :steps, as: 'steps', class: Google::Apis::CloudbuildV1::BuildStep, decorator: Google::Apis::CloudbuildV1::BuildStep::Representation - - property :build_trigger_id, as: 'buildTriggerId' - property :id, as: 'id' - property :start_time, as: 'startTime' - end - end - - class CancelBuildRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end end end end diff --git a/generated/google/apis/cloudbuild_v1/service.rb b/generated/google/apis/cloudbuild_v1/service.rb index d1e6dbb6e..b7407481c 100644 --- a/generated/google/apis/cloudbuild_v1/service.rb +++ b/generated/google/apis/cloudbuild_v1/service.rb @@ -46,6 +46,42 @@ module Google super('https://cloudbuild.googleapis.com/', '') end + # Starts a build with the specified configuration. + # The long-running Operation returned by this method will include the ID of + # the build, which can be passed to GetBuild to determine its status (e.g., + # success or failure). + # @param [String] project_id + # ID of the project. + # @param [Google::Apis::CloudbuildV1::Build] build_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudbuildV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudbuildV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_build(project_id, build_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/projects/{projectId}/builds', options) + command.request_representation = Google::Apis::CloudbuildV1::Build::Representation + command.request_object = build_object + command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation + command.response_class = Google::Apis::CloudbuildV1::Operation + command.params['projectId'] = project_id unless project_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Cancels a requested build in progress. # @param [String] project_id # ID of the project. @@ -122,12 +158,12 @@ module Google # successfully or unsuccessfully. # @param [String] project_id # ID of the project. + # @param [String] filter + # The raw filter text to constrain the results. # @param [String] page_token # Token to provide to skip to a particular spot in the list. # @param [Fixnum] page_size # Number of results to return in the list. - # @param [String] filter - # The raw filter text to constrain the results. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -145,50 +181,14 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_project_builds(project_id, page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_project_builds(project_id, filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/projects/{projectId}/builds', options) command.response_representation = Google::Apis::CloudbuildV1::ListBuildsResponse::Representation command.response_class = Google::Apis::CloudbuildV1::ListBuildsResponse command.params['projectId'] = project_id unless project_id.nil? + command.query['filter'] = filter unless filter.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['filter'] = filter unless filter.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Starts a build with the specified configuration. - # The long-running Operation returned by this method will include the ID of - # the build, which can be passed to GetBuild to determine its status (e.g., - # success or failure). - # @param [String] project_id - # ID of the project. - # @param [Google::Apis::CloudbuildV1::Build] build_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudbuildV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudbuildV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_project_build(project_id, build_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/projects/{projectId}/builds', options) - command.request_representation = Google::Apis::CloudbuildV1::Build::Representation - command.request_object = build_object - command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation - command.response_class = Google::Apis::CloudbuildV1::Operation - command.params['projectId'] = project_id unless project_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) @@ -364,6 +364,80 @@ module Google execute_or_queue_command(command, &block) end + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # NOTE: the `name` binding below allows API services to override the binding + # to use different resource name schemes, such as `users/*/operations`. + # @param [String] name + # The name of the operation collection. + # @param [String] page_token + # The standard list page token. + # @param [Fixnum] page_size + # The standard list page size. + # @param [String] filter + # The standard list filter. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudbuildV1::ListOperationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudbuildV1::ListOperationsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_operations(name, page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::CloudbuildV1::ListOperationsResponse::Representation + command.response_class = Google::Apis::CloudbuildV1::ListOperationsResponse + command.params['name'] = name unless name.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['filter'] = filter unless filter.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # @param [String] name + # The name of the operation resource. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudbuildV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudbuildV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation + command.response_class = Google::Apis::CloudbuildV1::Operation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Starts asynchronous cancellation on a long-running operation. The server # makes a best effort to cancel the operation, but success is not # guaranteed. If the server doesn't support this method, it returns @@ -405,80 +479,6 @@ module Google command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # NOTE: the `name` binding below allows API services to override the binding - # to use different resource name schemes, such as `users/*/operations`. - # @param [String] name - # The name of the operation collection. - # @param [String] filter - # The standard list filter. - # @param [String] page_token - # The standard list page token. - # @param [Fixnum] page_size - # The standard list page size. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudbuildV1::ListOperationsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudbuildV1::ListOperationsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_operations(name, filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+name}', options) - command.response_representation = Google::Apis::CloudbuildV1::ListOperationsResponse::Representation - command.response_class = Google::Apis::CloudbuildV1::ListOperationsResponse - command.params['name'] = name unless name.nil? - command.query['filter'] = filter unless filter.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # @param [String] name - # The name of the operation resource. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudbuildV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudbuildV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_operation(name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+name}', options) - command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation - command.response_class = Google::Apis::CloudbuildV1::Operation - command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end protected diff --git a/generated/google/apis/cloudkms_v1beta1.rb b/generated/google/apis/cloudkms_v1beta1.rb new file mode 100644 index 000000000..8ebc19fde --- /dev/null +++ b/generated/google/apis/cloudkms_v1beta1.rb @@ -0,0 +1,34 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/cloudkms_v1beta1/service.rb' +require 'google/apis/cloudkms_v1beta1/classes.rb' +require 'google/apis/cloudkms_v1beta1/representations.rb' + +module Google + module Apis + # Google Cloud KMS API + # + # + # + # @see https://cloud.google.com/kms/ + module CloudkmsV1beta1 + VERSION = 'V1beta1' + REVISION = '20170117' + + # View and manage your data across Google Cloud Platform services + AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' + end + end +end diff --git a/generated/google/apis/cloudkms_v1beta1/classes.rb b/generated/google/apis/cloudkms_v1beta1/classes.rb new file mode 100644 index 000000000..a03b247f3 --- /dev/null +++ b/generated/google/apis/cloudkms_v1beta1/classes.rb @@ -0,0 +1,999 @@ +# 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 CloudkmsV1beta1 + + # Write a Cloud Audit log + class CloudAuditOptions + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Associates `members` with a `role`. + class Binding + include Google::Apis::Core::Hashable + + # Specifies the identities requesting access for a Cloud Platform resource. + # `members` can have the following values: + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # * `user:`emailid``: An email address that represents a specific Google + # account. For example, `alice@gmail.com` or `joe@example.com`. + # * `serviceAccount:`emailid``: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # * `group:`emailid``: An email address that represents a Google group. + # For example, `admins@example.com`. + # * `domain:`domain``: A Google Apps domain name that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # Corresponds to the JSON property `members` + # @return [Array] + attr_accessor :members + + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # Corresponds to the JSON property `role` + # @return [String] + attr_accessor :role + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @members = args[:members] if args.key?(:members) + @role = args[:role] if args.key?(:role) + end + end + + # Request message for KeyManagementService.Encrypt. + class EncryptRequest + include Google::Apis::Core::Hashable + + # Required. The data to encrypt. Must be no larger than 64KiB. + # Corresponds to the JSON property `plaintext` + # @return [String] + attr_accessor :plaintext + + # Optional data that, if specified, must also be provided during decryption + # through DecryptRequest.additional_authenticated_data. Must be no + # larger than 64KiB. + # Corresponds to the JSON property `additionalAuthenticatedData` + # @return [String] + attr_accessor :additional_authenticated_data + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @plaintext = args[:plaintext] if args.key?(:plaintext) + @additional_authenticated_data = args[:additional_authenticated_data] if args.key?(:additional_authenticated_data) + end + end + + # Response message for KeyManagementService.ListCryptoKeyVersions. + class ListCryptoKeyVersionsResponse + include Google::Apis::Core::Hashable + + # The list of CryptoKeyVersions. + # Corresponds to the JSON property `cryptoKeyVersions` + # @return [Array] + attr_accessor :crypto_key_versions + + # A token to retrieve next page of results. Pass this value in + # ListCryptoKeyVersionsRequest.page_token to retrieve the next page of + # results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The total number of CryptoKeyVersions that matched the + # query. + # Corresponds to the JSON property `totalSize` + # @return [Fixnum] + attr_accessor :total_size + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @crypto_key_versions = args[:crypto_key_versions] if args.key?(:crypto_key_versions) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @total_size = args[:total_size] if args.key?(:total_size) + end + end + + # Response message for `TestIamPermissions` method. + class TestIamPermissionsResponse + include Google::Apis::Core::Hashable + + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @permissions = args[:permissions] if args.key?(:permissions) + end + end + + # Request message for KeyManagementService.DestroyCryptoKeyVersion. + class DestroyCryptoKeyVersionRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # A CryptoKey represents a logical key that can be used for cryptographic + # operations. + # A CryptoKey is made up of one or more versions, which + # represent the actual key material used in cryptographic operations. + class CryptoKey + include Google::Apis::Core::Hashable + + # Output only. The resource name for this CryptoKey in the format + # `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The immutable purpose of this CryptoKey. Currently, the only acceptable + # purpose is ENCRYPT_DECRYPT. + # Corresponds to the JSON property `purpose` + # @return [String] + attr_accessor :purpose + + # At next_rotation_time, the Key Management Service will automatically: + # 1. Create a new version of this CryptoKey. + # 2. Mark the new version as primary. + # Key rotations performed manually via + # CreateCryptoKeyVersion and + # UpdateCryptoKeyPrimaryVersion + # do not affect next_rotation_time. + # Corresponds to the JSON property `nextRotationTime` + # @return [String] + attr_accessor :next_rotation_time + + # Output only. The time at which this CryptoKey was created. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # next_rotation_time will be advanced by this period when the service + # automatically rotates a key. Must be at least one day. + # If rotation_period is set, next_rotation_time must also be set. + # Corresponds to the JSON property `rotationPeriod` + # @return [String] + attr_accessor :rotation_period + + # A CryptoKeyVersion represents an individual cryptographic key, and the + # associated key material. + # It can be used for cryptographic operations either directly, or via its + # parent CryptoKey, in which case the server will choose the appropriate + # version for the operation. + # Corresponds to the JSON property `primary` + # @return [Google::Apis::CloudkmsV1beta1::CryptoKeyVersion] + attr_accessor :primary + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + @purpose = args[:purpose] if args.key?(:purpose) + @next_rotation_time = args[:next_rotation_time] if args.key?(:next_rotation_time) + @create_time = args[:create_time] if args.key?(:create_time) + @rotation_period = args[:rotation_period] if args.key?(:rotation_period) + @primary = args[:primary] if args.key?(:primary) + end + end + + # A rule to be applied in a Policy. + class Rule + include Google::Apis::Core::Hashable + + # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries + # that match the LOG action. + # Corresponds to the JSON property `logConfig` + # @return [Array] + attr_accessor :log_config + + # If one or more 'in' clauses are specified, the rule matches if + # the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. + # Corresponds to the JSON property `in` + # @return [Array] + attr_accessor :in + + # A permission is a string of form '..' + # (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, + # and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + # Required + # Corresponds to the JSON property `action` + # @return [String] + attr_accessor :action + + # If one or more 'not_in' clauses are specified, the rule matches + # if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. + # The format for in and not_in entries is the same as for members in a + # Binding (see google/iam/v1/policy.proto). + # Corresponds to the JSON property `notIn` + # @return [Array] + attr_accessor :not_in + + # Human-readable description of the rule. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Additional restrictions that must be met + # Corresponds to the JSON property `conditions` + # @return [Array] + attr_accessor :conditions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @log_config = args[:log_config] if args.key?(:log_config) + @in = args[:in] if args.key?(:in) + @permissions = args[:permissions] if args.key?(:permissions) + @action = args[:action] if args.key?(:action) + @not_in = args[:not_in] if args.key?(:not_in) + @description = args[:description] if args.key?(:description) + @conditions = args[:conditions] if args.key?(:conditions) + end + end + + # Specifies what kind of log the caller must write + # Increment a streamz counter with the specified metric and field names. + # Metric names should start with a '/', generally be lowercase-only, + # and end in "_count". Field names should not contain an initial slash. + # The actual exported metric names will have "/iam/policy" prepended. + # Field names correspond to IAM request parameters and field values are + # their respective values. + # At present the only supported field names are + # - "iam_principal", corresponding to IAMContext.principal; + # - "" (empty string), resulting in one aggretated counter with no field. + # Examples: + # counter ` metric: "/debug_access_count" field: "iam_principal" ` + # ==> increment counter /iam/policy/backend_debug_access_count + # `iam_principal=[value of IAMContext.principal]` + # At this time we do not support: + # * multiple field names (though this may be supported in the future) + # * decrementing the counter + # * incrementing it by anything other than 1 + class LogConfig + include Google::Apis::Core::Hashable + + # Write a Data Access (Gin) log + # Corresponds to the JSON property `dataAccess` + # @return [Google::Apis::CloudkmsV1beta1::DataAccessOptions] + attr_accessor :data_access + + # Write a Cloud Audit log + # Corresponds to the JSON property `cloudAudit` + # @return [Google::Apis::CloudkmsV1beta1::CloudAuditOptions] + attr_accessor :cloud_audit + + # Options for counters + # Corresponds to the JSON property `counter` + # @return [Google::Apis::CloudkmsV1beta1::CounterOptions] + attr_accessor :counter + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @data_access = args[:data_access] if args.key?(:data_access) + @cloud_audit = args[:cloud_audit] if args.key?(:cloud_audit) + @counter = args[:counter] if args.key?(:counter) + end + end + + # Request message for `SetIamPolicy` method. + class SetIamPolicyRequest + include Google::Apis::Core::Hashable + + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, a default + # mask is used: + # paths: "bindings, etag" + # This field is only used by Cloud IAM. + # Corresponds to the JSON property `updateMask` + # @return [String] + attr_accessor :update_mask + + # Defines an Identity and Access Management (IAM) policy. It is used to + # specify access control policies for Cloud Platform resources. + # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of + # `members` to a `role`, where the members can be user accounts, Google groups, + # Google domains, and service accounts. A `role` is a named list of permissions + # defined by IAM. + # **Example** + # ` + # "bindings": [ + # ` + # "role": "roles/owner", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-other-app@appspot.gserviceaccount.com", + # ] + # `, + # ` + # "role": "roles/viewer", + # "members": ["user:sean@example.com"] + # ` + # ] + # ` + # For a description of IAM and its features, see the + # [IAM developer's guide](https://cloud.google.com/iam). + # Corresponds to the JSON property `policy` + # @return [Google::Apis::CloudkmsV1beta1::Policy] + attr_accessor :policy + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @update_mask = args[:update_mask] if args.key?(:update_mask) + @policy = args[:policy] if args.key?(:policy) + end + end + + # Request message for KeyManagementService.Decrypt. + class DecryptRequest + include Google::Apis::Core::Hashable + + # Required. The encrypted data originally returned in + # EncryptResponse.ciphertext. + # Corresponds to the JSON property `ciphertext` + # @return [String] + attr_accessor :ciphertext + + # Optional data that must match the data originally supplied in + # EncryptRequest.additional_authenticated_data. + # Corresponds to the JSON property `additionalAuthenticatedData` + # @return [String] + attr_accessor :additional_authenticated_data + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @ciphertext = args[:ciphertext] if args.key?(:ciphertext) + @additional_authenticated_data = args[:additional_authenticated_data] if args.key?(:additional_authenticated_data) + end + end + + # A resource that represents Google Cloud Platform location. + class Location + include Google::Apis::Core::Hashable + + # Cross-service attributes for the location. For example + # `"cloud.googleapis.com/region": "us-east1"` + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # Resource name for the location, which may vary between implementations. + # For example: `"projects/example-project/locations/us-east1"` + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The canonical id for this location. For example: `"us-east1"`. + # Corresponds to the JSON property `locationId` + # @return [String] + attr_accessor :location_id + + # Service-specific metadata. For example the available capacity at the given + # location. + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @labels = args[:labels] if args.key?(:labels) + @name = args[:name] if args.key?(:name) + @location_id = args[:location_id] if args.key?(:location_id) + @metadata = args[:metadata] if args.key?(:metadata) + end + end + + # Response message for KeyManagementService.ListCryptoKeys. + class ListCryptoKeysResponse + include Google::Apis::Core::Hashable + + # A token to retrieve next page of results. Pass this value in + # ListCryptoKeysRequest.page_token to retrieve the next page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The list of CryptoKeys. + # Corresponds to the JSON property `cryptoKeys` + # @return [Array] + attr_accessor :crypto_keys + + # The total number of CryptoKeys that matched the query. + # Corresponds to the JSON property `totalSize` + # @return [Fixnum] + attr_accessor :total_size + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @crypto_keys = args[:crypto_keys] if args.key?(:crypto_keys) + @total_size = args[:total_size] if args.key?(:total_size) + end + end + + # A condition to be met. + class Condition + include Google::Apis::Core::Hashable + + # Trusted attributes discharged by the service. + # Corresponds to the JSON property `svc` + # @return [String] + attr_accessor :svc + + # Trusted attributes supplied by any service that owns resources and uses + # the IAM system for access control. + # Corresponds to the JSON property `sys` + # @return [String] + attr_accessor :sys + + # DEPRECATED. Use 'values' instead. + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + + # The objects of the condition. This is mutually exclusive with 'value'. + # Corresponds to the JSON property `values` + # @return [Array] + attr_accessor :values + + # Trusted attributes supplied by the IAM system. + # Corresponds to the JSON property `iam` + # @return [String] + attr_accessor :iam + + # An operator to apply the subject with. + # Corresponds to the JSON property `op` + # @return [String] + attr_accessor :op + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @svc = args[:svc] if args.key?(:svc) + @sys = args[:sys] if args.key?(:sys) + @value = args[:value] if args.key?(:value) + @values = args[:values] if args.key?(:values) + @iam = args[:iam] if args.key?(:iam) + @op = args[:op] if args.key?(:op) + end + end + + # Options for counters + class CounterOptions + include Google::Apis::Core::Hashable + + # The metric to update. + # Corresponds to the JSON property `metric` + # @return [String] + attr_accessor :metric + + # The field value to attribute. + # Corresponds to the JSON property `field` + # @return [String] + attr_accessor :field + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @metric = args[:metric] if args.key?(:metric) + @field = args[:field] if args.key?(:field) + end + end + + # Provides the configuration for logging a type of permissions. + # Example: + # ` + # "audit_log_configs": [ + # ` + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:foo@gmail.com" + # ] + # `, + # ` + # "log_type": "DATA_WRITE", + # ` + # ] + # ` + # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + # foo@gmail.com from DATA_READ logging. + class AuditLogConfig + include Google::Apis::Core::Hashable + + # Specifies the identities that do not cause logging for this type of + # permission. + # Follows the same format of Binding.members. + # Corresponds to the JSON property `exemptedMembers` + # @return [Array] + attr_accessor :exempted_members + + # The log type that this config enables. + # Corresponds to the JSON property `logType` + # @return [String] + attr_accessor :log_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @exempted_members = args[:exempted_members] if args.key?(:exempted_members) + @log_type = args[:log_type] if args.key?(:log_type) + end + end + + # Response message for KeyManagementService.Decrypt. + class DecryptResponse + include Google::Apis::Core::Hashable + + # The decrypted data originally supplied in EncryptRequest.plaintext. + # Corresponds to the JSON property `plaintext` + # @return [String] + attr_accessor :plaintext + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @plaintext = args[:plaintext] if args.key?(:plaintext) + end + end + + # Request message for `TestIamPermissions` method. + class TestIamPermissionsRequest + include Google::Apis::Core::Hashable + + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @permissions = args[:permissions] if args.key?(:permissions) + end + end + + # Defines an Identity and Access Management (IAM) policy. It is used to + # specify access control policies for Cloud Platform resources. + # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of + # `members` to a `role`, where the members can be user accounts, Google groups, + # Google domains, and service accounts. A `role` is a named list of permissions + # defined by IAM. + # **Example** + # ` + # "bindings": [ + # ` + # "role": "roles/owner", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-other-app@appspot.gserviceaccount.com", + # ] + # `, + # ` + # "role": "roles/viewer", + # "members": ["user:sean@example.com"] + # ` + # ] + # ` + # For a description of IAM and its features, see the + # [IAM developer's guide](https://cloud.google.com/iam). + class Policy + include Google::Apis::Core::Hashable + + # + # Corresponds to the JSON property `iamOwned` + # @return [Boolean] + attr_accessor :iam_owned + alias_method :iam_owned?, :iam_owned + + # If more than one rule is specified, the rules are applied in the following + # manner: + # - All matching LOG rules are always applied. + # - If any DENY/DENY_WITH_LOG rule matches, permission is denied. + # Logging will be applied if one or more matching rule requires logging. + # - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule matches, permission is + # granted. + # Logging will be applied if one or more matching rule requires logging. + # - Otherwise, if no rule applies, permission is denied. + # Corresponds to the JSON property `rules` + # @return [Array] + attr_accessor :rules + + # Version of the `Policy`. The default version is 0. + # Corresponds to the JSON property `version` + # @return [Fixnum] + attr_accessor :version + + # Specifies cloud audit logging configuration for this policy. + # Corresponds to the JSON property `auditConfigs` + # @return [Array] + attr_accessor :audit_configs + + # Associates a list of `members` to a `role`. + # Multiple `bindings` must not be specified for the same `role`. + # `bindings` with no members will result in an error. + # Corresponds to the JSON property `bindings` + # @return [Array] + attr_accessor :bindings + + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # If no `etag` is provided in the call to `setIamPolicy`, then the existing + # policy is overwritten blindly. + # Corresponds to the JSON property `etag` + # @return [String] + attr_accessor :etag + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @iam_owned = args[:iam_owned] if args.key?(:iam_owned) + @rules = args[:rules] if args.key?(:rules) + @version = args[:version] if args.key?(:version) + @audit_configs = args[:audit_configs] if args.key?(:audit_configs) + @bindings = args[:bindings] if args.key?(:bindings) + @etag = args[:etag] if args.key?(:etag) + end + end + + # Response message for KeyManagementService.Encrypt. + class EncryptResponse + include Google::Apis::Core::Hashable + + # The encrypted data. + # Corresponds to the JSON property `ciphertext` + # @return [String] + attr_accessor :ciphertext + + # The resource name of the CryptoKeyVersion used in encryption. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @ciphertext = args[:ciphertext] if args.key?(:ciphertext) + @name = args[:name] if args.key?(:name) + end + end + + # A KeyRing is a toplevel logical grouping of CryptoKeys. + class KeyRing + include Google::Apis::Core::Hashable + + # Output only. The time at which this KeyRing was created. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Output only. The resource name for the KeyRing in the format + # `projects/*/locations/*/keyRings/*`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @create_time = args[:create_time] if args.key?(:create_time) + @name = args[:name] if args.key?(:name) + end + end + + # The response message for Locations.ListLocations. + class ListLocationsResponse + include Google::Apis::Core::Hashable + + # The standard List next-page token. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # A list of locations that matches the specified filter in the request. + # Corresponds to the JSON property `locations` + # @return [Array] + attr_accessor :locations + + 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) + @locations = args[:locations] if args.key?(:locations) + end + end + + # Request message for KeyManagementService.UpdateCryptoKeyPrimaryVersion. + class UpdateCryptoKeyPrimaryVersionRequest + include Google::Apis::Core::Hashable + + # The id of the child CryptoKeyVersion to use as primary. + # Corresponds to the JSON property `cryptoKeyVersionId` + # @return [String] + attr_accessor :crypto_key_version_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @crypto_key_version_id = args[:crypto_key_version_id] if args.key?(:crypto_key_version_id) + end + end + + # Request message for KeyManagementService.RestoreCryptoKeyVersion. + class RestoreCryptoKeyVersionRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Write a Data Access (Gin) log + class DataAccessOptions + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Response message for KeyManagementService.ListKeyRings. + class ListKeyRingsResponse + include Google::Apis::Core::Hashable + + # A token to retrieve next page of results. Pass this value in + # ListKeyRingsRequest.page_token to retrieve the next page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The total number of KeyRings that matched the query. + # Corresponds to the JSON property `totalSize` + # @return [Fixnum] + attr_accessor :total_size + + # The list of KeyRings. + # Corresponds to the JSON property `keyRings` + # @return [Array] + attr_accessor :key_rings + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @total_size = args[:total_size] if args.key?(:total_size) + @key_rings = args[:key_rings] if args.key?(:key_rings) + end + end + + # Specifies the audit configuration for a service. + # It consists of which permission types are logged, and what identities, if + # any, are exempted from logging. + # An AuditConifg must have one or more AuditLogConfigs. + class AuditConfig + include Google::Apis::Core::Hashable + + # The configuration for logging of each type of permission. + # Next ID: 4 + # Corresponds to the JSON property `auditLogConfigs` + # @return [Array] + attr_accessor :audit_log_configs + + # Specifies the identities that are exempted from "data access" audit + # logging for the `service` specified above. + # Follows the same format of Binding.members. + # This field is deprecated in favor of per-permission-type exemptions. + # Corresponds to the JSON property `exemptedMembers` + # @return [Array] + attr_accessor :exempted_members + + # Specifies a service that will be enabled for audit logging. + # For example, `resourcemanager`, `storage`, `compute`. + # `allServices` is a special value that covers all services. + # Corresponds to the JSON property `service` + # @return [String] + attr_accessor :service + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs) + @exempted_members = args[:exempted_members] if args.key?(:exempted_members) + @service = args[:service] if args.key?(:service) + end + end + + # A CryptoKeyVersion represents an individual cryptographic key, and the + # associated key material. + # It can be used for cryptographic operations either directly, or via its + # parent CryptoKey, in which case the server will choose the appropriate + # version for the operation. + class CryptoKeyVersion + include Google::Apis::Core::Hashable + + # Output only. The time at which this CryptoKeyVersion was created. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # The current state of the CryptoKeyVersion. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + # Output only. The resource name for this CryptoKeyVersion in the format + # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Output only. The time this CryptoKeyVersion's key material was + # destroyed. Only present if state is + # DESTROYED. + # Corresponds to the JSON property `destroyEventTime` + # @return [String] + attr_accessor :destroy_event_time + + # Output only. The time this CryptoKeyVersion's key material is scheduled + # for destruction. Only present if state is + # DESTROY_SCHEDULED. + # Corresponds to the JSON property `destroyTime` + # @return [String] + attr_accessor :destroy_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @create_time = args[:create_time] if args.key?(:create_time) + @state = args[:state] if args.key?(:state) + @name = args[:name] if args.key?(:name) + @destroy_event_time = args[:destroy_event_time] if args.key?(:destroy_event_time) + @destroy_time = args[:destroy_time] if args.key?(:destroy_time) + end + end + end + end +end diff --git a/generated/google/apis/cloudkms_v1beta1/representations.rb b/generated/google/apis/cloudkms_v1beta1/representations.rb new file mode 100644 index 000000000..396f0226b --- /dev/null +++ b/generated/google/apis/cloudkms_v1beta1/representations.rb @@ -0,0 +1,448 @@ +# 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 CloudkmsV1beta1 + + class CloudAuditOptions + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Binding + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class EncryptRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListCryptoKeyVersionsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TestIamPermissionsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DestroyCryptoKeyVersionRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CryptoKey + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Rule + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class LogConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SetIamPolicyRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DecryptRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Location + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListCryptoKeysResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Condition + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CounterOptions + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AuditLogConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DecryptResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TestIamPermissionsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Policy + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class EncryptResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class KeyRing + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListLocationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpdateCryptoKeyPrimaryVersionRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RestoreCryptoKeyVersionRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DataAccessOptions + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListKeyRingsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AuditConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CryptoKeyVersion + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CloudAuditOptions + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class Binding + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :members, as: 'members' + property :role, as: 'role' + end + end + + class EncryptRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :plaintext, :base64 => true, as: 'plaintext' + property :additional_authenticated_data, :base64 => true, as: 'additionalAuthenticatedData' + end + end + + class ListCryptoKeyVersionsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :crypto_key_versions, as: 'cryptoKeyVersions', class: Google::Apis::CloudkmsV1beta1::CryptoKeyVersion, decorator: Google::Apis::CloudkmsV1beta1::CryptoKeyVersion::Representation + + property :next_page_token, as: 'nextPageToken' + property :total_size, as: 'totalSize' + end + end + + class TestIamPermissionsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' + end + end + + class DestroyCryptoKeyVersionRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class CryptoKey + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + property :purpose, as: 'purpose' + property :next_rotation_time, as: 'nextRotationTime' + property :create_time, as: 'createTime' + property :rotation_period, as: 'rotationPeriod' + property :primary, as: 'primary', class: Google::Apis::CloudkmsV1beta1::CryptoKeyVersion, decorator: Google::Apis::CloudkmsV1beta1::CryptoKeyVersion::Representation + + end + end + + class Rule + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :log_config, as: 'logConfig', class: Google::Apis::CloudkmsV1beta1::LogConfig, decorator: Google::Apis::CloudkmsV1beta1::LogConfig::Representation + + collection :in, as: 'in' + collection :permissions, as: 'permissions' + property :action, as: 'action' + collection :not_in, as: 'notIn' + property :description, as: 'description' + collection :conditions, as: 'conditions', class: Google::Apis::CloudkmsV1beta1::Condition, decorator: Google::Apis::CloudkmsV1beta1::Condition::Representation + + end + end + + class LogConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :data_access, as: 'dataAccess', class: Google::Apis::CloudkmsV1beta1::DataAccessOptions, decorator: Google::Apis::CloudkmsV1beta1::DataAccessOptions::Representation + + property :cloud_audit, as: 'cloudAudit', class: Google::Apis::CloudkmsV1beta1::CloudAuditOptions, decorator: Google::Apis::CloudkmsV1beta1::CloudAuditOptions::Representation + + property :counter, as: 'counter', class: Google::Apis::CloudkmsV1beta1::CounterOptions, decorator: Google::Apis::CloudkmsV1beta1::CounterOptions::Representation + + end + end + + class SetIamPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :update_mask, as: 'updateMask' + property :policy, as: 'policy', class: Google::Apis::CloudkmsV1beta1::Policy, decorator: Google::Apis::CloudkmsV1beta1::Policy::Representation + + end + end + + class DecryptRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :ciphertext, :base64 => true, as: 'ciphertext' + property :additional_authenticated_data, :base64 => true, as: 'additionalAuthenticatedData' + end + end + + class Location + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :labels, as: 'labels' + property :name, as: 'name' + property :location_id, as: 'locationId' + hash :metadata, as: 'metadata' + end + end + + class ListCryptoKeysResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :crypto_keys, as: 'cryptoKeys', class: Google::Apis::CloudkmsV1beta1::CryptoKey, decorator: Google::Apis::CloudkmsV1beta1::CryptoKey::Representation + + property :total_size, as: 'totalSize' + end + end + + class Condition + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :svc, as: 'svc' + property :sys, as: 'sys' + property :value, as: 'value' + collection :values, as: 'values' + property :iam, as: 'iam' + property :op, as: 'op' + end + end + + class CounterOptions + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :metric, as: 'metric' + property :field, as: 'field' + end + end + + class AuditLogConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :exempted_members, as: 'exemptedMembers' + property :log_type, as: 'logType' + end + end + + class DecryptResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :plaintext, :base64 => true, as: 'plaintext' + end + end + + class TestIamPermissionsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' + end + end + + class Policy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :iam_owned, as: 'iamOwned' + collection :rules, as: 'rules', class: Google::Apis::CloudkmsV1beta1::Rule, decorator: Google::Apis::CloudkmsV1beta1::Rule::Representation + + property :version, as: 'version' + collection :audit_configs, as: 'auditConfigs', class: Google::Apis::CloudkmsV1beta1::AuditConfig, decorator: Google::Apis::CloudkmsV1beta1::AuditConfig::Representation + + collection :bindings, as: 'bindings', class: Google::Apis::CloudkmsV1beta1::Binding, decorator: Google::Apis::CloudkmsV1beta1::Binding::Representation + + property :etag, :base64 => true, as: 'etag' + end + end + + class EncryptResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :ciphertext, :base64 => true, as: 'ciphertext' + property :name, as: 'name' + end + end + + class KeyRing + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + property :name, as: 'name' + end + end + + class ListLocationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :locations, as: 'locations', class: Google::Apis::CloudkmsV1beta1::Location, decorator: Google::Apis::CloudkmsV1beta1::Location::Representation + + end + end + + class UpdateCryptoKeyPrimaryVersionRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :crypto_key_version_id, as: 'cryptoKeyVersionId' + end + end + + class RestoreCryptoKeyVersionRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class DataAccessOptions + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class ListKeyRingsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + property :total_size, as: 'totalSize' + collection :key_rings, as: 'keyRings', class: Google::Apis::CloudkmsV1beta1::KeyRing, decorator: Google::Apis::CloudkmsV1beta1::KeyRing::Representation + + end + end + + class AuditConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::CloudkmsV1beta1::AuditLogConfig, decorator: Google::Apis::CloudkmsV1beta1::AuditLogConfig::Representation + + collection :exempted_members, as: 'exemptedMembers' + property :service, as: 'service' + end + end + + class CryptoKeyVersion + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + property :state, as: 'state' + property :name, as: 'name' + property :destroy_event_time, as: 'destroyEventTime' + property :destroy_time, as: 'destroyTime' + end + end + end + end +end diff --git a/generated/google/apis/cloudkms_v1beta1/service.rb b/generated/google/apis/cloudkms_v1beta1/service.rb new file mode 100644 index 000000000..056d6a0b3 --- /dev/null +++ b/generated/google/apis/cloudkms_v1beta1/service.rb @@ -0,0 +1,932 @@ +# 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 CloudkmsV1beta1 + # Google Cloud KMS API + # + # + # + # @example + # require 'google/apis/cloudkms_v1beta1' + # + # Cloudkms = Google::Apis::CloudkmsV1beta1 # Alias the module + # service = Cloudkms::CloudKMSService.new + # + # @see https://cloud.google.com/kms/ + class CloudKMSService < Google::Apis::Core::BaseService + # @return [String] + # API key. Your API key identifies your project and provides you with API access, + # quota, and reports. Required unless you provide an OAuth 2.0 token. + attr_accessor :key + + # @return [String] + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + attr_accessor :quota_user + + def initialize + super('https://cloudkms.googleapis.com/', '') + end + + # Lists information about the supported locations for this service. + # @param [String] name + # The resource that owns the locations collection, if applicable. + # @param [String] filter + # The standard list filter. + # @param [String] page_token + # The standard list page token. + # @param [Fixnum] page_size + # The standard list page size. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudkmsV1beta1::ListLocationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1beta1::ListLocationsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_locations(name, filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+name}/locations', options) + command.response_representation = Google::Apis::CloudkmsV1beta1::ListLocationsResponse::Representation + command.response_class = Google::Apis::CloudkmsV1beta1::ListLocationsResponse + command.params['name'] = name unless name.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Get information about a location. + # @param [String] name + # Resource name for the location. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudkmsV1beta1::Location] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1beta1::Location] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::CloudkmsV1beta1::Location::Representation + command.response_class = Google::Apis::CloudkmsV1beta1::Location + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists KeyRings. + # @param [String] parent + # Required. The resource name of the location associated with the + # KeyRings, in the format `projects/*/locations/*`. + # @param [String] page_token + # Optional pagination token, returned earlier via + # ListKeyRingsResponse.next_page_token. + # @param [Fixnum] page_size + # Optional limit on the number of KeyRings to include in the + # response. Further KeyRings can subsequently be obtained by + # including the ListKeyRingsResponse.next_page_token in a subsequent + # request. If unspecified, the server will pick an appropriate default. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudkmsV1beta1::ListKeyRingsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1beta1::ListKeyRingsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_key_rings(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+parent}/keyRings', options) + command.response_representation = Google::Apis::CloudkmsV1beta1::ListKeyRingsResponse::Representation + command.response_class = Google::Apis::CloudkmsV1beta1::ListKeyRingsResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Sets the access control policy on the specified resource. Replaces any + # existing policy. + # @param [String] resource + # REQUIRED: The resource for which the policy is being specified. + # `resource` is usually specified as a path. For example, a Project + # resource is specified as `projects/`project``. + # @param [Google::Apis::CloudkmsV1beta1::SetIamPolicyRequest] set_iam_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudkmsV1beta1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1beta1::Policy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def set_key_ring_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+resource}:setIamPolicy', options) + command.request_representation = Google::Apis::CloudkmsV1beta1::SetIamPolicyRequest::Representation + command.request_object = set_iam_policy_request_object + command.response_representation = Google::Apis::CloudkmsV1beta1::Policy::Representation + command.response_class = Google::Apis::CloudkmsV1beta1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Create a new KeyRing in a given Project and Location. + # @param [String] parent + # Required. The resource name of the location associated with the + # KeyRings, in the format `projects/*/locations/*`. + # @param [Google::Apis::CloudkmsV1beta1::KeyRing] key_ring_object + # @param [String] key_ring_id + # Required. It must be unique within a location and match the regular + # expression `[a-zA-Z0-9_-]`1,63`` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudkmsV1beta1::KeyRing] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1beta1::KeyRing] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_location_key_ring(parent, key_ring_object = nil, key_ring_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+parent}/keyRings', options) + command.request_representation = Google::Apis::CloudkmsV1beta1::KeyRing::Representation + command.request_object = key_ring_object + command.response_representation = Google::Apis::CloudkmsV1beta1::KeyRing::Representation + command.response_class = Google::Apis::CloudkmsV1beta1::KeyRing + command.params['parent'] = parent unless parent.nil? + command.query['keyRingId'] = key_ring_id unless key_ring_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the access control policy for a resource. + # Returns an empty policy if the resource exists and does not have a policy + # set. + # @param [String] resource + # REQUIRED: The resource for which the policy is being requested. + # `resource` is usually specified as a path. For example, a Project + # resource is specified as `projects/`project``. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudkmsV1beta1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1beta1::Policy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_key_ring_iam_policy(resource, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+resource}:getIamPolicy', options) + command.response_representation = Google::Apis::CloudkmsV1beta1::Policy::Representation + command.response_class = Google::Apis::CloudkmsV1beta1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns metadata for a given KeyRing. + # @param [String] name + # The name of the KeyRing to get. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudkmsV1beta1::KeyRing] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1beta1::KeyRing] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_key_ring(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::CloudkmsV1beta1::KeyRing::Representation + command.response_class = Google::Apis::CloudkmsV1beta1::KeyRing + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns permissions that a caller has on the specified resource. + # If the resource does not exist, this will return an empty set of + # permissions, not a NOT_FOUND error. + # @param [String] resource + # REQUIRED: The resource for which the policy detail is being requested. + # `resource` is usually specified as a path. For example, a Project + # resource is specified as `projects/`project``. + # @param [Google::Apis::CloudkmsV1beta1::TestIamPermissionsRequest] test_iam_permissions_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudkmsV1beta1::TestIamPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1beta1::TestIamPermissionsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def test_key_ring_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', options) + command.request_representation = Google::Apis::CloudkmsV1beta1::TestIamPermissionsRequest::Representation + command.request_object = test_iam_permissions_request_object + command.response_representation = Google::Apis::CloudkmsV1beta1::TestIamPermissionsResponse::Representation + command.response_class = Google::Apis::CloudkmsV1beta1::TestIamPermissionsResponse + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the access control policy for a resource. + # Returns an empty policy if the resource exists and does not have a policy + # set. + # @param [String] resource + # REQUIRED: The resource for which the policy is being requested. + # `resource` is usually specified as a path. For example, a Project + # resource is specified as `projects/`project``. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudkmsV1beta1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1beta1::Policy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_key_ring_crypto_key_iam_policy(resource, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+resource}:getIamPolicy', options) + command.response_representation = Google::Apis::CloudkmsV1beta1::Policy::Representation + command.response_class = Google::Apis::CloudkmsV1beta1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns metadata for a given CryptoKey, as well as its + # primary CryptoKeyVersion. + # @param [String] name + # The name of the CryptoKey to get. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudkmsV1beta1::CryptoKey] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1beta1::CryptoKey] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_key_ring_crypto_key(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::CloudkmsV1beta1::CryptoKey::Representation + command.response_class = Google::Apis::CloudkmsV1beta1::CryptoKey + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Update a CryptoKey. + # @param [String] name + # Output only. The resource name for this CryptoKey in the format + # `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + # @param [Google::Apis::CloudkmsV1beta1::CryptoKey] crypto_key_object + # @param [String] update_mask + # Required list of fields to be updated in this request. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudkmsV1beta1::CryptoKey] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1beta1::CryptoKey] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_project_location_key_ring_crypto_key(name, crypto_key_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1beta1/{+name}', options) + command.request_representation = Google::Apis::CloudkmsV1beta1::CryptoKey::Representation + command.request_object = crypto_key_object + command.response_representation = Google::Apis::CloudkmsV1beta1::CryptoKey::Representation + command.response_class = Google::Apis::CloudkmsV1beta1::CryptoKey + command.params['name'] = name unless name.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns permissions that a caller has on the specified resource. + # If the resource does not exist, this will return an empty set of + # permissions, not a NOT_FOUND error. + # @param [String] resource + # REQUIRED: The resource for which the policy detail is being requested. + # `resource` is usually specified as a path. For example, a Project + # resource is specified as `projects/`project``. + # @param [Google::Apis::CloudkmsV1beta1::TestIamPermissionsRequest] test_iam_permissions_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudkmsV1beta1::TestIamPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1beta1::TestIamPermissionsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def test_crypto_key_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', options) + command.request_representation = Google::Apis::CloudkmsV1beta1::TestIamPermissionsRequest::Representation + command.request_object = test_iam_permissions_request_object + command.response_representation = Google::Apis::CloudkmsV1beta1::TestIamPermissionsResponse::Representation + command.response_class = Google::Apis::CloudkmsV1beta1::TestIamPermissionsResponse + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Decrypt data that was protected by Encrypt. + # @param [String] name + # Required. The resource name of the CryptoKey to use for decryption. + # The server will choose the appropriate version. + # @param [Google::Apis::CloudkmsV1beta1::DecryptRequest] decrypt_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudkmsV1beta1::DecryptResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1beta1::DecryptResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def decrypt_crypto_key(name, decrypt_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+name}:decrypt', options) + command.request_representation = Google::Apis::CloudkmsV1beta1::DecryptRequest::Representation + command.request_object = decrypt_request_object + command.response_representation = Google::Apis::CloudkmsV1beta1::DecryptResponse::Representation + command.response_class = Google::Apis::CloudkmsV1beta1::DecryptResponse + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists CryptoKeys. + # @param [String] parent + # Required. The resource name of the KeyRing to list, in the format + # `projects/*/locations/*/keyRings/*`. + # @param [String] page_token + # Optional pagination token, returned earlier via + # ListCryptoKeysResponse.next_page_token. + # @param [Fixnum] page_size + # Optional limit on the number of CryptoKeys to include in the + # response. Further CryptoKeys can subsequently be obtained by + # including the ListCryptoKeysResponse.next_page_token in a subsequent + # request. If unspecified, the server will pick an appropriate default. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudkmsV1beta1::ListCryptoKeysResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1beta1::ListCryptoKeysResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_key_ring_crypto_keys(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+parent}/cryptoKeys', options) + command.response_representation = Google::Apis::CloudkmsV1beta1::ListCryptoKeysResponse::Representation + command.response_class = Google::Apis::CloudkmsV1beta1::ListCryptoKeysResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Encrypt data, so that it can only be recovered by a call to Decrypt. + # @param [String] name + # Required. The resource name of the CryptoKey or CryptoKeyVersion + # to use for encryption. + # If a CryptoKey is specified, the server will use its + # primary version. + # @param [Google::Apis::CloudkmsV1beta1::EncryptRequest] encrypt_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudkmsV1beta1::EncryptResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1beta1::EncryptResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def encrypt_crypto_key(name, encrypt_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+name}:encrypt', options) + command.request_representation = Google::Apis::CloudkmsV1beta1::EncryptRequest::Representation + command.request_object = encrypt_request_object + command.response_representation = Google::Apis::CloudkmsV1beta1::EncryptResponse::Representation + command.response_class = Google::Apis::CloudkmsV1beta1::EncryptResponse + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Create a new CryptoKey within a KeyRing. + # CryptoKey.purpose is required. + # @param [String] parent + # Required. The name of the KeyRing associated with the + # CryptoKeys. + # @param [Google::Apis::CloudkmsV1beta1::CryptoKey] crypto_key_object + # @param [String] crypto_key_id + # Required. It must be unique within a KeyRing and match the regular + # expression `[a-zA-Z0-9_-]`1,63`` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudkmsV1beta1::CryptoKey] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1beta1::CryptoKey] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_location_key_ring_crypto_key(parent, crypto_key_object = nil, crypto_key_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+parent}/cryptoKeys', options) + command.request_representation = Google::Apis::CloudkmsV1beta1::CryptoKey::Representation + command.request_object = crypto_key_object + command.response_representation = Google::Apis::CloudkmsV1beta1::CryptoKey::Representation + command.response_class = Google::Apis::CloudkmsV1beta1::CryptoKey + command.params['parent'] = parent unless parent.nil? + command.query['cryptoKeyId'] = crypto_key_id unless crypto_key_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Sets the access control policy on the specified resource. Replaces any + # existing policy. + # @param [String] resource + # REQUIRED: The resource for which the policy is being specified. + # `resource` is usually specified as a path. For example, a Project + # resource is specified as `projects/`project``. + # @param [Google::Apis::CloudkmsV1beta1::SetIamPolicyRequest] set_iam_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudkmsV1beta1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1beta1::Policy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def set_crypto_key_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+resource}:setIamPolicy', options) + command.request_representation = Google::Apis::CloudkmsV1beta1::SetIamPolicyRequest::Representation + command.request_object = set_iam_policy_request_object + command.response_representation = Google::Apis::CloudkmsV1beta1::Policy::Representation + command.response_class = Google::Apis::CloudkmsV1beta1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Update the version of a CryptoKey that will be used in Encrypt + # @param [String] name + # The resource name of the CryptoKey to update. + # @param [Google::Apis::CloudkmsV1beta1::UpdateCryptoKeyPrimaryVersionRequest] update_crypto_key_primary_version_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudkmsV1beta1::CryptoKey] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1beta1::CryptoKey] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_project_location_key_ring_crypto_key_primary_version(name, update_crypto_key_primary_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+name}:updatePrimaryVersion', options) + command.request_representation = Google::Apis::CloudkmsV1beta1::UpdateCryptoKeyPrimaryVersionRequest::Representation + command.request_object = update_crypto_key_primary_version_request_object + command.response_representation = Google::Apis::CloudkmsV1beta1::CryptoKey::Representation + command.response_class = Google::Apis::CloudkmsV1beta1::CryptoKey + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists CryptoKeyVersions. + # @param [String] parent + # Required. The resource name of the CryptoKey to list, in the format + # `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + # @param [String] page_token + # Optional pagination token, returned earlier via + # ListCryptoKeyVersionsResponse.next_page_token. + # @param [Fixnum] page_size + # Optional limit on the number of CryptoKeyVersions to + # include in the response. Further CryptoKeyVersions can + # subsequently be obtained by including the + # ListCryptoKeyVersionsResponse.next_page_token in a subsequent request. + # If unspecified, the server will pick an appropriate default. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudkmsV1beta1::ListCryptoKeyVersionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1beta1::ListCryptoKeyVersionsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_key_ring_crypto_key_crypto_key_versions(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+parent}/cryptoKeyVersions', options) + command.response_representation = Google::Apis::CloudkmsV1beta1::ListCryptoKeyVersionsResponse::Representation + command.response_class = Google::Apis::CloudkmsV1beta1::ListCryptoKeyVersionsResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Create a new CryptoKeyVersion in a CryptoKey. + # The server will assign the next sequential id. If unset, + # state will be set to + # ENABLED. + # @param [String] parent + # Required. The name of the CryptoKey associated with + # the CryptoKeyVersions. + # @param [Google::Apis::CloudkmsV1beta1::CryptoKeyVersion] crypto_key_version_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudkmsV1beta1::CryptoKeyVersion] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1beta1::CryptoKeyVersion] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_location_key_ring_crypto_key_crypto_key_version(parent, crypto_key_version_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+parent}/cryptoKeyVersions', options) + command.request_representation = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion::Representation + command.request_object = crypto_key_version_object + command.response_representation = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion::Representation + command.response_class = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Schedule a CryptoKeyVersion for destruction. + # Upon calling this method, CryptoKeyVersion.state will be set to + # DESTROY_SCHEDULED + # and destroy_time will be set to a time 24 + # hours in the future, at which point the state + # will be changed to + # DESTROYED, and the key + # material will be irrevocably destroyed. + # Before the destroy_time is reached, + # RestoreCryptoKeyVersion may be called to reverse the process. + # @param [String] name + # The resource name of the CryptoKeyVersion to destroy. + # @param [Google::Apis::CloudkmsV1beta1::DestroyCryptoKeyVersionRequest] destroy_crypto_key_version_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudkmsV1beta1::CryptoKeyVersion] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1beta1::CryptoKeyVersion] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def destroy_crypto_key_version(name, destroy_crypto_key_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+name}:destroy', options) + command.request_representation = Google::Apis::CloudkmsV1beta1::DestroyCryptoKeyVersionRequest::Representation + command.request_object = destroy_crypto_key_version_request_object + command.response_representation = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion::Representation + command.response_class = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Restore a CryptoKeyVersion in the + # DESTROY_SCHEDULED, + # state. + # Upon restoration of the CryptoKeyVersion, state + # will be set to DISABLED, + # and destroy_time will be cleared. + # @param [String] name + # The resource name of the CryptoKeyVersion to restore. + # @param [Google::Apis::CloudkmsV1beta1::RestoreCryptoKeyVersionRequest] restore_crypto_key_version_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudkmsV1beta1::CryptoKeyVersion] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1beta1::CryptoKeyVersion] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def restore_crypto_key_version(name, restore_crypto_key_version_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+name}:restore', options) + command.request_representation = Google::Apis::CloudkmsV1beta1::RestoreCryptoKeyVersionRequest::Representation + command.request_object = restore_crypto_key_version_request_object + command.response_representation = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion::Representation + command.response_class = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Update a CryptoKeyVersion's metadata. + # state may be changed between + # ENABLED and + # DISABLED using this + # method. See DestroyCryptoKeyVersion and RestoreCryptoKeyVersion to + # move between other states. + # @param [String] name + # Output only. The resource name for this CryptoKeyVersion in the format + # `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. + # @param [Google::Apis::CloudkmsV1beta1::CryptoKeyVersion] crypto_key_version_object + # @param [String] update_mask + # Required list of fields to be updated in this request. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudkmsV1beta1::CryptoKeyVersion] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1beta1::CryptoKeyVersion] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_project_location_key_ring_crypto_key_crypto_key_version(name, crypto_key_version_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1beta1/{+name}', options) + command.request_representation = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion::Representation + command.request_object = crypto_key_version_object + command.response_representation = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion::Representation + command.response_class = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion + command.params['name'] = name unless name.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns metadata for a given CryptoKeyVersion. + # @param [String] name + # The name of the CryptoKeyVersion to get. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudkmsV1beta1::CryptoKeyVersion] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1beta1::CryptoKeyVersion] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_key_ring_crypto_key_crypto_key_version(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion::Representation + command.response_class = Google::Apis::CloudkmsV1beta1::CryptoKeyVersion + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + protected + + def apply_command_defaults(command) + command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + end + end + end + end +end diff --git a/generated/google/apis/cloudresourcemanager_v1.rb b/generated/google/apis/cloudresourcemanager_v1.rb index aaf8850f5..24dae032e 100644 --- a/generated/google/apis/cloudresourcemanager_v1.rb +++ b/generated/google/apis/cloudresourcemanager_v1.rb @@ -26,13 +26,13 @@ module Google # @see https://cloud.google.com/resource-manager module CloudresourcemanagerV1 VERSION = 'V1' - REVISION = '20170122' - - # View and manage your data across Google Cloud Platform services - AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' + REVISION = '20170125' # View your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only' + + # View and manage your data across Google Cloud Platform services + AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' end end end diff --git a/generated/google/apis/cloudresourcemanager_v1/classes.rb b/generated/google/apis/cloudresourcemanager_v1/classes.rb index a25e72b30..3cb320339 100644 --- a/generated/google/apis/cloudresourcemanager_v1/classes.rb +++ b/generated/google/apis/cloudresourcemanager_v1/classes.rb @@ -22,120 +22,119 @@ module Google module Apis module CloudresourcemanagerV1 - # A classification of the Folder Operation error. - class FolderOperationError - include Google::Apis::Core::Hashable - - # The type of operation error experienced. - # Corresponds to the JSON property `errorMessageId` - # @return [String] - attr_accessor :error_message_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @error_message_id = args[:error_message_id] if args.key?(:error_message_id) - end - end - - # The `Status` type defines a logical error model that is suitable for different - # programming environments, including REST APIs and RPC APIs. It is used by - # [gRPC](https://github.com/grpc). The error model is designed to be: - # - Simple to use and understand for most users - # - Flexible enough to meet unexpected needs - # # Overview - # The `Status` message contains three pieces of data: error code, error message, - # and error details. The error code should be an enum value of - # google.rpc.Code, but it may accept additional error codes if needed. The - # error message should be a developer-facing English message that helps - # developers *understand* and *resolve* the error. If a localized user-facing - # error message is needed, put the localized message in the error details or - # localize it in the client. The optional error details may contain arbitrary - # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. - # # Language mapping - # The `Status` message is the logical representation of the error model, but it - # is not necessarily the actual wire format. When the `Status` message is - # exposed in different client libraries and different wire protocols, it can be - # mapped differently. For example, it will likely be mapped to some exceptions - # in Java, but more likely mapped to some error codes in C. - # # Other uses - # The error model and the `Status` message can be used in a variety of - # environments, either with or without APIs, to provide a - # consistent developer experience across different environments. - # Example uses of this error model include: - # - Partial errors. If a service needs to return partial errors to the client, - # it may embed the `Status` in the normal response to indicate the partial - # errors. - # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. - # - Batch operations. If a client uses batch request and batch response, the - # `Status` message should be used directly inside batch response, one for - # each error sub-response. - # - Asynchronous operations. If an API call embeds asynchronous operation - # results in its response, the status of those operations should be - # represented directly using the `Status` message. - # - Logging. If some API errors are stored in logs, the message `Status` could - # be used directly after any stripping needed for security/privacy reasons. - class Status - include Google::Apis::Core::Hashable - - # The status code, which should be an enum value of google.rpc.Code. - # Corresponds to the JSON property `code` - # @return [Fixnum] - attr_accessor :code - - # A list of messages that carry the error details. There will be a - # common set of message types for APIs to use. - # Corresponds to the JSON property `details` - # @return [Array>] - attr_accessor :details - - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # google.rpc.Status.details field, or localized by the client. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @code = args[:code] if args.key?(:code) - @details = args[:details] if args.key?(:details) - @message = args[:message] if args.key?(:message) - end - end - - # A page of the response received from the - # ListProjects + # The request sent to the + # GetAncestry # method. - # A paginated response where more pages are available has - # `next_page_token` set. This token can be used in a subsequent request to - # retrieve the next request page. - class ListProjectsResponse + class GetAncestryRequest include Google::Apis::Core::Hashable - # The list of Projects that matched the list filter. This list can - # be paginated. - # Corresponds to the JSON property `projects` - # @return [Array] - attr_accessor :projects + def initialize(**args) + update!(**args) + end - # Pagination token. - # If the result set is too large to fit in a single response, this token - # is returned. It encodes the position of the current result cursor. - # Feeding this value into a new list request with the `page_token` parameter - # gives the next page of the results. - # When `next_page_token` is not filled in, there is no next page and - # the list returned is the last page in the result set. - # Pagination tokens have a limited lifetime. + # Update properties of this object + def update!(**args) + end + end + + # A Project is a high-level Google Cloud Platform entity. It is a + # container for ACLs, APIs, AppEngine Apps, VMs, and other + # Google Cloud Platform resources. + class Project + include Google::Apis::Core::Hashable + + # The Project lifecycle state. + # Read-only. + # Corresponds to the JSON property `lifecycleState` + # @return [String] + attr_accessor :lifecycle_state + + # The number uniquely identifying the project. + # Example: 415104041262 + # Read-only. + # Corresponds to the JSON property `projectNumber` + # @return [String] + attr_accessor :project_number + + # A container to reference an id for any resource type. A `resource` in Google + # Cloud Platform is a generic term for something you (a developer) may want to + # interact with through one of our API's. Some examples are an AppEngine app, + # a Compute Engine instance, a Cloud SQL database, and so on. + # Corresponds to the JSON property `parent` + # @return [Google::Apis::CloudresourcemanagerV1::ResourceId] + attr_accessor :parent + + # Creation time. + # Read-only. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # The labels associated with this Project. + # Label keys must be between 1 and 63 characters long and must conform + # to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. + # Label values must be between 0 and 63 characters long and must conform + # to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. + # No more than 256 labels can be associated with a given resource. + # Clients should store labels in a representation such as JSON that does not + # depend on specific characters being disallowed. + # Example: "environment" : "dev" + # Read-write. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # The user-assigned display name of the Project. + # It must be 4 to 30 characters. + # Allowed characters are: lowercase and uppercase letters, numbers, + # hyphen, single-quote, double-quote, space, and exclamation point. + # Example: My Project + # Read-write. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The unique, user-assigned ID of the Project. + # It must be 6 to 30 lowercase letters, digits, or hyphens. + # It must start with a letter. + # Trailing hyphens are prohibited. + # Example: tokyo-rain-123 + # Read-only after creation. + # Corresponds to the JSON property `projectId` + # @return [String] + attr_accessor :project_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @lifecycle_state = args[:lifecycle_state] if args.key?(:lifecycle_state) + @project_number = args[:project_number] if args.key?(:project_number) + @parent = args[:parent] if args.key?(:parent) + @create_time = args[:create_time] if args.key?(:create_time) + @labels = args[:labels] if args.key?(:labels) + @name = args[:name] if args.key?(:name) + @project_id = args[:project_id] if args.key?(:project_id) + end + end + + # The response returned from the `SearchOrganizations` method. + class SearchOrganizationsResponse + include Google::Apis::Core::Hashable + + # The list of Organizations that matched the search query, possibly + # paginated. + # Corresponds to the JSON property `organizations` + # @return [Array] + attr_accessor :organizations + + # A pagination token to be used to retrieve the next page of results. If the + # result is too large to fit within the page size specified in the request, + # this field will be set with a token that can be used to fetch the next page + # of results. If this field is empty, it indicates that this response + # contains the last page of results. # Corresponds to the JSON property `nextPageToken` # @return [String] attr_accessor :next_page_token @@ -146,224 +145,19 @@ module Google # Update properties of this object def update!(**args) - @projects = args[:projects] if args.key?(:projects) + @organizations = args[:organizations] if args.key?(:organizations) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) end end - # The request sent to the UndeleteProject - # method. - class UndeleteProjectRequest + # Request message for `TestIamPermissions` method. + class TestIamPermissionsRequest include Google::Apis::Core::Hashable - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # Metadata describing a long running folder operation - class FolderOperation - include Google::Apis::Core::Hashable - - # The display name of the folder. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The resource name of the folder's parent. - # Only applicable when the operation_type is MOVE. - # Corresponds to the JSON property `sourceParent` - # @return [String] - attr_accessor :source_parent - - # The resource name of the folder or organization we are either creating - # the folder under or moving the folder to. - # Corresponds to the JSON property `destinationParent` - # @return [String] - attr_accessor :destination_parent - - # The type of this operation. - # Corresponds to the JSON property `operationType` - # @return [String] - attr_accessor :operation_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @display_name = args[:display_name] if args.key?(:display_name) - @source_parent = args[:source_parent] if args.key?(:source_parent) - @destination_parent = args[:destination_parent] if args.key?(:destination_parent) - @operation_type = args[:operation_type] if args.key?(:operation_type) - end - end - - # This resource represents a long-running operation that is the result of a - # network API call. - class Operation - include Google::Apis::Core::Hashable - - # The `Status` type defines a logical error model that is suitable for different - # programming environments, including REST APIs and RPC APIs. It is used by - # [gRPC](https://github.com/grpc). The error model is designed to be: - # - Simple to use and understand for most users - # - Flexible enough to meet unexpected needs - # # Overview - # The `Status` message contains three pieces of data: error code, error message, - # and error details. The error code should be an enum value of - # google.rpc.Code, but it may accept additional error codes if needed. The - # error message should be a developer-facing English message that helps - # developers *understand* and *resolve* the error. If a localized user-facing - # error message is needed, put the localized message in the error details or - # localize it in the client. The optional error details may contain arbitrary - # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. - # # Language mapping - # The `Status` message is the logical representation of the error model, but it - # is not necessarily the actual wire format. When the `Status` message is - # exposed in different client libraries and different wire protocols, it can be - # mapped differently. For example, it will likely be mapped to some exceptions - # in Java, but more likely mapped to some error codes in C. - # # Other uses - # The error model and the `Status` message can be used in a variety of - # environments, either with or without APIs, to provide a - # consistent developer experience across different environments. - # Example uses of this error model include: - # - Partial errors. If a service needs to return partial errors to the client, - # it may embed the `Status` in the normal response to indicate the partial - # errors. - # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. - # - Batch operations. If a client uses batch request and batch response, the - # `Status` message should be used directly inside batch response, one for - # each error sub-response. - # - Asynchronous operations. If an API call embeds asynchronous operation - # results in its response, the status of those operations should be - # represented directly using the `Status` message. - # - Logging. If some API errors are stored in logs, the message `Status` could - # be used directly after any stripping needed for security/privacy reasons. - # Corresponds to the JSON property `error` - # @return [Google::Apis::CloudresourcemanagerV1::Status] - attr_accessor :error - - # If the value is `false`, it means the operation is still in progress. - # If true, the operation is completed, and either `error` or `response` is - # available. - # Corresponds to the JSON property `done` - # @return [Boolean] - attr_accessor :done - alias_method :done?, :done - - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # Corresponds to the JSON property `metadata` - # @return [Hash] - attr_accessor :metadata - - # The normal response of the operation in case of success. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # Corresponds to the JSON property `response` - # @return [Hash] - attr_accessor :response - - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should have the format of `operations/some/unique/name`. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @error = args[:error] if args.key?(:error) - @done = args[:done] if args.key?(:done) - @metadata = args[:metadata] if args.key?(:metadata) - @response = args[:response] if args.key?(:response) - @name = args[:name] if args.key?(:name) - end - end - - # Request message for `GetIamPolicy` method. - class GetIamPolicyRequest - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # Request message for `SetIamPolicy` method. - class SetIamPolicyRequest - include Google::Apis::Core::Hashable - - # Defines an Identity and Access Management (IAM) policy. It is used to - # specify access control policies for Cloud Platform resources. - # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of - # `members` to a `role`, where the members can be user accounts, Google groups, - # Google domains, and service accounts. A `role` is a named list of permissions - # defined by IAM. - # **Example** - # ` - # "bindings": [ - # ` - # "role": "roles/owner", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-other-app@appspot.gserviceaccount.com", - # ] - # `, - # ` - # "role": "roles/viewer", - # "members": ["user:sean@example.com"] - # ` - # ] - # ` - # For a description of IAM and its features, see the - # [IAM developer's guide](https://cloud.google.com/iam). - # Corresponds to the JSON property `policy` - # @return [Google::Apis::CloudresourcemanagerV1::Policy] - attr_accessor :policy - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @policy = args[:policy] if args.key?(:policy) - end - end - - # Response message for `TestIamPermissions` method. - class TestIamPermissionsResponse - include Google::Apis::Core::Hashable - - # A subset of `TestPermissionsRequest.permissions` that the caller is - # allowed. + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). # Corresponds to the JSON property `permissions` # @return [Array] attr_accessor :permissions @@ -378,60 +172,6 @@ module Google end end - # The root node in the resource hierarchy to which a particular entity's - # (e.g., company) resources belong. - class Organization - include Google::Apis::Core::Hashable - - # A friendly string to be used to refer to the Organization in the UI. - # Assigned by the server, set to the firm name of the Google For Work - # customer that owns this organization. - # @OutputOnly - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # Timestamp when the Organization was created. Assigned by the server. - # @OutputOnly - # Corresponds to the JSON property `creationTime` - # @return [String] - attr_accessor :creation_time - - # The entity that owns an Organization. The lifetime of the Organization and - # all of its descendants are bound to the `OrganizationOwner`. If the - # `OrganizationOwner` is deleted, the Organization and all its descendants will - # be deleted. - # Corresponds to the JSON property `owner` - # @return [Google::Apis::CloudresourcemanagerV1::OrganizationOwner] - attr_accessor :owner - - # The organization's current lifecycle state. Assigned by the server. - # @OutputOnly - # Corresponds to the JSON property `lifecycleState` - # @return [String] - attr_accessor :lifecycle_state - - # Output Only. The resource name of the organization. This is the - # organization's relative path in the API. Its format is - # "organizations/[organization_id]". For example, "organizations/1234". - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @display_name = args[:display_name] if args.key?(:display_name) - @creation_time = args[:creation_time] if args.key?(:creation_time) - @owner = args[:owner] if args.key?(:owner) - @lifecycle_state = args[:lifecycle_state] if args.key?(:lifecycle_state) - @name = args[:name] if args.key?(:name) - end - end - # Defines an Identity and Access Management (IAM) policy. It is used to # specify access control policies for Cloud Platform resources. # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of @@ -498,161 +238,31 @@ module Google end end - # A status object which is used as the `metadata` field for the Operation - # returned by CreateProject. It provides insight for when significant phases of - # Project creation have completed. - class ProjectCreationStatus + # Metadata describing a long running folder operation + class FolderOperation include Google::Apis::Core::Hashable - # True if the project creation process is complete. - # Corresponds to the JSON property `ready` - # @return [Boolean] - attr_accessor :ready - alias_method :ready?, :ready - - # True if the project can be retrieved using GetProject. No other operations - # on the project are guaranteed to work until the project creation is - # complete. - # Corresponds to the JSON property `gettable` - # @return [Boolean] - attr_accessor :gettable - alias_method :gettable?, :gettable - - # Creation time of the project creation workflow. - # Corresponds to the JSON property `createTime` + # The display name of the folder. + # Corresponds to the JSON property `displayName` # @return [String] - attr_accessor :create_time + attr_accessor :display_name - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ready = args[:ready] if args.key?(:ready) - @gettable = args[:gettable] if args.key?(:gettable) - @create_time = args[:create_time] if args.key?(:create_time) - end - end - - # Request message for `TestIamPermissions` method. - class TestIamPermissionsRequest - include Google::Apis::Core::Hashable - - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # Corresponds to the JSON property `permissions` - # @return [Array] - attr_accessor :permissions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @permissions = args[:permissions] if args.key?(:permissions) - end - end - - # The request sent to the - # GetAncestry - # method. - class GetAncestryRequest - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # Response from the GetAncestry method. - class GetAncestryResponse - include Google::Apis::Core::Hashable - - # Ancestors are ordered from bottom to top of the resource hierarchy. The - # first ancestor is the project itself, followed by the project's parent, - # etc. - # Corresponds to the JSON property `ancestor` - # @return [Array] - attr_accessor :ancestor - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ancestor = args[:ancestor] if args.key?(:ancestor) - end - end - - # The response returned from the `SearchOrganizations` method. - class SearchOrganizationsResponse - include Google::Apis::Core::Hashable - - # The list of Organizations that matched the search query, possibly - # paginated. - # Corresponds to the JSON property `organizations` - # @return [Array] - attr_accessor :organizations - - # A pagination token to be used to retrieve the next page of results. If the - # result is too large to fit within the page size specified in the request, - # this field will be set with a token that can be used to fetch the next page - # of results. If this field is empty, it indicates that this response - # contains the last page of results. - # Corresponds to the JSON property `nextPageToken` + # The resource name of the folder's parent. + # Only applicable when the operation_type is MOVE. + # Corresponds to the JSON property `sourceParent` # @return [String] - attr_accessor :next_page_token + attr_accessor :source_parent - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @organizations = args[:organizations] if args.key?(:organizations) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # The request sent to the `SearchOrganizations` method. - class SearchOrganizationsRequest - include Google::Apis::Core::Hashable - - # The maximum number of Organizations to return in the response. - # This field is optional. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - # An optional query string used to filter the Organizations to return in - # the response. Filter rules are case-insensitive. - # Organizations may be filtered by `owner.directoryCustomerId` or by - # `domain`, where the domain is a Google for Work domain, for example: - # |Filter|Description| - # |------|-----------| - # |owner.directorycustomerid:123456789|Organizations with - # `owner.directory_customer_id` equal to `123456789`.| - # |domain:google.com|Organizations corresponding to the domain `google.com`.| - # This field is optional. - # Corresponds to the JSON property `filter` + # The resource name of the folder or organization we are either creating + # the folder under or moving the folder to. + # Corresponds to the JSON property `destinationParent` # @return [String] - attr_accessor :filter + attr_accessor :destination_parent - # A pagination token returned from a previous call to `SearchOrganizations` - # that indicates from where listing should continue. - # This field is optional. - # Corresponds to the JSON property `pageToken` + # The type of this operation. + # Corresponds to the JSON property `operationType` # @return [String] - attr_accessor :page_token + attr_accessor :operation_type def initialize(**args) update!(**args) @@ -660,50 +270,29 @@ module Google # Update properties of this object def update!(**args) - @page_size = args[:page_size] if args.key?(:page_size) - @filter = args[:filter] if args.key?(:filter) - @page_token = args[:page_token] if args.key?(:page_token) + @display_name = args[:display_name] if args.key?(:display_name) + @source_parent = args[:source_parent] if args.key?(:source_parent) + @destination_parent = args[:destination_parent] if args.key?(:destination_parent) + @operation_type = args[:operation_type] if args.key?(:operation_type) end end - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # service Foo ` - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # ` - # The JSON representation for `Empty` is empty JSON object ````. - class Empty + # A classification of the Folder Operation error. + class FolderOperationError include Google::Apis::Core::Hashable + # The type of operation error experienced. + # Corresponds to the JSON property `errorMessageId` + # @return [String] + attr_accessor :error_message_id + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - end - end - - # Identifying information for a single ancestor of a project. - class Ancestor - include Google::Apis::Core::Hashable - - # A container to reference an id for any resource type. A `resource` in Google - # Cloud Platform is a generic term for something you (a developer) may want to - # interact with through one of our API's. Some examples are an AppEngine app, - # a Compute Engine instance, a Cloud SQL database, and so on. - # Corresponds to the JSON property `resourceId` - # @return [Google::Apis::CloudresourcemanagerV1::ResourceId] - attr_accessor :resource_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @resource_id = args[:resource_id] if args.key?(:resource_id) + @error_message_id = args[:error_message_id] if args.key?(:error_message_id) end end @@ -737,6 +326,241 @@ module Google end end + # This resource represents a long-running operation that is the result of a + # network API call. + class Operation + include Google::Apis::Core::Hashable + + # If the value is `false`, it means the operation is still in progress. + # If true, the operation is completed, and either `error` or `response` is + # available. + # Corresponds to the JSON property `done` + # @return [Boolean] + attr_accessor :done + alias_method :done?, :done + + # The normal response of the operation in case of success. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # Corresponds to the JSON property `response` + # @return [Hash] + attr_accessor :response + + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should have the format of `operations/some/unique/name`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` which can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting purpose. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + # Corresponds to the JSON property `error` + # @return [Google::Apis::CloudresourcemanagerV1::Status] + attr_accessor :error + + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @done = args[:done] if args.key?(:done) + @response = args[:response] if args.key?(:response) + @name = args[:name] if args.key?(:name) + @error = args[:error] if args.key?(:error) + @metadata = args[:metadata] if args.key?(:metadata) + end + end + + # Identifying information for a single ancestor of a project. + class Ancestor + include Google::Apis::Core::Hashable + + # A container to reference an id for any resource type. A `resource` in Google + # Cloud Platform is a generic term for something you (a developer) may want to + # interact with through one of our API's. Some examples are an AppEngine app, + # a Compute Engine instance, a Cloud SQL database, and so on. + # Corresponds to the JSON property `resourceId` + # @return [Google::Apis::CloudresourcemanagerV1::ResourceId] + attr_accessor :resource_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @resource_id = args[:resource_id] if args.key?(:resource_id) + end + end + + # Request message for `SetIamPolicy` method. + class SetIamPolicyRequest + include Google::Apis::Core::Hashable + + # Defines an Identity and Access Management (IAM) policy. It is used to + # specify access control policies for Cloud Platform resources. + # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of + # `members` to a `role`, where the members can be user accounts, Google groups, + # Google domains, and service accounts. A `role` is a named list of permissions + # defined by IAM. + # **Example** + # ` + # "bindings": [ + # ` + # "role": "roles/owner", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-other-app@appspot.gserviceaccount.com", + # ] + # `, + # ` + # "role": "roles/viewer", + # "members": ["user:sean@example.com"] + # ` + # ] + # ` + # For a description of IAM and its features, see the + # [IAM developer's guide](https://cloud.google.com/iam). + # Corresponds to the JSON property `policy` + # @return [Google::Apis::CloudresourcemanagerV1::Policy] + attr_accessor :policy + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @policy = args[:policy] if args.key?(:policy) + end + end + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` which can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting purpose. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + class Status + include Google::Apis::Core::Hashable + + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # google.rpc.Status.details field, or localized by the client. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + # A list of messages that carry the error details. There will be a + # common set of message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @code = args[:code] if args.key?(:code) + @message = args[:message] if args.key?(:message) + @details = args[:details] if args.key?(:details) + end + end + # Associates `members` with a `role`. class Binding include Google::Apis::Core::Hashable @@ -777,86 +601,181 @@ module Google end end - # A Project is a high-level Google Cloud Platform entity. It is a - # container for ACLs, APIs, AppEngine Apps, VMs, and other - # Google Cloud Platform resources. - class Project + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # service Foo ` + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # ` + # The JSON representation for `Empty` is empty JSON object ````. + class Empty include Google::Apis::Core::Hashable - # A container to reference an id for any resource type. A `resource` in Google - # Cloud Platform is a generic term for something you (a developer) may want to - # interact with through one of our API's. Some examples are an AppEngine app, - # a Compute Engine instance, a Cloud SQL database, and so on. - # Corresponds to the JSON property `parent` - # @return [Google::Apis::CloudresourcemanagerV1::ResourceId] - attr_accessor :parent - - # The labels associated with this Project. - # Label keys must be between 1 and 63 characters long and must conform - # to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. - # Label values must be between 0 and 63 characters long and must conform - # to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. - # No more than 256 labels can be associated with a given resource. - # Clients should store labels in a representation such as JSON that does not - # depend on specific characters being disallowed. - # Example: "environment" : "dev" - # Read-write. - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels - - # The Project lifecycle state. - # Read-only. - # Corresponds to the JSON property `lifecycleState` - # @return [String] - attr_accessor :lifecycle_state - - # Creation time. - # Read-only. - # Corresponds to the JSON property `createTime` - # @return [String] - attr_accessor :create_time - - # The user-assigned display name of the Project. - # It must be 4 to 30 characters. - # Allowed characters are: lowercase and uppercase letters, numbers, - # hyphen, single-quote, double-quote, space, and exclamation point. - # Example: My Project - # Read-write. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The number uniquely identifying the project. - # Example: 415104041262 - # Read-only. - # Corresponds to the JSON property `projectNumber` - # @return [String] - attr_accessor :project_number - - # The unique, user-assigned ID of the Project. - # It must be 6 to 30 lowercase letters, digits, or hyphens. - # It must start with a letter. - # Trailing hyphens are prohibited. - # Example: tokyo-rain-123 - # Read-only after creation. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @parent = args[:parent] if args.key?(:parent) - @labels = args[:labels] if args.key?(:labels) + end + end + + # The request sent to the UndeleteProject + # method. + class UndeleteProjectRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # The root node in the resource hierarchy to which a particular entity's + # (e.g., company) resources belong. + class Organization + include Google::Apis::Core::Hashable + + # A friendly string to be used to refer to the Organization in the UI. + # Assigned by the server, set to the firm name of the Google For Work + # customer that owns this organization. + # @OutputOnly + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Timestamp when the Organization was created. Assigned by the server. + # @OutputOnly + # Corresponds to the JSON property `creationTime` + # @return [String] + attr_accessor :creation_time + + # The entity that owns an Organization. The lifetime of the Organization and + # all of its descendants are bound to the `OrganizationOwner`. If the + # `OrganizationOwner` is deleted, the Organization and all its descendants will + # be deleted. + # Corresponds to the JSON property `owner` + # @return [Google::Apis::CloudresourcemanagerV1::OrganizationOwner] + attr_accessor :owner + + # The organization's current lifecycle state. Assigned by the server. + # @OutputOnly + # Corresponds to the JSON property `lifecycleState` + # @return [String] + attr_accessor :lifecycle_state + + # Output Only. The resource name of the organization. This is the + # organization's relative path in the API. Its format is + # "organizations/[organization_id]". For example, "organizations/1234". + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @display_name = args[:display_name] if args.key?(:display_name) + @creation_time = args[:creation_time] if args.key?(:creation_time) + @owner = args[:owner] if args.key?(:owner) @lifecycle_state = args[:lifecycle_state] if args.key?(:lifecycle_state) - @create_time = args[:create_time] if args.key?(:create_time) @name = args[:name] if args.key?(:name) - @project_number = args[:project_number] if args.key?(:project_number) - @project_id = args[:project_id] if args.key?(:project_id) + end + end + + # A status object which is used as the `metadata` field for the Operation + # returned by CreateProject. It provides insight for when significant phases of + # Project creation have completed. + class ProjectCreationStatus + include Google::Apis::Core::Hashable + + # True if the project creation process is complete. + # Corresponds to the JSON property `ready` + # @return [Boolean] + attr_accessor :ready + alias_method :ready?, :ready + + # Creation time of the project creation workflow. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # True if the project can be retrieved using GetProject. No other operations + # on the project are guaranteed to work until the project creation is + # complete. + # Corresponds to the JSON property `gettable` + # @return [Boolean] + attr_accessor :gettable + alias_method :gettable?, :gettable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @ready = args[:ready] if args.key?(:ready) + @create_time = args[:create_time] if args.key?(:create_time) + @gettable = args[:gettable] if args.key?(:gettable) + end + end + + # Request message for `GetIamPolicy` method. + class GetIamPolicyRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Response message for `TestIamPermissions` method. + class TestIamPermissionsResponse + include Google::Apis::Core::Hashable + + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @permissions = args[:permissions] if args.key?(:permissions) + end + end + + # Response from the GetAncestry method. + class GetAncestryResponse + include Google::Apis::Core::Hashable + + # Ancestors are ordered from bottom to top of the resource hierarchy. The + # first ancestor is the project itself, followed by the project's parent, + # etc. + # Corresponds to the JSON property `ancestor` + # @return [Array] + attr_accessor :ancestor + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @ancestor = args[:ancestor] if args.key?(:ancestor) end end @@ -881,6 +800,87 @@ module Google @directory_customer_id = args[:directory_customer_id] if args.key?(:directory_customer_id) end end + + # A page of the response received from the + # ListProjects + # method. + # A paginated response where more pages are available has + # `next_page_token` set. This token can be used in a subsequent request to + # retrieve the next request page. + class ListProjectsResponse + include Google::Apis::Core::Hashable + + # The list of Projects that matched the list filter. This list can + # be paginated. + # Corresponds to the JSON property `projects` + # @return [Array] + attr_accessor :projects + + # Pagination token. + # If the result set is too large to fit in a single response, this token + # is returned. It encodes the position of the current result cursor. + # Feeding this value into a new list request with the `page_token` parameter + # gives the next page of the results. + # When `next_page_token` is not filled in, there is no next page and + # the list returned is the last page in the result set. + # Pagination tokens have a limited lifetime. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @projects = args[:projects] if args.key?(:projects) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # The request sent to the `SearchOrganizations` method. + class SearchOrganizationsRequest + include Google::Apis::Core::Hashable + + # An optional query string used to filter the Organizations to return in + # the response. Filter rules are case-insensitive. + # Organizations may be filtered by `owner.directoryCustomerId` or by + # `domain`, where the domain is a Google for Work domain, for example: + # |Filter|Description| + # |------|-----------| + # |owner.directorycustomerid:123456789|Organizations with + # `owner.directory_customer_id` equal to `123456789`.| + # |domain:google.com|Organizations corresponding to the domain `google.com`.| + # This field is optional. + # Corresponds to the JSON property `filter` + # @return [String] + attr_accessor :filter + + # A pagination token returned from a previous call to `SearchOrganizations` + # that indicates from where listing should continue. + # This field is optional. + # Corresponds to the JSON property `pageToken` + # @return [String] + attr_accessor :page_token + + # The maximum number of Organizations to return in the response. + # This field is optional. + # Corresponds to the JSON property `pageSize` + # @return [Fixnum] + attr_accessor :page_size + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @filter = args[:filter] if args.key?(:filter) + @page_token = args[:page_token] if args.key?(:page_token) + @page_size = args[:page_size] if args.key?(:page_size) + end + end end end end diff --git a/generated/google/apis/cloudresourcemanager_v1/representations.rb b/generated/google/apis/cloudresourcemanager_v1/representations.rb index 24283d851..5a8d4b74d 100644 --- a/generated/google/apis/cloudresourcemanager_v1/representations.rb +++ b/generated/google/apis/cloudresourcemanager_v1/representations.rb @@ -22,172 +22,187 @@ module Google module Apis module CloudresourcemanagerV1 - class FolderOperationError - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Status - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListProjectsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UndeleteProjectRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class FolderOperation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Operation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GetIamPolicyRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SetIamPolicyRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TestIamPermissionsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Organization - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Policy - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ProjectCreationStatus - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TestIamPermissionsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class GetAncestryRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class GetAncestryResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SearchOrganizationsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SearchOrganizationsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Empty - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Ancestor - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ResourceId - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Binding - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class Project class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class OrganizationOwner + class SearchOrganizationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TestIamPermissionsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Policy + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class FolderOperation class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end class FolderOperationError - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :error_message_id, as: 'errorMessageId' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ResourceId + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Operation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Ancestor + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SetIamPolicyRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Status - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - collection :details, as: 'details' - property :message, as: 'message' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Binding + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Empty + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UndeleteProjectRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Organization + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ProjectCreationStatus + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GetIamPolicyRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TestIamPermissionsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GetAncestryResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class OrganizationOwner + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ListProjectsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SearchOrganizationsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GetAncestryRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :projects, as: 'projects', class: Google::Apis::CloudresourcemanagerV1::Project, decorator: Google::Apis::CloudresourcemanagerV1::Project::Representation + end + end + + class Project + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :lifecycle_state, as: 'lifecycleState' + property :project_number, as: 'projectNumber' + property :parent, as: 'parent', class: Google::Apis::CloudresourcemanagerV1::ResourceId, decorator: Google::Apis::CloudresourcemanagerV1::ResourceId::Representation + + property :create_time, as: 'createTime' + hash :labels, as: 'labels' + property :name, as: 'name' + property :project_id, as: 'projectId' + end + end + + class SearchOrganizationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :organizations, as: 'organizations', class: Google::Apis::CloudresourcemanagerV1::Organization, decorator: Google::Apis::CloudresourcemanagerV1::Organization::Representation property :next_page_token, as: 'nextPageToken' end end - class UndeleteProjectRequest + class TestIamPermissionsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' + end + end + + class Policy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :bindings, as: 'bindings', class: Google::Apis::CloudresourcemanagerV1::Binding, decorator: Google::Apis::CloudresourcemanagerV1::Binding::Representation + + property :etag, :base64 => true, as: 'etag' + property :version, as: 'version' end end @@ -201,21 +216,38 @@ module Google end end - class Operation + class FolderOperationError # @private class Representation < Google::Apis::Core::JsonRepresentation - property :error, as: 'error', class: Google::Apis::CloudresourcemanagerV1::Status, decorator: Google::Apis::CloudresourcemanagerV1::Status::Representation - - property :done, as: 'done' - hash :metadata, as: 'metadata' - hash :response, as: 'response' - property :name, as: 'name' + property :error_message_id, as: 'errorMessageId' end end - class GetIamPolicyRequest + class ResourceId # @private class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' + property :id, as: 'id' + end + end + + class Operation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :done, as: 'done' + hash :response, as: 'response' + property :name, as: 'name' + property :error, as: 'error', class: Google::Apis::CloudresourcemanagerV1::Status, decorator: Google::Apis::CloudresourcemanagerV1::Status::Representation + + hash :metadata, as: 'metadata' + end + end + + class Ancestor + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :resource_id, as: 'resourceId', class: Google::Apis::CloudresourcemanagerV1::ResourceId, decorator: Google::Apis::CloudresourcemanagerV1::ResourceId::Representation + end end @@ -227,10 +259,32 @@ module Google end end - class TestIamPermissionsResponse + class Status + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :code, as: 'code' + property :message, as: 'message' + collection :details, as: 'details' + end + end + + class Binding + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :members, as: 'members' + property :role, as: 'role' + end + end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class UndeleteProjectRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :permissions, as: 'permissions' end end @@ -246,38 +300,28 @@ module Google end end - class Policy - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :bindings, as: 'bindings', class: Google::Apis::CloudresourcemanagerV1::Binding, decorator: Google::Apis::CloudresourcemanagerV1::Binding::Representation - - property :etag, :base64 => true, as: 'etag' - property :version, as: 'version' - end - end - class ProjectCreationStatus # @private class Representation < Google::Apis::Core::JsonRepresentation property :ready, as: 'ready' - property :gettable, as: 'gettable' property :create_time, as: 'createTime' + property :gettable, as: 'gettable' end end - class TestIamPermissionsRequest + class GetIamPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class TestIamPermissionsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation collection :permissions, as: 'permissions' end end - class GetAncestryRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - class GetAncestryResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -286,10 +330,17 @@ module Google end end - class SearchOrganizationsResponse + class OrganizationOwner # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :organizations, as: 'organizations', class: Google::Apis::CloudresourcemanagerV1::Organization, decorator: Google::Apis::CloudresourcemanagerV1::Organization::Representation + property :directory_customer_id, as: 'directoryCustomerId' + end + end + + class ListProjectsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :projects, as: 'projects', class: Google::Apis::CloudresourcemanagerV1::Project, decorator: Google::Apis::CloudresourcemanagerV1::Project::Representation property :next_page_token, as: 'nextPageToken' end @@ -298,60 +349,9 @@ module Google class SearchOrganizationsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :page_size, as: 'pageSize' property :filter, as: 'filter' property :page_token, as: 'pageToken' - end - end - - class Empty - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - class Ancestor - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :resource_id, as: 'resourceId', class: Google::Apis::CloudresourcemanagerV1::ResourceId, decorator: Google::Apis::CloudresourcemanagerV1::ResourceId::Representation - - end - end - - class ResourceId - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - property :id, as: 'id' - end - end - - class Binding - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :members, as: 'members' - property :role, as: 'role' - end - end - - class Project - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :parent, as: 'parent', class: Google::Apis::CloudresourcemanagerV1::ResourceId, decorator: Google::Apis::CloudresourcemanagerV1::ResourceId::Representation - - hash :labels, as: 'labels' - property :lifecycle_state, as: 'lifecycleState' - property :create_time, as: 'createTime' - property :name, as: 'name' - property :project_number, as: 'projectNumber' - property :project_id, as: 'projectId' - end - end - - class OrganizationOwner - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :directory_customer_id, as: 'directoryCustomerId' + property :page_size, as: 'pageSize' end end end diff --git a/generated/google/apis/cloudresourcemanager_v1/service.rb b/generated/google/apis/cloudresourcemanager_v1/service.rb index 52ce0166e..a1d84e7d7 100644 --- a/generated/google/apis/cloudresourcemanager_v1/service.rb +++ b/generated/google/apis/cloudresourcemanager_v1/service.rb @@ -47,216 +47,6 @@ module Google super('https://cloudresourcemanager.googleapis.com/', '') end - # Fetches an Organization resource identified by the specified resource name. - # @param [String] name - # The resource name of the Organization to fetch, e.g. "organizations/1234". - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Organization] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1::Organization] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_organization(name, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+name}', options) - command.response_representation = Google::Apis::CloudresourcemanagerV1::Organization::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::Organization - command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Returns permissions that a caller has on the specified Organization. - # The `resource` field should be the organization's resource name, - # e.g. "organizations/123". - # @param [String] resource - # REQUIRED: The resource for which the policy detail is being requested. - # `resource` is usually specified as a path. For example, a Project - # resource is specified as `projects/`project``. - # @param [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest] test_iam_permissions_request_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def test_organization_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options) - command.request_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest::Representation - command.request_object = test_iam_permissions_request_object - command.response_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse - command.params['resource'] = resource unless resource.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Searches Organization resources that are visible to the user and satisfy - # the specified filter. This method returns Organizations in an unspecified - # order. New Organizations do not necessarily appear at the end of the - # results. - # @param [Google::Apis::CloudresourcemanagerV1::SearchOrganizationsRequest] search_organizations_request_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def search_organizations(search_organizations_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/organizations:search', options) - command.request_representation = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsRequest::Representation - command.request_object = search_organizations_request_object - command.response_representation = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Sets the access control policy on an Organization resource. Replaces any - # existing policy. The `resource` field should be the organization's resource - # name, e.g. "organizations/123". - # @param [String] resource - # REQUIRED: The resource for which the policy is being specified. - # `resource` is usually specified as a path. For example, a Project - # resource is specified as `projects/`project``. - # @param [Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest] set_iam_policy_request_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Policy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1::Policy] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_organization_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options) - command.request_representation = Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest::Representation - command.request_object = set_iam_policy_request_object - command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::Policy - command.params['resource'] = resource unless resource.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Gets the access control policy for an Organization resource. May be empty - # if no such policy or resource exists. The `resource` field should be the - # organization's resource name, e.g. "organizations/123". - # @param [String] resource - # REQUIRED: The resource for which the policy is being requested. - # `resource` is usually specified as a path. For example, a Project - # resource is specified as `projects/`project``. - # @param [Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest] get_iam_policy_request_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Policy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1::Policy] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_organization_iam_policy(resource, get_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options) - command.request_representation = Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest::Representation - command.request_object = get_iam_policy_request_object - command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::Policy - command.params['resource'] = resource unless resource.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Gets a list of ancestors in the resource hierarchy for the Project - # identified by the specified `project_id` (for example, `my-project-123`). - # The caller must have read permissions for this Project. - # @param [String] project_id - # The Project ID (for example, `my-project-123`). - # Required. - # @param [Google::Apis::CloudresourcemanagerV1::GetAncestryRequest] get_ancestry_request_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudresourcemanagerV1::GetAncestryResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1::GetAncestryResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_ancestry(project_id, get_ancestry_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/projects/{projectId}:getAncestry', options) - command.request_representation = Google::Apis::CloudresourcemanagerV1::GetAncestryRequest::Representation - command.request_object = get_ancestry_request_object - command.response_representation = Google::Apis::CloudresourcemanagerV1::GetAncestryResponse::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::GetAncestryResponse - command.params['projectId'] = project_id unless project_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - # Returns the IAM access control policy for the specified Project. # Permission is denied if the policy or the resource does not exist. # @param [String] resource @@ -264,11 +54,11 @@ module Google # `resource` is usually specified as a path. For example, a Project # resource is specified as `projects/`project``. # @param [Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest] get_iam_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -281,15 +71,15 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_iam_policy(resource, get_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def get_project_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/projects/{resource}:getIamPolicy', options) command.request_representation = Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest::Representation command.request_object = get_iam_policy_request_object command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation command.response_class = Google::Apis::CloudresourcemanagerV1::Policy command.params['resource'] = resource unless resource.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -303,11 +93,11 @@ module Google # The project ID (for example, `foo-bar-123`). # Required. # @param [Google::Apis::CloudresourcemanagerV1::UndeleteProjectRequest] undelete_project_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -320,15 +110,204 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def undelete_project(project_id, undelete_project_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def undelete_project(project_id, undelete_project_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/projects/{projectId}:undelete', options) command.request_representation = Google::Apis::CloudresourcemanagerV1::UndeleteProjectRequest::Representation command.request_object = undelete_project_request_object command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation command.response_class = Google::Apis::CloudresourcemanagerV1::Empty command.params['projectId'] = project_id unless project_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Retrieves the Project identified by the specified + # `project_id` (for example, `my-project-123`). + # The caller must have read permissions for this Project. + # @param [String] project_id + # The Project ID (for example, `my-project-123`). + # Required. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Project] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::Project] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project(project_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/projects/{projectId}', options) + command.response_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::Project + command.params['projectId'] = project_id unless project_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates the attributes of the Project identified by the specified + # `project_id` (for example, `my-project-123`). + # The caller must have modify permissions for this Project. + # @param [String] project_id + # The project ID (for example, `my-project-123`). + # Required. + # @param [Google::Apis::CloudresourcemanagerV1::Project] project_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Project] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::Project] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_project(project_id, project_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'v1/projects/{projectId}', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation + command.request_object = project_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::Project + command.params['projectId'] = project_id unless project_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a list of ancestors in the resource hierarchy for the Project + # identified by the specified `project_id` (for example, `my-project-123`). + # The caller must have read permissions for this Project. + # @param [String] project_id + # The Project ID (for example, `my-project-123`). + # Required. + # @param [Google::Apis::CloudresourcemanagerV1::GetAncestryRequest] get_ancestry_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::GetAncestryResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::GetAncestryResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_ancestry(project_id, get_ancestry_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/projects/{projectId}:getAncestry', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::GetAncestryRequest::Representation + command.request_object = get_ancestry_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::GetAncestryResponse::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::GetAncestryResponse + command.params['projectId'] = project_id unless project_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns permissions that a caller has on the specified Project. + # @param [String] resource + # REQUIRED: The resource for which the policy detail is being requested. + # `resource` is usually specified as a path. For example, a Project + # resource is specified as `projects/`project``. + # @param [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest] test_iam_permissions_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def test_project_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/projects/{resource}:testIamPermissions', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest::Representation + command.request_object = test_iam_permissions_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Marks the Project identified by the specified + # `project_id` (for example, `my-project-123`) for deletion. + # This method will only affect the Project if the following criteria are met: + # + The Project does not have a billing account associated with it. + # + The Project has a lifecycle state of + # ACTIVE. + # This method changes the Project's lifecycle state from + # ACTIVE + # to DELETE_REQUESTED. + # The deletion starts at an unspecified time, + # at which point the Project is no longer accessible. + # Until the deletion completes, you can check the lifecycle state + # checked by retrieving the Project with GetProject, + # and the Project remains visible to ListProjects. + # However, you cannot update the project. + # After the deletion completes, the Project is not retrievable by + # the GetProject and + # ListProjects methods. + # The caller must have modify permissions for this Project. + # @param [String] project_id + # The Project ID (for example, `foo-bar-123`). + # Required. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project(project_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/projects/{projectId}', options) + command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::Empty + command.params['projectId'] = project_id unless project_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -362,11 +341,11 @@ module Google # A pagination token returned from a previous call to ListProjects # that indicates from where listing should continue. # Optional. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -379,120 +358,15 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_projects(page_size: nil, filter: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_projects(page_size: nil, filter: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/projects', options) command.response_representation = Google::Apis::CloudresourcemanagerV1::ListProjectsResponse::Representation command.response_class = Google::Apis::CloudresourcemanagerV1::ListProjectsResponse command.query['pageSize'] = page_size unless page_size.nil? command.query['filter'] = filter unless filter.nil? command.query['pageToken'] = page_token unless page_token.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves the Project identified by the specified - # `project_id` (for example, `my-project-123`). - # The caller must have read permissions for this Project. - # @param [String] project_id - # The Project ID (for example, `my-project-123`). - # Required. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Project] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1::Project] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project(project_id, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/projects/{projectId}', options) - command.response_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::Project - command.params['projectId'] = project_id unless project_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Updates the attributes of the Project identified by the specified - # `project_id` (for example, `my-project-123`). - # The caller must have modify permissions for this Project. - # @param [String] project_id - # The project ID (for example, `my-project-123`). - # Required. - # @param [Google::Apis::CloudresourcemanagerV1::Project] project_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Project] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1::Project] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_project(project_id, project_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:put, 'v1/projects/{projectId}', options) - command.request_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation - command.request_object = project_object - command.response_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::Project - command.params['projectId'] = project_id unless project_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Request that a new Project be created. The result is an Operation which - # can be used to track the creation process. It is automatically deleted - # after a few hours, so there is no need to call DeleteOperation. - # Our SLO permits Project creation to take up to 30 seconds at the 90th - # percentile. As of 2016-08-29, we are observing 6 seconds 50th percentile - # latency. 95th percentile latency is around 11 seconds. We recommend - # polling at the 5th second with an exponential backoff. - # @param [Google::Apis::CloudresourcemanagerV1::Project] project_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_project(project_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/projects', options) - command.request_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation - command.request_object = project_object - command.response_representation = Google::Apis::CloudresourcemanagerV1::Operation::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::Operation - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -529,11 +403,11 @@ module Google # `resource` is usually specified as a path. For example, a Project # resource is specified as `projects/`project``. # @param [Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest] set_iam_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -546,112 +420,31 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_project_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def set_project_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/projects/{resource}:setIamPolicy', options) command.request_representation = Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest::Representation command.request_object = set_iam_policy_request_object command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation command.response_class = Google::Apis::CloudresourcemanagerV1::Policy command.params['resource'] = resource unless resource.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - # Marks the Project identified by the specified - # `project_id` (for example, `my-project-123`) for deletion. - # This method will only affect the Project if the following criteria are met: - # + The Project does not have a billing account associated with it. - # + The Project has a lifecycle state of - # ACTIVE. - # This method changes the Project's lifecycle state from - # ACTIVE - # to DELETE_REQUESTED. - # The deletion starts at an unspecified time, - # at which point the Project is no longer accessible. - # Until the deletion completes, you can check the lifecycle state - # checked by retrieving the Project with GetProject, - # and the Project remains visible to ListProjects. - # However, you cannot update the project. - # After the deletion completes, the Project is not retrievable by - # the GetProject and - # ListProjects methods. - # The caller must have modify permissions for this Project. - # @param [String] project_id - # The Project ID (for example, `foo-bar-123`). - # Required. + # Request that a new Project be created. The result is an Operation which + # can be used to track the creation process. It is automatically deleted + # after a few hours, so there is no need to call DeleteOperation. + # Our SLO permits Project creation to take up to 30 seconds at the 90th + # percentile. As of 2016-08-29, we are observing 6 seconds 50th percentile + # latency. 95th percentile latency is around 11 seconds. We recommend + # polling at the 5th second with an exponential backoff. + # @param [Google::Apis::CloudresourcemanagerV1::Project] project_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_project(project_id, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/projects/{projectId}', options) - command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::Empty - command.params['projectId'] = project_id unless project_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Returns permissions that a caller has on the specified Project. - # @param [String] resource - # REQUIRED: The resource for which the policy detail is being requested. - # `resource` is usually specified as a path. For example, a Project - # resource is specified as `projects/`project``. - # @param [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest] test_iam_permissions_request_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def test_project_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/projects/{resource}:testIamPermissions', options) - command.request_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest::Representation - command.request_object = test_iam_permissions_request_object - command.response_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse - command.params['resource'] = resource unless resource.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # @param [String] name - # The name of the operation resource. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -664,13 +457,220 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_operation(name, quota_user: nil, fields: nil, options: nil, &block) + def create_project(project_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/projects', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation + command.request_object = project_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::Operation::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::Operation + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Searches Organization resources that are visible to the user and satisfy + # the specified filter. This method returns Organizations in an unspecified + # order. New Organizations do not necessarily appear at the end of the + # results. + # @param [Google::Apis::CloudresourcemanagerV1::SearchOrganizationsRequest] search_organizations_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def search_organizations(search_organizations_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/organizations:search', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsRequest::Representation + command.request_object = search_organizations_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Fetches an Organization resource identified by the specified resource name. + # @param [String] name + # The resource name of the Organization to fetch, e.g. "organizations/1234". + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Organization] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::Organization] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_organization(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::CloudresourcemanagerV1::Organization::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::Organization + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Sets the access control policy on an Organization resource. Replaces any + # existing policy. The `resource` field should be the organization's resource + # name, e.g. "organizations/123". + # @param [String] resource + # REQUIRED: The resource for which the policy is being specified. + # `resource` is usually specified as a path. For example, a Project + # resource is specified as `projects/`project``. + # @param [Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest] set_iam_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::Policy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def set_organization_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest::Representation + command.request_object = set_iam_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns permissions that a caller has on the specified Organization. + # The `resource` field should be the organization's resource name, + # e.g. "organizations/123". + # @param [String] resource + # REQUIRED: The resource for which the policy detail is being requested. + # `resource` is usually specified as a path. For example, a Project + # resource is specified as `projects/`project``. + # @param [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest] test_iam_permissions_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def test_organization_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest::Representation + command.request_object = test_iam_permissions_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the access control policy for an Organization resource. May be empty + # if no such policy or resource exists. The `resource` field should be the + # organization's resource name, e.g. "organizations/123". + # @param [String] resource + # REQUIRED: The resource for which the policy is being requested. + # `resource` is usually specified as a path. For example, a Project + # resource is specified as `projects/`project``. + # @param [Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest] get_iam_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::Policy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_organization_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest::Representation + command.request_object = get_iam_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # @param [String] name + # The name of the operation resource. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', options) command.response_representation = Google::Apis::CloudresourcemanagerV1::Operation::Representation command.response_class = Google::Apis::CloudresourcemanagerV1::Operation command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/cloudresourcemanager_v1beta1.rb b/generated/google/apis/cloudresourcemanager_v1beta1.rb index 4213a0f6d..53c62b32c 100644 --- a/generated/google/apis/cloudresourcemanager_v1beta1.rb +++ b/generated/google/apis/cloudresourcemanager_v1beta1.rb @@ -26,13 +26,13 @@ module Google # @see https://cloud.google.com/resource-manager module CloudresourcemanagerV1beta1 VERSION = 'V1beta1' - REVISION = '20170122' - - # View and manage your data across Google Cloud Platform services - AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' + REVISION = '20170125' # View your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only' + + # View and manage your data across Google Cloud Platform services + AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' end end end diff --git a/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb b/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb index b1c624b2d..553204620 100644 --- a/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +++ b/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb @@ -22,119 +22,17 @@ module Google module Apis module CloudresourcemanagerV1beta1 - # A classification of the Folder Operation error. - class FolderOperationError + # Identifying information for a single ancestor of a project. + class Ancestor include Google::Apis::Core::Hashable - # The type of operation error experienced. - # Corresponds to the JSON property `errorMessageId` - # @return [String] - attr_accessor :error_message_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @error_message_id = args[:error_message_id] if args.key?(:error_message_id) - end - end - - # A page of the response received from the - # ListProjects - # method. - # A paginated response where more pages are available has - # `next_page_token` set. This token can be used in a subsequent request to - # retrieve the next request page. - class ListProjectsResponse - include Google::Apis::Core::Hashable - - # The list of Projects that matched the list filter. This list can - # be paginated. - # Corresponds to the JSON property `projects` - # @return [Array] - attr_accessor :projects - - # Pagination token. - # If the result set is too large to fit in a single response, this token - # is returned. It encodes the position of the current result cursor. - # Feeding this value into a new list request with the `page_token` parameter - # gives the next page of the results. - # When `next_page_token` is not filled in, there is no next page and - # the list returned is the last page in the result set. - # Pagination tokens have a limited lifetime. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @projects = args[:projects] if args.key?(:projects) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # The request sent to the UndeleteProject - # method. - class UndeleteProjectRequest - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # Metadata describing a long running folder operation - class FolderOperation - include Google::Apis::Core::Hashable - - # The display name of the folder. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The resource name of the folder's parent. - # Only applicable when the operation_type is MOVE. - # Corresponds to the JSON property `sourceParent` - # @return [String] - attr_accessor :source_parent - - # The resource name of the folder or organization we are either creating - # the folder under or moving the folder to. - # Corresponds to the JSON property `destinationParent` - # @return [String] - attr_accessor :destination_parent - - # The type of this operation. - # Corresponds to the JSON property `operationType` - # @return [String] - attr_accessor :operation_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @display_name = args[:display_name] if args.key?(:display_name) - @source_parent = args[:source_parent] if args.key?(:source_parent) - @destination_parent = args[:destination_parent] if args.key?(:destination_parent) - @operation_type = args[:operation_type] if args.key?(:operation_type) - end - end - - # Request message for `GetIamPolicy` method. - class GetIamPolicyRequest - include Google::Apis::Core::Hashable + # A container to reference an id for any resource type. A `resource` in Google + # Cloud Platform is a generic term for something you (a developer) may want to + # interact with through one of our API's. Some examples are an AppEngine app, + # a Compute Engine instance, a Cloud SQL database, and so on. + # Corresponds to the JSON property `resourceId` + # @return [Google::Apis::CloudresourcemanagerV1beta1::ResourceId] + attr_accessor :resource_id def initialize(**args) update!(**args) @@ -142,6 +40,7 @@ module Google # Update properties of this object def update!(**args) + @resource_id = args[:resource_id] if args.key?(:resource_id) end end @@ -189,214 +88,6 @@ module Google end end - # Response message for `TestIamPermissions` method. - class TestIamPermissionsResponse - include Google::Apis::Core::Hashable - - # A subset of `TestPermissionsRequest.permissions` that the caller is - # allowed. - # Corresponds to the JSON property `permissions` - # @return [Array] - attr_accessor :permissions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @permissions = args[:permissions] if args.key?(:permissions) - end - end - - # The root node in the resource hierarchy to which a particular entity's - # (e.g., company) resources belong. - class Organization - include Google::Apis::Core::Hashable - - # The organization's current lifecycle state. Assigned by the server. - # @OutputOnly - # Corresponds to the JSON property `lifecycleState` - # @return [String] - attr_accessor :lifecycle_state - - # A friendly string to be used to refer to the Organization in the UI. - # Assigned by the server, set to the firm name of the Google For Work - # customer that owns this organization. - # @OutputOnly - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # An immutable id for the Organization that is assigned on creation. This - # should be omitted when creating a new Organization. - # This field is read-only. - # This field is deprecated and will be removed in v1. Use name instead. - # Corresponds to the JSON property `organizationId` - # @return [String] - attr_accessor :organization_id - - # Output Only. The resource name of the organization. This is the - # organization's relative path in the API. Its format is - # "organizations/[organization_id]". For example, "organizations/1234". - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Timestamp when the Organization was created. Assigned by the server. - # @OutputOnly - # Corresponds to the JSON property `creationTime` - # @return [String] - attr_accessor :creation_time - - # The entity that owns an Organization. The lifetime of the Organization and - # all of its descendants are bound to the `OrganizationOwner`. If the - # `OrganizationOwner` is deleted, the Organization and all its descendants will - # be deleted. - # Corresponds to the JSON property `owner` - # @return [Google::Apis::CloudresourcemanagerV1beta1::OrganizationOwner] - attr_accessor :owner - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @lifecycle_state = args[:lifecycle_state] if args.key?(:lifecycle_state) - @display_name = args[:display_name] if args.key?(:display_name) - @organization_id = args[:organization_id] if args.key?(:organization_id) - @name = args[:name] if args.key?(:name) - @creation_time = args[:creation_time] if args.key?(:creation_time) - @owner = args[:owner] if args.key?(:owner) - end - end - - # Defines an Identity and Access Management (IAM) policy. It is used to - # specify access control policies for Cloud Platform resources. - # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of - # `members` to a `role`, where the members can be user accounts, Google groups, - # Google domains, and service accounts. A `role` is a named list of permissions - # defined by IAM. - # **Example** - # ` - # "bindings": [ - # ` - # "role": "roles/owner", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-other-app@appspot.gserviceaccount.com", - # ] - # `, - # ` - # "role": "roles/viewer", - # "members": ["user:sean@example.com"] - # ` - # ] - # ` - # For a description of IAM and its features, see the - # [IAM developer's guide](https://cloud.google.com/iam). - class Policy - include Google::Apis::Core::Hashable - - # Associates a list of `members` to a `role`. - # Multiple `bindings` must not be specified for the same `role`. - # `bindings` with no members will result in an error. - # Corresponds to the JSON property `bindings` - # @return [Array] - attr_accessor :bindings - - # `etag` is used for optimistic concurrency control as a way to help - # prevent simultaneous updates of a policy from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform policy updates in order to avoid race - # conditions: An `etag` is returned in the response to `getIamPolicy`, and - # systems are expected to put that etag in the request to `setIamPolicy` to - # ensure that their change will be applied to the same version of the policy. - # If no `etag` is provided in the call to `setIamPolicy`, then the existing - # policy is overwritten blindly. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Version of the `Policy`. The default version is 0. - # Corresponds to the JSON property `version` - # @return [Fixnum] - attr_accessor :version - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bindings = args[:bindings] if args.key?(:bindings) - @etag = args[:etag] if args.key?(:etag) - @version = args[:version] if args.key?(:version) - end - end - - # A status object which is used as the `metadata` field for the Operation - # returned by CreateProject. It provides insight for when significant phases of - # Project creation have completed. - class ProjectCreationStatus - include Google::Apis::Core::Hashable - - # True if the project creation process is complete. - # Corresponds to the JSON property `ready` - # @return [Boolean] - attr_accessor :ready - alias_method :ready?, :ready - - # True if the project can be retrieved using GetProject. No other operations - # on the project are guaranteed to work until the project creation is - # complete. - # Corresponds to the JSON property `gettable` - # @return [Boolean] - attr_accessor :gettable - alias_method :gettable?, :gettable - - # Creation time of the project creation workflow. - # Corresponds to the JSON property `createTime` - # @return [String] - attr_accessor :create_time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ready = args[:ready] if args.key?(:ready) - @gettable = args[:gettable] if args.key?(:gettable) - @create_time = args[:create_time] if args.key?(:create_time) - end - end - - # Request message for `TestIamPermissions` method. - class TestIamPermissionsRequest - include Google::Apis::Core::Hashable - - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # Corresponds to the JSON property `permissions` - # @return [Array] - attr_accessor :permissions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @permissions = args[:permissions] if args.key?(:permissions) - end - end - # The response returned from the `ListOrganizations` method. class ListOrganizationsResponse include Google::Apis::Core::Hashable @@ -426,196 +117,6 @@ module Google end end - # The request sent to the - # GetAncestry - # method. - class GetAncestryRequest - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # Response from the GetAncestry method. - class GetAncestryResponse - include Google::Apis::Core::Hashable - - # Ancestors are ordered from bottom to top of the resource hierarchy. The - # first ancestor is the project itself, followed by the project's parent, - # etc. - # Corresponds to the JSON property `ancestor` - # @return [Array] - attr_accessor :ancestor - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ancestor = args[:ancestor] if args.key?(:ancestor) - end - end - - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # service Foo ` - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # ` - # The JSON representation for `Empty` is empty JSON object ````. - class Empty - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # Identifying information for a single ancestor of a project. - class Ancestor - include Google::Apis::Core::Hashable - - # A container to reference an id for any resource type. A `resource` in Google - # Cloud Platform is a generic term for something you (a developer) may want to - # interact with through one of our API's. Some examples are an AppEngine app, - # a Compute Engine instance, a Cloud SQL database, and so on. - # Corresponds to the JSON property `resourceId` - # @return [Google::Apis::CloudresourcemanagerV1beta1::ResourceId] - attr_accessor :resource_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @resource_id = args[:resource_id] if args.key?(:resource_id) - end - end - - # A container to reference an id for any resource type. A `resource` in Google - # Cloud Platform is a generic term for something you (a developer) may want to - # interact with through one of our API's. Some examples are an AppEngine app, - # a Compute Engine instance, a Cloud SQL database, and so on. - class ResourceId - include Google::Apis::Core::Hashable - - # Required field representing the resource type this id is for. - # At present, the valid types are "project" and "organization". - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Required field for the type-specific id. This should correspond to the id - # used in the type-specific API's. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] if args.key?(:type) - @id = args[:id] if args.key?(:id) - end - end - - # A Project is a high-level Google Cloud Platform entity. It is a - # container for ACLs, APIs, AppEngine Apps, VMs, and other - # Google Cloud Platform resources. - class Project - include Google::Apis::Core::Hashable - - # A container to reference an id for any resource type. A `resource` in Google - # Cloud Platform is a generic term for something you (a developer) may want to - # interact with through one of our API's. Some examples are an AppEngine app, - # a Compute Engine instance, a Cloud SQL database, and so on. - # Corresponds to the JSON property `parent` - # @return [Google::Apis::CloudresourcemanagerV1beta1::ResourceId] - attr_accessor :parent - - # The labels associated with this Project. - # Label keys must be between 1 and 63 characters long and must conform - # to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. - # Label values must be between 0 and 63 characters long and must conform - # to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. - # No more than 256 labels can be associated with a given resource. - # Clients should store labels in a representation such as JSON that does not - # depend on specific characters being disallowed. - # Example: "environment" : "dev" - # Read-write. - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels - - # The Project lifecycle state. - # Read-only. - # Corresponds to the JSON property `lifecycleState` - # @return [String] - attr_accessor :lifecycle_state - - # Creation time. - # Read-only. - # Corresponds to the JSON property `createTime` - # @return [String] - attr_accessor :create_time - - # The user-assigned display name of the Project. - # It must be 4 to 30 characters. - # Allowed characters are: lowercase and uppercase letters, numbers, - # hyphen, single-quote, double-quote, space, and exclamation point. - # Example: My Project - # Read-write. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The number uniquely identifying the project. - # Example: 415104041262 - # Read-only. - # Corresponds to the JSON property `projectNumber` - # @return [String] - attr_accessor :project_number - - # The unique, user-assigned ID of the Project. - # It must be 6 to 30 lowercase letters, digits, or hyphens. - # It must start with a letter. - # Trailing hyphens are prohibited. - # Example: tokyo-rain-123 - # Read-only after creation. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @parent = args[:parent] if args.key?(:parent) - @labels = args[:labels] if args.key?(:labels) - @lifecycle_state = args[:lifecycle_state] if args.key?(:lifecycle_state) - @create_time = args[:create_time] if args.key?(:create_time) - @name = args[:name] if args.key?(:name) - @project_number = args[:project_number] if args.key?(:project_number) - @project_id = args[:project_id] if args.key?(:project_id) - end - end - # Associates `members` with a `role`. class Binding include Google::Apis::Core::Hashable @@ -656,6 +157,193 @@ module Google end end + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # service Foo ` + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # ` + # The JSON representation for `Empty` is empty JSON object ````. + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # The request sent to the UndeleteProject + # method. + class UndeleteProjectRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # The root node in the resource hierarchy to which a particular entity's + # (e.g., company) resources belong. + class Organization + include Google::Apis::Core::Hashable + + # The entity that owns an Organization. The lifetime of the Organization and + # all of its descendants are bound to the `OrganizationOwner`. If the + # `OrganizationOwner` is deleted, the Organization and all its descendants will + # be deleted. + # Corresponds to the JSON property `owner` + # @return [Google::Apis::CloudresourcemanagerV1beta1::OrganizationOwner] + attr_accessor :owner + + # Output Only. The resource name of the organization. This is the + # organization's relative path in the API. Its format is + # "organizations/[organization_id]". For example, "organizations/1234". + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # An immutable id for the Organization that is assigned on creation. This + # should be omitted when creating a new Organization. + # This field is read-only. + # This field is deprecated and will be removed in v1. Use name instead. + # Corresponds to the JSON property `organizationId` + # @return [String] + attr_accessor :organization_id + + # The organization's current lifecycle state. Assigned by the server. + # @OutputOnly + # Corresponds to the JSON property `lifecycleState` + # @return [String] + attr_accessor :lifecycle_state + + # A friendly string to be used to refer to the Organization in the UI. + # Assigned by the server, set to the firm name of the Google For Work + # customer that owns this organization. + # @OutputOnly + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Timestamp when the Organization was created. Assigned by the server. + # @OutputOnly + # Corresponds to the JSON property `creationTime` + # @return [String] + attr_accessor :creation_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @owner = args[:owner] if args.key?(:owner) + @name = args[:name] if args.key?(:name) + @organization_id = args[:organization_id] if args.key?(:organization_id) + @lifecycle_state = args[:lifecycle_state] if args.key?(:lifecycle_state) + @display_name = args[:display_name] if args.key?(:display_name) + @creation_time = args[:creation_time] if args.key?(:creation_time) + end + end + + # A status object which is used as the `metadata` field for the Operation + # returned by CreateProject. It provides insight for when significant phases of + # Project creation have completed. + class ProjectCreationStatus + include Google::Apis::Core::Hashable + + # Creation time of the project creation workflow. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # True if the project can be retrieved using GetProject. No other operations + # on the project are guaranteed to work until the project creation is + # complete. + # Corresponds to the JSON property `gettable` + # @return [Boolean] + attr_accessor :gettable + alias_method :gettable?, :gettable + + # True if the project creation process is complete. + # Corresponds to the JSON property `ready` + # @return [Boolean] + attr_accessor :ready + alias_method :ready?, :ready + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @create_time = args[:create_time] if args.key?(:create_time) + @gettable = args[:gettable] if args.key?(:gettable) + @ready = args[:ready] if args.key?(:ready) + end + end + + # Response message for `TestIamPermissions` method. + class TestIamPermissionsResponse + include Google::Apis::Core::Hashable + + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @permissions = args[:permissions] if args.key?(:permissions) + end + end + + # Request message for `GetIamPolicy` method. + class GetIamPolicyRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Response from the GetAncestry method. + class GetAncestryResponse + include Google::Apis::Core::Hashable + + # Ancestors are ordered from bottom to top of the resource hierarchy. The + # first ancestor is the project itself, followed by the project's parent, + # etc. + # Corresponds to the JSON property `ancestor` + # @return [Array] + attr_accessor :ancestor + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @ancestor = args[:ancestor] if args.key?(:ancestor) + end + end + # The entity that owns an Organization. The lifetime of the Organization and # all of its descendants are bound to the `OrganizationOwner`. If the # `OrganizationOwner` is deleted, the Organization and all its descendants will @@ -677,6 +365,318 @@ module Google @directory_customer_id = args[:directory_customer_id] if args.key?(:directory_customer_id) end end + + # A page of the response received from the + # ListProjects + # method. + # A paginated response where more pages are available has + # `next_page_token` set. This token can be used in a subsequent request to + # retrieve the next request page. + class ListProjectsResponse + include Google::Apis::Core::Hashable + + # The list of Projects that matched the list filter. This list can + # be paginated. + # Corresponds to the JSON property `projects` + # @return [Array] + attr_accessor :projects + + # Pagination token. + # If the result set is too large to fit in a single response, this token + # is returned. It encodes the position of the current result cursor. + # Feeding this value into a new list request with the `page_token` parameter + # gives the next page of the results. + # When `next_page_token` is not filled in, there is no next page and + # the list returned is the last page in the result set. + # Pagination tokens have a limited lifetime. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @projects = args[:projects] if args.key?(:projects) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # The request sent to the + # GetAncestry + # method. + class GetAncestryRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # A Project is a high-level Google Cloud Platform entity. It is a + # container for ACLs, APIs, AppEngine Apps, VMs, and other + # Google Cloud Platform resources. + class Project + include Google::Apis::Core::Hashable + + # The labels associated with this Project. + # Label keys must be between 1 and 63 characters long and must conform + # to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. + # Label values must be between 0 and 63 characters long and must conform + # to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. + # No more than 256 labels can be associated with a given resource. + # Clients should store labels in a representation such as JSON that does not + # depend on specific characters being disallowed. + # Example: "environment" : "dev" + # Read-write. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # Creation time. + # Read-only. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # The user-assigned display name of the Project. + # It must be 4 to 30 characters. + # Allowed characters are: lowercase and uppercase letters, numbers, + # hyphen, single-quote, double-quote, space, and exclamation point. + # Example: My Project + # Read-write. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The unique, user-assigned ID of the Project. + # It must be 6 to 30 lowercase letters, digits, or hyphens. + # It must start with a letter. + # Trailing hyphens are prohibited. + # Example: tokyo-rain-123 + # Read-only after creation. + # Corresponds to the JSON property `projectId` + # @return [String] + attr_accessor :project_id + + # The Project lifecycle state. + # Read-only. + # Corresponds to the JSON property `lifecycleState` + # @return [String] + attr_accessor :lifecycle_state + + # The number uniquely identifying the project. + # Example: 415104041262 + # Read-only. + # Corresponds to the JSON property `projectNumber` + # @return [String] + attr_accessor :project_number + + # A container to reference an id for any resource type. A `resource` in Google + # Cloud Platform is a generic term for something you (a developer) may want to + # interact with through one of our API's. Some examples are an AppEngine app, + # a Compute Engine instance, a Cloud SQL database, and so on. + # Corresponds to the JSON property `parent` + # @return [Google::Apis::CloudresourcemanagerV1beta1::ResourceId] + attr_accessor :parent + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @labels = args[:labels] if args.key?(:labels) + @create_time = args[:create_time] if args.key?(:create_time) + @name = args[:name] if args.key?(:name) + @project_id = args[:project_id] if args.key?(:project_id) + @lifecycle_state = args[:lifecycle_state] if args.key?(:lifecycle_state) + @project_number = args[:project_number] if args.key?(:project_number) + @parent = args[:parent] if args.key?(:parent) + end + end + + # Request message for `TestIamPermissions` method. + class TestIamPermissionsRequest + include Google::Apis::Core::Hashable + + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @permissions = args[:permissions] if args.key?(:permissions) + end + end + + # A classification of the Folder Operation error. + class FolderOperationError + include Google::Apis::Core::Hashable + + # The type of operation error experienced. + # Corresponds to the JSON property `errorMessageId` + # @return [String] + attr_accessor :error_message_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @error_message_id = args[:error_message_id] if args.key?(:error_message_id) + end + end + + # Defines an Identity and Access Management (IAM) policy. It is used to + # specify access control policies for Cloud Platform resources. + # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of + # `members` to a `role`, where the members can be user accounts, Google groups, + # Google domains, and service accounts. A `role` is a named list of permissions + # defined by IAM. + # **Example** + # ` + # "bindings": [ + # ` + # "role": "roles/owner", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-other-app@appspot.gserviceaccount.com", + # ] + # `, + # ` + # "role": "roles/viewer", + # "members": ["user:sean@example.com"] + # ` + # ] + # ` + # For a description of IAM and its features, see the + # [IAM developer's guide](https://cloud.google.com/iam). + class Policy + include Google::Apis::Core::Hashable + + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # If no `etag` is provided in the call to `setIamPolicy`, then the existing + # policy is overwritten blindly. + # Corresponds to the JSON property `etag` + # @return [String] + attr_accessor :etag + + # Version of the `Policy`. The default version is 0. + # Corresponds to the JSON property `version` + # @return [Fixnum] + attr_accessor :version + + # Associates a list of `members` to a `role`. + # Multiple `bindings` must not be specified for the same `role`. + # `bindings` with no members will result in an error. + # Corresponds to the JSON property `bindings` + # @return [Array] + attr_accessor :bindings + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @etag = args[:etag] if args.key?(:etag) + @version = args[:version] if args.key?(:version) + @bindings = args[:bindings] if args.key?(:bindings) + end + end + + # Metadata describing a long running folder operation + class FolderOperation + include Google::Apis::Core::Hashable + + # The display name of the folder. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # The resource name of the folder's parent. + # Only applicable when the operation_type is MOVE. + # Corresponds to the JSON property `sourceParent` + # @return [String] + attr_accessor :source_parent + + # The resource name of the folder or organization we are either creating + # the folder under or moving the folder to. + # Corresponds to the JSON property `destinationParent` + # @return [String] + attr_accessor :destination_parent + + # The type of this operation. + # Corresponds to the JSON property `operationType` + # @return [String] + attr_accessor :operation_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @display_name = args[:display_name] if args.key?(:display_name) + @source_parent = args[:source_parent] if args.key?(:source_parent) + @destination_parent = args[:destination_parent] if args.key?(:destination_parent) + @operation_type = args[:operation_type] if args.key?(:operation_type) + end + end + + # A container to reference an id for any resource type. A `resource` in Google + # Cloud Platform is a generic term for something you (a developer) may want to + # interact with through one of our API's. Some examples are an AppEngine app, + # a Compute Engine instance, a Cloud SQL database, and so on. + class ResourceId + include Google::Apis::Core::Hashable + + # Required field representing the resource type this id is for. + # At present, the valid types are "project" and "organization". + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # Required field for the type-specific id. This should correspond to the id + # used in the type-specific API's. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type = args[:type] if args.key?(:type) + @id = args[:id] if args.key?(:id) + end + end end end end diff --git a/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb b/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb index eddb3fa42..b37717d79 100644 --- a/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +++ b/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb @@ -22,31 +22,7 @@ module Google module Apis module CloudresourcemanagerV1beta1 - class FolderOperationError - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListProjectsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UndeleteProjectRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class FolderOperation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GetIamPolicyRequest + class Ancestor class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -58,49 +34,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class TestIamPermissionsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Organization - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Policy - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ProjectCreationStatus - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TestIamPermissionsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class ListOrganizationsResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class GetAncestryRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GetAncestryResponse + class Binding class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -112,25 +52,37 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Ancestor + class UndeleteProjectRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ResourceId + class Organization class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Project + class ProjectCreationStatus class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Binding + class TestIamPermissionsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GetIamPolicyRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GetAncestryResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -142,41 +94,59 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class FolderOperationError - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :error_message_id, as: 'errorMessageId' - end - end - class ListProjectsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :projects, as: 'projects', class: Google::Apis::CloudresourcemanagerV1beta1::Project, decorator: Google::Apis::CloudresourcemanagerV1beta1::Project::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :next_page_token, as: 'nextPageToken' - end + include Google::Apis::Core::JsonObjectSupport end - class UndeleteProjectRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end + class GetAncestryRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Project + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TestIamPermissionsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class FolderOperationError + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Policy + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class FolderOperation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :display_name, as: 'displayName' - property :source_parent, as: 'sourceParent' - property :destination_parent, as: 'destinationParent' - property :operation_type, as: 'operationType' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end - class GetIamPolicyRequest + class ResourceId + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Ancestor # @private class Representation < Google::Apis::Core::JsonRepresentation + property :resource_id, as: 'resourceId', class: Google::Apis::CloudresourcemanagerV1beta1::ResourceId, decorator: Google::Apis::CloudresourcemanagerV1beta1::ResourceId::Representation + end end @@ -188,52 +158,6 @@ module Google end end - class TestIamPermissionsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :permissions, as: 'permissions' - end - end - - class Organization - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :lifecycle_state, as: 'lifecycleState' - property :display_name, as: 'displayName' - property :organization_id, as: 'organizationId' - property :name, as: 'name' - property :creation_time, as: 'creationTime' - property :owner, as: 'owner', class: Google::Apis::CloudresourcemanagerV1beta1::OrganizationOwner, decorator: Google::Apis::CloudresourcemanagerV1beta1::OrganizationOwner::Representation - - end - end - - class Policy - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :bindings, as: 'bindings', class: Google::Apis::CloudresourcemanagerV1beta1::Binding, decorator: Google::Apis::CloudresourcemanagerV1beta1::Binding::Representation - - property :etag, :base64 => true, as: 'etag' - property :version, as: 'version' - end - end - - class ProjectCreationStatus - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :ready, as: 'ready' - property :gettable, as: 'gettable' - property :create_time, as: 'createTime' - end - end - - class TestIamPermissionsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :permissions, as: 'permissions' - end - end - class ListOrganizationsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -243,7 +167,56 @@ module Google end end - class GetAncestryRequest + class Binding + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :members, as: 'members' + property :role, as: 'role' + end + end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class UndeleteProjectRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class Organization + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :owner, as: 'owner', class: Google::Apis::CloudresourcemanagerV1beta1::OrganizationOwner, decorator: Google::Apis::CloudresourcemanagerV1beta1::OrganizationOwner::Representation + + property :name, as: 'name' + property :organization_id, as: 'organizationId' + property :lifecycle_state, as: 'lifecycleState' + property :display_name, as: 'displayName' + property :creation_time, as: 'creationTime' + end + end + + class ProjectCreationStatus + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + property :gettable, as: 'gettable' + property :ready, as: 'ready' + end + end + + class TestIamPermissionsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' + end + end + + class GetIamPolicyRequest # @private class Representation < Google::Apis::Core::JsonRepresentation end @@ -257,20 +230,76 @@ module Google end end - class Empty + class OrganizationOwner + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :directory_customer_id, as: 'directoryCustomerId' + end + end + + class ListProjectsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :projects, as: 'projects', class: Google::Apis::CloudresourcemanagerV1beta1::Project, decorator: Google::Apis::CloudresourcemanagerV1beta1::Project::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class GetAncestryRequest # @private class Representation < Google::Apis::Core::JsonRepresentation end end - class Ancestor + class Project # @private class Representation < Google::Apis::Core::JsonRepresentation - property :resource_id, as: 'resourceId', class: Google::Apis::CloudresourcemanagerV1beta1::ResourceId, decorator: Google::Apis::CloudresourcemanagerV1beta1::ResourceId::Representation + hash :labels, as: 'labels' + property :create_time, as: 'createTime' + property :name, as: 'name' + property :project_id, as: 'projectId' + property :lifecycle_state, as: 'lifecycleState' + property :project_number, as: 'projectNumber' + property :parent, as: 'parent', class: Google::Apis::CloudresourcemanagerV1beta1::ResourceId, decorator: Google::Apis::CloudresourcemanagerV1beta1::ResourceId::Representation end end + class TestIamPermissionsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' + end + end + + class FolderOperationError + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :error_message_id, as: 'errorMessageId' + end + end + + class Policy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :etag, :base64 => true, as: 'etag' + property :version, as: 'version' + collection :bindings, as: 'bindings', class: Google::Apis::CloudresourcemanagerV1beta1::Binding, decorator: Google::Apis::CloudresourcemanagerV1beta1::Binding::Representation + + end + end + + class FolderOperation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :display_name, as: 'displayName' + property :source_parent, as: 'sourceParent' + property :destination_parent, as: 'destinationParent' + property :operation_type, as: 'operationType' + end + end + class ResourceId # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -278,35 +307,6 @@ module Google property :id, as: 'id' end end - - class Project - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :parent, as: 'parent', class: Google::Apis::CloudresourcemanagerV1beta1::ResourceId, decorator: Google::Apis::CloudresourcemanagerV1beta1::ResourceId::Representation - - hash :labels, as: 'labels' - property :lifecycle_state, as: 'lifecycleState' - property :create_time, as: 'createTime' - property :name, as: 'name' - property :project_number, as: 'projectNumber' - property :project_id, as: 'projectId' - end - end - - class Binding - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :members, as: 'members' - property :role, as: 'role' - end - end - - class OrganizationOwner - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :directory_customer_id, as: 'directoryCustomerId' - end - end end end end diff --git a/generated/google/apis/cloudresourcemanager_v1beta1/service.rb b/generated/google/apis/cloudresourcemanager_v1beta1/service.rb index d6cf811d7..53e31bf40 100644 --- a/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +++ b/generated/google/apis/cloudresourcemanager_v1beta1/service.rb @@ -47,393 +47,9 @@ module Google super('https://cloudresourcemanager.googleapis.com/', '') end - # Gets a list of ancestors in the resource hierarchy for the Project - # identified by the specified `project_id` (for example, `my-project-123`). - # The caller must have read permissions for this Project. - # @param [String] project_id - # The Project ID (for example, `my-project-123`). - # Required. - # @param [Google::Apis::CloudresourcemanagerV1beta1::GetAncestryRequest] get_ancestry_request_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_ancestry(project_id, get_ancestry_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1beta1/projects/{projectId}:getAncestry', options) - command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::GetAncestryRequest::Representation - command.request_object = get_ancestry_request_object - command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse - command.params['projectId'] = project_id unless project_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Returns the IAM access control policy for the specified Project. - # Permission is denied if the policy or the resource does not exist. - # @param [String] resource - # REQUIRED: The resource for which the policy is being requested. - # `resource` is usually specified as a path. For example, a Project - # resource is specified as `projects/`project``. - # @param [Google::Apis::CloudresourcemanagerV1beta1::GetIamPolicyRequest] get_iam_policy_request_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Policy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1beta1::Policy] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_iam_policy(resource, get_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1beta1/projects/{resource}:getIamPolicy', options) - command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::GetIamPolicyRequest::Representation - command.request_object = get_iam_policy_request_object - command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Policy - command.params['resource'] = resource unless resource.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Restores the Project identified by the specified - # `project_id` (for example, `my-project-123`). - # You can only use this method for a Project that has a lifecycle state of - # DELETE_REQUESTED. - # After deletion starts, the Project cannot be restored. - # The caller must have modify permissions for this Project. - # @param [String] project_id - # The project ID (for example, `foo-bar-123`). - # Required. - # @param [Google::Apis::CloudresourcemanagerV1beta1::UndeleteProjectRequest] undelete_project_request_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1beta1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def undelete_project(project_id, undelete_project_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1beta1/projects/{projectId}:undelete', options) - command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::UndeleteProjectRequest::Representation - command.request_object = undelete_project_request_object - command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Empty::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Empty - command.params['projectId'] = project_id unless project_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Lists Projects that are visible to the user and satisfy the - # specified filter. This method returns Projects in an unspecified order. - # New Projects do not necessarily appear at the end of the list. - # @param [Fixnum] page_size - # The maximum number of Projects to return in the response. - # The server can return fewer Projects than requested. - # If unspecified, server picks an appropriate default. - # Optional. - # @param [String] filter - # An expression for filtering the results of the request. Filter rules are - # case insensitive. The fields eligible for filtering are: - # + `name` - # + `id` - # + labels.key where *key* is the name of a label - # Some examples of using labels as filters: - # |Filter|Description| - # |------|-----------| - # |name:*|The project has a name.| - # |name:Howl|The project's name is `Howl` or `howl`.| - # |name:HOWL|Equivalent to above.| - # |NAME:howl|Equivalent to above.| - # |labels.color:*|The project has the label `color`.| - # |labels.color:red|The project's label `color` has the value `red`.| - # |labels.color:red label.size:big|The project's label `color` has the - # value `red` and its label `size` has the value `big`. - # Optional. - # @param [String] page_token - # A pagination token returned from a previous call to ListProjects - # that indicates from where listing should continue. - # Optional. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::ListProjectsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1beta1::ListProjectsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_projects(page_size: nil, filter: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1beta1/projects', options) - command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::ListProjectsResponse::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1beta1::ListProjectsResponse - command.query['pageSize'] = page_size unless page_size.nil? - command.query['filter'] = filter unless filter.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves the Project identified by the specified - # `project_id` (for example, `my-project-123`). - # The caller must have read permissions for this Project. - # @param [String] project_id - # The Project ID (for example, `my-project-123`). - # Required. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Project] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1beta1::Project] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project(project_id, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1beta1/projects/{projectId}', options) - command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Project - command.params['projectId'] = project_id unless project_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Updates the attributes of the Project identified by the specified - # `project_id` (for example, `my-project-123`). - # The caller must have modify permissions for this Project. - # @param [String] project_id - # The project ID (for example, `my-project-123`). - # Required. - # @param [Google::Apis::CloudresourcemanagerV1beta1::Project] project_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Project] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1beta1::Project] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_project(project_id, project_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:put, 'v1beta1/projects/{projectId}', options) - command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation - command.request_object = project_object - command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Project - command.params['projectId'] = project_id unless project_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Creates a Project resource. - # Initially, the Project resource is owned by its creator exclusively. - # The creator can later grant permission to others to read or update the - # Project. - # Several APIs are activated automatically for the Project, including - # Google Cloud Storage. - # @param [Google::Apis::CloudresourcemanagerV1beta1::Project] project_object - # @param [Boolean] use_legacy_stack - # A safety hatch to opt out of the new reliable project creation process. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Project] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1beta1::Project] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_project(project_object = nil, use_legacy_stack: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1beta1/projects', options) - command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation - command.request_object = project_object - command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Project - command.query['useLegacyStack'] = use_legacy_stack unless use_legacy_stack.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Sets the IAM access control policy for the specified Project. Replaces - # any existing policy. - # The following constraints apply when using `setIamPolicy()`: - # + Project does not support `allUsers` and `allAuthenticatedUsers` as - # `members` in a `Binding` of a `Policy`. - # + The owner role can be granted only to `user` and `serviceAccount`. - # + Service accounts can be made owners of a project directly - # without any restrictions. However, to be added as an owner, a user must be - # invited via Cloud Platform console and must accept the invitation. - # + A user cannot be granted the owner role using `setIamPolicy()`. The user - # must be granted the owner role using the Cloud Platform Console and must - # explicitly accept the invitation. - # + Invitations to grant the owner role cannot be sent using `setIamPolicy()`; - # they must be sent only using the Cloud Platform Console. - # + Membership changes that leave the project without any owners that have - # accepted the Terms of Service (ToS) will be rejected. - # + There must be at least one owner who has accepted the Terms of - # Service (ToS) agreement in the policy. Calling `setIamPolicy()` to - # to remove the last ToS-accepted owner from the policy will fail. This - # restriction also applies to legacy projects that no longer have owners - # who have accepted the ToS. Edits to IAM policies will be rejected until - # the lack of a ToS-accepting owner is rectified. - # + Calling this method requires enabling the App Engine Admin API. - # Note: Removing service accounts from policies or changing their roles - # can render services completely inoperable. It is important to understand - # how the service account is being used before removing or updating its roles. - # @param [String] resource - # REQUIRED: The resource for which the policy is being specified. - # `resource` is usually specified as a path. For example, a Project - # resource is specified as `projects/`project``. - # @param [Google::Apis::CloudresourcemanagerV1beta1::SetIamPolicyRequest] set_iam_policy_request_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Policy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1beta1::Policy] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_project_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1beta1/projects/{resource}:setIamPolicy', options) - command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::SetIamPolicyRequest::Representation - command.request_object = set_iam_policy_request_object - command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Policy - command.params['resource'] = resource unless resource.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Marks the Project identified by the specified - # `project_id` (for example, `my-project-123`) for deletion. - # This method will only affect the Project if the following criteria are met: - # + The Project does not have a billing account associated with it. - # + The Project has a lifecycle state of - # ACTIVE. - # This method changes the Project's lifecycle state from - # ACTIVE - # to DELETE_REQUESTED. - # The deletion starts at an unspecified time, at which point the project is - # no longer accessible. - # Until the deletion completes, you can check the lifecycle state - # checked by retrieving the Project with GetProject, - # and the Project remains visible to ListProjects. - # However, you cannot update the project. - # After the deletion completes, the Project is not retrievable by - # the GetProject and - # ListProjects methods. - # The caller must have modify permissions for this Project. - # @param [String] project_id - # The Project ID (for example, `foo-bar-123`). - # Required. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1beta1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_project(project_id, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1beta1/projects/{projectId}', options) - command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Empty::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Empty - command.params['projectId'] = project_id unless project_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Returns permissions that a caller has on the specified Project. + # Returns permissions that a caller has on the specified Organization. + # The `resource` field should be the organization's resource name, + # e.g. "organizations/123". # @param [String] resource # REQUIRED: The resource for which the policy detail is being requested. # `resource` is usually specified as a path. For example, a Project @@ -456,8 +72,8 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def test_project_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1beta1/projects/{resource}:testIamPermissions', options) + def test_organization_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', options) command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsRequest::Representation command.request_object = test_iam_permissions_request_object command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsResponse::Representation @@ -468,6 +84,93 @@ module Google execute_or_queue_command(command, &block) end + # Lists Organization resources that are visible to the user and satisfy + # the specified filter. This method returns Organizations in an unspecified + # order. New Organizations do not necessarily appear at the end of the list. + # @param [String] filter + # An optional query string used to filter the Organizations to return in + # the response. Filter rules are case-insensitive. + # Organizations may be filtered by `owner.directoryCustomerId` or by + # `domain`, where the domain is a Google for Work domain, for example: + # |Filter|Description| + # |------|-----------| + # |owner.directorycustomerid:123456789|Organizations with `owner. + # directory_customer_id` equal to `123456789`.| + # |domain:google.com|Organizations corresponding to the domain `google.com`.| + # This field is optional. + # @param [String] page_token + # A pagination token returned from a previous call to `ListOrganizations` + # that indicates from where listing should continue. + # This field is optional. + # @param [Fixnum] page_size + # The maximum number of Organizations to return in the response. + # This field is optional. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::ListOrganizationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1beta1::ListOrganizationsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_organizations(filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/organizations', options) + command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::ListOrganizationsResponse::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1beta1::ListOrganizationsResponse + command.query['filter'] = filter unless filter.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Sets the access control policy on an Organization resource. Replaces any + # existing policy. The `resource` field should be the organization's resource + # name, e.g. "organizations/123". + # @param [String] resource + # REQUIRED: The resource for which the policy is being specified. + # `resource` is usually specified as a path. For example, a Project + # resource is specified as `projects/`project``. + # @param [Google::Apis::CloudresourcemanagerV1beta1::SetIamPolicyRequest] set_iam_policy_request_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1beta1::Policy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def set_organization_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+resource}:setIamPolicy', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::SetIamPolicyRequest::Representation + command.request_object = set_iam_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + # Gets the access control policy for an Organization resource. May be empty # if no such policy or resource exists. The `resource` field should be the # organization's resource name, e.g. "organizations/123". @@ -505,56 +208,6 @@ module Google execute_or_queue_command(command, &block) end - # Lists Organization resources that are visible to the user and satisfy - # the specified filter. This method returns Organizations in an unspecified - # order. New Organizations do not necessarily appear at the end of the list. - # @param [Fixnum] page_size - # The maximum number of Organizations to return in the response. - # This field is optional. - # @param [String] filter - # An optional query string used to filter the Organizations to return in - # the response. Filter rules are case-insensitive. - # Organizations may be filtered by `owner.directoryCustomerId` or by - # `domain`, where the domain is a Google for Work domain, for example: - # |Filter|Description| - # |------|-----------| - # |owner.directorycustomerid:123456789|Organizations with `owner. - # directory_customer_id` equal to `123456789`.| - # |domain:google.com|Organizations corresponding to the domain `google.com`.| - # This field is optional. - # @param [String] page_token - # A pagination token returned from a previous call to `ListOrganizations` - # that indicates from where listing should continue. - # This field is optional. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::ListOrganizationsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1beta1::ListOrganizationsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_organizations(page_size: nil, filter: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1beta1/organizations', options) - command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::ListOrganizationsResponse::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1beta1::ListOrganizationsResponse - command.query['pageSize'] = page_size unless page_size.nil? - command.query['filter'] = filter unless filter.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - # Fetches an Organization resource identified by the specified resource name. # @param [String] name # The resource name of the Organization to fetch, e.g. "organizations/1234". @@ -624,14 +277,12 @@ module Google execute_or_queue_command(command, &block) end - # Sets the access control policy on an Organization resource. Replaces any - # existing policy. The `resource` field should be the organization's resource - # name, e.g. "organizations/123". - # @param [String] resource - # REQUIRED: The resource for which the policy is being specified. - # `resource` is usually specified as a path. For example, a Project - # resource is specified as `projects/`project``. - # @param [Google::Apis::CloudresourcemanagerV1beta1::SetIamPolicyRequest] set_iam_policy_request_object + # Retrieves the Project identified by the specified + # `project_id` (for example, `my-project-123`). + # The caller must have read permissions for this Project. + # @param [String] project_id + # The Project ID (for example, `my-project-123`). + # Required. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. @@ -641,29 +292,136 @@ module Google # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Policy] parsed result object + # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Project] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::CloudresourcemanagerV1beta1::Policy] + # @return [Google::Apis::CloudresourcemanagerV1beta1::Project] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_organization_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1beta1/{+resource}:setIamPolicy', options) - command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::SetIamPolicyRequest::Representation - command.request_object = set_iam_policy_request_object - command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Policy - command.params['resource'] = resource unless resource.nil? + def get_project(project_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/projects/{projectId}', options) + command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Project + command.params['projectId'] = project_id unless project_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end - # Returns permissions that a caller has on the specified Organization. - # The `resource` field should be the organization's resource name, - # e.g. "organizations/123". + # Restores the Project identified by the specified + # `project_id` (for example, `my-project-123`). + # You can only use this method for a Project that has a lifecycle state of + # DELETE_REQUESTED. + # After deletion starts, the Project cannot be restored. + # The caller must have modify permissions for this Project. + # @param [String] project_id + # The project ID (for example, `foo-bar-123`). + # Required. + # @param [Google::Apis::CloudresourcemanagerV1beta1::UndeleteProjectRequest] undelete_project_request_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1beta1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def undelete_project(project_id, undelete_project_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/projects/{projectId}:undelete', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::UndeleteProjectRequest::Representation + command.request_object = undelete_project_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Empty::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Empty + command.params['projectId'] = project_id unless project_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Updates the attributes of the Project identified by the specified + # `project_id` (for example, `my-project-123`). + # The caller must have modify permissions for this Project. + # @param [String] project_id + # The project ID (for example, `my-project-123`). + # Required. + # @param [Google::Apis::CloudresourcemanagerV1beta1::Project] project_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Project] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1beta1::Project] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_project(project_id, project_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:put, 'v1beta1/projects/{projectId}', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation + command.request_object = project_object + command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Project + command.params['projectId'] = project_id unless project_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets a list of ancestors in the resource hierarchy for the Project + # identified by the specified `project_id` (for example, `my-project-123`). + # The caller must have read permissions for this Project. + # @param [String] project_id + # The Project ID (for example, `my-project-123`). + # Required. + # @param [Google::Apis::CloudresourcemanagerV1beta1::GetAncestryRequest] get_ancestry_request_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_ancestry(project_id, get_ancestry_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/projects/{projectId}:getAncestry', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::GetAncestryRequest::Representation + command.request_object = get_ancestry_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse + command.params['projectId'] = project_id unless project_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Returns permissions that a caller has on the specified Project. # @param [String] resource # REQUIRED: The resource for which the policy detail is being requested. # `resource` is usually specified as a path. For example, a Project @@ -686,8 +444,8 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def test_organization_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', options) + def test_project_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/projects/{resource}:testIamPermissions', options) command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsRequest::Representation command.request_object = test_iam_permissions_request_object command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsResponse::Representation @@ -697,6 +455,248 @@ module Google command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end + + # Marks the Project identified by the specified + # `project_id` (for example, `my-project-123`) for deletion. + # This method will only affect the Project if the following criteria are met: + # + The Project does not have a billing account associated with it. + # + The Project has a lifecycle state of + # ACTIVE. + # This method changes the Project's lifecycle state from + # ACTIVE + # to DELETE_REQUESTED. + # The deletion starts at an unspecified time, at which point the project is + # no longer accessible. + # Until the deletion completes, you can check the lifecycle state + # checked by retrieving the Project with GetProject, + # and the Project remains visible to ListProjects. + # However, you cannot update the project. + # After the deletion completes, the Project is not retrievable by + # the GetProject and + # ListProjects methods. + # The caller must have modify permissions for this Project. + # @param [String] project_id + # The Project ID (for example, `foo-bar-123`). + # Required. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1beta1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project(project_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1beta1/projects/{projectId}', options) + command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Empty::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Empty + command.params['projectId'] = project_id unless project_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Lists Projects that are visible to the user and satisfy the + # specified filter. This method returns Projects in an unspecified order. + # New Projects do not necessarily appear at the end of the list. + # @param [Fixnum] page_size + # The maximum number of Projects to return in the response. + # The server can return fewer Projects than requested. + # If unspecified, server picks an appropriate default. + # Optional. + # @param [String] filter + # An expression for filtering the results of the request. Filter rules are + # case insensitive. The fields eligible for filtering are: + # + `name` + # + `id` + # + labels.key where *key* is the name of a label + # Some examples of using labels as filters: + # |Filter|Description| + # |------|-----------| + # |name:*|The project has a name.| + # |name:Howl|The project's name is `Howl` or `howl`.| + # |name:HOWL|Equivalent to above.| + # |NAME:howl|Equivalent to above.| + # |labels.color:*|The project has the label `color`.| + # |labels.color:red|The project's label `color` has the value `red`.| + # |labels.color:red label.size:big|The project's label `color` has the + # value `red` and its label `size` has the value `big`. + # Optional. + # @param [String] page_token + # A pagination token returned from a previous call to ListProjects + # that indicates from where listing should continue. + # Optional. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::ListProjectsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1beta1::ListProjectsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_projects(page_size: nil, filter: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/projects', options) + command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::ListProjectsResponse::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1beta1::ListProjectsResponse + command.query['pageSize'] = page_size unless page_size.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Sets the IAM access control policy for the specified Project. Replaces + # any existing policy. + # The following constraints apply when using `setIamPolicy()`: + # + Project does not support `allUsers` and `allAuthenticatedUsers` as + # `members` in a `Binding` of a `Policy`. + # + The owner role can be granted only to `user` and `serviceAccount`. + # + Service accounts can be made owners of a project directly + # without any restrictions. However, to be added as an owner, a user must be + # invited via Cloud Platform console and must accept the invitation. + # + A user cannot be granted the owner role using `setIamPolicy()`. The user + # must be granted the owner role using the Cloud Platform Console and must + # explicitly accept the invitation. + # + Invitations to grant the owner role cannot be sent using `setIamPolicy()`; + # they must be sent only using the Cloud Platform Console. + # + Membership changes that leave the project without any owners that have + # accepted the Terms of Service (ToS) will be rejected. + # + There must be at least one owner who has accepted the Terms of + # Service (ToS) agreement in the policy. Calling `setIamPolicy()` to + # to remove the last ToS-accepted owner from the policy will fail. This + # restriction also applies to legacy projects that no longer have owners + # who have accepted the ToS. Edits to IAM policies will be rejected until + # the lack of a ToS-accepting owner is rectified. + # + Calling this method requires enabling the App Engine Admin API. + # Note: Removing service accounts from policies or changing their roles + # can render services completely inoperable. It is important to understand + # how the service account is being used before removing or updating its roles. + # @param [String] resource + # REQUIRED: The resource for which the policy is being specified. + # `resource` is usually specified as a path. For example, a Project + # resource is specified as `projects/`project``. + # @param [Google::Apis::CloudresourcemanagerV1beta1::SetIamPolicyRequest] set_iam_policy_request_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1beta1::Policy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def set_project_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/projects/{resource}:setIamPolicy', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::SetIamPolicyRequest::Representation + command.request_object = set_iam_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Creates a Project resource. + # Initially, the Project resource is owned by its creator exclusively. + # The creator can later grant permission to others to read or update the + # Project. + # Several APIs are activated automatically for the Project, including + # Google Cloud Storage. + # @param [Google::Apis::CloudresourcemanagerV1beta1::Project] project_object + # @param [Boolean] use_legacy_stack + # A safety hatch to opt out of the new reliable project creation process. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Project] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1beta1::Project] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project(project_object = nil, use_legacy_stack: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/projects', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation + command.request_object = project_object + command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Project + command.query['useLegacyStack'] = use_legacy_stack unless use_legacy_stack.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Returns the IAM access control policy for the specified Project. + # Permission is denied if the policy or the resource does not exist. + # @param [String] resource + # REQUIRED: The resource for which the policy is being requested. + # `resource` is usually specified as a path. For example, a Project + # resource is specified as `projects/`project``. + # @param [Google::Apis::CloudresourcemanagerV1beta1::GetIamPolicyRequest] get_iam_policy_request_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1beta1::Policy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_iam_policy(resource, get_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/projects/{resource}:getIamPolicy', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::GetIamPolicyRequest::Representation + command.request_object = get_iam_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end protected diff --git a/generated/google/apis/container_v1.rb b/generated/google/apis/container_v1.rb index d44c142c9..e7247cb5c 100644 --- a/generated/google/apis/container_v1.rb +++ b/generated/google/apis/container_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/container-engine/ module ContainerV1 VERSION = 'V1' - REVISION = '20160421' + REVISION = '20161024' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/container_v1/classes.rb b/generated/google/apis/container_v1/classes.rb index 9ccc8ca9b..01b68eaa4 100644 --- a/generated/google/apis/container_v1/classes.rb +++ b/generated/google/apis/container_v1/classes.rb @@ -129,8 +129,7 @@ module Google # @return [String] attr_accessor :subnetwork - # The node pools associated with this cluster. When creating a new cluster, only - # a single node pool should be specified. This field should not be set if " + # The node pools associated with this cluster. This field should not be set if " # node_config" or "initial_node_count" are specified. # Corresponds to the JSON property `nodePools` # @return [Array] @@ -142,6 +141,16 @@ module Google # @return [Array] attr_accessor :locations + # Kubernetes alpha features are enabled on this cluster. This includes alpha API + # groups (e.g. v1alpha1) and features that may not be production ready in the + # kubernetes version of the master and nodes. The cluster has no SLA for uptime + # and master/node upgrades are disabled. Alpha enabled clusters are + # automatically deleted thirty days after creation. + # Corresponds to the JSON property `enableKubernetesAlpha` + # @return [Boolean] + attr_accessor :enable_kubernetes_alpha + alias_method :enable_kubernetes_alpha?, :enable_kubernetes_alpha + # [Output only] Server-defined URL for the resource. # Corresponds to the JSON property `selfLink` # @return [String] @@ -221,6 +230,12 @@ module Google # @return [Fixnum] attr_accessor :current_node_count + # [Output only] The time the cluster will be automatically deleted in [RFC3339]( + # https://www.ietf.org/rfc/rfc3339.txt) text format. + # Corresponds to the JSON property `expireTime` + # @return [String] + attr_accessor :expire_time + def initialize(**args) update!(**args) end @@ -240,6 +255,7 @@ module Google @subnetwork = args[:subnetwork] if args.key?(:subnetwork) @node_pools = args[:node_pools] if args.key?(:node_pools) @locations = args[:locations] if args.key?(:locations) + @enable_kubernetes_alpha = args[:enable_kubernetes_alpha] if args.key?(:enable_kubernetes_alpha) @self_link = args[:self_link] if args.key?(:self_link) @zone = args[:zone] if args.key?(:zone) @endpoint = args[:endpoint] if args.key?(:endpoint) @@ -253,6 +269,7 @@ module Google @services_ipv4_cidr = args[:services_ipv4_cidr] if args.key?(:services_ipv4_cidr) @instance_group_urls = args[:instance_group_urls] if args.key?(:instance_group_urls) @current_node_count = args[:current_node_count] if args.key?(:current_node_count) + @expire_time = args[:expire_time] if args.key?(:expire_time) end end @@ -285,6 +302,12 @@ module Google # @return [Array] attr_accessor :oauth_scopes + # The Google Cloud Platform Service Account to be used by the node VMs. If no + # Service Account is specified, the "default" service account is used. + # Corresponds to the JSON property `serviceAccount` + # @return [String] + attr_accessor :service_account + # The metadata key/value pairs assigned to instances in the cluster. Keys must # conform to the regexp [a-zA-Z0-9-_]+ and be less than 128 bytes in length. # These are reflected as part of a URL in the metadata server. Additionally, to @@ -298,6 +321,47 @@ module Google # @return [Hash] attr_accessor :metadata + # The image type to use for this node. Note that for a given image type, the + # latest version of it will be used. + # Corresponds to the JSON property `imageType` + # @return [String] + attr_accessor :image_type + + # The map of Kubernetes labels (key/value pairs) to be applied to each node. + # These will added in addition to any default label(s) that Kubernetes may apply + # to the node. In case of conflict in label keys, the applied set may differ + # depending on the Kubernetes version -- it's best to assume the behavior is + # undefined and conflicts should be avoided. For more information, including + # usage and the valid values, see: http://kubernetes.io/v1.1/docs/user-guide/ + # labels.html + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # The number of local SSD disks to be attached to the node. The limit for this + # value is dependant upon the maximum number of disks available on a machine per + # zone. See: https://cloud.google.com/compute/docs/disks/local-ssd# + # local_ssd_limits for more information. + # Corresponds to the JSON property `localSsdCount` + # @return [Fixnum] + attr_accessor :local_ssd_count + + # The list of instance tags applied to all nodes. Tags are used to identify + # valid sources or targets for network firewalls and are specified by the client + # during cluster or node pool creation. Each tag within the list must comply + # with RFC1035. + # Corresponds to the JSON property `tags` + # @return [Array] + attr_accessor :tags + + # Whether the nodes are created as preemptible VM instances. See: https://cloud. + # google.com/compute/docs/instances/preemptible for more inforamtion about + # preemptible VM instances. + # Corresponds to the JSON property `preemptible` + # @return [Boolean] + attr_accessor :preemptible + alias_method :preemptible?, :preemptible + def initialize(**args) update!(**args) end @@ -307,7 +371,13 @@ module Google @machine_type = args[:machine_type] if args.key?(:machine_type) @disk_size_gb = args[:disk_size_gb] if args.key?(:disk_size_gb) @oauth_scopes = args[:oauth_scopes] if args.key?(:oauth_scopes) + @service_account = args[:service_account] if args.key?(:service_account) @metadata = args[:metadata] if args.key?(:metadata) + @image_type = args[:image_type] if args.key?(:image_type) + @labels = args[:labels] if args.key?(:labels) + @local_ssd_count = args[:local_ssd_count] if args.key?(:local_ssd_count) + @tags = args[:tags] if args.key?(:tags) + @preemptible = args[:preemptible] if args.key?(:preemptible) end end @@ -461,12 +531,12 @@ module Google # @return [Fixnum] attr_accessor :initial_node_count - # Server-defined URL for the resource. + # [Output only] Server-defined URL for the resource. # Corresponds to the JSON property `selfLink` # @return [String] attr_accessor :self_link - # The version of the Kubernetes of this node. + # [Output only] The version of the Kubernetes of this node. # Corresponds to the JSON property `version` # @return [String] attr_accessor :version @@ -477,7 +547,7 @@ module Google # @return [Array] attr_accessor :instance_group_urls - # The status of the nodes in this pool instance. + # [Output only] The status of the nodes in this pool instance. # Corresponds to the JSON property `status` # @return [String] attr_accessor :status @@ -488,6 +558,18 @@ module Google # @return [String] attr_accessor :status_message + # NodePoolAutoscaling contains information required by cluster autoscaler to + # adjust the size of the node pool to the current cluster usage. + # Corresponds to the JSON property `autoscaling` + # @return [Google::Apis::ContainerV1::NodePoolAutoscaling] + attr_accessor :autoscaling + + # NodeManagement defines the set of node management services turned on for the + # node pool. + # Corresponds to the JSON property `management` + # @return [Google::Apis::ContainerV1::NodeManagement] + attr_accessor :management + def initialize(**args) update!(**args) end @@ -502,6 +584,99 @@ module Google @instance_group_urls = args[:instance_group_urls] if args.key?(:instance_group_urls) @status = args[:status] if args.key?(:status) @status_message = args[:status_message] if args.key?(:status_message) + @autoscaling = args[:autoscaling] if args.key?(:autoscaling) + @management = args[:management] if args.key?(:management) + end + end + + # NodePoolAutoscaling contains information required by cluster autoscaler to + # adjust the size of the node pool to the current cluster usage. + class NodePoolAutoscaling + include Google::Apis::Core::Hashable + + # Is autoscaling enabled for this node pool. + # Corresponds to the JSON property `enabled` + # @return [Boolean] + attr_accessor :enabled + alias_method :enabled?, :enabled + + # Minimum number of nodes in the NodePool. Must be >= 1 and <= max_node_count. + # Corresponds to the JSON property `minNodeCount` + # @return [Fixnum] + attr_accessor :min_node_count + + # Maximum number of nodes in the NodePool. Must be >= min_node_count. There has + # to enough quota to scale up the cluster. + # Corresponds to the JSON property `maxNodeCount` + # @return [Fixnum] + attr_accessor :max_node_count + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @enabled = args[:enabled] if args.key?(:enabled) + @min_node_count = args[:min_node_count] if args.key?(:min_node_count) + @max_node_count = args[:max_node_count] if args.key?(:max_node_count) + end + end + + # NodeManagement defines the set of node management services turned on for the + # node pool. + class NodeManagement + include Google::Apis::Core::Hashable + + # Whether the nodes will be automatically upgraded. + # Corresponds to the JSON property `autoUpgrade` + # @return [Boolean] + attr_accessor :auto_upgrade + alias_method :auto_upgrade?, :auto_upgrade + + # AutoUpgradeOptions defines the set of options for the user to control how the + # Auto Upgrades will proceed. + # Corresponds to the JSON property `upgradeOptions` + # @return [Google::Apis::ContainerV1::AutoUpgradeOptions] + attr_accessor :upgrade_options + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @auto_upgrade = args[:auto_upgrade] if args.key?(:auto_upgrade) + @upgrade_options = args[:upgrade_options] if args.key?(:upgrade_options) + end + end + + # AutoUpgradeOptions defines the set of options for the user to control how the + # Auto Upgrades will proceed. + class AutoUpgradeOptions + include Google::Apis::Core::Hashable + + # [Output only] This field is set when upgrades are about to commence with the + # approximate start time for the upgrades, in [RFC3339](https://www.ietf.org/rfc/ + # rfc3339.txt) text format. + # Corresponds to the JSON property `autoUpgradeStartTime` + # @return [String] + attr_accessor :auto_upgrade_start_time + + # [Output only] This field is set when upgrades are about to commence with the + # description of the upgrade. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @auto_upgrade_start_time = args[:auto_upgrade_start_time] if args.key?(:auto_upgrade_start_time) + @description = args[:description] if args.key?(:description) end end @@ -631,13 +806,34 @@ module Google # @return [Google::Apis::ContainerV1::AddonsConfig] attr_accessor :desired_addons_config - # The node pool to be upgraded. This field is mandatory if the " - # desired_node_version" or "desired_image_family" is specified and there is more - # than one node pool on the cluster. + # The node pool to be upgraded. This field is mandatory if "desired_node_version" + # , "desired_image_family" or "desired_node_pool_autoscaling" is specified and + # there is more than one node pool on the cluster. # Corresponds to the JSON property `desiredNodePoolId` # @return [String] attr_accessor :desired_node_pool_id + # The desired image type for the node pool. NOTE: Set the "desired_node_pool" + # field as well. + # Corresponds to the JSON property `desiredImageType` + # @return [String] + attr_accessor :desired_image_type + + # NodePoolAutoscaling contains information required by cluster autoscaler to + # adjust the size of the node pool to the current cluster usage. + # Corresponds to the JSON property `desiredNodePoolAutoscaling` + # @return [Google::Apis::ContainerV1::NodePoolAutoscaling] + attr_accessor :desired_node_pool_autoscaling + + # The desired list of Google Compute Engine [locations](/compute/docs/zones# + # available) in which the cluster's nodes should be located. Changing the + # locations a cluster is in will result in nodes being either created or removed + # from the cluster, depending on whether locations are being added or removed. + # This list must always include the cluster's primary zone. + # Corresponds to the JSON property `desiredLocations` + # @return [Array] + attr_accessor :desired_locations + # The Kubernetes version to change the master to. The only valid value is the # latest supported version. Use "-" to have the server automatically select the # latest version. @@ -655,6 +851,9 @@ module Google @desired_monitoring_service = args[:desired_monitoring_service] if args.key?(:desired_monitoring_service) @desired_addons_config = args[:desired_addons_config] if args.key?(:desired_addons_config) @desired_node_pool_id = args[:desired_node_pool_id] if args.key?(:desired_node_pool_id) + @desired_image_type = args[:desired_image_type] if args.key?(:desired_image_type) + @desired_node_pool_autoscaling = args[:desired_node_pool_autoscaling] if args.key?(:desired_node_pool_autoscaling) + @desired_locations = args[:desired_locations] if args.key?(:desired_locations) @desired_master_version = args[:desired_master_version] if args.key?(:desired_master_version) end end @@ -685,6 +884,36 @@ module Google end end + # CancelOperationRequest cancels a single operation. + class CancelOperationRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # A generic empty message that you can re-use to avoid defining duplicated empty + # messages in your APIs. A typical example is to use it as the request or the + # response type of an API method. For instance: service Foo ` rpc Bar(google. + # protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for + # `Empty` is empty JSON object ````. + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + # Container Engine service configuration. class ServerConfig include Google::Apis::Core::Hashable @@ -699,15 +928,20 @@ module Google # @return [Array] attr_accessor :valid_node_versions - # Default image family. - # Corresponds to the JSON property `defaultImageFamily` + # Default image type. + # Corresponds to the JSON property `defaultImageType` # @return [String] - attr_accessor :default_image_family + attr_accessor :default_image_type - # List of valid image families. - # Corresponds to the JSON property `validImageFamilies` + # List of valid image types. + # Corresponds to the JSON property `validImageTypes` # @return [Array] - attr_accessor :valid_image_families + attr_accessor :valid_image_types + + # List of valid master versions. + # Corresponds to the JSON property `validMasterVersions` + # @return [Array] + attr_accessor :valid_master_versions def initialize(**args) update!(**args) @@ -717,8 +951,9 @@ module Google def update!(**args) @default_cluster_version = args[:default_cluster_version] if args.key?(:default_cluster_version) @valid_node_versions = args[:valid_node_versions] if args.key?(:valid_node_versions) - @default_image_family = args[:default_image_family] if args.key?(:default_image_family) - @valid_image_families = args[:valid_image_families] if args.key?(:valid_image_families) + @default_image_type = args[:default_image_type] if args.key?(:default_image_type) + @valid_image_types = args[:valid_image_types] if args.key?(:valid_image_types) + @valid_master_versions = args[:valid_master_versions] if args.key?(:valid_master_versions) end end @@ -764,6 +999,42 @@ module Google @node_pool = args[:node_pool] if args.key?(:node_pool) end end + + # RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed + # NodePool upgrade. This will be an no-op if the last upgrade successfully + # completed. + class RollbackNodePoolUpgradeRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # SetNodePoolManagementRequest sets the node management properties of a node + # pool. + class SetNodePoolManagementRequest + include Google::Apis::Core::Hashable + + # NodeManagement defines the set of node management services turned on for the + # node pool. + # Corresponds to the JSON property `management` + # @return [Google::Apis::ContainerV1::NodeManagement] + attr_accessor :management + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @management = args[:management] if args.key?(:management) + end + end end end end diff --git a/generated/google/apis/container_v1/representations.rb b/generated/google/apis/container_v1/representations.rb index 528258165..aab2e6dbe 100644 --- a/generated/google/apis/container_v1/representations.rb +++ b/generated/google/apis/container_v1/representations.rb @@ -70,6 +70,24 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class NodePoolAutoscaling + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class NodeManagement + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AutoUpgradeOptions + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class CreateClusterRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -100,6 +118,18 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class CancelOperationRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Empty + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ServerConfig class Representation < Google::Apis::Core::JsonRepresentation; end @@ -118,6 +148,18 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class RollbackNodePoolUpgradeRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SetNodePoolManagementRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ListClustersResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -147,6 +189,7 @@ module Google collection :node_pools, as: 'nodePools', class: Google::Apis::ContainerV1::NodePool, decorator: Google::Apis::ContainerV1::NodePool::Representation collection :locations, as: 'locations' + property :enable_kubernetes_alpha, as: 'enableKubernetesAlpha' property :self_link, as: 'selfLink' property :zone, as: 'zone' property :endpoint, as: 'endpoint' @@ -160,6 +203,7 @@ module Google property :services_ipv4_cidr, as: 'servicesIpv4Cidr' collection :instance_group_urls, as: 'instanceGroupUrls' property :current_node_count, as: 'currentNodeCount' + property :expire_time, as: 'expireTime' end end @@ -169,7 +213,13 @@ module Google property :machine_type, as: 'machineType' property :disk_size_gb, as: 'diskSizeGb' collection :oauth_scopes, as: 'oauthScopes' + property :service_account, as: 'serviceAccount' hash :metadata, as: 'metadata' + property :image_type, as: 'imageType' + hash :labels, as: 'labels' + property :local_ssd_count, as: 'localSsdCount' + collection :tags, as: 'tags' + property :preemptible, as: 'preemptible' end end @@ -220,6 +270,36 @@ module Google collection :instance_group_urls, as: 'instanceGroupUrls' property :status, as: 'status' property :status_message, as: 'statusMessage' + property :autoscaling, as: 'autoscaling', class: Google::Apis::ContainerV1::NodePoolAutoscaling, decorator: Google::Apis::ContainerV1::NodePoolAutoscaling::Representation + + property :management, as: 'management', class: Google::Apis::ContainerV1::NodeManagement, decorator: Google::Apis::ContainerV1::NodeManagement::Representation + + end + end + + class NodePoolAutoscaling + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :enabled, as: 'enabled' + property :min_node_count, as: 'minNodeCount' + property :max_node_count, as: 'maxNodeCount' + end + end + + class NodeManagement + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :auto_upgrade, as: 'autoUpgrade' + property :upgrade_options, as: 'upgradeOptions', class: Google::Apis::ContainerV1::AutoUpgradeOptions, decorator: Google::Apis::ContainerV1::AutoUpgradeOptions::Representation + + end + end + + class AutoUpgradeOptions + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :auto_upgrade_start_time, as: 'autoUpgradeStartTime' + property :description, as: 'description' end end @@ -261,6 +341,10 @@ module Google property :desired_addons_config, as: 'desiredAddonsConfig', class: Google::Apis::ContainerV1::AddonsConfig, decorator: Google::Apis::ContainerV1::AddonsConfig::Representation property :desired_node_pool_id, as: 'desiredNodePoolId' + property :desired_image_type, as: 'desiredImageType' + property :desired_node_pool_autoscaling, as: 'desiredNodePoolAutoscaling', class: Google::Apis::ContainerV1::NodePoolAutoscaling, decorator: Google::Apis::ContainerV1::NodePoolAutoscaling::Representation + + collection :desired_locations, as: 'desiredLocations' property :desired_master_version, as: 'desiredMasterVersion' end end @@ -274,13 +358,26 @@ module Google end end + class CancelOperationRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + class ServerConfig # @private class Representation < Google::Apis::Core::JsonRepresentation property :default_cluster_version, as: 'defaultClusterVersion' collection :valid_node_versions, as: 'validNodeVersions' - property :default_image_family, as: 'defaultImageFamily' - collection :valid_image_families, as: 'validImageFamilies' + property :default_image_type, as: 'defaultImageType' + collection :valid_image_types, as: 'validImageTypes' + collection :valid_master_versions, as: 'validMasterVersions' end end @@ -299,6 +396,20 @@ module Google end end + + class RollbackNodePoolUpgradeRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class SetNodePoolManagementRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :management, as: 'management', class: Google::Apis::ContainerV1::NodeManagement, decorator: Google::Apis::ContainerV1::NodeManagement::Representation + + end + end end end end diff --git a/generated/google/apis/container_v1/service.rb b/generated/google/apis/container_v1/service.rb index 045fc8132..fdc752454 100644 --- a/generated/google/apis/container_v1/service.rb +++ b/generated/google/apis/container_v1/service.rb @@ -444,6 +444,95 @@ module Google execute_or_queue_command(command, &block) end + # Roll back the previously Aborted or Failed NodePool upgrade. This will be an + # no-op if the last upgrade successfully completed. + # @param [String] project_id + # The Google Developers Console [project ID or project number](https://support. + # google.com/cloud/answer/6158840). + # @param [String] zone + # The name of the Google Compute Engine [zone](/compute/docs/zones#available) in + # which the cluster resides. + # @param [String] cluster_id + # The name of the cluster to rollback. + # @param [String] node_pool_id + # The name of the node pool to rollback. + # @param [Google::Apis::ContainerV1::RollbackNodePoolUpgradeRequest] rollback_node_pool_upgrade_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ContainerV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ContainerV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def rollback_node_pool_upgrade(project_id, zone, cluster_id, node_pool_id, rollback_node_pool_upgrade_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback', options) + command.request_representation = Google::Apis::ContainerV1::RollbackNodePoolUpgradeRequest::Representation + command.request_object = rollback_node_pool_upgrade_request_object + command.response_representation = Google::Apis::ContainerV1::Operation::Representation + command.response_class = Google::Apis::ContainerV1::Operation + command.params['projectId'] = project_id unless project_id.nil? + command.params['zone'] = zone unless zone.nil? + command.params['clusterId'] = cluster_id unless cluster_id.nil? + command.params['nodePoolId'] = node_pool_id unless node_pool_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Sets the NodeManagement options for a node pool. + # @param [String] project_id + # The Google Developers Console [project ID or project number](https://support. + # google.com/cloud/answer/6158840). + # @param [String] zone + # The name of the Google Compute Engine [zone](/compute/docs/zones#available) in + # which the cluster resides. + # @param [String] cluster_id + # The name of the cluster to update. + # @param [String] node_pool_id + # The name of the node pool to update. + # @param [Google::Apis::ContainerV1::SetNodePoolManagementRequest] set_node_pool_management_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ContainerV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ContainerV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def set_project_zone_cluster_node_pool_management(project_id, zone, cluster_id, node_pool_id, set_node_pool_management_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement', options) + command.request_representation = Google::Apis::ContainerV1::SetNodePoolManagementRequest::Representation + command.request_object = set_node_pool_management_request_object + command.response_representation = Google::Apis::ContainerV1::Operation::Representation + command.response_class = Google::Apis::ContainerV1::Operation + command.params['projectId'] = project_id unless project_id.nil? + command.params['zone'] = zone unless zone.nil? + command.params['clusterId'] = cluster_id unless cluster_id.nil? + command.params['nodePoolId'] = node_pool_id unless node_pool_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Lists all operations in a project in a specific zone or all zones. # @param [String] project_id # The Google Developers Console [project ID or project number](https://support. @@ -516,6 +605,47 @@ module Google command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end + + # Cancels the specified operation. + # @param [String] project_id + # The Google Developers Console [project ID or project number](https://support. + # google.com/cloud/answer/6158840). + # @param [String] zone + # The name of the Google Compute Engine [zone](/compute/docs/zones#available) in + # which the operation resides. + # @param [String] operation_id + # The server-assigned `name` of the operation. + # @param [Google::Apis::ContainerV1::CancelOperationRequest] cancel_operation_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ContainerV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ContainerV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def cancel_operation(project_id, zone, operation_id, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel', options) + command.request_representation = Google::Apis::ContainerV1::CancelOperationRequest::Representation + command.request_object = cancel_operation_request_object + command.response_representation = Google::Apis::ContainerV1::Empty::Representation + command.response_class = Google::Apis::ContainerV1::Empty + command.params['projectId'] = project_id unless project_id.nil? + command.params['zone'] = zone unless zone.nil? + command.params['operationId'] = operation_id unless operation_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end protected diff --git a/generated/google/apis/doubleclicksearch_v2.rb b/generated/google/apis/doubleclicksearch_v2.rb index d0cd78e8d..745257dc5 100644 --- a/generated/google/apis/doubleclicksearch_v2.rb +++ b/generated/google/apis/doubleclicksearch_v2.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/doubleclick-search/ module DoubleclicksearchV2 VERSION = 'V2' - REVISION = '20170110' + REVISION = '20170119' # View and manage your advertising data in DoubleClick Search AUTH_DOUBLECLICKSEARCH = 'https://www.googleapis.com/auth/doubleclicksearch' diff --git a/generated/google/apis/drive_v2.rb b/generated/google/apis/drive_v2.rb index c077ebb55..0d765304d 100644 --- a/generated/google/apis/drive_v2.rb +++ b/generated/google/apis/drive_v2.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/drive/ module DriveV2 VERSION = 'V2' - REVISION = '20170113' + REVISION = '20170119' # View and manage the files in your Google Drive AUTH_DRIVE = 'https://www.googleapis.com/auth/drive' diff --git a/generated/google/apis/drive_v3.rb b/generated/google/apis/drive_v3.rb index 6660beb70..bbcbda490 100644 --- a/generated/google/apis/drive_v3.rb +++ b/generated/google/apis/drive_v3.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/drive/ module DriveV3 VERSION = 'V3' - REVISION = '20170113' + REVISION = '20170119' # View and manage the files in your Google Drive AUTH_DRIVE = 'https://www.googleapis.com/auth/drive' diff --git a/generated/google/apis/genomics_v1.rb b/generated/google/apis/genomics_v1.rb index ae1f5e417..2839e9f37 100644 --- a/generated/google/apis/genomics_v1.rb +++ b/generated/google/apis/genomics_v1.rb @@ -20,27 +20,27 @@ module Google module Apis # Genomics API # - # Stores, processes, explores and shares genomic data. + # Upload, process, query, and search Genomics data in the cloud. # - # @see https://cloud.google.com/genomics/ + # @see https://cloud.google.com/genomics module GenomicsV1 VERSION = 'V1' - REVISION = '20160928' + REVISION = '20170126' # View and manage your data in Google BigQuery AUTH_BIGQUERY = 'https://www.googleapis.com/auth/bigquery' - # View and manage your data across Google Cloud Platform services - AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' - # Manage your data in Google Cloud Storage AUTH_DEVSTORAGE_READ_WRITE = 'https://www.googleapis.com/auth/devstorage.read_write' - # View and manage Genomics data - AUTH_GENOMICS = 'https://www.googleapis.com/auth/genomics' + # View and manage your data across Google Cloud Platform services + AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' # View Genomics data AUTH_GENOMICS_READONLY = 'https://www.googleapis.com/auth/genomics.readonly' + + # View and manage Genomics data + AUTH_GENOMICS = 'https://www.googleapis.com/auth/genomics' end end end diff --git a/generated/google/apis/genomics_v1/classes.rb b/generated/google/apis/genomics_v1/classes.rb index 24e74b1e7..af2120664 100644 --- a/generated/google/apis/genomics_v1/classes.rb +++ b/generated/google/apis/genomics_v1/classes.rb @@ -22,3414 +22,30 @@ module Google module Apis module GenomicsV1 - # An annotation set is a logical grouping of annotations that share consistent - # type information and provenance. Examples of annotation sets include 'all - # genes from refseq', and 'all variant annotations from ClinVar'. - class AnnotationSet - include Google::Apis::Core::Hashable - - # The server-generated annotation set ID, unique across all annotation sets. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The dataset to which this annotation set belongs. - # Corresponds to the JSON property `datasetId` - # @return [String] - attr_accessor :dataset_id - - # The ID of the reference set that defines the coordinate space for this set's - # annotations. - # Corresponds to the JSON property `referenceSetId` - # @return [String] - attr_accessor :reference_set_id - - # The display name for this annotation set. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The source URI describing the file from which this annotation set was - # generated, if any. - # Corresponds to the JSON property `sourceUri` - # @return [String] - attr_accessor :source_uri - - # The type of annotations contained within this set. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # A map of additional read alignment information. This must be of the form map ( - # string key mapping to a list of string values). - # Corresponds to the JSON property `info` - # @return [Hash>] - attr_accessor :info - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] if args.key?(:id) - @dataset_id = args[:dataset_id] if args.key?(:dataset_id) - @reference_set_id = args[:reference_set_id] if args.key?(:reference_set_id) - @name = args[:name] if args.key?(:name) - @source_uri = args[:source_uri] if args.key?(:source_uri) - @type = args[:type] if args.key?(:type) - @info = args[:info] if args.key?(:info) - end - end - - # A generic empty message that you can re-use to avoid defining duplicated empty - # messages in your APIs. A typical example is to use it as the request or the - # response type of an API method. For instance: service Foo ` rpc Bar(google. - # protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for - # `Empty` is empty JSON object ````. - class Empty - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # - class SearchAnnotationSetsRequest - include Google::Apis::Core::Hashable - - # Required. The dataset IDs to search within. Caller must have `READ` access to - # these datasets. - # Corresponds to the JSON property `datasetIds` - # @return [Array] - attr_accessor :dataset_ids - - # If specified, only annotation sets associated with the given reference set are - # returned. - # Corresponds to the JSON property `referenceSetId` - # @return [String] - attr_accessor :reference_set_id - - # Only return annotations sets for which a substring of the name matches this - # string (case insensitive). - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # If specified, only annotation sets that have any of these types are returned. - # Corresponds to the JSON property `types` - # @return [Array] - attr_accessor :types - - # The continuation token, which is used to page through large result sets. To - # get the next page of results, set this parameter to the value of ` - # nextPageToken` from the previous response. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # The maximum number of results to return in a single page. If unspecified, - # defaults to 128. The maximum value is 1024. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dataset_ids = args[:dataset_ids] if args.key?(:dataset_ids) - @reference_set_id = args[:reference_set_id] if args.key?(:reference_set_id) - @name = args[:name] if args.key?(:name) - @types = args[:types] if args.key?(:types) - @page_token = args[:page_token] if args.key?(:page_token) - @page_size = args[:page_size] if args.key?(:page_size) - end - end - - # - class SearchAnnotationSetsResponse - include Google::Apis::Core::Hashable - - # The matching annotation sets. - # Corresponds to the JSON property `annotationSets` - # @return [Array] - attr_accessor :annotation_sets - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # This field will be empty if there aren't any additional results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @annotation_sets = args[:annotation_sets] if args.key?(:annotation_sets) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # An annotation describes a region of reference genome. The value of an - # annotation may be one of several canonical types, supplemented by arbitrary - # info tags. An annotation is not inherently associated with a specific sample - # or individual (though a client could choose to use annotations in this way). - # Example canonical annotation types are `GENE` and `VARIANT`. - class Annotation - include Google::Apis::Core::Hashable - - # The server-generated annotation ID, unique across all annotations. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The annotation set to which this annotation belongs. - # Corresponds to the JSON property `annotationSetId` - # @return [String] - attr_accessor :annotation_set_id - - # The display name of this annotation. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The ID of the Google Genomics reference associated with this range. - # Corresponds to the JSON property `referenceId` - # @return [String] - attr_accessor :reference_id - - # The display name corresponding to the reference specified by `referenceId`, - # for example `chr1`, `1`, or `chrX`. - # Corresponds to the JSON property `referenceName` - # @return [String] - attr_accessor :reference_name - - # The start position of the range on the reference, 0-based inclusive. - # Corresponds to the JSON property `start` - # @return [String] - attr_accessor :start - - # The end position of the range on the reference, 0-based exclusive. - # Corresponds to the JSON property `end` - # @return [String] - attr_accessor :end - - # Whether this range refers to the reverse strand, as opposed to the forward - # strand. Note that regardless of this field, the start/end position of the - # range always refer to the forward strand. - # Corresponds to the JSON property `reverseStrand` - # @return [Boolean] - attr_accessor :reverse_strand - alias_method :reverse_strand?, :reverse_strand - - # The data type for this annotation. Must match the containing annotation set's - # type. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # A variant annotation, which describes the effect of a variant on the genome, - # the coding sequence, and/or higher level consequences at the organism level e. - # g. pathogenicity. This field is only set for annotations of type `VARIANT`. - # Corresponds to the JSON property `variant` - # @return [Google::Apis::GenomicsV1::VariantAnnotation] - attr_accessor :variant - - # A transcript represents the assertion that a particular region of the - # reference genome may be transcribed as RNA. - # Corresponds to the JSON property `transcript` - # @return [Google::Apis::GenomicsV1::Transcript] - attr_accessor :transcript - - # A map of additional read alignment information. This must be of the form map ( - # string key mapping to a list of string values). - # Corresponds to the JSON property `info` - # @return [Hash>] - attr_accessor :info - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] if args.key?(:id) - @annotation_set_id = args[:annotation_set_id] if args.key?(:annotation_set_id) - @name = args[:name] if args.key?(:name) - @reference_id = args[:reference_id] if args.key?(:reference_id) - @reference_name = args[:reference_name] if args.key?(:reference_name) - @start = args[:start] if args.key?(:start) - @end = args[:end] if args.key?(:end) - @reverse_strand = args[:reverse_strand] if args.key?(:reverse_strand) - @type = args[:type] if args.key?(:type) - @variant = args[:variant] if args.key?(:variant) - @transcript = args[:transcript] if args.key?(:transcript) - @info = args[:info] if args.key?(:info) - end - end - - # - class VariantAnnotation - include Google::Apis::Core::Hashable - - # Type has been adapted from ClinVar's list of variant types. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Effect of the variant on the coding sequence. - # Corresponds to the JSON property `effect` - # @return [String] - attr_accessor :effect - - # The alternate allele for this variant. If multiple alternate alleles exist at - # this location, create a separate variant for each one, as they may represent - # distinct conditions. - # Corresponds to the JSON property `alternateBases` - # @return [String] - attr_accessor :alternate_bases - - # Google annotation ID of the gene affected by this variant. This should be - # provided when the variant is created. - # Corresponds to the JSON property `geneId` - # @return [String] - attr_accessor :gene_id - - # Google annotation IDs of the transcripts affected by this variant. These - # should be provided when the variant is created. - # Corresponds to the JSON property `transcriptIds` - # @return [Array] - attr_accessor :transcript_ids - - # The set of conditions associated with this variant. A condition describes the - # way a variant influences human health. - # Corresponds to the JSON property `conditions` - # @return [Array] - attr_accessor :conditions - - # Describes the clinical significance of a variant. It is adapted from the - # ClinVar controlled vocabulary for clinical significance described at: http:// - # www.ncbi.nlm.nih.gov/clinvar/docs/clinsig/ - # Corresponds to the JSON property `clinicalSignificance` - # @return [String] - attr_accessor :clinical_significance - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] if args.key?(:type) - @effect = args[:effect] if args.key?(:effect) - @alternate_bases = args[:alternate_bases] if args.key?(:alternate_bases) - @gene_id = args[:gene_id] if args.key?(:gene_id) - @transcript_ids = args[:transcript_ids] if args.key?(:transcript_ids) - @conditions = args[:conditions] if args.key?(:conditions) - @clinical_significance = args[:clinical_significance] if args.key?(:clinical_significance) - end - end - - # - class ClinicalCondition - include Google::Apis::Core::Hashable - - # A set of names for the condition. - # Corresponds to the JSON property `names` - # @return [Array] - attr_accessor :names - - # The set of external IDs for this condition. - # Corresponds to the JSON property `externalIds` - # @return [Array] - attr_accessor :external_ids - - # The MedGen concept id associated with this gene. Search for these IDs at http:/ - # /www.ncbi.nlm.nih.gov/medgen/ - # Corresponds to the JSON property `conceptId` - # @return [String] - attr_accessor :concept_id - - # The OMIM id for this condition. Search for these IDs at http://omim.org/ - # Corresponds to the JSON property `omimId` - # @return [String] - attr_accessor :omim_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @names = args[:names] if args.key?(:names) - @external_ids = args[:external_ids] if args.key?(:external_ids) - @concept_id = args[:concept_id] if args.key?(:concept_id) - @omim_id = args[:omim_id] if args.key?(:omim_id) - end - end - - # - class ExternalId - include Google::Apis::Core::Hashable - - # The name of the source of this data. - # Corresponds to the JSON property `sourceName` - # @return [String] - attr_accessor :source_name - - # The id used by the source of this data. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @source_name = args[:source_name] if args.key?(:source_name) - @id = args[:id] if args.key?(:id) - end - end - - # A transcript represents the assertion that a particular region of the - # reference genome may be transcribed as RNA. - class Transcript - include Google::Apis::Core::Hashable - - # The annotation ID of the gene from which this transcript is transcribed. - # Corresponds to the JSON property `geneId` - # @return [String] - attr_accessor :gene_id - - # The exons that compose this transcript. This field should be unset for genomes - # where transcript splicing does not occur, for example prokaryotes. Introns are - # regions of the transcript that are not included in the spliced RNA product. - # Though not explicitly modeled here, intron ranges can be deduced; all regions - # of this transcript that are not exons are introns. Exonic sequences do not - # necessarily code for a translational product (amino acids). Only the regions - # of exons bounded by the codingSequence correspond to coding DNA sequence. - # Exons are ordered by start position and may not overlap. - # Corresponds to the JSON property `exons` - # @return [Array] - attr_accessor :exons - - # The range of the coding sequence for this transcript, if any. To determine the - # exact ranges of coding sequence, intersect this range with those of the exons, - # if any. If there are any exons, the codingSequence must start and end within - # them. Note that in some cases, the reference genome will not exactly match the - # observed mRNA transcript e.g. due to variance in the source genome from - # reference. In these cases, exon.frame will not necessarily match the expected - # reference reading frame and coding exon reference bases cannot necessarily be - # concatenated to produce the original transcript mRNA. - # Corresponds to the JSON property `codingSequence` - # @return [Google::Apis::GenomicsV1::CodingSequence] - attr_accessor :coding_sequence - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @gene_id = args[:gene_id] if args.key?(:gene_id) - @exons = args[:exons] if args.key?(:exons) - @coding_sequence = args[:coding_sequence] if args.key?(:coding_sequence) - end - end - - # - class Exon - include Google::Apis::Core::Hashable - - # The start position of the exon on this annotation's reference sequence, 0- - # based inclusive. Note that this is relative to the reference start, and **not** - # the containing annotation start. - # Corresponds to the JSON property `start` - # @return [String] - attr_accessor :start - - # The end position of the exon on this annotation's reference sequence, 0-based - # exclusive. Note that this is relative to the reference start, and *not* the - # containing annotation start. - # Corresponds to the JSON property `end` - # @return [String] - attr_accessor :end - - # The frame of this exon. Contains a value of 0, 1, or 2, which indicates the - # offset of the first coding base of the exon within the reading frame of the - # coding DNA sequence, if any. This field is dependent on the strandedness of - # this annotation (see Annotation.reverse_strand). For forward stranded - # annotations, this offset is relative to the exon.start. For reverse strand - # annotations, this offset is relative to the exon.end `- 1`. Unset if this exon - # does not intersect the coding sequence. Upon creation of a transcript, the - # frame must be populated for all or none of the coding exons. - # Corresponds to the JSON property `frame` - # @return [Fixnum] - attr_accessor :frame - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @start = args[:start] if args.key?(:start) - @end = args[:end] if args.key?(:end) - @frame = args[:frame] if args.key?(:frame) - end - end - - # - class CodingSequence - include Google::Apis::Core::Hashable - - # The start of the coding sequence on this annotation's reference sequence, 0- - # based inclusive. Note that this position is relative to the reference start, - # and *not* the containing annotation start. - # Corresponds to the JSON property `start` - # @return [String] - attr_accessor :start - - # The end of the coding sequence on this annotation's reference sequence, 0- - # based exclusive. Note that this position is relative to the reference start, - # and *not* the containing annotation start. - # Corresponds to the JSON property `end` - # @return [String] - attr_accessor :end - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @start = args[:start] if args.key?(:start) - @end = args[:end] if args.key?(:end) - end - end - - # - class BatchCreateAnnotationsRequest - include Google::Apis::Core::Hashable - - # The annotations to be created. At most 4096 can be specified in a single - # request. - # Corresponds to the JSON property `annotations` - # @return [Array] - attr_accessor :annotations - - # A unique request ID which enables the server to detect duplicated requests. If - # provided, duplicated requests will result in the same response; if not - # provided, duplicated requests may result in duplicated data. For a given - # annotation set, callers should not reuse `request_id`s when writing different - # batches of annotations - behavior in this case is undefined. A common approach - # is to use a UUID. For batch jobs where worker crashes are a possibility, - # consider using some unique variant of a worker or run ID. - # 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) - @annotations = args[:annotations] if args.key?(:annotations) - @request_id = args[:request_id] if args.key?(:request_id) - end - end - - # - class BatchCreateAnnotationsResponse - include Google::Apis::Core::Hashable - - # The resulting per-annotation entries, ordered consistently with the original - # request. - # Corresponds to the JSON property `entries` - # @return [Array] - attr_accessor :entries - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @entries = args[:entries] if args.key?(:entries) - end - end - - # - class Entry - include Google::Apis::Core::Hashable - - # The `Status` type defines a logical error model that is suitable for different - # programming environments, including REST APIs and RPC APIs. It is used by [ - # gRPC](https://github.com/grpc). The error model is designed to be: - Simple to - # use and understand for most users - Flexible enough to meet unexpected needs # - # Overview The `Status` message contains three pieces of data: error code, error - # message, and error details. The error code should be an enum value of google. - # rpc.Code, but it may accept additional error codes if needed. The error - # message should be a developer-facing English message that helps developers * - # understand* and *resolve* the error. If a localized user-facing error message - # is needed, put the localized message in the error details or localize it in - # the client. The optional error details may contain arbitrary information about - # the error. There is a predefined set of error detail types in the package ` - # google.rpc` which can be used for common error conditions. # Language mapping - # The `Status` message is the logical representation of the error model, but it - # is not necessarily the actual wire format. When the `Status` message is - # exposed in different client libraries and different wire protocols, it can be - # mapped differently. For example, it will likely be mapped to some exceptions - # in Java, but more likely mapped to some error codes in C. # Other uses The - # error model and the `Status` message can be used in a variety of environments, - # either with or without APIs, to provide a consistent developer experience - # across different environments. Example uses of this error model include: - - # Partial errors. If a service needs to return partial errors to the client, it - # may embed the `Status` in the normal response to indicate the partial errors. - - # Workflow errors. A typical workflow has multiple steps. Each step may have a ` - # Status` message for error reporting purpose. - Batch operations. If a client - # uses batch request and batch response, the `Status` message should be used - # directly inside batch response, one for each error sub-response. - - # Asynchronous operations. If an API call embeds asynchronous operation results - # in its response, the status of those operations should be represented directly - # using the `Status` message. - Logging. If some API errors are stored in logs, - # the message `Status` could be used directly after any stripping needed for - # security/privacy reasons. - # Corresponds to the JSON property `status` - # @return [Google::Apis::GenomicsV1::Status] - attr_accessor :status - - # An annotation describes a region of reference genome. The value of an - # annotation may be one of several canonical types, supplemented by arbitrary - # info tags. An annotation is not inherently associated with a specific sample - # or individual (though a client could choose to use annotations in this way). - # Example canonical annotation types are `GENE` and `VARIANT`. - # Corresponds to the JSON property `annotation` - # @return [Google::Apis::GenomicsV1::Annotation] - attr_accessor :annotation - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @status = args[:status] if args.key?(:status) - @annotation = args[:annotation] if args.key?(:annotation) - end - end - - # The `Status` type defines a logical error model that is suitable for different - # programming environments, including REST APIs and RPC APIs. It is used by [ - # gRPC](https://github.com/grpc). The error model is designed to be: - Simple to - # use and understand for most users - Flexible enough to meet unexpected needs # - # Overview The `Status` message contains three pieces of data: error code, error - # message, and error details. The error code should be an enum value of google. - # rpc.Code, but it may accept additional error codes if needed. The error - # message should be a developer-facing English message that helps developers * - # understand* and *resolve* the error. If a localized user-facing error message - # is needed, put the localized message in the error details or localize it in - # the client. The optional error details may contain arbitrary information about - # the error. There is a predefined set of error detail types in the package ` - # google.rpc` which can be used for common error conditions. # Language mapping - # The `Status` message is the logical representation of the error model, but it - # is not necessarily the actual wire format. When the `Status` message is - # exposed in different client libraries and different wire protocols, it can be - # mapped differently. For example, it will likely be mapped to some exceptions - # in Java, but more likely mapped to some error codes in C. # Other uses The - # error model and the `Status` message can be used in a variety of environments, - # either with or without APIs, to provide a consistent developer experience - # across different environments. Example uses of this error model include: - - # Partial errors. If a service needs to return partial errors to the client, it - # may embed the `Status` in the normal response to indicate the partial errors. - - # Workflow errors. A typical workflow has multiple steps. Each step may have a ` - # Status` message for error reporting purpose. - Batch operations. If a client - # uses batch request and batch response, the `Status` message should be used - # directly inside batch response, one for each error sub-response. - - # Asynchronous operations. If an API call embeds asynchronous operation results - # in its response, the status of those operations should be represented directly - # using the `Status` message. - Logging. If some API errors are stored in logs, - # the message `Status` could be used directly after any stripping needed for - # security/privacy reasons. - class Status - include Google::Apis::Core::Hashable - - # The status code, which should be an enum value of google.rpc.Code. - # Corresponds to the JSON property `code` - # @return [Fixnum] - attr_accessor :code - - # A developer-facing error message, which should be in English. Any user-facing - # error message should be localized and sent in the google.rpc.Status.details - # field, or localized by the client. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - # A list of messages that carry the error details. There will be a common set of - # message types for APIs to use. - # Corresponds to the JSON property `details` - # @return [Array>] - attr_accessor :details - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @code = args[:code] if args.key?(:code) - @message = args[:message] if args.key?(:message) - @details = args[:details] if args.key?(:details) - end - end - - # - class SearchAnnotationsRequest - include Google::Apis::Core::Hashable - - # Required. The annotation sets to search within. The caller must have `READ` - # access to these annotation sets. All queried annotation sets must have the - # same type. - # Corresponds to the JSON property `annotationSetIds` - # @return [Array] - attr_accessor :annotation_set_ids - - # The ID of the reference to query. - # Corresponds to the JSON property `referenceId` - # @return [String] - attr_accessor :reference_id - - # The name of the reference to query, within the reference set associated with - # this query. - # Corresponds to the JSON property `referenceName` - # @return [String] - attr_accessor :reference_name - - # The start position of the range on the reference, 0-based inclusive. If - # specified, referenceId or referenceName must be specified. Defaults to 0. - # Corresponds to the JSON property `start` - # @return [String] - attr_accessor :start - - # The end position of the range on the reference, 0-based exclusive. If - # referenceId or referenceName must be specified, Defaults to the length of the - # reference. - # Corresponds to the JSON property `end` - # @return [String] - attr_accessor :end - - # The continuation token, which is used to page through large result sets. To - # get the next page of results, set this parameter to the value of ` - # nextPageToken` from the previous response. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # The maximum number of results to return in a single page. If unspecified, - # defaults to 256. The maximum value is 2048. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @annotation_set_ids = args[:annotation_set_ids] if args.key?(:annotation_set_ids) - @reference_id = args[:reference_id] if args.key?(:reference_id) - @reference_name = args[:reference_name] if args.key?(:reference_name) - @start = args[:start] if args.key?(:start) - @end = args[:end] if args.key?(:end) - @page_token = args[:page_token] if args.key?(:page_token) - @page_size = args[:page_size] if args.key?(:page_size) - end - end - - # - class SearchAnnotationsResponse - include Google::Apis::Core::Hashable - - # The matching annotations. - # Corresponds to the JSON property `annotations` - # @return [Array] - attr_accessor :annotations - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # This field will be empty if there aren't any additional results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @annotations = args[:annotations] if args.key?(:annotations) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # The dataset list response. - class ListDatasetsResponse - include Google::Apis::Core::Hashable - - # The list of matching Datasets. - # Corresponds to the JSON property `datasets` - # @return [Array] - attr_accessor :datasets - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # This field will be empty if there aren't any additional results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @datasets = args[:datasets] if args.key?(:datasets) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # A Dataset is a collection of genomic data. For more genomics resource - # definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/ - # genomics/fundamentals-of-google-genomics) - class Dataset - include Google::Apis::Core::Hashable - - # The server-generated dataset ID, unique across all datasets. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The Google Cloud project ID that this dataset belongs to. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # The dataset name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The time this dataset was created, in seconds from the epoch. - # Corresponds to the JSON property `createTime` - # @return [String] - attr_accessor :create_time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] if args.key?(:id) - @project_id = args[:project_id] if args.key?(:project_id) - @name = args[:name] if args.key?(:name) - @create_time = args[:create_time] if args.key?(:create_time) - end - end - - # - class UndeleteDatasetRequest - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # Request message for `SetIamPolicy` method. - class SetIamPolicyRequest - include Google::Apis::Core::Hashable - - # Defines an Identity and Access Management (IAM) policy. It is used to specify - # access control policies for Cloud Platform resources. A `Policy` consists of a - # list of `bindings`. A `Binding` binds a list of `members` to a `role`, where - # the members can be user accounts, Google groups, Google domains, and service - # accounts. A `role` is a named list of permissions defined by IAM. **Example** ` - # "bindings": [ ` "role": "roles/owner", "members": [ "user:mike@example.com", " - # group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@ - # appspot.gserviceaccount.com", ] `, ` "role": "roles/viewer", "members": ["user: - # sean@example.com"] ` ] ` For a description of IAM and its features, see the [ - # IAM developer's guide](https://cloud.google.com/iam). - # Corresponds to the JSON property `policy` - # @return [Google::Apis::GenomicsV1::Policy] - attr_accessor :policy - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @policy = args[:policy] if args.key?(:policy) - end - end - - # Defines an Identity and Access Management (IAM) policy. It is used to specify - # access control policies for Cloud Platform resources. A `Policy` consists of a - # list of `bindings`. A `Binding` binds a list of `members` to a `role`, where - # the members can be user accounts, Google groups, Google domains, and service - # accounts. A `role` is a named list of permissions defined by IAM. **Example** ` - # "bindings": [ ` "role": "roles/owner", "members": [ "user:mike@example.com", " - # group:admins@example.com", "domain:google.com", "serviceAccount:my-other-app@ - # appspot.gserviceaccount.com", ] `, ` "role": "roles/viewer", "members": ["user: - # sean@example.com"] ` ] ` For a description of IAM and its features, see the [ - # IAM developer's guide](https://cloud.google.com/iam). - class Policy - include Google::Apis::Core::Hashable - - # Version of the `Policy`. The default version is 0. - # Corresponds to the JSON property `version` - # @return [Fixnum] - attr_accessor :version - - # Associates a list of `members` to a `role`. Multiple `bindings` must not be - # specified for the same `role`. `bindings` with no members will result in an - # error. - # Corresponds to the JSON property `bindings` - # @return [Array] - attr_accessor :bindings - - # `etag` is used for optimistic concurrency control as a way to help prevent - # simultaneous updates of a policy from overwriting each other. It is strongly - # suggested that systems make use of the `etag` in the read-modify-write cycle - # to perform policy updates in order to avoid race conditions: An `etag` is - # returned in the response to `getIamPolicy`, and systems are expected to put - # that etag in the request to `setIamPolicy` to ensure that their change will be - # applied to the same version of the policy. If no `etag` is provided in the - # call to `setIamPolicy`, then the existing policy is overwritten blindly. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @version = args[:version] if args.key?(:version) - @bindings = args[:bindings] if args.key?(:bindings) - @etag = args[:etag] if args.key?(:etag) - end - end - - # Associates `members` with a `role`. - class Binding - include Google::Apis::Core::Hashable - - # Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor` - # , or `roles/owner`. Required - # Corresponds to the JSON property `role` - # @return [String] - attr_accessor :role - - # Specifies the identities requesting access for a Cloud Platform resource. ` - # members` can have the following values: * `allUsers`: A special identifier - # that represents anyone who is on the internet; with or without a Google - # account. * `allAuthenticatedUsers`: A special identifier that represents - # anyone who is authenticated with a Google account or a service account. * ` - # user:`emailid``: An email address that represents a specific Google account. - # For example, `alice@gmail.com` or `joe@example.com`. * `serviceAccount:` - # emailid``: An email address that represents a service account. For example, ` - # my-other-app@appspot.gserviceaccount.com`. * `group:`emailid``: An email - # address that represents a Google group. For example, `admins@example.com`. * ` - # domain:`domain``: A Google Apps domain name that represents all the users of - # that domain. For example, `google.com` or `example.com`. - # Corresponds to the JSON property `members` - # @return [Array] - attr_accessor :members - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @role = args[:role] if args.key?(:role) - @members = args[:members] if args.key?(:members) - end - end - - # Request message for `GetIamPolicy` method. - class GetIamPolicyRequest - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # Request message for `TestIamPermissions` method. - class TestIamPermissionsRequest - include Google::Apis::Core::Hashable - - # REQUIRED: The set of permissions to check for the 'resource'. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. Allowed permissions - # are: * `genomics.datasets.create` * `genomics.datasets.delete` * `genomics. - # datasets.get` * `genomics.datasets.list` * `genomics.datasets.update` * ` - # genomics.datasets.getIamPolicy` * `genomics.datasets.setIamPolicy` - # Corresponds to the JSON property `permissions` - # @return [Array] - attr_accessor :permissions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @permissions = args[:permissions] if args.key?(:permissions) - end - end - - # Response message for `TestIamPermissions` method. - class TestIamPermissionsResponse - include Google::Apis::Core::Hashable - - # A subset of `TestPermissionsRequest.permissions` that the caller is allowed. - # Corresponds to the JSON property `permissions` - # @return [Array] - attr_accessor :permissions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @permissions = args[:permissions] if args.key?(:permissions) - end - end - - # The response message for Operations.ListOperations. - class ListOperationsResponse - include Google::Apis::Core::Hashable - - # A list of operations that matches the specified filter in the request. - # Corresponds to the JSON property `operations` - # @return [Array] - attr_accessor :operations - - # The standard List next-page token. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @operations = args[:operations] if args.key?(:operations) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # This resource represents a long-running operation that is the result of a - # network API call. - class Operation - include Google::Apis::Core::Hashable - - # The server-assigned name, which is only unique within the same service that - # originally returns it. For example: `operations/CJHU7Oi_ChDrveSpBRjfuL- - # qzoWAgEw` - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # An OperationMetadata object. This will always be returned with the Operation. - # Corresponds to the JSON property `metadata` - # @return [Hash] - attr_accessor :metadata - - # If the value is `false`, it means the operation is still in progress. If true, - # the operation is completed, and either `error` or `response` is available. - # Corresponds to the JSON property `done` - # @return [Boolean] - attr_accessor :done - alias_method :done?, :done - - # The `Status` type defines a logical error model that is suitable for different - # programming environments, including REST APIs and RPC APIs. It is used by [ - # gRPC](https://github.com/grpc). The error model is designed to be: - Simple to - # use and understand for most users - Flexible enough to meet unexpected needs # - # Overview The `Status` message contains three pieces of data: error code, error - # message, and error details. The error code should be an enum value of google. - # rpc.Code, but it may accept additional error codes if needed. The error - # message should be a developer-facing English message that helps developers * - # understand* and *resolve* the error. If a localized user-facing error message - # is needed, put the localized message in the error details or localize it in - # the client. The optional error details may contain arbitrary information about - # the error. There is a predefined set of error detail types in the package ` - # google.rpc` which can be used for common error conditions. # Language mapping - # The `Status` message is the logical representation of the error model, but it - # is not necessarily the actual wire format. When the `Status` message is - # exposed in different client libraries and different wire protocols, it can be - # mapped differently. For example, it will likely be mapped to some exceptions - # in Java, but more likely mapped to some error codes in C. # Other uses The - # error model and the `Status` message can be used in a variety of environments, - # either with or without APIs, to provide a consistent developer experience - # across different environments. Example uses of this error model include: - - # Partial errors. If a service needs to return partial errors to the client, it - # may embed the `Status` in the normal response to indicate the partial errors. - - # Workflow errors. A typical workflow has multiple steps. Each step may have a ` - # Status` message for error reporting purpose. - Batch operations. If a client - # uses batch request and batch response, the `Status` message should be used - # directly inside batch response, one for each error sub-response. - - # Asynchronous operations. If an API call embeds asynchronous operation results - # in its response, the status of those operations should be represented directly - # using the `Status` message. - Logging. If some API errors are stored in logs, - # the message `Status` could be used directly after any stripping needed for - # security/privacy reasons. - # Corresponds to the JSON property `error` - # @return [Google::Apis::GenomicsV1::Status] - attr_accessor :error - - # If importing ReadGroupSets, an ImportReadGroupSetsResponse is returned. If - # importing Variants, an ImportVariantsResponse is returned. For exports, an - # empty response is returned. - # Corresponds to the JSON property `response` - # @return [Hash] - attr_accessor :response - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - @metadata = args[:metadata] if args.key?(:metadata) - @done = args[:done] if args.key?(:done) - @error = args[:error] if args.key?(:error) - @response = args[:response] if args.key?(:response) - end - end - - # The request message for Operations.CancelOperation. - class CancelOperationRequest - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # The read group set import request. - class ImportReadGroupSetsRequest - include Google::Apis::Core::Hashable - - # Required. The ID of the dataset these read group sets will belong to. The - # caller must have WRITE permissions to this dataset. - # Corresponds to the JSON property `datasetId` - # @return [String] - attr_accessor :dataset_id - - # The reference set to which the imported read group sets are aligned to, if any. - # The reference names of this reference set must be a superset of those found - # in the imported file headers. If no reference set id is provided, a best - # effort is made to associate with a matching reference set. - # Corresponds to the JSON property `referenceSetId` - # @return [String] - attr_accessor :reference_set_id - - # A list of URIs pointing at [BAM files](https://samtools.github.io/hts-specs/ - # SAMv1.pdf) in Google Cloud Storage. - # Corresponds to the JSON property `sourceUris` - # @return [Array] - attr_accessor :source_uris - - # The partition strategy describes how read groups are partitioned into read - # group sets. - # Corresponds to the JSON property `partitionStrategy` - # @return [String] - attr_accessor :partition_strategy - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dataset_id = args[:dataset_id] if args.key?(:dataset_id) - @reference_set_id = args[:reference_set_id] if args.key?(:reference_set_id) - @source_uris = args[:source_uris] if args.key?(:source_uris) - @partition_strategy = args[:partition_strategy] if args.key?(:partition_strategy) - end - end - - # The read group set export request. - class ExportReadGroupSetRequest - include Google::Apis::Core::Hashable - - # Required. The Google Cloud project ID that owns this export. The caller must - # have WRITE access to this project. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # Required. A Google Cloud Storage URI for the exported BAM file. The currently - # authenticated user must have write access to the new file. An error will be - # returned if the URI already contains data. - # Corresponds to the JSON property `exportUri` - # @return [String] - attr_accessor :export_uri - - # The reference names to export. If this is not specified, all reference - # sequences, including unmapped reads, are exported. Use `*` to export only - # unmapped reads. - # Corresponds to the JSON property `referenceNames` - # @return [Array] - attr_accessor :reference_names - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @project_id = args[:project_id] if args.key?(:project_id) - @export_uri = args[:export_uri] if args.key?(:export_uri) - @reference_names = args[:reference_names] if args.key?(:reference_names) - end - end - - # The read group set search request. - class SearchReadGroupSetsRequest - include Google::Apis::Core::Hashable - - # Restricts this query to read group sets within the given datasets. At least - # one ID must be provided. - # Corresponds to the JSON property `datasetIds` - # @return [Array] - attr_accessor :dataset_ids - - # Only return read group sets for which a substring of the name matches this - # string. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The continuation token, which is used to page through large result sets. To - # get the next page of results, set this parameter to the value of ` - # nextPageToken` from the previous response. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # The maximum number of results to return in a single page. If unspecified, - # defaults to 256. The maximum value is 1024. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dataset_ids = args[:dataset_ids] if args.key?(:dataset_ids) - @name = args[:name] if args.key?(:name) - @page_token = args[:page_token] if args.key?(:page_token) - @page_size = args[:page_size] if args.key?(:page_size) - end - end - - # The read group set search response. - class SearchReadGroupSetsResponse - include Google::Apis::Core::Hashable - - # The list of matching read group sets. - # Corresponds to the JSON property `readGroupSets` - # @return [Array] - attr_accessor :read_group_sets - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # This field will be empty if there aren't any additional results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @read_group_sets = args[:read_group_sets] if args.key?(:read_group_sets) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # A read group set is a logical collection of read groups, which are collections - # of reads produced by a sequencer. A read group set typically models reads - # corresponding to one sample, sequenced one way, and aligned one way. * A read - # group set belongs to one dataset. * A read group belongs to one read group set. - # * A read belongs to one read group. For more genomics resource definitions, - # see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/ - # fundamentals-of-google-genomics) - class ReadGroupSet - include Google::Apis::Core::Hashable - - # The server-generated read group set ID, unique for all read group sets. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The dataset to which this read group set belongs. - # Corresponds to the JSON property `datasetId` - # @return [String] - attr_accessor :dataset_id - - # The reference set to which the reads in this read group set are aligned. - # Corresponds to the JSON property `referenceSetId` - # @return [String] - attr_accessor :reference_set_id - - # The read group set name. By default this will be initialized to the sample - # name of the sequenced data contained in this set. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The filename of the original source file for this read group set, if any. - # Corresponds to the JSON property `filename` - # @return [String] - attr_accessor :filename - - # The read groups in this set. There are typically 1-10 read groups in a read - # group set. - # Corresponds to the JSON property `readGroups` - # @return [Array] - attr_accessor :read_groups - - # A map of additional read group set information. - # Corresponds to the JSON property `info` - # @return [Hash>] - attr_accessor :info - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] if args.key?(:id) - @dataset_id = args[:dataset_id] if args.key?(:dataset_id) - @reference_set_id = args[:reference_set_id] if args.key?(:reference_set_id) - @name = args[:name] if args.key?(:name) - @filename = args[:filename] if args.key?(:filename) - @read_groups = args[:read_groups] if args.key?(:read_groups) - @info = args[:info] if args.key?(:info) - end - end - - # A read group is all the data that's processed the same way by the sequencer. - class ReadGroup - include Google::Apis::Core::Hashable - - # The server-generated read group ID, unique for all read groups. Note: This is - # different than the @RG ID field in the SAM spec. For that value, see name. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The dataset to which this read group belongs. - # Corresponds to the JSON property `datasetId` - # @return [String] - attr_accessor :dataset_id - - # The read group name. This corresponds to the @RG ID field in the SAM spec. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # A free-form text description of this read group. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # A client-supplied sample identifier for the reads in this read group. - # Corresponds to the JSON property `sampleId` - # @return [String] - attr_accessor :sample_id - - # The experiment used to generate this read group. - # Corresponds to the JSON property `experiment` - # @return [Google::Apis::GenomicsV1::Experiment] - attr_accessor :experiment - - # The predicted insert size of this read group. The insert size is the length - # the sequenced DNA fragment from end-to-end, not including the adapters. - # Corresponds to the JSON property `predictedInsertSize` - # @return [Fixnum] - attr_accessor :predicted_insert_size - - # The programs used to generate this read group. Programs are always identical - # for all read groups within a read group set. For this reason, only the first - # read group in a returned set will have this field populated. - # Corresponds to the JSON property `programs` - # @return [Array] - attr_accessor :programs - - # The reference set the reads in this read group are aligned to. - # Corresponds to the JSON property `referenceSetId` - # @return [String] - attr_accessor :reference_set_id - - # A map of additional read group information. This must be of the form map ( - # string key mapping to a list of string values). - # Corresponds to the JSON property `info` - # @return [Hash>] - attr_accessor :info - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] if args.key?(:id) - @dataset_id = args[:dataset_id] if args.key?(:dataset_id) - @name = args[:name] if args.key?(:name) - @description = args[:description] if args.key?(:description) - @sample_id = args[:sample_id] if args.key?(:sample_id) - @experiment = args[:experiment] if args.key?(:experiment) - @predicted_insert_size = args[:predicted_insert_size] if args.key?(:predicted_insert_size) - @programs = args[:programs] if args.key?(:programs) - @reference_set_id = args[:reference_set_id] if args.key?(:reference_set_id) - @info = args[:info] if args.key?(:info) - end - end - - # - class Experiment - include Google::Apis::Core::Hashable - - # A client-supplied library identifier; a library is a collection of DNA - # fragments which have been prepared for sequencing from a sample. This field is - # important for quality control as error or bias can be introduced during sample - # preparation. - # Corresponds to the JSON property `libraryId` - # @return [String] - attr_accessor :library_id - - # The platform unit used as part of this experiment, for example flowcell- - # barcode.lane for Illumina or slide for SOLiD. Corresponds to the @RG PU field - # in the SAM spec. - # Corresponds to the JSON property `platformUnit` - # @return [String] - attr_accessor :platform_unit - - # The sequencing center used as part of this experiment. - # Corresponds to the JSON property `sequencingCenter` - # @return [String] - attr_accessor :sequencing_center - - # The instrument model used as part of this experiment. This maps to sequencing - # technology in the SAM spec. - # Corresponds to the JSON property `instrumentModel` - # @return [String] - attr_accessor :instrument_model - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @library_id = args[:library_id] if args.key?(:library_id) - @platform_unit = args[:platform_unit] if args.key?(:platform_unit) - @sequencing_center = args[:sequencing_center] if args.key?(:sequencing_center) - @instrument_model = args[:instrument_model] if args.key?(:instrument_model) - end - end - - # - class Program - include Google::Apis::Core::Hashable - - # The command line used to run this program. - # Corresponds to the JSON property `commandLine` - # @return [String] - attr_accessor :command_line - - # The user specified locally unique ID of the program. Used along with ` - # prevProgramId` to define an ordering between programs. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The display name of the program. This is typically the colloquial name of the - # tool used, for example 'bwa' or 'picard'. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The ID of the program run before this one. - # Corresponds to the JSON property `prevProgramId` - # @return [String] - attr_accessor :prev_program_id - - # The version of the program run. - # Corresponds to the JSON property `version` - # @return [String] - attr_accessor :version - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @command_line = args[:command_line] if args.key?(:command_line) - @id = args[:id] if args.key?(:id) - @name = args[:name] if args.key?(:name) - @prev_program_id = args[:prev_program_id] if args.key?(:prev_program_id) - @version = args[:version] if args.key?(:version) - end - end - - # - class ListCoverageBucketsResponse - include Google::Apis::Core::Hashable - - # The length of each coverage bucket in base pairs. Note that buckets at the end - # of a reference sequence may be shorter. This value is omitted if the bucket - # width is infinity (the default behaviour, with no range or `targetBucketWidth`) - # . - # Corresponds to the JSON property `bucketWidth` - # @return [String] - attr_accessor :bucket_width - - # The coverage buckets. The list of buckets is sparse; a bucket with 0 - # overlapping reads is not returned. A bucket never crosses more than one - # reference sequence. Each bucket has width `bucketWidth`, unless its end is the - # end of the reference sequence. - # Corresponds to the JSON property `coverageBuckets` - # @return [Array] - attr_accessor :coverage_buckets - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # This field will be empty if there aren't any additional results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bucket_width = args[:bucket_width] if args.key?(:bucket_width) - @coverage_buckets = args[:coverage_buckets] if args.key?(:coverage_buckets) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - # A bucket over which read coverage has been precomputed. A bucket corresponds # to a specific range of the reference sequence. class CoverageBucket include Google::Apis::Core::Hashable + # The average number of reads which are aligned to each individual + # reference base in this bucket. + # Corresponds to the JSON property `meanCoverage` + # @return [Float] + attr_accessor :mean_coverage + # A 0-based half-open genomic coordinate range for search requests. # Corresponds to the JSON property `range` # @return [Google::Apis::GenomicsV1::Range] attr_accessor :range - # The average number of reads which are aligned to each individual reference - # base in this bucket. - # Corresponds to the JSON property `meanCoverage` - # @return [Float] - attr_accessor :mean_coverage - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @range = args[:range] if args.key?(:range) @mean_coverage = args[:mean_coverage] if args.key?(:mean_coverage) - end - end - - # A 0-based half-open genomic coordinate range for search requests. - class Range - include Google::Apis::Core::Hashable - - # The reference sequence name, for example `chr1`, `1`, or `chrX`. - # Corresponds to the JSON property `referenceName` - # @return [String] - attr_accessor :reference_name - - # The start position of the range on the reference, 0-based inclusive. - # Corresponds to the JSON property `start` - # @return [String] - attr_accessor :start - - # The end position of the range on the reference, 0-based exclusive. - # Corresponds to the JSON property `end` - # @return [String] - attr_accessor :end - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @reference_name = args[:reference_name] if args.key?(:reference_name) - @start = args[:start] if args.key?(:start) - @end = args[:end] if args.key?(:end) - end - end - - # The read search request. - class SearchReadsRequest - include Google::Apis::Core::Hashable - - # The IDs of the read groups sets within which to search for reads. All - # specified read group sets must be aligned against a common set of reference - # sequences; this defines the genomic coordinates for the query. Must specify - # one of `readGroupSetIds` or `readGroupIds`. - # Corresponds to the JSON property `readGroupSetIds` - # @return [Array] - attr_accessor :read_group_set_ids - - # The IDs of the read groups within which to search for reads. All specified - # read groups must belong to the same read group sets. Must specify one of ` - # readGroupSetIds` or `readGroupIds`. - # Corresponds to the JSON property `readGroupIds` - # @return [Array] - attr_accessor :read_group_ids - - # The reference sequence name, for example `chr1`, `1`, or `chrX`. If set to `*`, - # only unmapped reads are returned. If unspecified, all reads (mapped and - # unmapped) are returned. - # Corresponds to the JSON property `referenceName` - # @return [String] - attr_accessor :reference_name - - # The start position of the range on the reference, 0-based inclusive. If - # specified, `referenceName` must also be specified. - # Corresponds to the JSON property `start` - # @return [String] - attr_accessor :start - - # The end position of the range on the reference, 0-based exclusive. If - # specified, `referenceName` must also be specified. - # Corresponds to the JSON property `end` - # @return [String] - attr_accessor :end - - # The continuation token, which is used to page through large result sets. To - # get the next page of results, set this parameter to the value of ` - # nextPageToken` from the previous response. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # The maximum number of results to return in a single page. If unspecified, - # defaults to 256. The maximum value is 2048. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @read_group_set_ids = args[:read_group_set_ids] if args.key?(:read_group_set_ids) - @read_group_ids = args[:read_group_ids] if args.key?(:read_group_ids) - @reference_name = args[:reference_name] if args.key?(:reference_name) - @start = args[:start] if args.key?(:start) - @end = args[:end] if args.key?(:end) - @page_token = args[:page_token] if args.key?(:page_token) - @page_size = args[:page_size] if args.key?(:page_size) - end - end - - # The read search response. - class SearchReadsResponse - include Google::Apis::Core::Hashable - - # The list of matching alignments sorted by mapped genomic coordinate, if any, - # ascending in position within the same reference. Unmapped reads, which have no - # position, are returned contiguously and are sorted in ascending lexicographic - # order by fragment name. - # Corresponds to the JSON property `alignments` - # @return [Array] - attr_accessor :alignments - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # This field will be empty if there aren't any additional results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @alignments = args[:alignments] if args.key?(:alignments) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # A read alignment describes a linear alignment of a string of DNA to a - # reference sequence, in addition to metadata about the fragment (the molecule - # of DNA sequenced) and the read (the bases which were read by the sequencer). A - # read is equivalent to a line in a SAM file. A read belongs to exactly one read - # group and exactly one read group set. For more genomics resource definitions, - # see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/ - # fundamentals-of-google-genomics) ### Reverse-stranded reads Mapped reads ( - # reads having a non-null `alignment`) can be aligned to either the forward or - # the reverse strand of their associated reference. Strandedness of a mapped - # read is encoded by `alignment.position.reverseStrand`. If we consider the - # reference to be a forward-stranded coordinate space of `[0, reference.length)` - # with `0` as the left-most position and `reference.length` as the right-most - # position, reads are always aligned left to right. That is, `alignment.position. - # position` always refers to the left-most reference coordinate and `alignment. - # cigar` describes the alignment of this read to the reference from left to - # right. All per-base fields such as `alignedSequence` and `alignedQuality` - # share this same left-to-right orientation; this is true of reads which are - # aligned to either strand. For reverse-stranded reads, this means that ` - # alignedSequence` is the reverse complement of the bases that were originally - # reported by the sequencing machine. ### Generating a reference-aligned - # sequence string When interacting with mapped reads, it's often useful to - # produce a string representing the local alignment of the read to reference. - # The following pseudocode demonstrates one way of doing this: out = "" offset = - # 0 for c in read.alignment.cigar ` switch c.operation ` case "ALIGNMENT_MATCH", - # "SEQUENCE_MATCH", "SEQUENCE_MISMATCH": out += read.alignedSequence[offset: - # offset+c.operationLength] offset += c.operationLength break case "CLIP_SOFT", " - # INSERT": offset += c.operationLength break case "PAD": out += repeat("*", c. - # operationLength) break case "DELETE": out += repeat("-", c.operationLength) - # break case "SKIP": out += repeat(" ", c.operationLength) break case "CLIP_HARD" - # : break ` ` return out ### Converting to SAM's CIGAR string The following - # pseudocode generates a SAM CIGAR string from the `cigar` field. Note that this - # is a lossy conversion (`cigar.referenceSequence` is lost). cigarMap = ` " - # ALIGNMENT_MATCH": "M", "INSERT": "I", "DELETE": "D", "SKIP": "N", "CLIP_SOFT": - # "S", "CLIP_HARD": "H", "PAD": "P", "SEQUENCE_MATCH": "=", "SEQUENCE_MISMATCH": - # "X", ` cigarStr = "" for c in read.alignment.cigar ` cigarStr += c. - # operationLength + cigarMap[c.operation] ` return cigarStr - class Read - include Google::Apis::Core::Hashable - - # The server-generated read ID, unique across all reads. This is different from - # the `fragmentName`. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The ID of the read group this read belongs to. A read belongs to exactly one - # read group. This is a server-generated ID which is distinct from SAM's RG tag ( - # for that value, see ReadGroup.name). - # Corresponds to the JSON property `readGroupId` - # @return [String] - attr_accessor :read_group_id - - # The ID of the read group set this read belongs to. A read belongs to exactly - # one read group set. - # Corresponds to the JSON property `readGroupSetId` - # @return [String] - attr_accessor :read_group_set_id - - # The fragment name. Equivalent to QNAME (query template name) in SAM. - # Corresponds to the JSON property `fragmentName` - # @return [String] - attr_accessor :fragment_name - - # The orientation and the distance between reads from the fragment are - # consistent with the sequencing protocol (SAM flag 0x2). - # Corresponds to the JSON property `properPlacement` - # @return [Boolean] - attr_accessor :proper_placement - alias_method :proper_placement?, :proper_placement - - # The fragment is a PCR or optical duplicate (SAM flag 0x400). - # Corresponds to the JSON property `duplicateFragment` - # @return [Boolean] - attr_accessor :duplicate_fragment - alias_method :duplicate_fragment?, :duplicate_fragment - - # The observed length of the fragment, equivalent to TLEN in SAM. - # Corresponds to the JSON property `fragmentLength` - # @return [Fixnum] - attr_accessor :fragment_length - - # The read number in sequencing. 0-based and less than numberReads. This field - # replaces SAM flag 0x40 and 0x80. - # Corresponds to the JSON property `readNumber` - # @return [Fixnum] - attr_accessor :read_number - - # The number of reads in the fragment (extension to SAM flag 0x1). - # Corresponds to the JSON property `numberReads` - # @return [Fixnum] - attr_accessor :number_reads - - # Whether this read did not pass filters, such as platform or vendor quality - # controls (SAM flag 0x200). - # Corresponds to the JSON property `failedVendorQualityChecks` - # @return [Boolean] - attr_accessor :failed_vendor_quality_checks - alias_method :failed_vendor_quality_checks?, :failed_vendor_quality_checks - - # A linear alignment can be represented by one CIGAR string. Describes the - # mapped position and local alignment of the read to the reference. - # Corresponds to the JSON property `alignment` - # @return [Google::Apis::GenomicsV1::LinearAlignment] - attr_accessor :alignment - - # Whether this alignment is secondary. Equivalent to SAM flag 0x100. A secondary - # alignment represents an alternative to the primary alignment for this read. - # Aligners may return secondary alignments if a read can map ambiguously to - # multiple coordinates in the genome. By convention, each read has one and only - # one alignment where both `secondaryAlignment` and `supplementaryAlignment` are - # false. - # Corresponds to the JSON property `secondaryAlignment` - # @return [Boolean] - attr_accessor :secondary_alignment - alias_method :secondary_alignment?, :secondary_alignment - - # Whether this alignment is supplementary. Equivalent to SAM flag 0x800. - # Supplementary alignments are used in the representation of a chimeric - # alignment. In a chimeric alignment, a read is split into multiple linear - # alignments that map to different reference contigs. The first linear alignment - # in the read will be designated as the representative alignment; the remaining - # linear alignments will be designated as supplementary alignments. These - # alignments may have different mapping quality scores. In each linear alignment - # in a chimeric alignment, the read will be hard clipped. The `alignedSequence` - # and `alignedQuality` fields in the alignment record will only represent the - # bases for its respective linear alignment. - # Corresponds to the JSON property `supplementaryAlignment` - # @return [Boolean] - attr_accessor :supplementary_alignment - alias_method :supplementary_alignment?, :supplementary_alignment - - # The bases of the read sequence contained in this alignment record, **without - # CIGAR operations applied** (equivalent to SEQ in SAM). `alignedSequence` and ` - # alignedQuality` may be shorter than the full read sequence and quality. This - # will occur if the alignment is part of a chimeric alignment, or if the read - # was trimmed. When this occurs, the CIGAR for this read will begin/end with a - # hard clip operator that will indicate the length of the excised sequence. - # Corresponds to the JSON property `alignedSequence` - # @return [String] - attr_accessor :aligned_sequence - - # The quality of the read sequence contained in this alignment record ( - # equivalent to QUAL in SAM). `alignedSequence` and `alignedQuality` may be - # shorter than the full read sequence and quality. This will occur if the - # alignment is part of a chimeric alignment, or if the read was trimmed. When - # this occurs, the CIGAR for this read will begin/end with a hard clip operator - # that will indicate the length of the excised sequence. - # Corresponds to the JSON property `alignedQuality` - # @return [Array] - attr_accessor :aligned_quality - - # An abstraction for referring to a genomic position, in relation to some - # already known reference. For now, represents a genomic position as a reference - # name, a base number on that reference (0-based), and a determination of - # forward or reverse strand. - # Corresponds to the JSON property `nextMatePosition` - # @return [Google::Apis::GenomicsV1::Position] - attr_accessor :next_mate_position - - # A map of additional read alignment information. This must be of the form map ( - # string key mapping to a list of string values). - # Corresponds to the JSON property `info` - # @return [Hash>] - attr_accessor :info - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] if args.key?(:id) - @read_group_id = args[:read_group_id] if args.key?(:read_group_id) - @read_group_set_id = args[:read_group_set_id] if args.key?(:read_group_set_id) - @fragment_name = args[:fragment_name] if args.key?(:fragment_name) - @proper_placement = args[:proper_placement] if args.key?(:proper_placement) - @duplicate_fragment = args[:duplicate_fragment] if args.key?(:duplicate_fragment) - @fragment_length = args[:fragment_length] if args.key?(:fragment_length) - @read_number = args[:read_number] if args.key?(:read_number) - @number_reads = args[:number_reads] if args.key?(:number_reads) - @failed_vendor_quality_checks = args[:failed_vendor_quality_checks] if args.key?(:failed_vendor_quality_checks) - @alignment = args[:alignment] if args.key?(:alignment) - @secondary_alignment = args[:secondary_alignment] if args.key?(:secondary_alignment) - @supplementary_alignment = args[:supplementary_alignment] if args.key?(:supplementary_alignment) - @aligned_sequence = args[:aligned_sequence] if args.key?(:aligned_sequence) - @aligned_quality = args[:aligned_quality] if args.key?(:aligned_quality) - @next_mate_position = args[:next_mate_position] if args.key?(:next_mate_position) - @info = args[:info] if args.key?(:info) - end - end - - # A linear alignment can be represented by one CIGAR string. Describes the - # mapped position and local alignment of the read to the reference. - class LinearAlignment - include Google::Apis::Core::Hashable - - # An abstraction for referring to a genomic position, in relation to some - # already known reference. For now, represents a genomic position as a reference - # name, a base number on that reference (0-based), and a determination of - # forward or reverse strand. - # Corresponds to the JSON property `position` - # @return [Google::Apis::GenomicsV1::Position] - attr_accessor :position - - # The mapping quality of this alignment. Represents how likely the read maps to - # this position as opposed to other locations. Specifically, this is -10 log10 - # Pr(mapping position is wrong), rounded to the nearest integer. - # Corresponds to the JSON property `mappingQuality` - # @return [Fixnum] - attr_accessor :mapping_quality - - # Represents the local alignment of this sequence (alignment matches, indels, - # etc) against the reference. - # Corresponds to the JSON property `cigar` - # @return [Array] - attr_accessor :cigar - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @position = args[:position] if args.key?(:position) - @mapping_quality = args[:mapping_quality] if args.key?(:mapping_quality) - @cigar = args[:cigar] if args.key?(:cigar) - end - end - - # An abstraction for referring to a genomic position, in relation to some - # already known reference. For now, represents a genomic position as a reference - # name, a base number on that reference (0-based), and a determination of - # forward or reverse strand. - class Position - include Google::Apis::Core::Hashable - - # The name of the reference in whatever reference set is being used. - # Corresponds to the JSON property `referenceName` - # @return [String] - attr_accessor :reference_name - - # The 0-based offset from the start of the forward strand for that reference. - # Corresponds to the JSON property `position` - # @return [String] - attr_accessor :position - - # Whether this position is on the reverse strand, as opposed to the forward - # strand. - # Corresponds to the JSON property `reverseStrand` - # @return [Boolean] - attr_accessor :reverse_strand - alias_method :reverse_strand?, :reverse_strand - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @reference_name = args[:reference_name] if args.key?(:reference_name) - @position = args[:position] if args.key?(:position) - @reverse_strand = args[:reverse_strand] if args.key?(:reverse_strand) - end - end - - # A single CIGAR operation. - class CigarUnit - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `operation` - # @return [String] - attr_accessor :operation - - # The number of genomic bases that the operation runs for. Required. - # Corresponds to the JSON property `operationLength` - # @return [String] - attr_accessor :operation_length - - # `referenceSequence` is only used at mismatches (`SEQUENCE_MISMATCH`) and - # deletions (`DELETE`). Filling this field replaces SAM's MD tag. If the - # relevant information is not available, this field is unset. - # Corresponds to the JSON property `referenceSequence` - # @return [String] - attr_accessor :reference_sequence - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @operation = args[:operation] if args.key?(:operation) - @operation_length = args[:operation_length] if args.key?(:operation_length) - @reference_sequence = args[:reference_sequence] if args.key?(:reference_sequence) - end - end - - # The stream reads request. - class StreamReadsRequest - include Google::Apis::Core::Hashable - - # The Google Cloud project ID which will be billed for this access. The caller - # must have WRITE access to this project. Required. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # The ID of the read group set from which to stream reads. - # Corresponds to the JSON property `readGroupSetId` - # @return [String] - attr_accessor :read_group_set_id - - # The reference sequence name, for example `chr1`, `1`, or `chrX`. If set to *, - # only unmapped reads are returned. - # Corresponds to the JSON property `referenceName` - # @return [String] - attr_accessor :reference_name - - # The start position of the range on the reference, 0-based inclusive. If - # specified, `referenceName` must also be specified. - # Corresponds to the JSON property `start` - # @return [String] - attr_accessor :start - - # The end position of the range on the reference, 0-based exclusive. If - # specified, `referenceName` must also be specified. - # Corresponds to the JSON property `end` - # @return [String] - attr_accessor :end - - # Restricts results to a shard containing approximately `1/totalShards` of the - # normal response payload for this query. Results from a sharded request are - # disjoint from those returned by all queries which differ only in their shard - # parameter. A shard may yield 0 results; this is especially likely for large - # values of `totalShards`. Valid values are `[0, totalShards)`. - # Corresponds to the JSON property `shard` - # @return [Fixnum] - attr_accessor :shard - - # Specifying `totalShards` causes a disjoint subset of the normal response - # payload to be returned for each query with a unique `shard` parameter - # specified. A best effort is made to yield equally sized shards. Sharding can - # be used to distribute processing amongst workers, where each worker is - # assigned a unique `shard` number and all workers specify the same `totalShards` - # number. The union of reads returned for all sharded queries `[0, totalShards)` - # is equal to those returned by a single unsharded query. Queries for different - # values of `totalShards` with common divisors will share shard boundaries. For - # example, streaming `shard` 2 of 5 `totalShards` yields the same results as - # streaming `shard`s 4 and 5 of 10 `totalShards`. This property can be leveraged - # for adaptive retries. - # Corresponds to the JSON property `totalShards` - # @return [Fixnum] - attr_accessor :total_shards - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @project_id = args[:project_id] if args.key?(:project_id) - @read_group_set_id = args[:read_group_set_id] if args.key?(:read_group_set_id) - @reference_name = args[:reference_name] if args.key?(:reference_name) - @start = args[:start] if args.key?(:start) - @end = args[:end] if args.key?(:end) - @shard = args[:shard] if args.key?(:shard) - @total_shards = args[:total_shards] if args.key?(:total_shards) - end - end - - # - class StreamReadsResponse - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `alignments` - # @return [Array] - attr_accessor :alignments - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @alignments = args[:alignments] if args.key?(:alignments) - end - end - - # - class SearchReferenceSetsRequest - include Google::Apis::Core::Hashable - - # If present, return reference sets for which the md5checksum matches exactly. - # Corresponds to the JSON property `md5checksums` - # @return [Array] - attr_accessor :md5checksums - - # If present, return reference sets for which a prefix of any of - # sourceAccessions match any of these strings. Accession numbers typically have - # a main number and a version, for example `NC_000001.11`. - # Corresponds to the JSON property `accessions` - # @return [Array] - attr_accessor :accessions - - # If present, return reference sets for which a substring of their `assemblyId` - # matches this string (case insensitive). - # Corresponds to the JSON property `assemblyId` - # @return [String] - attr_accessor :assembly_id - - # The continuation token, which is used to page through large result sets. To - # get the next page of results, set this parameter to the value of ` - # nextPageToken` from the previous response. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # The maximum number of results to return in a single page. If unspecified, - # defaults to 1024. The maximum value is 4096. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @md5checksums = args[:md5checksums] if args.key?(:md5checksums) - @accessions = args[:accessions] if args.key?(:accessions) - @assembly_id = args[:assembly_id] if args.key?(:assembly_id) - @page_token = args[:page_token] if args.key?(:page_token) - @page_size = args[:page_size] if args.key?(:page_size) - end - end - - # - class SearchReferenceSetsResponse - include Google::Apis::Core::Hashable - - # The matching references sets. - # Corresponds to the JSON property `referenceSets` - # @return [Array] - attr_accessor :reference_sets - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # This field will be empty if there aren't any additional results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @reference_sets = args[:reference_sets] if args.key?(:reference_sets) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # A reference set is a set of references which typically comprise a reference - # assembly for a species, such as `GRCh38` which is representative of the human - # genome. A reference set defines a common coordinate space for comparing - # reference-aligned experimental data. A reference set contains 1 or more - # references. For more genomics resource definitions, see [Fundamentals of - # Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google- - # genomics) - class ReferenceSet - include Google::Apis::Core::Hashable - - # The server-generated reference set ID, unique across all reference sets. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The IDs of the reference objects that are part of this set. `Reference. - # md5checksum` must be unique within this set. - # Corresponds to the JSON property `referenceIds` - # @return [Array] - attr_accessor :reference_ids - - # Order-independent MD5 checksum which identifies this reference set. The - # checksum is computed by sorting all lower case hexidecimal string `reference. - # md5checksum` (for all reference in this set) in ascending lexicographic order, - # concatenating, and taking the MD5 of that value. The resulting value is - # represented in lower case hexadecimal format. - # Corresponds to the JSON property `md5checksum` - # @return [String] - attr_accessor :md5checksum - - # ID from http://www.ncbi.nlm.nih.gov/taxonomy (for example, 9606 for human) - # indicating the species which this reference set is intended to model. Note - # that contained references may specify a different `ncbiTaxonId`, as assemblies - # may contain reference sequences which do not belong to the modeled species, - # for example EBV in a human reference genome. - # Corresponds to the JSON property `ncbiTaxonId` - # @return [Fixnum] - attr_accessor :ncbi_taxon_id - - # Free text description of this reference set. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Public id of this reference set, such as `GRCh37`. - # Corresponds to the JSON property `assemblyId` - # @return [String] - attr_accessor :assembly_id - - # The URI from which the references were obtained. - # Corresponds to the JSON property `sourceUri` - # @return [String] - attr_accessor :source_uri - - # All known corresponding accession IDs in INSDC (GenBank/ENA/DDBJ) ideally with - # a version number, for example `NC_000001.11`. - # Corresponds to the JSON property `sourceAccessions` - # @return [Array] - attr_accessor :source_accessions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] if args.key?(:id) - @reference_ids = args[:reference_ids] if args.key?(:reference_ids) - @md5checksum = args[:md5checksum] if args.key?(:md5checksum) - @ncbi_taxon_id = args[:ncbi_taxon_id] if args.key?(:ncbi_taxon_id) - @description = args[:description] if args.key?(:description) - @assembly_id = args[:assembly_id] if args.key?(:assembly_id) - @source_uri = args[:source_uri] if args.key?(:source_uri) - @source_accessions = args[:source_accessions] if args.key?(:source_accessions) - end - end - - # - class SearchReferencesRequest - include Google::Apis::Core::Hashable - - # If present, return references for which the md5checksum matches exactly. - # Corresponds to the JSON property `md5checksums` - # @return [Array] - attr_accessor :md5checksums - - # If present, return references for which a prefix of any of sourceAccessions - # match any of these strings. Accession numbers typically have a main number and - # a version, for example `GCF_000001405.26`. - # Corresponds to the JSON property `accessions` - # @return [Array] - attr_accessor :accessions - - # If present, return only references which belong to this reference set. - # Corresponds to the JSON property `referenceSetId` - # @return [String] - attr_accessor :reference_set_id - - # The continuation token, which is used to page through large result sets. To - # get the next page of results, set this parameter to the value of ` - # nextPageToken` from the previous response. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # The maximum number of results to return in a single page. If unspecified, - # defaults to 1024. The maximum value is 4096. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @md5checksums = args[:md5checksums] if args.key?(:md5checksums) - @accessions = args[:accessions] if args.key?(:accessions) - @reference_set_id = args[:reference_set_id] if args.key?(:reference_set_id) - @page_token = args[:page_token] if args.key?(:page_token) - @page_size = args[:page_size] if args.key?(:page_size) - end - end - - # - class SearchReferencesResponse - include Google::Apis::Core::Hashable - - # The matching references. - # Corresponds to the JSON property `references` - # @return [Array] - attr_accessor :references - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # This field will be empty if there aren't any additional results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @references = args[:references] if args.key?(:references) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # A reference is a canonical assembled DNA sequence, intended to act as a - # reference coordinate space for other genomic annotations. A single reference - # might represent the human chromosome 1 or mitochandrial DNA, for instance. A - # reference belongs to one or more reference sets. For more genomics resource - # definitions, see [Fundamentals of Google Genomics](https://cloud.google.com/ - # genomics/fundamentals-of-google-genomics) - class Reference - include Google::Apis::Core::Hashable - - # The server-generated reference ID, unique across all references. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The length of this reference's sequence. - # Corresponds to the JSON property `length` - # @return [String] - attr_accessor :length - - # MD5 of the upper-case sequence excluding all whitespace characters (this is - # equivalent to SQ:M5 in SAM). This value is represented in lower case - # hexadecimal format. - # Corresponds to the JSON property `md5checksum` - # @return [String] - attr_accessor :md5checksum - - # The name of this reference, for example `22`. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The URI from which the sequence was obtained. Typically specifies a FASTA - # format file. - # Corresponds to the JSON property `sourceUri` - # @return [String] - attr_accessor :source_uri - - # All known corresponding accession IDs in INSDC (GenBank/ENA/DDBJ) ideally with - # a version number, for example `GCF_000001405.26`. - # Corresponds to the JSON property `sourceAccessions` - # @return [Array] - attr_accessor :source_accessions - - # ID from http://www.ncbi.nlm.nih.gov/taxonomy. For example, 9606 for human. - # Corresponds to the JSON property `ncbiTaxonId` - # @return [Fixnum] - attr_accessor :ncbi_taxon_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] if args.key?(:id) - @length = args[:length] if args.key?(:length) - @md5checksum = args[:md5checksum] if args.key?(:md5checksum) - @name = args[:name] if args.key?(:name) - @source_uri = args[:source_uri] if args.key?(:source_uri) - @source_accessions = args[:source_accessions] if args.key?(:source_accessions) - @ncbi_taxon_id = args[:ncbi_taxon_id] if args.key?(:ncbi_taxon_id) - end - end - - # - class ListBasesResponse - include Google::Apis::Core::Hashable - - # The offset position (0-based) of the given `sequence` from the start of this ` - # Reference`. This value will differ for each page in a paginated request. - # Corresponds to the JSON property `offset` - # @return [String] - attr_accessor :offset - - # A substring of the bases that make up this reference. - # Corresponds to the JSON property `sequence` - # @return [String] - attr_accessor :sequence - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # This field will be empty if there aren't any additional results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @offset = args[:offset] if args.key?(:offset) - @sequence = args[:sequence] if args.key?(:sequence) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # The variant data import request. - class ImportVariantsRequest - include Google::Apis::Core::Hashable - - # Required. The variant set to which variant data should be imported. - # Corresponds to the JSON property `variantSetId` - # @return [String] - attr_accessor :variant_set_id - - # A list of URIs referencing variant files in Google Cloud Storage. URIs can - # include wildcards [as described here](https://cloud.google.com/storage/docs/ - # gsutil/addlhelp/WildcardNames). Note that recursive wildcards ('**') are not - # supported. - # Corresponds to the JSON property `sourceUris` - # @return [Array] - attr_accessor :source_uris - - # The format of the variant data being imported. If unspecified, defaults to to ` - # VCF`. - # Corresponds to the JSON property `format` - # @return [String] - attr_accessor :format - - # Convert reference names to the canonical representation. hg19 haploytypes ( - # those reference names containing "_hap") are not modified in any way. All - # other reference names are modified according to the following rules: The - # reference name is capitalized. The "chr" prefix is dropped for all autosomes - # and sex chromsomes. For example "chr17" becomes "17" and "chrX" becomes "X". - # All mitochondrial chromosomes ("chrM", "chrMT", etc) become "MT". - # Corresponds to the JSON property `normalizeReferenceNames` - # @return [Boolean] - attr_accessor :normalize_reference_names - alias_method :normalize_reference_names?, :normalize_reference_names - - # A mapping between info field keys and the InfoMergeOperations to be performed - # on them. This is plumbed down to the MergeVariantRequests generated by the - # resulting import job. - # Corresponds to the JSON property `infoMergeConfig` - # @return [Hash] - attr_accessor :info_merge_config - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @variant_set_id = args[:variant_set_id] if args.key?(:variant_set_id) - @source_uris = args[:source_uris] if args.key?(:source_uris) - @format = args[:format] if args.key?(:format) - @normalize_reference_names = args[:normalize_reference_names] if args.key?(:normalize_reference_names) - @info_merge_config = args[:info_merge_config] if args.key?(:info_merge_config) - end - end - - # A variant set is a collection of call sets and variants. It contains summary - # statistics of those contents. A variant set belongs to a dataset. For more - # genomics resource definitions, see [Fundamentals of Google Genomics](https:// - # cloud.google.com/genomics/fundamentals-of-google-genomics) - class VariantSet - include Google::Apis::Core::Hashable - - # The dataset to which this variant set belongs. - # Corresponds to the JSON property `datasetId` - # @return [String] - attr_accessor :dataset_id - - # The server-generated variant set ID, unique across all variant sets. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The reference set to which the variant set is mapped. The reference set - # describes the alignment provenance of the variant set, while the ` - # referenceBounds` describe the shape of the actual variant data. The reference - # set's reference names are a superset of those found in the `referenceBounds`. - # For example, given a variant set that is mapped to the GRCh38 reference set - # and contains a single variant on reference 'X', `referenceBounds` would - # contain only an entry for 'X', while the associated reference set enumerates - # all possible references: '1', '2', 'X', 'Y', 'MT', etc. - # Corresponds to the JSON property `referenceSetId` - # @return [String] - attr_accessor :reference_set_id - - # A list of all references used by the variants in a variant set with associated - # coordinate upper bounds for each one. - # Corresponds to the JSON property `referenceBounds` - # @return [Array] - attr_accessor :reference_bounds - - # The metadata associated with this variant set. - # Corresponds to the JSON property `metadata` - # @return [Array] - attr_accessor :metadata - - # User-specified, mutable name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # A textual description of this variant set. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dataset_id = args[:dataset_id] if args.key?(:dataset_id) - @id = args[:id] if args.key?(:id) - @reference_set_id = args[:reference_set_id] if args.key?(:reference_set_id) - @reference_bounds = args[:reference_bounds] if args.key?(:reference_bounds) - @metadata = args[:metadata] if args.key?(:metadata) - @name = args[:name] if args.key?(:name) - @description = args[:description] if args.key?(:description) - end - end - - # ReferenceBound records an upper bound for the starting coordinate of variants - # in a particular reference. - class ReferenceBound - include Google::Apis::Core::Hashable - - # The name of the reference associated with this reference bound. - # Corresponds to the JSON property `referenceName` - # @return [String] - attr_accessor :reference_name - - # An upper bound (inclusive) on the starting coordinate of any variant in the - # reference sequence. - # Corresponds to the JSON property `upperBound` - # @return [String] - attr_accessor :upper_bound - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @reference_name = args[:reference_name] if args.key?(:reference_name) - @upper_bound = args[:upper_bound] if args.key?(:upper_bound) - end - end - - # Metadata describes a single piece of variant call metadata. These data include - # a top level key and either a single value string (value) or a list of key- - # value pairs (info.) Value and info are mutually exclusive. - class VariantSetMetadata - include Google::Apis::Core::Hashable - - # The top-level key. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # The value field for simple metadata - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - # User-provided ID field, not enforced by this API. Two or more pieces of - # structured metadata with identical id and key fields are considered equivalent. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The type of data. Possible types include: Integer, Float, Flag, Character, and - # String. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The number of values that can be included in a field described by this - # metadata. - # Corresponds to the JSON property `number` - # @return [String] - attr_accessor :number - - # A textual description of this metadata. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Remaining structured metadata key-value pairs. This must be of the form map ( - # string key mapping to a list of string values). - # Corresponds to the JSON property `info` - # @return [Hash>] - attr_accessor :info - - 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) - @id = args[:id] if args.key?(:id) - @type = args[:type] if args.key?(:type) - @number = args[:number] if args.key?(:number) - @description = args[:description] if args.key?(:description) - @info = args[:info] if args.key?(:info) - end - end - - # The variant data export request. - class ExportVariantSetRequest - include Google::Apis::Core::Hashable - - # If provided, only variant call information from the specified call sets will - # be exported. By default all variant calls are exported. - # Corresponds to the JSON property `callSetIds` - # @return [Array] - attr_accessor :call_set_ids - - # Required. The Google Cloud project ID that owns the destination BigQuery - # dataset. The caller must have WRITE access to this project. This project will - # also own the resulting export job. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # The format for the exported data. - # Corresponds to the JSON property `format` - # @return [String] - attr_accessor :format - - # Required. The BigQuery dataset to export data to. This dataset must already - # exist. Note that this is distinct from the Genomics concept of "dataset". - # Corresponds to the JSON property `bigqueryDataset` - # @return [String] - attr_accessor :bigquery_dataset - - # Required. The BigQuery table to export data to. If the table doesn't exist, it - # will be created. If it already exists, it will be overwritten. - # Corresponds to the JSON property `bigqueryTable` - # @return [String] - attr_accessor :bigquery_table - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @call_set_ids = args[:call_set_ids] if args.key?(:call_set_ids) - @project_id = args[:project_id] if args.key?(:project_id) - @format = args[:format] if args.key?(:format) - @bigquery_dataset = args[:bigquery_dataset] if args.key?(:bigquery_dataset) - @bigquery_table = args[:bigquery_table] if args.key?(:bigquery_table) - end - end - - # The search variant sets request. - class SearchVariantSetsRequest - include Google::Apis::Core::Hashable - - # Exactly one dataset ID must be provided here. Only variant sets which belong - # to this dataset will be returned. - # Corresponds to the JSON property `datasetIds` - # @return [Array] - attr_accessor :dataset_ids - - # The continuation token, which is used to page through large result sets. To - # get the next page of results, set this parameter to the value of ` - # nextPageToken` from the previous response. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # The maximum number of results to return in a single page. If unspecified, - # defaults to 1024. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dataset_ids = args[:dataset_ids] if args.key?(:dataset_ids) - @page_token = args[:page_token] if args.key?(:page_token) - @page_size = args[:page_size] if args.key?(:page_size) - end - end - - # The search variant sets response. - class SearchVariantSetsResponse - include Google::Apis::Core::Hashable - - # The variant sets belonging to the requested dataset. - # Corresponds to the JSON property `variantSets` - # @return [Array] - attr_accessor :variant_sets - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # This field will be empty if there aren't any additional results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @variant_sets = args[:variant_sets] if args.key?(:variant_sets) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # The variant search request. - class SearchVariantsRequest - include Google::Apis::Core::Hashable - - # At most one variant set ID must be provided. Only variants from this variant - # set will be returned. If omitted, a call set id must be included in the - # request. - # Corresponds to the JSON property `variantSetIds` - # @return [Array] - attr_accessor :variant_set_ids - - # Only return variants which have exactly this name. - # Corresponds to the JSON property `variantName` - # @return [String] - attr_accessor :variant_name - - # Only return variant calls which belong to call sets with these ids. Leaving - # this blank returns all variant calls. If a variant has no calls belonging to - # any of these call sets, it won't be returned at all. - # Corresponds to the JSON property `callSetIds` - # @return [Array] - attr_accessor :call_set_ids - - # Required. Only return variants in this reference sequence. - # Corresponds to the JSON property `referenceName` - # @return [String] - attr_accessor :reference_name - - # The beginning of the window (0-based, inclusive) for which overlapping - # variants should be returned. If unspecified, defaults to 0. - # Corresponds to the JSON property `start` - # @return [String] - attr_accessor :start - - # The end of the window, 0-based exclusive. If unspecified or 0, defaults to the - # length of the reference. - # Corresponds to the JSON property `end` - # @return [String] - attr_accessor :end - - # The continuation token, which is used to page through large result sets. To - # get the next page of results, set this parameter to the value of ` - # nextPageToken` from the previous response. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # The maximum number of variants to return in a single page. If unspecified, - # defaults to 5000. The maximum value is 10000. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - # The maximum number of calls to return in a single page. Note that this limit - # may be exceeded in the event that a matching variant contains more calls than - # the requested maximum. If unspecified, defaults to 5000. The maximum value is - # 10000. - # Corresponds to the JSON property `maxCalls` - # @return [Fixnum] - attr_accessor :max_calls - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @variant_set_ids = args[:variant_set_ids] if args.key?(:variant_set_ids) - @variant_name = args[:variant_name] if args.key?(:variant_name) - @call_set_ids = args[:call_set_ids] if args.key?(:call_set_ids) - @reference_name = args[:reference_name] if args.key?(:reference_name) - @start = args[:start] if args.key?(:start) - @end = args[:end] if args.key?(:end) - @page_token = args[:page_token] if args.key?(:page_token) - @page_size = args[:page_size] if args.key?(:page_size) - @max_calls = args[:max_calls] if args.key?(:max_calls) - end - end - - # The variant search response. - class SearchVariantsResponse - include Google::Apis::Core::Hashable - - # The list of matching Variants. - # Corresponds to the JSON property `variants` - # @return [Array] - attr_accessor :variants - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # This field will be empty if there aren't any additional results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @variants = args[:variants] if args.key?(:variants) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # A variant represents a change in DNA sequence relative to a reference sequence. - # For example, a variant could represent a SNP or an insertion. Variants belong - # to a variant set. For more genomics resource definitions, see [Fundamentals of - # Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google- - # genomics) Each of the calls on a variant represent a determination of genotype - # with respect to that variant. For example, a call might assign probability of - # 0.32 to the occurrence of a SNP named rs1234 in a sample named NA12345. A call - # belongs to a call set, which contains related calls typically from one sample. - class Variant - include Google::Apis::Core::Hashable - - # The ID of the variant set this variant belongs to. - # Corresponds to the JSON property `variantSetId` - # @return [String] - attr_accessor :variant_set_id - - # The server-generated variant ID, unique across all variants. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Names for the variant, for example a RefSNP ID. - # Corresponds to the JSON property `names` - # @return [Array] - attr_accessor :names - - # The date this variant was created, in milliseconds from the epoch. - # Corresponds to the JSON property `created` - # @return [String] - attr_accessor :created - - # The reference on which this variant occurs. (such as `chr20` or `X`) - # Corresponds to the JSON property `referenceName` - # @return [String] - attr_accessor :reference_name - - # The position at which this variant occurs (0-based). This corresponds to the - # first base of the string of reference bases. - # Corresponds to the JSON property `start` - # @return [String] - attr_accessor :start - - # The end position (0-based) of this variant. This corresponds to the first base - # after the last base in the reference allele. So, the length of the reference - # allele is (end - start). This is useful for variants that don't explicitly - # give alternate bases, for example large deletions. - # Corresponds to the JSON property `end` - # @return [String] - attr_accessor :end - - # The reference bases for this variant. They start at the given position. - # Corresponds to the JSON property `referenceBases` - # @return [String] - attr_accessor :reference_bases - - # The bases that appear instead of the reference bases. - # Corresponds to the JSON property `alternateBases` - # @return [Array] - attr_accessor :alternate_bases - - # A measure of how likely this variant is to be real. A higher value is better. - # Corresponds to the JSON property `quality` - # @return [Float] - attr_accessor :quality - - # A list of filters (normally quality filters) this variant has failed. `PASS` - # indicates this variant has passed all filters. - # Corresponds to the JSON property `filter` - # @return [Array] - attr_accessor :filter - - # A map of additional variant information. This must be of the form map (string - # key mapping to a list of string values). - # Corresponds to the JSON property `info` - # @return [Hash>] - attr_accessor :info - - # The variant calls for this particular variant. Each one represents the - # determination of genotype with respect to this variant. - # Corresponds to the JSON property `calls` - # @return [Array] - attr_accessor :calls - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @variant_set_id = args[:variant_set_id] if args.key?(:variant_set_id) - @id = args[:id] if args.key?(:id) - @names = args[:names] if args.key?(:names) - @created = args[:created] if args.key?(:created) - @reference_name = args[:reference_name] if args.key?(:reference_name) - @start = args[:start] if args.key?(:start) - @end = args[:end] if args.key?(:end) - @reference_bases = args[:reference_bases] if args.key?(:reference_bases) - @alternate_bases = args[:alternate_bases] if args.key?(:alternate_bases) - @quality = args[:quality] if args.key?(:quality) - @filter = args[:filter] if args.key?(:filter) - @info = args[:info] if args.key?(:info) - @calls = args[:calls] if args.key?(:calls) - end - end - - # A call represents the determination of genotype with respect to a particular - # variant. It may include associated information such as quality and phasing. - # For example, a call might assign a probability of 0.32 to the occurrence of a - # SNP named rs1234 in a call set with the name NA12345. - class VariantCall - include Google::Apis::Core::Hashable - - # The ID of the call set this variant call belongs to. - # Corresponds to the JSON property `callSetId` - # @return [String] - attr_accessor :call_set_id - - # The name of the call set this variant call belongs to. - # Corresponds to the JSON property `callSetName` - # @return [String] - attr_accessor :call_set_name - - # The genotype of this variant call. Each value represents either the value of - # the `referenceBases` field or a 1-based index into `alternateBases`. If a - # variant had a `referenceBases` value of `T` and an `alternateBases` value of `[ - # "A", "C"]`, and the `genotype` was `[2, 1]`, that would mean the call - # represented the heterozygous value `CA` for this variant. If the `genotype` - # was instead `[0, 1]`, the represented value would be `TA`. Ordering of the - # genotype values is important if the `phaseset` is present. If a genotype is - # not called (that is, a `.` is present in the GT string) -1 is returned. - # Corresponds to the JSON property `genotype` - # @return [Array] - attr_accessor :genotype - - # If this field is present, this variant call's genotype ordering implies the - # phase of the bases and is consistent with any other variant calls in the same - # reference sequence which have the same phaseset value. When importing data - # from VCF, if the genotype data was phased but no phase set was specified this - # field will be set to `*`. - # Corresponds to the JSON property `phaseset` - # @return [String] - attr_accessor :phaseset - - # The genotype likelihoods for this variant call. Each array entry represents - # how likely a specific genotype is for this call. The value ordering is defined - # by the GL tag in the VCF spec. If Phred-scaled genotype likelihood scores (PL) - # are available and log10(P) genotype likelihood scores (GL) are not, PL scores - # are converted to GL scores. If both are available, PL scores are stored in ` - # info`. - # Corresponds to the JSON property `genotypeLikelihood` - # @return [Array] - attr_accessor :genotype_likelihood - - # A map of additional variant call information. This must be of the form map ( - # string key mapping to a list of string values). - # Corresponds to the JSON property `info` - # @return [Hash>] - attr_accessor :info - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @call_set_id = args[:call_set_id] if args.key?(:call_set_id) - @call_set_name = args[:call_set_name] if args.key?(:call_set_name) - @genotype = args[:genotype] if args.key?(:genotype) - @phaseset = args[:phaseset] if args.key?(:phaseset) - @genotype_likelihood = args[:genotype_likelihood] if args.key?(:genotype_likelihood) - @info = args[:info] if args.key?(:info) - end - end - - # - class MergeVariantsRequest - include Google::Apis::Core::Hashable - - # The destination variant set. - # Corresponds to the JSON property `variantSetId` - # @return [String] - attr_accessor :variant_set_id - - # The variants to be merged with existing variants. - # Corresponds to the JSON property `variants` - # @return [Array] - attr_accessor :variants - - # A mapping between info field keys and the InfoMergeOperations to be performed - # on them. - # Corresponds to the JSON property `infoMergeConfig` - # @return [Hash] - attr_accessor :info_merge_config - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @variant_set_id = args[:variant_set_id] if args.key?(:variant_set_id) - @variants = args[:variants] if args.key?(:variants) - @info_merge_config = args[:info_merge_config] if args.key?(:info_merge_config) - end - end - - # The call set search request. - class SearchCallSetsRequest - include Google::Apis::Core::Hashable - - # Restrict the query to call sets within the given variant sets. At least one ID - # must be provided. - # Corresponds to the JSON property `variantSetIds` - # @return [Array] - attr_accessor :variant_set_ids - - # Only return call sets for which a substring of the name matches this string. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The continuation token, which is used to page through large result sets. To - # get the next page of results, set this parameter to the value of ` - # nextPageToken` from the previous response. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # The maximum number of results to return in a single page. If unspecified, - # defaults to 1024. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @variant_set_ids = args[:variant_set_ids] if args.key?(:variant_set_ids) - @name = args[:name] if args.key?(:name) - @page_token = args[:page_token] if args.key?(:page_token) - @page_size = args[:page_size] if args.key?(:page_size) - end - end - - # The call set search response. - class SearchCallSetsResponse - include Google::Apis::Core::Hashable - - # The list of matching call sets. - # Corresponds to the JSON property `callSets` - # @return [Array] - attr_accessor :call_sets - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of results. - # This field will be empty if there aren't any additional results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @call_sets = args[:call_sets] if args.key?(:call_sets) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # A call set is a collection of variant calls, typically for one sample. It - # belongs to a variant set. For more genomics resource definitions, see [ - # Fundamentals of Google Genomics](https://cloud.google.com/genomics/ - # fundamentals-of-google-genomics) - class CallSet - include Google::Apis::Core::Hashable - - # The server-generated call set ID, unique across all call sets. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The call set name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The sample ID this call set corresponds to. - # Corresponds to the JSON property `sampleId` - # @return [String] - attr_accessor :sample_id - - # The IDs of the variant sets this call set belongs to. This field must have - # exactly length one, as a call set belongs to a single variant set. This field - # is repeated for compatibility with the [GA4GH 0.5.1 API](https://github.com/ - # ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variants.avdl#L76). - # Corresponds to the JSON property `variantSetIds` - # @return [Array] - attr_accessor :variant_set_ids - - # The date this call set was created in milliseconds from the epoch. - # Corresponds to the JSON property `created` - # @return [String] - attr_accessor :created - - # A map of additional call set information. This must be of the form map (string - # key mapping to a list of string values). - # Corresponds to the JSON property `info` - # @return [Hash>] - attr_accessor :info - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] if args.key?(:id) - @name = args[:name] if args.key?(:name) - @sample_id = args[:sample_id] if args.key?(:sample_id) - @variant_set_ids = args[:variant_set_ids] if args.key?(:variant_set_ids) - @created = args[:created] if args.key?(:created) - @info = args[:info] if args.key?(:info) - end - end - - # The stream variants request. - class StreamVariantsRequest - include Google::Apis::Core::Hashable - - # The Google Cloud project ID which will be billed for this access. The caller - # must have WRITE access to this project. Required. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # The variant set ID from which to stream variants. - # Corresponds to the JSON property `variantSetId` - # @return [String] - attr_accessor :variant_set_id - - # Only return variant calls which belong to call sets with these IDs. Leaving - # this blank returns all variant calls. - # Corresponds to the JSON property `callSetIds` - # @return [Array] - attr_accessor :call_set_ids - - # Required. Only return variants in this reference sequence. - # Corresponds to the JSON property `referenceName` - # @return [String] - attr_accessor :reference_name - - # The beginning of the window (0-based, inclusive) for which overlapping - # variants should be returned. - # Corresponds to the JSON property `start` - # @return [String] - attr_accessor :start - - # The end of the window (0-based, exclusive) for which overlapping variants - # should be returned. - # Corresponds to the JSON property `end` - # @return [String] - attr_accessor :end - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @project_id = args[:project_id] if args.key?(:project_id) - @variant_set_id = args[:variant_set_id] if args.key?(:variant_set_id) - @call_set_ids = args[:call_set_ids] if args.key?(:call_set_ids) - @reference_name = args[:reference_name] if args.key?(:reference_name) - @start = args[:start] if args.key?(:start) - @end = args[:end] if args.key?(:end) - end - end - - # - class StreamVariantsResponse - include Google::Apis::Core::Hashable - - # - # Corresponds to the JSON property `variants` - # @return [Array] - attr_accessor :variants - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @variants = args[:variants] if args.key?(:variants) - end - end - - # The read group set import response. - class ImportReadGroupSetsResponse - include Google::Apis::Core::Hashable - - # IDs of the read group sets that were created. - # Corresponds to the JSON property `readGroupSetIds` - # @return [Array] - attr_accessor :read_group_set_ids - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @read_group_set_ids = args[:read_group_set_ids] if args.key?(:read_group_set_ids) - end - end - - # The variant data import response. - class ImportVariantsResponse - include Google::Apis::Core::Hashable - - # IDs of the call sets created during the import. - # Corresponds to the JSON property `callSetIds` - # @return [Array] - attr_accessor :call_set_ids - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @call_set_ids = args[:call_set_ids] if args.key?(:call_set_ids) - end - end - - # Metadata describing an Operation. - class OperationMetadata - include Google::Apis::Core::Hashable - - # The Google Cloud Project in which the job is scoped. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # The time at which the job was submitted to the Genomics service. - # Corresponds to the JSON property `createTime` - # @return [String] - attr_accessor :create_time - - # The time at which the job began to run. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - # The time at which the job stopped running. - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - # The original request that started the operation. Note that this will be in - # current version of the API. If the operation was started with v1beta2 API and - # a GetOperation is performed on v1 API, a v1 request will be returned. - # Corresponds to the JSON property `request` - # @return [Hash] - attr_accessor :request - - # Optional event messages that were generated during the job's execution. This - # also contains any warnings that were generated during import or export. - # Corresponds to the JSON property `events` - # @return [Array] - attr_accessor :events - - # This field is deprecated. Use `labels` instead. Optionally provided by the - # caller when submitting the request that creates the operation. - # Corresponds to the JSON property `clientId` - # @return [String] - attr_accessor :client_id - - # Runtime metadata on this Operation. - # Corresponds to the JSON property `runtimeMetadata` - # @return [Hash] - attr_accessor :runtime_metadata - - # Optionally provided by the caller when submitting the request that creates the - # operation. - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @project_id = args[:project_id] if args.key?(:project_id) - @create_time = args[:create_time] if args.key?(:create_time) - @start_time = args[:start_time] if args.key?(:start_time) - @end_time = args[:end_time] if args.key?(:end_time) - @request = args[:request] if args.key?(:request) - @events = args[:events] if args.key?(:events) - @client_id = args[:client_id] if args.key?(:client_id) - @runtime_metadata = args[:runtime_metadata] if args.key?(:runtime_metadata) - @labels = args[:labels] if args.key?(:labels) - end - end - - # An event that occurred during an Operation. - class OperationEvent - include Google::Apis::Core::Hashable - - # Optional time of when event started. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - # Optional time of when event finished. An event can have a start time and no - # finish time. If an event has a finish time, there must be a start time. - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - # Required description of event. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @start_time = args[:start_time] if args.key?(:start_time) - @end_time = args[:end_time] if args.key?(:end_time) - @description = args[:description] if args.key?(:description) - end - end - - # Runtime metadata that will be populated in the runtimeMetadata field of the - # Operation associated with a RunPipeline execution. - class RuntimeMetadata - include Google::Apis::Core::Hashable - - # Describes a Compute Engine resource that is being managed by a running - # pipeline. - # Corresponds to the JSON property `computeEngine` - # @return [Google::Apis::GenomicsV1::ComputeEngine] - attr_accessor :compute_engine - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @compute_engine = args[:compute_engine] if args.key?(:compute_engine) + @range = args[:range] if args.key?(:range) end end @@ -3470,6 +86,3392 @@ module Google @disk_names = args[:disk_names] if args.key?(:disk_names) end end + + # + class ExternalId + include Google::Apis::Core::Hashable + + # The name of the source of this data. + # Corresponds to the JSON property `sourceName` + # @return [String] + attr_accessor :source_name + + # The id used by the source of this data. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @source_name = args[:source_name] if args.key?(:source_name) + @id = args[:id] if args.key?(:id) + end + end + + # A reference is a canonical assembled DNA sequence, intended to act as a + # reference coordinate space for other genomic annotations. A single reference + # might represent the human chromosome 1 or mitochandrial DNA, for instance. A + # reference belongs to one or more reference sets. + # For more genomics resource definitions, see [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + class Reference + include Google::Apis::Core::Hashable + + # ID from http://www.ncbi.nlm.nih.gov/taxonomy. For example, 9606 for human. + # Corresponds to the JSON property `ncbiTaxonId` + # @return [Fixnum] + attr_accessor :ncbi_taxon_id + + # The URI from which the sequence was obtained. Typically specifies a FASTA + # format file. + # Corresponds to the JSON property `sourceUri` + # @return [String] + attr_accessor :source_uri + + # The name of this reference, for example `22`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # MD5 of the upper-case sequence excluding all whitespace characters (this + # is equivalent to SQ:M5 in SAM). This value is represented in lower case + # hexadecimal format. + # Corresponds to the JSON property `md5checksum` + # @return [String] + attr_accessor :md5checksum + + # The server-generated reference ID, unique across all references. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # The length of this reference's sequence. + # Corresponds to the JSON property `length` + # @return [String] + attr_accessor :length + + # All known corresponding accession IDs in INSDC (GenBank/ENA/DDBJ) ideally + # with a version number, for example `GCF_000001405.26`. + # Corresponds to the JSON property `sourceAccessions` + # @return [Array] + attr_accessor :source_accessions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @ncbi_taxon_id = args[:ncbi_taxon_id] if args.key?(:ncbi_taxon_id) + @source_uri = args[:source_uri] if args.key?(:source_uri) + @name = args[:name] if args.key?(:name) + @md5checksum = args[:md5checksum] if args.key?(:md5checksum) + @id = args[:id] if args.key?(:id) + @length = args[:length] if args.key?(:length) + @source_accessions = args[:source_accessions] if args.key?(:source_accessions) + end + end + + # Metadata describes a single piece of variant call metadata. + # These data include a top level key and either a single value string (value) + # or a list of key-value pairs (info.) + # Value and info are mutually exclusive. + class VariantSetMetadata + include Google::Apis::Core::Hashable + + # The number of values that can be included in a field described by this + # metadata. + # Corresponds to the JSON property `number` + # @return [String] + attr_accessor :number + + # User-provided ID field, not enforced by this API. + # Two or more pieces of structured metadata with identical + # id and key fields are considered equivalent. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # The value field for simple metadata + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + + # The top-level key. + # Corresponds to the JSON property `key` + # @return [String] + attr_accessor :key + + # A textual description of this metadata. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Remaining structured metadata key-value pairs. This must be of the form + # map (string key mapping to a list of string values). + # Corresponds to the JSON property `info` + # @return [Hash>] + attr_accessor :info + + # The type of data. Possible types include: Integer, Float, + # Flag, Character, and String. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @number = args[:number] if args.key?(:number) + @id = args[:id] if args.key?(:id) + @value = args[:value] if args.key?(:value) + @key = args[:key] if args.key?(:key) + @description = args[:description] if args.key?(:description) + @info = args[:info] if args.key?(:info) + @type = args[:type] if args.key?(:type) + end + end + + # The search variant sets request. + class SearchVariantSetsRequest + include Google::Apis::Core::Hashable + + # Exactly one dataset ID must be provided here. Only variant sets which + # belong to this dataset will be returned. + # Corresponds to the JSON property `datasetIds` + # @return [Array] + attr_accessor :dataset_ids + + # The continuation token, which is used to page through large result sets. + # To get the next page of results, set this parameter to the value of + # `nextPageToken` from the previous response. + # Corresponds to the JSON property `pageToken` + # @return [String] + attr_accessor :page_token + + # The maximum number of results to return in a single page. If unspecified, + # defaults to 1024. + # Corresponds to the JSON property `pageSize` + # @return [Fixnum] + attr_accessor :page_size + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @dataset_ids = args[:dataset_ids] if args.key?(:dataset_ids) + @page_token = args[:page_token] if args.key?(:page_token) + @page_size = args[:page_size] if args.key?(:page_size) + end + end + + # + class SearchReferenceSetsRequest + include Google::Apis::Core::Hashable + + # If present, return reference sets for which a substring of their + # `assemblyId` matches this string (case insensitive). + # Corresponds to the JSON property `assemblyId` + # @return [String] + attr_accessor :assembly_id + + # If present, return reference sets for which the + # md5checksum matches exactly. + # Corresponds to the JSON property `md5checksums` + # @return [Array] + attr_accessor :md5checksums + + # If present, return reference sets for which a prefix of any of + # sourceAccessions + # match any of these strings. Accession numbers typically have a main number + # and a version, for example `NC_000001.11`. + # Corresponds to the JSON property `accessions` + # @return [Array] + attr_accessor :accessions + + # The continuation token, which is used to page through large result sets. + # To get the next page of results, set this parameter to the value of + # `nextPageToken` from the previous response. + # Corresponds to the JSON property `pageToken` + # @return [String] + attr_accessor :page_token + + # The maximum number of results to return in a single page. If unspecified, + # defaults to 1024. The maximum value is 4096. + # Corresponds to the JSON property `pageSize` + # @return [Fixnum] + attr_accessor :page_size + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @assembly_id = args[:assembly_id] if args.key?(:assembly_id) + @md5checksums = args[:md5checksums] if args.key?(:md5checksums) + @accessions = args[:accessions] if args.key?(:accessions) + @page_token = args[:page_token] if args.key?(:page_token) + @page_size = args[:page_size] if args.key?(:page_size) + end + end + + # Request message for `SetIamPolicy` method. + class SetIamPolicyRequest + include Google::Apis::Core::Hashable + + # Defines an Identity and Access Management (IAM) policy. It is used to + # specify access control policies for Cloud Platform resources. + # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of + # `members` to a `role`, where the members can be user accounts, Google groups, + # Google domains, and service accounts. A `role` is a named list of permissions + # defined by IAM. + # **Example** + # ` + # "bindings": [ + # ` + # "role": "roles/owner", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-other-app@appspot.gserviceaccount.com", + # ] + # `, + # ` + # "role": "roles/viewer", + # "members": ["user:sean@example.com"] + # ` + # ] + # ` + # For a description of IAM and its features, see the + # [IAM developer's guide](https://cloud.google.com/iam). + # Corresponds to the JSON property `policy` + # @return [Google::Apis::GenomicsV1::Policy] + attr_accessor :policy + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @policy = args[:policy] if args.key?(:policy) + end + end + + # + class MergeVariantsRequest + include Google::Apis::Core::Hashable + + # A mapping between info field keys and the InfoMergeOperations to + # be performed on them. + # Corresponds to the JSON property `infoMergeConfig` + # @return [Hash] + attr_accessor :info_merge_config + + # The destination variant set. + # Corresponds to the JSON property `variantSetId` + # @return [String] + attr_accessor :variant_set_id + + # The variants to be merged with existing variants. + # Corresponds to the JSON property `variants` + # @return [Array] + attr_accessor :variants + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @info_merge_config = args[:info_merge_config] if args.key?(:info_merge_config) + @variant_set_id = args[:variant_set_id] if args.key?(:variant_set_id) + @variants = args[:variants] if args.key?(:variants) + end + end + + # + class BatchCreateAnnotationsRequest + include Google::Apis::Core::Hashable + + # The annotations to be created. At most 4096 can be specified in a single + # request. + # Corresponds to the JSON property `annotations` + # @return [Array] + attr_accessor :annotations + + # A unique request ID which enables the server to detect duplicated requests. + # If provided, duplicated requests will result in the same response; if not + # provided, duplicated requests may result in duplicated data. For a given + # annotation set, callers should not reuse `request_id`s when writing + # different batches of annotations - behavior in this case is undefined. + # A common approach is to use a UUID. For batch jobs where worker crashes are + # a possibility, consider using some unique variant of a worker or run ID. + # 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) + @annotations = args[:annotations] if args.key?(:annotations) + @request_id = args[:request_id] if args.key?(:request_id) + end + end + + # A read alignment describes a linear alignment of a string of DNA to a + # reference sequence, in addition to metadata + # about the fragment (the molecule of DNA sequenced) and the read (the bases + # which were read by the sequencer). A read is equivalent to a line in a SAM + # file. A read belongs to exactly one read group and exactly one + # read group set. + # For more genomics resource definitions, see [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # ### Reverse-stranded reads + # Mapped reads (reads having a non-null `alignment`) can be aligned to either + # the forward or the reverse strand of their associated reference. Strandedness + # of a mapped read is encoded by `alignment.position.reverseStrand`. + # If we consider the reference to be a forward-stranded coordinate space of + # `[0, reference.length)` with `0` as the left-most position and + # `reference.length` as the right-most position, reads are always aligned left + # to right. That is, `alignment.position.position` always refers to the + # left-most reference coordinate and `alignment.cigar` describes the alignment + # of this read to the reference from left to right. All per-base fields such as + # `alignedSequence` and `alignedQuality` share this same left-to-right + # orientation; this is true of reads which are aligned to either strand. For + # reverse-stranded reads, this means that `alignedSequence` is the reverse + # complement of the bases that were originally reported by the sequencing + # machine. + # ### Generating a reference-aligned sequence string + # When interacting with mapped reads, it's often useful to produce a string + # representing the local alignment of the read to reference. The following + # pseudocode demonstrates one way of doing this: + # out = "" + # offset = 0 + # for c in read.alignment.cigar ` + # switch c.operation ` + # case "ALIGNMENT_MATCH", "SEQUENCE_MATCH", "SEQUENCE_MISMATCH": + # out += read.alignedSequence[offset:offset+c.operationLength] + # offset += c.operationLength + # break + # case "CLIP_SOFT", "INSERT": + # offset += c.operationLength + # break + # case "PAD": + # out += repeat("*", c.operationLength) + # break + # case "DELETE": + # out += repeat("-", c.operationLength) + # break + # case "SKIP": + # out += repeat(" ", c.operationLength) + # break + # case "CLIP_HARD": + # break + # ` + # ` + # return out + # ### Converting to SAM's CIGAR string + # The following pseudocode generates a SAM CIGAR string from the + # `cigar` field. Note that this is a lossy conversion + # (`cigar.referenceSequence` is lost). + # cigarMap = ` + # "ALIGNMENT_MATCH": "M", + # "INSERT": "I", + # "DELETE": "D", + # "SKIP": "N", + # "CLIP_SOFT": "S", + # "CLIP_HARD": "H", + # "PAD": "P", + # "SEQUENCE_MATCH": "=", + # "SEQUENCE_MISMATCH": "X", + # ` + # cigarStr = "" + # for c in read.alignment.cigar ` + # cigarStr += c.operationLength + cigarMap[c.operation] + # ` + # return cigarStr + class Read + include Google::Apis::Core::Hashable + + # The fragment is a PCR or optical duplicate (SAM flag 0x400). + # Corresponds to the JSON property `duplicateFragment` + # @return [Boolean] + attr_accessor :duplicate_fragment + alias_method :duplicate_fragment?, :duplicate_fragment + + # The read number in sequencing. 0-based and less than numberReads. This + # field replaces SAM flag 0x40 and 0x80. + # Corresponds to the JSON property `readNumber` + # @return [Fixnum] + attr_accessor :read_number + + # The ID of the read group this read belongs to. A read belongs to exactly + # one read group. This is a server-generated ID which is distinct from SAM's + # RG tag (for that value, see + # ReadGroup.name). + # Corresponds to the JSON property `readGroupId` + # @return [String] + attr_accessor :read_group_id + + # The bases of the read sequence contained in this alignment record, + # **without CIGAR operations applied** (equivalent to SEQ in SAM). + # `alignedSequence` and `alignedQuality` may be + # shorter than the full read sequence and quality. This will occur if the + # alignment is part of a chimeric alignment, or if the read was trimmed. When + # this occurs, the CIGAR for this read will begin/end with a hard clip + # operator that will indicate the length of the excised sequence. + # Corresponds to the JSON property `alignedSequence` + # @return [String] + attr_accessor :aligned_sequence + + # A map of additional read alignment information. This must be of the form + # map (string key mapping to a list of string values). + # Corresponds to the JSON property `info` + # @return [Hash>] + attr_accessor :info + + # An abstraction for referring to a genomic position, in relation to some + # already known reference. For now, represents a genomic position as a + # reference name, a base number on that reference (0-based), and a + # determination of forward or reverse strand. + # Corresponds to the JSON property `nextMatePosition` + # @return [Google::Apis::GenomicsV1::Position] + attr_accessor :next_mate_position + + # Whether this alignment is supplementary. Equivalent to SAM flag 0x800. + # Supplementary alignments are used in the representation of a chimeric + # alignment. In a chimeric alignment, a read is split into multiple + # linear alignments that map to different reference contigs. The first + # linear alignment in the read will be designated as the representative + # alignment; the remaining linear alignments will be designated as + # supplementary alignments. These alignments may have different mapping + # quality scores. In each linear alignment in a chimeric alignment, the read + # will be hard clipped. The `alignedSequence` and + # `alignedQuality` fields in the alignment record will only + # represent the bases for its respective linear alignment. + # Corresponds to the JSON property `supplementaryAlignment` + # @return [Boolean] + attr_accessor :supplementary_alignment + alias_method :supplementary_alignment?, :supplementary_alignment + + # The orientation and the distance between reads from the fragment are + # consistent with the sequencing protocol (SAM flag 0x2). + # Corresponds to the JSON property `properPlacement` + # @return [Boolean] + attr_accessor :proper_placement + alias_method :proper_placement?, :proper_placement + + # The observed length of the fragment, equivalent to TLEN in SAM. + # Corresponds to the JSON property `fragmentLength` + # @return [Fixnum] + attr_accessor :fragment_length + + # Whether this read did not pass filters, such as platform or vendor quality + # controls (SAM flag 0x200). + # Corresponds to the JSON property `failedVendorQualityChecks` + # @return [Boolean] + attr_accessor :failed_vendor_quality_checks + alias_method :failed_vendor_quality_checks?, :failed_vendor_quality_checks + + # The quality of the read sequence contained in this alignment record + # (equivalent to QUAL in SAM). + # `alignedSequence` and `alignedQuality` may be shorter than the full read + # sequence and quality. This will occur if the alignment is part of a + # chimeric alignment, or if the read was trimmed. When this occurs, the CIGAR + # for this read will begin/end with a hard clip operator that will indicate + # the length of the excised sequence. + # Corresponds to the JSON property `alignedQuality` + # @return [Array] + attr_accessor :aligned_quality + + # A linear alignment can be represented by one CIGAR string. Describes the + # mapped position and local alignment of the read to the reference. + # Corresponds to the JSON property `alignment` + # @return [Google::Apis::GenomicsV1::LinearAlignment] + attr_accessor :alignment + + # The number of reads in the fragment (extension to SAM flag 0x1). + # Corresponds to the JSON property `numberReads` + # @return [Fixnum] + attr_accessor :number_reads + + # The server-generated read ID, unique across all reads. This is different + # from the `fragmentName`. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Whether this alignment is secondary. Equivalent to SAM flag 0x100. + # A secondary alignment represents an alternative to the primary alignment + # for this read. Aligners may return secondary alignments if a read can map + # ambiguously to multiple coordinates in the genome. By convention, each read + # has one and only one alignment where both `secondaryAlignment` + # and `supplementaryAlignment` are false. + # Corresponds to the JSON property `secondaryAlignment` + # @return [Boolean] + attr_accessor :secondary_alignment + alias_method :secondary_alignment?, :secondary_alignment + + # The fragment name. Equivalent to QNAME (query template name) in SAM. + # Corresponds to the JSON property `fragmentName` + # @return [String] + attr_accessor :fragment_name + + # The ID of the read group set this read belongs to. A read belongs to + # exactly one read group set. + # Corresponds to the JSON property `readGroupSetId` + # @return [String] + attr_accessor :read_group_set_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @duplicate_fragment = args[:duplicate_fragment] if args.key?(:duplicate_fragment) + @read_number = args[:read_number] if args.key?(:read_number) + @read_group_id = args[:read_group_id] if args.key?(:read_group_id) + @aligned_sequence = args[:aligned_sequence] if args.key?(:aligned_sequence) + @info = args[:info] if args.key?(:info) + @next_mate_position = args[:next_mate_position] if args.key?(:next_mate_position) + @supplementary_alignment = args[:supplementary_alignment] if args.key?(:supplementary_alignment) + @proper_placement = args[:proper_placement] if args.key?(:proper_placement) + @fragment_length = args[:fragment_length] if args.key?(:fragment_length) + @failed_vendor_quality_checks = args[:failed_vendor_quality_checks] if args.key?(:failed_vendor_quality_checks) + @aligned_quality = args[:aligned_quality] if args.key?(:aligned_quality) + @alignment = args[:alignment] if args.key?(:alignment) + @number_reads = args[:number_reads] if args.key?(:number_reads) + @id = args[:id] if args.key?(:id) + @secondary_alignment = args[:secondary_alignment] if args.key?(:secondary_alignment) + @fragment_name = args[:fragment_name] if args.key?(:fragment_name) + @read_group_set_id = args[:read_group_set_id] if args.key?(:read_group_set_id) + end + end + + # A reference set is a set of references which typically comprise a reference + # assembly for a species, such as `GRCh38` which is representative + # of the human genome. A reference set defines a common coordinate space for + # comparing reference-aligned experimental data. A reference set contains 1 or + # more references. + # For more genomics resource definitions, see [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + class ReferenceSet + include Google::Apis::Core::Hashable + + # All known corresponding accession IDs in INSDC (GenBank/ENA/DDBJ) ideally + # with a version number, for example `NC_000001.11`. + # Corresponds to the JSON property `sourceAccessions` + # @return [Array] + attr_accessor :source_accessions + + # Free text description of this reference set. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The URI from which the references were obtained. + # Corresponds to the JSON property `sourceUri` + # @return [String] + attr_accessor :source_uri + + # ID from http://www.ncbi.nlm.nih.gov/taxonomy (for example, 9606 for human) + # indicating the species which this reference set is intended to model. Note + # that contained references may specify a different `ncbiTaxonId`, as + # assemblies may contain reference sequences which do not belong to the + # modeled species, for example EBV in a human reference genome. + # Corresponds to the JSON property `ncbiTaxonId` + # @return [Fixnum] + attr_accessor :ncbi_taxon_id + + # The IDs of the reference objects that are part of this set. + # `Reference.md5checksum` must be unique within this set. + # Corresponds to the JSON property `referenceIds` + # @return [Array] + attr_accessor :reference_ids + + # Public id of this reference set, such as `GRCh37`. + # Corresponds to the JSON property `assemblyId` + # @return [String] + attr_accessor :assembly_id + + # Order-independent MD5 checksum which identifies this reference set. The + # checksum is computed by sorting all lower case hexidecimal string + # `reference.md5checksum` (for all reference in this set) in + # ascending lexicographic order, concatenating, and taking the MD5 of that + # value. The resulting value is represented in lower case hexadecimal format. + # Corresponds to the JSON property `md5checksum` + # @return [String] + attr_accessor :md5checksum + + # The server-generated reference set ID, unique across all reference sets. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @source_accessions = args[:source_accessions] if args.key?(:source_accessions) + @description = args[:description] if args.key?(:description) + @source_uri = args[:source_uri] if args.key?(:source_uri) + @ncbi_taxon_id = args[:ncbi_taxon_id] if args.key?(:ncbi_taxon_id) + @reference_ids = args[:reference_ids] if args.key?(:reference_ids) + @assembly_id = args[:assembly_id] if args.key?(:assembly_id) + @md5checksum = args[:md5checksum] if args.key?(:md5checksum) + @id = args[:id] if args.key?(:id) + end + end + + # A single CIGAR operation. + class CigarUnit + include Google::Apis::Core::Hashable + + # `referenceSequence` is only used at mismatches + # (`SEQUENCE_MISMATCH`) and deletions (`DELETE`). + # Filling this field replaces SAM's MD tag. If the relevant information is + # not available, this field is unset. + # Corresponds to the JSON property `referenceSequence` + # @return [String] + attr_accessor :reference_sequence + + # The number of genomic bases that the operation runs for. Required. + # Corresponds to the JSON property `operationLength` + # @return [String] + attr_accessor :operation_length + + # + # Corresponds to the JSON property `operation` + # @return [String] + attr_accessor :operation + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @reference_sequence = args[:reference_sequence] if args.key?(:reference_sequence) + @operation_length = args[:operation_length] if args.key?(:operation_length) + @operation = args[:operation] if args.key?(:operation) + end + end + + # An annotation set is a logical grouping of annotations that share consistent + # type information and provenance. Examples of annotation sets include 'all + # genes from refseq', and 'all variant annotations from ClinVar'. + class AnnotationSet + include Google::Apis::Core::Hashable + + # The dataset to which this annotation set belongs. + # Corresponds to the JSON property `datasetId` + # @return [String] + attr_accessor :dataset_id + + # The source URI describing the file from which this annotation set was + # generated, if any. + # Corresponds to the JSON property `sourceUri` + # @return [String] + attr_accessor :source_uri + + # The display name for this annotation set. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The ID of the reference set that defines the coordinate space for this + # set's annotations. + # Corresponds to the JSON property `referenceSetId` + # @return [String] + attr_accessor :reference_set_id + + # A map of additional read alignment information. This must be of the form + # map (string key mapping to a list of string values). + # Corresponds to the JSON property `info` + # @return [Hash>] + attr_accessor :info + + # The type of annotations contained within this set. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The server-generated annotation set ID, unique across all annotation sets. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @dataset_id = args[:dataset_id] if args.key?(:dataset_id) + @source_uri = args[:source_uri] if args.key?(:source_uri) + @name = args[:name] if args.key?(:name) + @reference_set_id = args[:reference_set_id] if args.key?(:reference_set_id) + @info = args[:info] if args.key?(:info) + @type = args[:type] if args.key?(:type) + @id = args[:id] if args.key?(:id) + end + end + + # A transcript represents the assertion that a particular region of the + # reference genome may be transcribed as RNA. + class Transcript + include Google::Apis::Core::Hashable + + # The exons that compose + # this transcript. This field should be unset for genomes where transcript + # splicing does not occur, for example prokaryotes. + # Introns are regions of the transcript that are not included in the + # spliced RNA product. Though not explicitly modeled here, intron ranges can + # be deduced; all regions of this transcript that are not exons are introns. + # Exonic sequences do not necessarily code for a translational product + # (amino acids). Only the regions of exons bounded by the + # codingSequence correspond + # to coding DNA sequence. + # Exons are ordered by start position and may not overlap. + # Corresponds to the JSON property `exons` + # @return [Array] + attr_accessor :exons + + # The range of the coding sequence for this transcript, if any. To determine + # the exact ranges of coding sequence, intersect this range with those of the + # exons, if any. If there are any + # exons, the + # codingSequence must start + # and end within them. + # Note that in some cases, the reference genome will not exactly match the + # observed mRNA transcript e.g. due to variance in the source genome from + # reference. In these cases, + # exon.frame will not necessarily + # match the expected reference reading frame and coding exon reference bases + # cannot necessarily be concatenated to produce the original transcript mRNA. + # Corresponds to the JSON property `codingSequence` + # @return [Google::Apis::GenomicsV1::CodingSequence] + attr_accessor :coding_sequence + + # The annotation ID of the gene from which this transcript is transcribed. + # Corresponds to the JSON property `geneId` + # @return [String] + attr_accessor :gene_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @exons = args[:exons] if args.key?(:exons) + @coding_sequence = args[:coding_sequence] if args.key?(:coding_sequence) + @gene_id = args[:gene_id] if args.key?(:gene_id) + end + end + + # + class Experiment + include Google::Apis::Core::Hashable + + # The platform unit used as part of this experiment, for example + # flowcell-barcode.lane for Illumina or slide for SOLiD. Corresponds to the + # @RG PU field in the SAM spec. + # Corresponds to the JSON property `platformUnit` + # @return [String] + attr_accessor :platform_unit + + # A client-supplied library identifier; a library is a collection of DNA + # fragments which have been prepared for sequencing from a sample. This + # field is important for quality control as error or bias can be introduced + # during sample preparation. + # Corresponds to the JSON property `libraryId` + # @return [String] + attr_accessor :library_id + + # The instrument model used as part of this experiment. This maps to + # sequencing technology in the SAM spec. + # Corresponds to the JSON property `instrumentModel` + # @return [String] + attr_accessor :instrument_model + + # The sequencing center used as part of this experiment. + # Corresponds to the JSON property `sequencingCenter` + # @return [String] + attr_accessor :sequencing_center + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @platform_unit = args[:platform_unit] if args.key?(:platform_unit) + @library_id = args[:library_id] if args.key?(:library_id) + @instrument_model = args[:instrument_model] if args.key?(:instrument_model) + @sequencing_center = args[:sequencing_center] if args.key?(:sequencing_center) + end + end + + # The dataset list response. + class ListDatasetsResponse + include Google::Apis::Core::Hashable + + # The list of matching Datasets. + # Corresponds to the JSON property `datasets` + # @return [Array] + attr_accessor :datasets + + # The continuation token, which is used to page through large result sets. + # Provide this value in a subsequent request to return the next page of + # results. This field will be empty if there aren't any additional results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @datasets = args[:datasets] if args.key?(:datasets) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # Request message for `TestIamPermissions` method. + class TestIamPermissionsRequest + include Google::Apis::Core::Hashable + + # REQUIRED: The set of permissions to check for the 'resource'. + # Permissions with wildcards (such as '*' or 'storage.*') are not allowed. + # Allowed permissions are: + # * `genomics.datasets.create` + # * `genomics.datasets.delete` + # * `genomics.datasets.get` + # * `genomics.datasets.list` + # * `genomics.datasets.update` + # * `genomics.datasets.getIamPolicy` + # * `genomics.datasets.setIamPolicy` + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @permissions = args[:permissions] if args.key?(:permissions) + end + end + + # The read group set export request. + class ExportReadGroupSetRequest + include Google::Apis::Core::Hashable + + # Required. A Google Cloud Storage URI for the exported BAM file. + # The currently authenticated user must have write access to the new file. + # An error will be returned if the URI already contains data. + # Corresponds to the JSON property `exportUri` + # @return [String] + attr_accessor :export_uri + + # The reference names to export. If this is not specified, all reference + # sequences, including unmapped reads, are exported. + # Use `*` to export only unmapped reads. + # Corresponds to the JSON property `referenceNames` + # @return [Array] + attr_accessor :reference_names + + # Required. The Google Cloud project ID that owns this + # export. The caller must have WRITE access to this project. + # Corresponds to the JSON property `projectId` + # @return [String] + attr_accessor :project_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @export_uri = args[:export_uri] if args.key?(:export_uri) + @reference_names = args[:reference_names] if args.key?(:reference_names) + @project_id = args[:project_id] if args.key?(:project_id) + end + end + + # + class Exon + include Google::Apis::Core::Hashable + + # The start position of the exon on this annotation's reference sequence, + # 0-based inclusive. Note that this is relative to the reference start, and + # **not** the containing annotation start. + # Corresponds to the JSON property `start` + # @return [String] + attr_accessor :start + + # The end position of the exon on this annotation's reference sequence, + # 0-based exclusive. Note that this is relative to the reference start, and + # *not* the containing annotation start. + # Corresponds to the JSON property `end` + # @return [String] + attr_accessor :end + + # The frame of this exon. Contains a value of 0, 1, or 2, which indicates + # the offset of the first coding base of the exon within the reading frame + # of the coding DNA sequence, if any. This field is dependent on the + # strandedness of this annotation (see + # Annotation.reverse_strand). + # For forward stranded annotations, this offset is relative to the + # exon.start. For reverse + # strand annotations, this offset is relative to the + # exon.end `- 1`. + # Unset if this exon does not intersect the coding sequence. Upon creation + # of a transcript, the frame must be populated for all or none of the + # coding exons. + # Corresponds to the JSON property `frame` + # @return [Fixnum] + attr_accessor :frame + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @start = args[:start] if args.key?(:start) + @end = args[:end] if args.key?(:end) + @frame = args[:frame] if args.key?(:frame) + end + end + + # A call set is a collection of variant calls, typically for one sample. It + # belongs to a variant set. + # For more genomics resource definitions, see [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + class CallSet + include Google::Apis::Core::Hashable + + # The date this call set was created in milliseconds from the epoch. + # Corresponds to the JSON property `created` + # @return [String] + attr_accessor :created + + # The sample ID this call set corresponds to. + # Corresponds to the JSON property `sampleId` + # @return [String] + attr_accessor :sample_id + + # The call set name. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # A map of additional call set information. This must be of the form + # map (string key mapping to a list of string values). + # Corresponds to the JSON property `info` + # @return [Hash>] + attr_accessor :info + + # The IDs of the variant sets this call set belongs to. This field must + # have exactly length one, as a call set belongs to a single variant set. + # This field is repeated for compatibility with the + # [GA4GH 0.5.1 + # API](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/ + # variants.avdl#L76). + # Corresponds to the JSON property `variantSetIds` + # @return [Array] + attr_accessor :variant_set_ids + + # The server-generated call set ID, unique across all call sets. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @created = args[:created] if args.key?(:created) + @sample_id = args[:sample_id] if args.key?(:sample_id) + @name = args[:name] if args.key?(:name) + @info = args[:info] if args.key?(:info) + @variant_set_ids = args[:variant_set_ids] if args.key?(:variant_set_ids) + @id = args[:id] if args.key?(:id) + end + end + + # + class SearchAnnotationSetsResponse + include Google::Apis::Core::Hashable + + # The matching annotation sets. + # Corresponds to the JSON property `annotationSets` + # @return [Array] + attr_accessor :annotation_sets + + # The continuation token, which is used to page through large result sets. + # Provide this value in a subsequent request to return the next page of + # results. This field will be empty if there aren't any additional results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @annotation_sets = args[:annotation_sets] if args.key?(:annotation_sets) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # The variant data import request. + class ImportVariantsRequest + include Google::Apis::Core::Hashable + + # A mapping between info field keys and the InfoMergeOperations to + # be performed on them. This is plumbed down to the MergeVariantRequests + # generated by the resulting import job. + # Corresponds to the JSON property `infoMergeConfig` + # @return [Hash] + attr_accessor :info_merge_config + + # Required. The variant set to which variant data should be imported. + # Corresponds to the JSON property `variantSetId` + # @return [String] + attr_accessor :variant_set_id + + # A list of URIs referencing variant files in Google Cloud Storage. URIs can + # include wildcards [as described + # here](https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames). + # Note that recursive wildcards ('**') are not supported. + # Corresponds to the JSON property `sourceUris` + # @return [Array] + attr_accessor :source_uris + + # Convert reference names to the canonical representation. + # hg19 haploytypes (those reference names containing "_hap") + # are not modified in any way. + # All other reference names are modified according to the following rules: + # The reference name is capitalized. + # The "chr" prefix is dropped for all autosomes and sex chromsomes. + # For example "chr17" becomes "17" and "chrX" becomes "X". + # All mitochondrial chromosomes ("chrM", "chrMT", etc) become "MT". + # Corresponds to the JSON property `normalizeReferenceNames` + # @return [Boolean] + attr_accessor :normalize_reference_names + alias_method :normalize_reference_names?, :normalize_reference_names + + # The format of the variant data being imported. If unspecified, defaults to + # to `VCF`. + # Corresponds to the JSON property `format` + # @return [String] + attr_accessor :format + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @info_merge_config = args[:info_merge_config] if args.key?(:info_merge_config) + @variant_set_id = args[:variant_set_id] if args.key?(:variant_set_id) + @source_uris = args[:source_uris] if args.key?(:source_uris) + @normalize_reference_names = args[:normalize_reference_names] if args.key?(:normalize_reference_names) + @format = args[:format] if args.key?(:format) + end + end + + # + class VariantAnnotation + include Google::Apis::Core::Hashable + + # The set of conditions associated with this variant. + # A condition describes the way a variant influences human health. + # Corresponds to the JSON property `conditions` + # @return [Array] + attr_accessor :conditions + + # Effect of the variant on the coding sequence. + # Corresponds to the JSON property `effect` + # @return [String] + attr_accessor :effect + + # Google annotation IDs of the transcripts affected by this variant. These + # should be provided when the variant is created. + # Corresponds to the JSON property `transcriptIds` + # @return [Array] + attr_accessor :transcript_ids + + # Type has been adapted from ClinVar's list of variant types. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The alternate allele for this variant. If multiple alternate alleles + # exist at this location, create a separate variant for each one, as they + # may represent distinct conditions. + # Corresponds to the JSON property `alternateBases` + # @return [String] + attr_accessor :alternate_bases + + # Google annotation ID of the gene affected by this variant. This should + # be provided when the variant is created. + # Corresponds to the JSON property `geneId` + # @return [String] + attr_accessor :gene_id + + # Describes the clinical significance of a variant. + # It is adapted from the ClinVar controlled vocabulary for clinical + # significance described at: + # http://www.ncbi.nlm.nih.gov/clinvar/docs/clinsig/ + # Corresponds to the JSON property `clinicalSignificance` + # @return [String] + attr_accessor :clinical_significance + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @conditions = args[:conditions] if args.key?(:conditions) + @effect = args[:effect] if args.key?(:effect) + @transcript_ids = args[:transcript_ids] if args.key?(:transcript_ids) + @type = args[:type] if args.key?(:type) + @alternate_bases = args[:alternate_bases] if args.key?(:alternate_bases) + @gene_id = args[:gene_id] if args.key?(:gene_id) + @clinical_significance = args[:clinical_significance] if args.key?(:clinical_significance) + end + end + + # + class ListCoverageBucketsResponse + include Google::Apis::Core::Hashable + + # The length of each coverage bucket in base pairs. Note that buckets at the + # end of a reference sequence may be shorter. This value is omitted if the + # bucket width is infinity (the default behaviour, with no range or + # `targetBucketWidth`). + # Corresponds to the JSON property `bucketWidth` + # @return [String] + attr_accessor :bucket_width + + # The coverage buckets. The list of buckets is sparse; a bucket with 0 + # overlapping reads is not returned. A bucket never crosses more than one + # reference sequence. Each bucket has width `bucketWidth`, unless + # its end is the end of the reference sequence. + # Corresponds to the JSON property `coverageBuckets` + # @return [Array] + attr_accessor :coverage_buckets + + # The continuation token, which is used to page through large result sets. + # Provide this value in a subsequent request to return the next page of + # results. This field will be empty if there aren't any additional results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @bucket_width = args[:bucket_width] if args.key?(:bucket_width) + @coverage_buckets = args[:coverage_buckets] if args.key?(:coverage_buckets) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # The variant data export request. + class ExportVariantSetRequest + include Google::Apis::Core::Hashable + + # The format for the exported data. + # Corresponds to the JSON property `format` + # @return [String] + attr_accessor :format + + # Required. The BigQuery dataset to export data to. This dataset must already + # exist. Note that this is distinct from the Genomics concept of "dataset". + # Corresponds to the JSON property `bigqueryDataset` + # @return [String] + attr_accessor :bigquery_dataset + + # Required. The BigQuery table to export data to. + # If the table doesn't exist, it will be created. If it already exists, it + # will be overwritten. + # Corresponds to the JSON property `bigqueryTable` + # @return [String] + attr_accessor :bigquery_table + + # If provided, only variant call information from the specified call sets + # will be exported. By default all variant calls are exported. + # Corresponds to the JSON property `callSetIds` + # @return [Array] + attr_accessor :call_set_ids + + # Required. The Google Cloud project ID that owns the destination + # BigQuery dataset. The caller must have WRITE access to this project. This + # project will also own the resulting export job. + # Corresponds to the JSON property `projectId` + # @return [String] + attr_accessor :project_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @format = args[:format] if args.key?(:format) + @bigquery_dataset = args[:bigquery_dataset] if args.key?(:bigquery_dataset) + @bigquery_table = args[:bigquery_table] if args.key?(:bigquery_table) + @call_set_ids = args[:call_set_ids] if args.key?(:call_set_ids) + @project_id = args[:project_id] if args.key?(:project_id) + end + end + + # + class SearchAnnotationsRequest + include Google::Apis::Core::Hashable + + # The continuation token, which is used to page through large result sets. + # To get the next page of results, set this parameter to the value of + # `nextPageToken` from the previous response. + # Corresponds to the JSON property `pageToken` + # @return [String] + attr_accessor :page_token + + # The maximum number of results to return in a single page. If unspecified, + # defaults to 256. The maximum value is 2048. + # Corresponds to the JSON property `pageSize` + # @return [Fixnum] + attr_accessor :page_size + + # The start position of the range on the reference, 0-based inclusive. If + # specified, + # referenceId or + # referenceName + # must be specified. Defaults to 0. + # Corresponds to the JSON property `start` + # @return [String] + attr_accessor :start + + # Required. The annotation sets to search within. The caller must have + # `READ` access to these annotation sets. + # All queried annotation sets must have the same type. + # Corresponds to the JSON property `annotationSetIds` + # @return [Array] + attr_accessor :annotation_set_ids + + # The name of the reference to query, within the reference set associated + # with this query. + # Corresponds to the JSON property `referenceName` + # @return [String] + attr_accessor :reference_name + + # The ID of the reference to query. + # Corresponds to the JSON property `referenceId` + # @return [String] + attr_accessor :reference_id + + # The end position of the range on the reference, 0-based exclusive. If + # referenceId or + # referenceName + # must be specified, Defaults to the length of the reference. + # Corresponds to the JSON property `end` + # @return [String] + attr_accessor :end + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @page_token = args[:page_token] if args.key?(:page_token) + @page_size = args[:page_size] if args.key?(:page_size) + @start = args[:start] if args.key?(:start) + @annotation_set_ids = args[:annotation_set_ids] if args.key?(:annotation_set_ids) + @reference_name = args[:reference_name] if args.key?(:reference_name) + @reference_id = args[:reference_id] if args.key?(:reference_id) + @end = args[:end] if args.key?(:end) + end + end + + # An event that occurred during an Operation. + class OperationEvent + include Google::Apis::Core::Hashable + + # Optional time of when event finished. An event can have a start time and no + # finish time. If an event has a finish time, there must be a start time. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # Optional time of when event started. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + # Required description of event. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @end_time = args[:end_time] if args.key?(:end_time) + @start_time = args[:start_time] if args.key?(:start_time) + @description = args[:description] if args.key?(:description) + end + end + + # + class CodingSequence + include Google::Apis::Core::Hashable + + # The start of the coding sequence on this annotation's reference sequence, + # 0-based inclusive. Note that this position is relative to the reference + # start, and *not* the containing annotation start. + # Corresponds to the JSON property `start` + # @return [String] + attr_accessor :start + + # The end of the coding sequence on this annotation's reference sequence, + # 0-based exclusive. Note that this position is relative to the reference + # start, and *not* the containing annotation start. + # Corresponds to the JSON property `end` + # @return [String] + attr_accessor :end + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @start = args[:start] if args.key?(:start) + @end = args[:end] if args.key?(:end) + end + end + + # + class SearchReferencesResponse + include Google::Apis::Core::Hashable + + # The matching references. + # Corresponds to the JSON property `references` + # @return [Array] + attr_accessor :references + + # The continuation token, which is used to page through large result sets. + # Provide this value in a subsequent request to return the next page of + # results. This field will be empty if there aren't any additional results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @references = args[:references] if args.key?(:references) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # Request message for `GetIamPolicy` method. + class GetIamPolicyRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Response message for `TestIamPermissions` method. + class TestIamPermissionsResponse + include Google::Apis::Core::Hashable + + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @permissions = args[:permissions] if args.key?(:permissions) + end + end + + # + class SearchAnnotationSetsRequest + include Google::Apis::Core::Hashable + + # The continuation token, which is used to page through large result sets. + # To get the next page of results, set this parameter to the value of + # `nextPageToken` from the previous response. + # Corresponds to the JSON property `pageToken` + # @return [String] + attr_accessor :page_token + + # The maximum number of results to return in a single page. If unspecified, + # defaults to 128. The maximum value is 1024. + # Corresponds to the JSON property `pageSize` + # @return [Fixnum] + attr_accessor :page_size + + # Required. The dataset IDs to search within. Caller must have `READ` access + # to these datasets. + # Corresponds to the JSON property `datasetIds` + # @return [Array] + attr_accessor :dataset_ids + + # If specified, only annotation sets that have any of these types are + # returned. + # Corresponds to the JSON property `types` + # @return [Array] + attr_accessor :types + + # Only return annotations sets for which a substring of the name matches this + # string (case insensitive). + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # If specified, only annotation sets associated with the given reference set + # are returned. + # Corresponds to the JSON property `referenceSetId` + # @return [String] + attr_accessor :reference_set_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @page_token = args[:page_token] if args.key?(:page_token) + @page_size = args[:page_size] if args.key?(:page_size) + @dataset_ids = args[:dataset_ids] if args.key?(:dataset_ids) + @types = args[:types] if args.key?(:types) + @name = args[:name] if args.key?(:name) + @reference_set_id = args[:reference_set_id] if args.key?(:reference_set_id) + end + end + + # The read group set search response. + class SearchReadGroupSetsResponse + include Google::Apis::Core::Hashable + + # The list of matching read group sets. + # Corresponds to the JSON property `readGroupSets` + # @return [Array] + attr_accessor :read_group_sets + + # The continuation token, which is used to page through large result sets. + # Provide this value in a subsequent request to return the next page of + # results. This field will be empty if there aren't any additional results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @read_group_sets = args[:read_group_sets] if args.key?(:read_group_sets) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # A linear alignment can be represented by one CIGAR string. Describes the + # mapped position and local alignment of the read to the reference. + class LinearAlignment + include Google::Apis::Core::Hashable + + # An abstraction for referring to a genomic position, in relation to some + # already known reference. For now, represents a genomic position as a + # reference name, a base number on that reference (0-based), and a + # determination of forward or reverse strand. + # Corresponds to the JSON property `position` + # @return [Google::Apis::GenomicsV1::Position] + attr_accessor :position + + # Represents the local alignment of this sequence (alignment matches, indels, + # etc) against the reference. + # Corresponds to the JSON property `cigar` + # @return [Array] + attr_accessor :cigar + + # The mapping quality of this alignment. Represents how likely + # the read maps to this position as opposed to other locations. + # Specifically, this is -10 log10 Pr(mapping position is wrong), rounded to + # the nearest integer. + # Corresponds to the JSON property `mappingQuality` + # @return [Fixnum] + attr_accessor :mapping_quality + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @position = args[:position] if args.key?(:position) + @cigar = args[:cigar] if args.key?(:cigar) + @mapping_quality = args[:mapping_quality] if args.key?(:mapping_quality) + end + end + + # + class SearchReferencesRequest + include Google::Apis::Core::Hashable + + # If present, return references for which the + # md5checksum matches exactly. + # Corresponds to the JSON property `md5checksums` + # @return [Array] + attr_accessor :md5checksums + + # If present, return references for which a prefix of any of + # sourceAccessions match + # any of these strings. Accession numbers typically have a main number and a + # version, for example `GCF_000001405.26`. + # Corresponds to the JSON property `accessions` + # @return [Array] + attr_accessor :accessions + + # The continuation token, which is used to page through large result sets. + # To get the next page of results, set this parameter to the value of + # `nextPageToken` from the previous response. + # Corresponds to the JSON property `pageToken` + # @return [String] + attr_accessor :page_token + + # If present, return only references which belong to this reference set. + # Corresponds to the JSON property `referenceSetId` + # @return [String] + attr_accessor :reference_set_id + + # The maximum number of results to return in a single page. If unspecified, + # defaults to 1024. The maximum value is 4096. + # Corresponds to the JSON property `pageSize` + # @return [Fixnum] + attr_accessor :page_size + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @md5checksums = args[:md5checksums] if args.key?(:md5checksums) + @accessions = args[:accessions] if args.key?(:accessions) + @page_token = args[:page_token] if args.key?(:page_token) + @reference_set_id = args[:reference_set_id] if args.key?(:reference_set_id) + @page_size = args[:page_size] if args.key?(:page_size) + end + end + + # A Dataset is a collection of genomic data. + # For more genomics resource definitions, see [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + class Dataset + include Google::Apis::Core::Hashable + + # The time this dataset was created, in seconds from the epoch. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # The dataset name. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The Google Cloud project ID that this dataset belongs to. + # Corresponds to the JSON property `projectId` + # @return [String] + attr_accessor :project_id + + # The server-generated dataset ID, unique across all datasets. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @create_time = args[:create_time] if args.key?(:create_time) + @name = args[:name] if args.key?(:name) + @project_id = args[:project_id] if args.key?(:project_id) + @id = args[:id] if args.key?(:id) + end + end + + # The variant data import response. + class ImportVariantsResponse + include Google::Apis::Core::Hashable + + # IDs of the call sets created during the import. + # Corresponds to the JSON property `callSetIds` + # @return [Array] + attr_accessor :call_set_ids + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @call_set_ids = args[:call_set_ids] if args.key?(:call_set_ids) + end + end + + # A read group is all the data that's processed the same way by the sequencer. + class ReadGroup + include Google::Apis::Core::Hashable + + # The reference set the reads in this read group are aligned to. + # Corresponds to the JSON property `referenceSetId` + # @return [String] + attr_accessor :reference_set_id + + # A map of additional read group information. This must be of the form + # map (string key mapping to a list of string values). + # Corresponds to the JSON property `info` + # @return [Hash>] + attr_accessor :info + + # The server-generated read group ID, unique for all read groups. + # Note: This is different than the @RG ID field in the SAM spec. For that + # value, see name. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # The predicted insert size of this read group. The insert size is the length + # the sequenced DNA fragment from end-to-end, not including the adapters. + # Corresponds to the JSON property `predictedInsertSize` + # @return [Fixnum] + attr_accessor :predicted_insert_size + + # The programs used to generate this read group. Programs are always + # identical for all read groups within a read group set. For this reason, + # only the first read group in a returned set will have this field + # populated. + # Corresponds to the JSON property `programs` + # @return [Array] + attr_accessor :programs + + # A free-form text description of this read group. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # A client-supplied sample identifier for the reads in this read group. + # Corresponds to the JSON property `sampleId` + # @return [String] + attr_accessor :sample_id + + # The dataset to which this read group belongs. + # Corresponds to the JSON property `datasetId` + # @return [String] + attr_accessor :dataset_id + + # The experiment used to generate this read group. + # Corresponds to the JSON property `experiment` + # @return [Google::Apis::GenomicsV1::Experiment] + attr_accessor :experiment + + # The read group name. This corresponds to the @RG ID field in the SAM spec. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @reference_set_id = args[:reference_set_id] if args.key?(:reference_set_id) + @info = args[:info] if args.key?(:info) + @id = args[:id] if args.key?(:id) + @predicted_insert_size = args[:predicted_insert_size] if args.key?(:predicted_insert_size) + @programs = args[:programs] if args.key?(:programs) + @description = args[:description] if args.key?(:description) + @sample_id = args[:sample_id] if args.key?(:sample_id) + @dataset_id = args[:dataset_id] if args.key?(:dataset_id) + @experiment = args[:experiment] if args.key?(:experiment) + @name = args[:name] if args.key?(:name) + end + end + + # A read group set is a logical collection of read groups, which are + # collections of reads produced by a sequencer. A read group set typically + # models reads corresponding to one sample, sequenced one way, and aligned one + # way. + # * A read group set belongs to one dataset. + # * A read group belongs to one read group set. + # * A read belongs to one read group. + # For more genomics resource definitions, see [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + class ReadGroupSet + include Google::Apis::Core::Hashable + + # The read groups in this set. There are typically 1-10 read groups in a read + # group set. + # Corresponds to the JSON property `readGroups` + # @return [Array] + attr_accessor :read_groups + + # The filename of the original source file for this read group set, if any. + # Corresponds to the JSON property `filename` + # @return [String] + attr_accessor :filename + + # The read group set name. By default this will be initialized to the sample + # name of the sequenced data contained in this set. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The reference set to which the reads in this read group set are aligned. + # Corresponds to the JSON property `referenceSetId` + # @return [String] + attr_accessor :reference_set_id + + # A map of additional read group set information. + # Corresponds to the JSON property `info` + # @return [Hash>] + attr_accessor :info + + # The server-generated read group set ID, unique for all read group sets. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # The dataset to which this read group set belongs. + # Corresponds to the JSON property `datasetId` + # @return [String] + attr_accessor :dataset_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @read_groups = args[:read_groups] if args.key?(:read_groups) + @filename = args[:filename] if args.key?(:filename) + @name = args[:name] if args.key?(:name) + @reference_set_id = args[:reference_set_id] if args.key?(:reference_set_id) + @info = args[:info] if args.key?(:info) + @id = args[:id] if args.key?(:id) + @dataset_id = args[:dataset_id] if args.key?(:dataset_id) + end + end + + # The search variant sets response. + class SearchVariantSetsResponse + include Google::Apis::Core::Hashable + + # The continuation token, which is used to page through large result sets. + # Provide this value in a subsequent request to return the next page of + # results. This field will be empty if there aren't any additional results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The variant sets belonging to the requested dataset. + # Corresponds to the JSON property `variantSets` + # @return [Array] + attr_accessor :variant_sets + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @variant_sets = args[:variant_sets] if args.key?(:variant_sets) + end + end + + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # service Foo ` + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # ` + # The JSON representation for `Empty` is empty JSON object ````. + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # + class Entry + include Google::Apis::Core::Hashable + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` which can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting purpose. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + # Corresponds to the JSON property `status` + # @return [Google::Apis::GenomicsV1::Status] + attr_accessor :status + + # An annotation describes a region of reference genome. The value of an + # annotation may be one of several canonical types, supplemented by arbitrary + # info tags. An annotation is not inherently associated with a specific + # sample or individual (though a client could choose to use annotations in + # this way). Example canonical annotation types are `GENE` and + # `VARIANT`. + # Corresponds to the JSON property `annotation` + # @return [Google::Apis::GenomicsV1::Annotation] + attr_accessor :annotation + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @status = args[:status] if args.key?(:status) + @annotation = args[:annotation] if args.key?(:annotation) + end + end + + # An abstraction for referring to a genomic position, in relation to some + # already known reference. For now, represents a genomic position as a + # reference name, a base number on that reference (0-based), and a + # determination of forward or reverse strand. + class Position + include Google::Apis::Core::Hashable + + # Whether this position is on the reverse strand, as opposed to the forward + # strand. + # Corresponds to the JSON property `reverseStrand` + # @return [Boolean] + attr_accessor :reverse_strand + alias_method :reverse_strand?, :reverse_strand + + # The 0-based offset from the start of the forward strand for that reference. + # Corresponds to the JSON property `position` + # @return [String] + attr_accessor :position + + # The name of the reference in whatever reference set is being used. + # Corresponds to the JSON property `referenceName` + # @return [String] + attr_accessor :reference_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @reverse_strand = args[:reverse_strand] if args.key?(:reverse_strand) + @position = args[:position] if args.key?(:position) + @reference_name = args[:reference_name] if args.key?(:reference_name) + end + end + + # + class SearchReferenceSetsResponse + include Google::Apis::Core::Hashable + + # The matching references sets. + # Corresponds to the JSON property `referenceSets` + # @return [Array] + attr_accessor :reference_sets + + # The continuation token, which is used to page through large result sets. + # Provide this value in a subsequent request to return the next page of + # results. This field will be empty if there aren't any additional results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @reference_sets = args[:reference_sets] if args.key?(:reference_sets) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # The call set search request. + class SearchCallSetsRequest + include Google::Apis::Core::Hashable + + # Restrict the query to call sets within the given variant sets. At least one + # ID must be provided. + # Corresponds to the JSON property `variantSetIds` + # @return [Array] + attr_accessor :variant_set_ids + + # Only return call sets for which a substring of the name matches this + # string. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The continuation token, which is used to page through large result sets. + # To get the next page of results, set this parameter to the value of + # `nextPageToken` from the previous response. + # Corresponds to the JSON property `pageToken` + # @return [String] + attr_accessor :page_token + + # The maximum number of results to return in a single page. If unspecified, + # defaults to 1024. + # Corresponds to the JSON property `pageSize` + # @return [Fixnum] + attr_accessor :page_size + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @variant_set_ids = args[:variant_set_ids] if args.key?(:variant_set_ids) + @name = args[:name] if args.key?(:name) + @page_token = args[:page_token] if args.key?(:page_token) + @page_size = args[:page_size] if args.key?(:page_size) + end + end + + # The read group set import request. + class ImportReadGroupSetsRequest + include Google::Apis::Core::Hashable + + # The reference set to which the imported read group sets are aligned to, if + # any. The reference names of this reference set must be a superset of those + # found in the imported file headers. If no reference set id is provided, a + # best effort is made to associate with a matching reference set. + # Corresponds to the JSON property `referenceSetId` + # @return [String] + attr_accessor :reference_set_id + + # The partition strategy describes how read groups are partitioned into read + # group sets. + # Corresponds to the JSON property `partitionStrategy` + # @return [String] + attr_accessor :partition_strategy + + # Required. The ID of the dataset these read group sets will belong to. The + # caller must have WRITE permissions to this dataset. + # Corresponds to the JSON property `datasetId` + # @return [String] + attr_accessor :dataset_id + + # A list of URIs pointing at [BAM + # files](https://samtools.github.io/hts-specs/SAMv1.pdf) + # in Google Cloud Storage. + # Those URIs can include wildcards (*), but do not add or remove + # matching files before import has completed. + # Note that Google Cloud Storage object listing is only eventually + # consistent: files added may be not be immediately visible to + # everyone. Thus, if using a wildcard it is preferable not to start + # the import immediately after the files are created. + # Corresponds to the JSON property `sourceUris` + # @return [Array] + attr_accessor :source_uris + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @reference_set_id = args[:reference_set_id] if args.key?(:reference_set_id) + @partition_strategy = args[:partition_strategy] if args.key?(:partition_strategy) + @dataset_id = args[:dataset_id] if args.key?(:dataset_id) + @source_uris = args[:source_uris] if args.key?(:source_uris) + end + end + + # Defines an Identity and Access Management (IAM) policy. It is used to + # specify access control policies for Cloud Platform resources. + # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of + # `members` to a `role`, where the members can be user accounts, Google groups, + # Google domains, and service accounts. A `role` is a named list of permissions + # defined by IAM. + # **Example** + # ` + # "bindings": [ + # ` + # "role": "roles/owner", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-other-app@appspot.gserviceaccount.com", + # ] + # `, + # ` + # "role": "roles/viewer", + # "members": ["user:sean@example.com"] + # ` + # ] + # ` + # For a description of IAM and its features, see the + # [IAM developer's guide](https://cloud.google.com/iam). + class Policy + include Google::Apis::Core::Hashable + + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # If no `etag` is provided in the call to `setIamPolicy`, then the existing + # policy is overwritten blindly. + # Corresponds to the JSON property `etag` + # @return [String] + attr_accessor :etag + + # Version of the `Policy`. The default version is 0. + # Corresponds to the JSON property `version` + # @return [Fixnum] + attr_accessor :version + + # Associates a list of `members` to a `role`. + # Multiple `bindings` must not be specified for the same `role`. + # `bindings` with no members will result in an error. + # Corresponds to the JSON property `bindings` + # @return [Array] + attr_accessor :bindings + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @etag = args[:etag] if args.key?(:etag) + @version = args[:version] if args.key?(:version) + @bindings = args[:bindings] if args.key?(:bindings) + end + end + + # The read search request. + class SearchReadsRequest + include Google::Apis::Core::Hashable + + # The reference sequence name, for example `chr1`, `1`, or `chrX`. If set to + # `*`, only unmapped reads are returned. If unspecified, all reads (mapped + # and unmapped) are returned. + # Corresponds to the JSON property `referenceName` + # @return [String] + attr_accessor :reference_name + + # The IDs of the read groups sets within which to search for reads. All + # specified read group sets must be aligned against a common set of reference + # sequences; this defines the genomic coordinates for the query. Must specify + # one of `readGroupSetIds` or `readGroupIds`. + # Corresponds to the JSON property `readGroupSetIds` + # @return [Array] + attr_accessor :read_group_set_ids + + # The IDs of the read groups within which to search for reads. All specified + # read groups must belong to the same read group sets. Must specify one of + # `readGroupSetIds` or `readGroupIds`. + # Corresponds to the JSON property `readGroupIds` + # @return [Array] + attr_accessor :read_group_ids + + # The end position of the range on the reference, 0-based exclusive. If + # specified, `referenceName` must also be specified. + # Corresponds to the JSON property `end` + # @return [String] + attr_accessor :end + + # The continuation token, which is used to page through large result sets. + # To get the next page of results, set this parameter to the value of + # `nextPageToken` from the previous response. + # Corresponds to the JSON property `pageToken` + # @return [String] + attr_accessor :page_token + + # The maximum number of results to return in a single page. If unspecified, + # defaults to 256. The maximum value is 2048. + # Corresponds to the JSON property `pageSize` + # @return [Fixnum] + attr_accessor :page_size + + # The start position of the range on the reference, 0-based inclusive. If + # specified, `referenceName` must also be specified. + # Corresponds to the JSON property `start` + # @return [String] + attr_accessor :start + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @reference_name = args[:reference_name] if args.key?(:reference_name) + @read_group_set_ids = args[:read_group_set_ids] if args.key?(:read_group_set_ids) + @read_group_ids = args[:read_group_ids] if args.key?(:read_group_ids) + @end = args[:end] if args.key?(:end) + @page_token = args[:page_token] if args.key?(:page_token) + @page_size = args[:page_size] if args.key?(:page_size) + @start = args[:start] if args.key?(:start) + end + end + + # The request message for Operations.CancelOperation. + class CancelOperationRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # An annotation describes a region of reference genome. The value of an + # annotation may be one of several canonical types, supplemented by arbitrary + # info tags. An annotation is not inherently associated with a specific + # sample or individual (though a client could choose to use annotations in + # this way). Example canonical annotation types are `GENE` and + # `VARIANT`. + class Annotation + include Google::Apis::Core::Hashable + + # A transcript represents the assertion that a particular region of the + # reference genome may be transcribed as RNA. + # Corresponds to the JSON property `transcript` + # @return [Google::Apis::GenomicsV1::Transcript] + attr_accessor :transcript + + # The start position of the range on the reference, 0-based inclusive. + # Corresponds to the JSON property `start` + # @return [String] + attr_accessor :start + + # The annotation set to which this annotation belongs. + # Corresponds to the JSON property `annotationSetId` + # @return [String] + attr_accessor :annotation_set_id + + # The display name of this annotation. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # A variant annotation, which describes the effect of a variant on the + # genome, the coding sequence, and/or higher level consequences at the + # organism level e.g. pathogenicity. This field is only set for annotations + # of type `VARIANT`. + # Corresponds to the JSON property `variant` + # @return [Google::Apis::GenomicsV1::VariantAnnotation] + attr_accessor :variant + + # The ID of the Google Genomics reference associated with this range. + # Corresponds to the JSON property `referenceId` + # @return [String] + attr_accessor :reference_id + + # The server-generated annotation ID, unique across all annotations. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Whether this range refers to the reverse strand, as opposed to the forward + # strand. Note that regardless of this field, the start/end position of the + # range always refer to the forward strand. + # Corresponds to the JSON property `reverseStrand` + # @return [Boolean] + attr_accessor :reverse_strand + alias_method :reverse_strand?, :reverse_strand + + # The display name corresponding to the reference specified by + # `referenceId`, for example `chr1`, `1`, or `chrX`. + # Corresponds to the JSON property `referenceName` + # @return [String] + attr_accessor :reference_name + + # The data type for this annotation. Must match the containing annotation + # set's type. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # A map of additional read alignment information. This must be of the form + # map (string key mapping to a list of string values). + # Corresponds to the JSON property `info` + # @return [Hash>] + attr_accessor :info + + # The end position of the range on the reference, 0-based exclusive. + # Corresponds to the JSON property `end` + # @return [String] + attr_accessor :end + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @transcript = args[:transcript] if args.key?(:transcript) + @start = args[:start] if args.key?(:start) + @annotation_set_id = args[:annotation_set_id] if args.key?(:annotation_set_id) + @name = args[:name] if args.key?(:name) + @variant = args[:variant] if args.key?(:variant) + @reference_id = args[:reference_id] if args.key?(:reference_id) + @id = args[:id] if args.key?(:id) + @reverse_strand = args[:reverse_strand] if args.key?(:reverse_strand) + @reference_name = args[:reference_name] if args.key?(:reference_name) + @type = args[:type] if args.key?(:type) + @info = args[:info] if args.key?(:info) + @end = args[:end] if args.key?(:end) + end + end + + # This resource represents a long-running operation that is the result of a + # network API call. + class Operation + include Google::Apis::Core::Hashable + + # If importing ReadGroupSets, an ImportReadGroupSetsResponse is returned. If + # importing Variants, an ImportVariantsResponse is returned. For pipelines and + # exports, an empty response is returned. + # Corresponds to the JSON property `response` + # @return [Hash] + attr_accessor :response + + # The server-assigned name, which is only unique within the same service that + # originally returns it. For example: `operations/CJHU7Oi_ChDrveSpBRjfuL- + # qzoWAgEw` + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` which can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting purpose. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + # Corresponds to the JSON property `error` + # @return [Google::Apis::GenomicsV1::Status] + attr_accessor :error + + # An OperationMetadata object. This will always be returned with the Operation. + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # If the value is `false`, it means the operation is still in progress. + # If true, the operation is completed, and either `error` or `response` is + # available. + # Corresponds to the JSON property `done` + # @return [Boolean] + attr_accessor :done + alias_method :done?, :done + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @response = args[:response] if args.key?(:response) + @name = args[:name] if args.key?(:name) + @error = args[:error] if args.key?(:error) + @metadata = args[:metadata] if args.key?(:metadata) + @done = args[:done] if args.key?(:done) + end + end + + # Runtime metadata that will be populated in the + # runtimeMetadata + # field of the Operation associated with a RunPipeline execution. + class RuntimeMetadata + include Google::Apis::Core::Hashable + + # Describes a Compute Engine resource that is being managed by a running + # pipeline. + # Corresponds to the JSON property `computeEngine` + # @return [Google::Apis::GenomicsV1::ComputeEngine] + attr_accessor :compute_engine + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @compute_engine = args[:compute_engine] if args.key?(:compute_engine) + end + end + + # The read group set import response. + class ImportReadGroupSetsResponse + include Google::Apis::Core::Hashable + + # IDs of the read group sets that were created. + # Corresponds to the JSON property `readGroupSetIds` + # @return [Array] + attr_accessor :read_group_set_ids + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @read_group_set_ids = args[:read_group_set_ids] if args.key?(:read_group_set_ids) + end + end + + # A call represents the determination of genotype with respect to a particular + # variant. It may include associated information such as quality and phasing. + # For example, a call might assign a probability of 0.32 to the occurrence of + # a SNP named rs1234 in a call set with the name NA12345. + class VariantCall + include Google::Apis::Core::Hashable + + # If this field is present, this variant call's genotype ordering implies + # the phase of the bases and is consistent with any other variant calls in + # the same reference sequence which have the same phaseset value. + # When importing data from VCF, if the genotype data was phased but no + # phase set was specified this field will be set to `*`. + # Corresponds to the JSON property `phaseset` + # @return [String] + attr_accessor :phaseset + + # A map of additional variant call information. This must be of the form + # map (string key mapping to a list of string values). + # Corresponds to the JSON property `info` + # @return [Hash>] + attr_accessor :info + + # The name of the call set this variant call belongs to. + # Corresponds to the JSON property `callSetName` + # @return [String] + attr_accessor :call_set_name + + # The genotype likelihoods for this variant call. Each array entry + # represents how likely a specific genotype is for this call. The value + # ordering is defined by the GL tag in the VCF spec. + # If Phred-scaled genotype likelihood scores (PL) are available and + # log10(P) genotype likelihood scores (GL) are not, PL scores are converted + # to GL scores. If both are available, PL scores are stored in `info`. + # Corresponds to the JSON property `genotypeLikelihood` + # @return [Array] + attr_accessor :genotype_likelihood + + # The ID of the call set this variant call belongs to. + # Corresponds to the JSON property `callSetId` + # @return [String] + attr_accessor :call_set_id + + # The genotype of this variant call. Each value represents either the value + # of the `referenceBases` field or a 1-based index into + # `alternateBases`. If a variant had a `referenceBases` + # value of `T` and an `alternateBases` + # value of `["A", "C"]`, and the `genotype` was + # `[2, 1]`, that would mean the call + # represented the heterozygous value `CA` for this variant. + # If the `genotype` was instead `[0, 1]`, the + # represented value would be `TA`. Ordering of the + # genotype values is important if the `phaseset` is present. + # If a genotype is not called (that is, a `.` is present in the + # GT string) -1 is returned. + # Corresponds to the JSON property `genotype` + # @return [Array] + attr_accessor :genotype + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @phaseset = args[:phaseset] if args.key?(:phaseset) + @info = args[:info] if args.key?(:info) + @call_set_name = args[:call_set_name] if args.key?(:call_set_name) + @genotype_likelihood = args[:genotype_likelihood] if args.key?(:genotype_likelihood) + @call_set_id = args[:call_set_id] if args.key?(:call_set_id) + @genotype = args[:genotype] if args.key?(:genotype) + end + end + + # The variant search response. + class SearchVariantsResponse + include Google::Apis::Core::Hashable + + # The continuation token, which is used to page through large result sets. + # Provide this value in a subsequent request to return the next page of + # results. This field will be empty if there aren't any additional results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The list of matching Variants. + # Corresponds to the JSON property `variants` + # @return [Array] + attr_accessor :variants + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @variants = args[:variants] if args.key?(:variants) + end + end + + # + class ListBasesResponse + include Google::Apis::Core::Hashable + + # A substring of the bases that make up this reference. + # Corresponds to the JSON property `sequence` + # @return [String] + attr_accessor :sequence + + # The offset position (0-based) of the given `sequence` from the + # start of this `Reference`. This value will differ for each page + # in a paginated request. + # Corresponds to the JSON property `offset` + # @return [String] + attr_accessor :offset + + # The continuation token, which is used to page through large result sets. + # Provide this value in a subsequent request to return the next page of + # results. This field will be empty if there aren't any additional results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @sequence = args[:sequence] if args.key?(:sequence) + @offset = args[:offset] if args.key?(:offset) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` which can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting purpose. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + class Status + include Google::Apis::Core::Hashable + + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # google.rpc.Status.details field, or localized by the client. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + # A list of messages that carry the error details. There will be a + # common set of message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @message = args[:message] if args.key?(:message) + @details = args[:details] if args.key?(:details) + @code = args[:code] if args.key?(:code) + end + end + + # + class UndeleteDatasetRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Associates `members` with a `role`. + class Binding + include Google::Apis::Core::Hashable + + # Specifies the identities requesting access for a Cloud Platform resource. + # `members` can have the following values: + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # * `user:`emailid``: An email address that represents a specific Google + # account. For example, `alice@gmail.com` or `joe@example.com`. + # * `serviceAccount:`emailid``: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # * `group:`emailid``: An email address that represents a Google group. + # For example, `admins@example.com`. + # * `domain:`domain``: A Google Apps domain name that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # Corresponds to the JSON property `members` + # @return [Array] + attr_accessor :members + + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # Corresponds to the JSON property `role` + # @return [String] + attr_accessor :role + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @members = args[:members] if args.key?(:members) + @role = args[:role] if args.key?(:role) + end + end + + # A 0-based half-open genomic coordinate range for search requests. + class Range + include Google::Apis::Core::Hashable + + # The start position of the range on the reference, 0-based inclusive. + # Corresponds to the JSON property `start` + # @return [String] + attr_accessor :start + + # The end position of the range on the reference, 0-based exclusive. + # Corresponds to the JSON property `end` + # @return [String] + attr_accessor :end + + # The reference sequence name, for example `chr1`, + # `1`, or `chrX`. + # Corresponds to the JSON property `referenceName` + # @return [String] + attr_accessor :reference_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @start = args[:start] if args.key?(:start) + @end = args[:end] if args.key?(:end) + @reference_name = args[:reference_name] if args.key?(:reference_name) + end + end + + # A variant set is a collection of call sets and variants. It contains summary + # statistics of those contents. A variant set belongs to a dataset. + # For more genomics resource definitions, see [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + class VariantSet + include Google::Apis::Core::Hashable + + # The metadata associated with this variant set. + # Corresponds to the JSON property `metadata` + # @return [Array] + attr_accessor :metadata + + # A list of all references used by the variants in a variant set + # with associated coordinate upper bounds for each one. + # Corresponds to the JSON property `referenceBounds` + # @return [Array] + attr_accessor :reference_bounds + + # The server-generated variant set ID, unique across all variant sets. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # A textual description of this variant set. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The dataset to which this variant set belongs. + # Corresponds to the JSON property `datasetId` + # @return [String] + attr_accessor :dataset_id + + # User-specified, mutable name. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The reference set to which the variant set is mapped. The reference set + # describes the alignment provenance of the variant set, while the + # `referenceBounds` describe the shape of the actual variant data. The + # reference set's reference names are a superset of those found in the + # `referenceBounds`. + # For example, given a variant set that is mapped to the GRCh38 reference set + # and contains a single variant on reference 'X', `referenceBounds` would + # contain only an entry for 'X', while the associated reference set + # enumerates all possible references: '1', '2', 'X', 'Y', 'MT', etc. + # Corresponds to the JSON property `referenceSetId` + # @return [String] + attr_accessor :reference_set_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @metadata = args[:metadata] if args.key?(:metadata) + @reference_bounds = args[:reference_bounds] if args.key?(:reference_bounds) + @id = args[:id] if args.key?(:id) + @description = args[:description] if args.key?(:description) + @dataset_id = args[:dataset_id] if args.key?(:dataset_id) + @name = args[:name] if args.key?(:name) + @reference_set_id = args[:reference_set_id] if args.key?(:reference_set_id) + end + end + + # + class BatchCreateAnnotationsResponse + include Google::Apis::Core::Hashable + + # The resulting per-annotation entries, ordered consistently with the + # original request. + # Corresponds to the JSON property `entries` + # @return [Array] + attr_accessor :entries + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @entries = args[:entries] if args.key?(:entries) + end + end + + # ReferenceBound records an upper bound for the starting coordinate of + # variants in a particular reference. + class ReferenceBound + include Google::Apis::Core::Hashable + + # An upper bound (inclusive) on the starting coordinate of any + # variant in the reference sequence. + # Corresponds to the JSON property `upperBound` + # @return [String] + attr_accessor :upper_bound + + # The name of the reference associated with this reference bound. + # Corresponds to the JSON property `referenceName` + # @return [String] + attr_accessor :reference_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @upper_bound = args[:upper_bound] if args.key?(:upper_bound) + @reference_name = args[:reference_name] if args.key?(:reference_name) + end + end + + # The call set search response. + class SearchCallSetsResponse + include Google::Apis::Core::Hashable + + # The continuation token, which is used to page through large result sets. + # Provide this value in a subsequent request to return the next page of + # results. This field will be empty if there aren't any additional results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The list of matching call sets. + # Corresponds to the JSON property `callSets` + # @return [Array] + attr_accessor :call_sets + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @call_sets = args[:call_sets] if args.key?(:call_sets) + end + end + + # A variant represents a change in DNA sequence relative to a reference + # sequence. For example, a variant could represent a SNP or an insertion. + # Variants belong to a variant set. + # For more genomics resource definitions, see [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # Each of the calls on a variant represent a determination of genotype with + # respect to that variant. For example, a call might assign probability of 0.32 + # to the occurrence of a SNP named rs1234 in a sample named NA12345. A call + # belongs to a call set, which contains related calls typically from one + # sample. + class Variant + include Google::Apis::Core::Hashable + + # A measure of how likely this variant is to be real. + # A higher value is better. + # Corresponds to the JSON property `quality` + # @return [Float] + attr_accessor :quality + + # The server-generated variant ID, unique across all variants. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # The ID of the variant set this variant belongs to. + # Corresponds to the JSON property `variantSetId` + # @return [String] + attr_accessor :variant_set_id + + # The reference on which this variant occurs. + # (such as `chr20` or `X`) + # Corresponds to the JSON property `referenceName` + # @return [String] + attr_accessor :reference_name + + # A map of additional variant information. This must be of the form + # map (string key mapping to a list of string values). + # Corresponds to the JSON property `info` + # @return [Hash>] + attr_accessor :info + + # The reference bases for this variant. They start at the given + # position. + # Corresponds to the JSON property `referenceBases` + # @return [String] + attr_accessor :reference_bases + + # Names for the variant, for example a RefSNP ID. + # Corresponds to the JSON property `names` + # @return [Array] + attr_accessor :names + + # The bases that appear instead of the reference bases. + # Corresponds to the JSON property `alternateBases` + # @return [Array] + attr_accessor :alternate_bases + + # The end position (0-based) of this variant. This corresponds to the first + # base after the last base in the reference allele. So, the length of + # the reference allele is (end - start). This is useful for variants + # that don't explicitly give alternate bases, for example large deletions. + # Corresponds to the JSON property `end` + # @return [String] + attr_accessor :end + + # A list of filters (normally quality filters) this variant has failed. + # `PASS` indicates this variant has passed all filters. + # Corresponds to the JSON property `filter` + # @return [Array] + attr_accessor :filter + + # The variant calls for this particular variant. Each one represents the + # determination of genotype with respect to this variant. + # Corresponds to the JSON property `calls` + # @return [Array] + attr_accessor :calls + + # The date this variant was created, in milliseconds from the epoch. + # Corresponds to the JSON property `created` + # @return [String] + attr_accessor :created + + # The position at which this variant occurs (0-based). + # This corresponds to the first base of the string of reference bases. + # Corresponds to the JSON property `start` + # @return [String] + attr_accessor :start + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @quality = args[:quality] if args.key?(:quality) + @id = args[:id] if args.key?(:id) + @variant_set_id = args[:variant_set_id] if args.key?(:variant_set_id) + @reference_name = args[:reference_name] if args.key?(:reference_name) + @info = args[:info] if args.key?(:info) + @reference_bases = args[:reference_bases] if args.key?(:reference_bases) + @names = args[:names] if args.key?(:names) + @alternate_bases = args[:alternate_bases] if args.key?(:alternate_bases) + @end = args[:end] if args.key?(:end) + @filter = args[:filter] if args.key?(:filter) + @calls = args[:calls] if args.key?(:calls) + @created = args[:created] if args.key?(:created) + @start = args[:start] if args.key?(:start) + end + end + + # The response message for Operations.ListOperations. + class ListOperationsResponse + include Google::Apis::Core::Hashable + + # The standard List next-page token. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # A list of operations that matches the specified filter in the request. + # Corresponds to the JSON property `operations` + # @return [Array] + attr_accessor :operations + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @operations = args[:operations] if args.key?(:operations) + end + end + + # Metadata describing an Operation. + class OperationMetadata + include Google::Apis::Core::Hashable + + # Optional event messages that were generated during the job's execution. + # This also contains any warnings that were generated during import + # or export. + # Corresponds to the JSON property `events` + # @return [Array] + attr_accessor :events + + # The time at which the job stopped running. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # The time at which the job began to run. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + # The original request that started the operation. Note that this will be in + # current version of the API. If the operation was started with v1beta2 API + # and a GetOperation is performed on v1 API, a v1 request will be returned. + # Corresponds to the JSON property `request` + # @return [Hash] + attr_accessor :request + + # Runtime metadata on this Operation. + # Corresponds to the JSON property `runtimeMetadata` + # @return [Hash] + attr_accessor :runtime_metadata + + # The time at which the job was submitted to the Genomics service. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Optionally provided by the caller when submitting the request that creates + # the operation. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # The Google Cloud Project in which the job is scoped. + # Corresponds to the JSON property `projectId` + # @return [String] + attr_accessor :project_id + + # This field is deprecated. Use `labels` instead. Optionally provided by the + # caller when submitting the request that creates the operation. + # Corresponds to the JSON property `clientId` + # @return [String] + attr_accessor :client_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @events = args[:events] if args.key?(:events) + @end_time = args[:end_time] if args.key?(:end_time) + @start_time = args[:start_time] if args.key?(:start_time) + @request = args[:request] if args.key?(:request) + @runtime_metadata = args[:runtime_metadata] if args.key?(:runtime_metadata) + @create_time = args[:create_time] if args.key?(:create_time) + @labels = args[:labels] if args.key?(:labels) + @project_id = args[:project_id] if args.key?(:project_id) + @client_id = args[:client_id] if args.key?(:client_id) + end + end + + # The variant search request. + class SearchVariantsRequest + include Google::Apis::Core::Hashable + + # The maximum number of variants to return in a single page. If unspecified, + # defaults to 5000. The maximum value is 10000. + # Corresponds to the JSON property `pageSize` + # @return [Fixnum] + attr_accessor :page_size + + # Only return variant calls which belong to call sets with these ids. + # Leaving this blank returns all variant calls. If a variant has no + # calls belonging to any of these call sets, it won't be returned at all. + # Corresponds to the JSON property `callSetIds` + # @return [Array] + attr_accessor :call_set_ids + + # Only return variants which have exactly this name. + # Corresponds to the JSON property `variantName` + # @return [String] + attr_accessor :variant_name + + # The beginning of the window (0-based, inclusive) for which + # overlapping variants should be returned. If unspecified, defaults to 0. + # Corresponds to the JSON property `start` + # @return [String] + attr_accessor :start + + # Required. Only return variants in this reference sequence. + # Corresponds to the JSON property `referenceName` + # @return [String] + attr_accessor :reference_name + + # At most one variant set ID must be provided. Only variants from this + # variant set will be returned. If omitted, a call set id must be included in + # the request. + # Corresponds to the JSON property `variantSetIds` + # @return [Array] + attr_accessor :variant_set_ids + + # The end of the window, 0-based exclusive. If unspecified or 0, defaults to + # the length of the reference. + # Corresponds to the JSON property `end` + # @return [String] + attr_accessor :end + + # The continuation token, which is used to page through large result sets. + # To get the next page of results, set this parameter to the value of + # `nextPageToken` from the previous response. + # Corresponds to the JSON property `pageToken` + # @return [String] + attr_accessor :page_token + + # The maximum number of calls to return in a single page. Note that this + # limit may be exceeded in the event that a matching variant contains more + # calls than the requested maximum. If unspecified, defaults to 5000. The + # maximum value is 10000. + # Corresponds to the JSON property `maxCalls` + # @return [Fixnum] + attr_accessor :max_calls + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @page_size = args[:page_size] if args.key?(:page_size) + @call_set_ids = args[:call_set_ids] if args.key?(:call_set_ids) + @variant_name = args[:variant_name] if args.key?(:variant_name) + @start = args[:start] if args.key?(:start) + @reference_name = args[:reference_name] if args.key?(:reference_name) + @variant_set_ids = args[:variant_set_ids] if args.key?(:variant_set_ids) + @end = args[:end] if args.key?(:end) + @page_token = args[:page_token] if args.key?(:page_token) + @max_calls = args[:max_calls] if args.key?(:max_calls) + end + end + + # The read group set search request. + class SearchReadGroupSetsRequest + include Google::Apis::Core::Hashable + + # Restricts this query to read group sets within the given datasets. At least + # one ID must be provided. + # Corresponds to the JSON property `datasetIds` + # @return [Array] + attr_accessor :dataset_ids + + # Only return read group sets for which a substring of the name matches this + # string. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The continuation token, which is used to page through large result sets. + # To get the next page of results, set this parameter to the value of + # `nextPageToken` from the previous response. + # Corresponds to the JSON property `pageToken` + # @return [String] + attr_accessor :page_token + + # The maximum number of results to return in a single page. If unspecified, + # defaults to 256. The maximum value is 1024. + # Corresponds to the JSON property `pageSize` + # @return [Fixnum] + attr_accessor :page_size + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @dataset_ids = args[:dataset_ids] if args.key?(:dataset_ids) + @name = args[:name] if args.key?(:name) + @page_token = args[:page_token] if args.key?(:page_token) + @page_size = args[:page_size] if args.key?(:page_size) + end + end + + # + class SearchAnnotationsResponse + include Google::Apis::Core::Hashable + + # The continuation token, which is used to page through large result sets. + # Provide this value in a subsequent request to return the next page of + # results. This field will be empty if there aren't any additional results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The matching annotations. + # Corresponds to the JSON property `annotations` + # @return [Array] + attr_accessor :annotations + + 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) + @annotations = args[:annotations] if args.key?(:annotations) + end + end + + # + class ClinicalCondition + include Google::Apis::Core::Hashable + + # The OMIM id for this condition. + # Search for these IDs at http://omim.org/ + # Corresponds to the JSON property `omimId` + # @return [String] + attr_accessor :omim_id + + # The set of external IDs for this condition. + # Corresponds to the JSON property `externalIds` + # @return [Array] + attr_accessor :external_ids + + # The MedGen concept id associated with this gene. + # Search for these IDs at http://www.ncbi.nlm.nih.gov/medgen/ + # Corresponds to the JSON property `conceptId` + # @return [String] + attr_accessor :concept_id + + # A set of names for the condition. + # Corresponds to the JSON property `names` + # @return [Array] + attr_accessor :names + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @omim_id = args[:omim_id] if args.key?(:omim_id) + @external_ids = args[:external_ids] if args.key?(:external_ids) + @concept_id = args[:concept_id] if args.key?(:concept_id) + @names = args[:names] if args.key?(:names) + end + end + + # The read search response. + class SearchReadsResponse + include Google::Apis::Core::Hashable + + # The continuation token, which is used to page through large result sets. + # Provide this value in a subsequent request to return the next page of + # results. This field will be empty if there aren't any additional results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The list of matching alignments sorted by mapped genomic coordinate, + # if any, ascending in position within the same reference. Unmapped reads, + # which have no position, are returned contiguously and are sorted in + # ascending lexicographic order by fragment name. + # Corresponds to the JSON property `alignments` + # @return [Array] + attr_accessor :alignments + + 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) + @alignments = args[:alignments] if args.key?(:alignments) + end + end + + # + class Program + include Google::Apis::Core::Hashable + + # The display name of the program. This is typically the colloquial name of + # the tool used, for example 'bwa' or 'picard'. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The command line used to run this program. + # Corresponds to the JSON property `commandLine` + # @return [String] + attr_accessor :command_line + + # The ID of the program run before this one. + # Corresponds to the JSON property `prevProgramId` + # @return [String] + attr_accessor :prev_program_id + + # The user specified locally unique ID of the program. Used along with + # `prevProgramId` to define an ordering between programs. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # The version of the program run. + # Corresponds to the JSON property `version` + # @return [String] + attr_accessor :version + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + @command_line = args[:command_line] if args.key?(:command_line) + @prev_program_id = args[:prev_program_id] if args.key?(:prev_program_id) + @id = args[:id] if args.key?(:id) + @version = args[:version] if args.key?(:version) + end + end end end end diff --git a/generated/google/apis/genomics_v1/representations.rb b/generated/google/apis/genomics_v1/representations.rb index b527cba32..90f24a309 100644 --- a/generated/google/apis/genomics_v1/representations.rb +++ b/generated/google/apis/genomics_v1/representations.rb @@ -22,1315 +22,455 @@ module Google module Apis module GenomicsV1 - class AnnotationSet - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Empty - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SearchAnnotationSetsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SearchAnnotationSetsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Annotation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class VariantAnnotation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ClinicalCondition - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ExternalId - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Transcript - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Exon - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CodingSequence - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BatchCreateAnnotationsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BatchCreateAnnotationsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Entry - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Status - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SearchAnnotationsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SearchAnnotationsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListDatasetsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Dataset - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UndeleteDatasetRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SetIamPolicyRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Policy - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Binding - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GetIamPolicyRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TestIamPermissionsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TestIamPermissionsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListOperationsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Operation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CancelOperationRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ImportReadGroupSetsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ExportReadGroupSetRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SearchReadGroupSetsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SearchReadGroupSetsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ReadGroupSet - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ReadGroup - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Experiment - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Program - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListCoverageBucketsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class CoverageBucket class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Range - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SearchReadsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SearchReadsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Read - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class LinearAlignment - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Position - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CigarUnit - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class StreamReadsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class StreamReadsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SearchReferenceSetsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SearchReferenceSetsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ReferenceSet - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SearchReferencesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SearchReferencesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Reference - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListBasesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ImportVariantsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class VariantSet - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ReferenceBound - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class VariantSetMetadata - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ExportVariantSetRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SearchVariantSetsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SearchVariantSetsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SearchVariantsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SearchVariantsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Variant - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class VariantCall - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MergeVariantsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SearchCallSetsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SearchCallSetsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CallSet - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class StreamVariantsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class StreamVariantsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ImportReadGroupSetsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ImportVariantsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class OperationMetadata - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class OperationEvent - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class RuntimeMetadata - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class ComputeEngine class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class AnnotationSet - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :dataset_id, as: 'datasetId' - property :reference_set_id, as: 'referenceSetId' - property :name, as: 'name' - property :source_uri, as: 'sourceUri' - property :type, as: 'type' - hash :info, as: 'info', :class => Array do - include Representable::JSON::Collection - items - end - - end - end - - class Empty - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - class SearchAnnotationSetsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :dataset_ids, as: 'datasetIds' - property :reference_set_id, as: 'referenceSetId' - property :name, as: 'name' - collection :types, as: 'types' - property :page_token, as: 'pageToken' - property :page_size, as: 'pageSize' - end - end - - class SearchAnnotationSetsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :annotation_sets, as: 'annotationSets', class: Google::Apis::GenomicsV1::AnnotationSet, decorator: Google::Apis::GenomicsV1::AnnotationSet::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - class Annotation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :annotation_set_id, as: 'annotationSetId' - property :name, as: 'name' - property :reference_id, as: 'referenceId' - property :reference_name, as: 'referenceName' - property :start, as: 'start' - property :end, as: 'end' - property :reverse_strand, as: 'reverseStrand' - property :type, as: 'type' - property :variant, as: 'variant', class: Google::Apis::GenomicsV1::VariantAnnotation, decorator: Google::Apis::GenomicsV1::VariantAnnotation::Representation - - property :transcript, as: 'transcript', class: Google::Apis::GenomicsV1::Transcript, decorator: Google::Apis::GenomicsV1::Transcript::Representation - - hash :info, as: 'info', :class => Array do - include Representable::JSON::Collection - items - end - - end - end - - class VariantAnnotation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - property :effect, as: 'effect' - property :alternate_bases, as: 'alternateBases' - property :gene_id, as: 'geneId' - collection :transcript_ids, as: 'transcriptIds' - collection :conditions, as: 'conditions', class: Google::Apis::GenomicsV1::ClinicalCondition, decorator: Google::Apis::GenomicsV1::ClinicalCondition::Representation - - property :clinical_significance, as: 'clinicalSignificance' - end - end - - class ClinicalCondition - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :names, as: 'names' - collection :external_ids, as: 'externalIds', class: Google::Apis::GenomicsV1::ExternalId, decorator: Google::Apis::GenomicsV1::ExternalId::Representation - - property :concept_id, as: 'conceptId' - property :omim_id, as: 'omimId' - end - end - class ExternalId - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :source_name, as: 'sourceName' - property :id, as: 'id' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end - class Transcript - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :gene_id, as: 'geneId' - collection :exons, as: 'exons', class: Google::Apis::GenomicsV1::Exon, decorator: Google::Apis::GenomicsV1::Exon::Representation + class Reference + class Representation < Google::Apis::Core::JsonRepresentation; end - property :coding_sequence, as: 'codingSequence', class: Google::Apis::GenomicsV1::CodingSequence, decorator: Google::Apis::GenomicsV1::CodingSequence::Representation - - end + include Google::Apis::Core::JsonObjectSupport end - class Exon - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :start, as: 'start' - property :end, as: 'end' - property :frame, as: 'frame' - end + class VariantSetMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end - class CodingSequence - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :start, as: 'start' - property :end, as: 'end' - end + class SearchVariantSetsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end - class BatchCreateAnnotationsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :annotations, as: 'annotations', class: Google::Apis::GenomicsV1::Annotation, decorator: Google::Apis::GenomicsV1::Annotation::Representation + class SearchReferenceSetsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end - property :request_id, as: 'requestId' - end - end - - class BatchCreateAnnotationsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :entries, as: 'entries', class: Google::Apis::GenomicsV1::Entry, decorator: Google::Apis::GenomicsV1::Entry::Representation - - end - end - - class Entry - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :status, as: 'status', class: Google::Apis::GenomicsV1::Status, decorator: Google::Apis::GenomicsV1::Status::Representation - - property :annotation, as: 'annotation', class: Google::Apis::GenomicsV1::Annotation, decorator: Google::Apis::GenomicsV1::Annotation::Representation - - end - end - - class Status - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - property :message, as: 'message' - collection :details, as: 'details' - end - end - - class SearchAnnotationsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :annotation_set_ids, as: 'annotationSetIds' - property :reference_id, as: 'referenceId' - property :reference_name, as: 'referenceName' - property :start, as: 'start' - property :end, as: 'end' - property :page_token, as: 'pageToken' - property :page_size, as: 'pageSize' - end - end - - class SearchAnnotationsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :annotations, as: 'annotations', class: Google::Apis::GenomicsV1::Annotation, decorator: Google::Apis::GenomicsV1::Annotation::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - class ListDatasetsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :datasets, as: 'datasets', class: Google::Apis::GenomicsV1::Dataset, decorator: Google::Apis::GenomicsV1::Dataset::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - class Dataset - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :project_id, as: 'projectId' - property :name, as: 'name' - property :create_time, as: 'createTime' - end - end - - class UndeleteDatasetRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end + include Google::Apis::Core::JsonObjectSupport end class SetIamPolicyRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :policy, as: 'policy', class: Google::Apis::GenomicsV1::Policy, decorator: Google::Apis::GenomicsV1::Policy::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end - class Policy - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :version, as: 'version' - collection :bindings, as: 'bindings', class: Google::Apis::GenomicsV1::Binding, decorator: Google::Apis::GenomicsV1::Binding::Representation + class MergeVariantsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end - property :etag, :base64 => true, as: 'etag' - end + include Google::Apis::Core::JsonObjectSupport end - class Binding - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :role, as: 'role' - collection :members, as: 'members' - end + class BatchCreateAnnotationsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end - class GetIamPolicyRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end + class Read + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end - class TestIamPermissionsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :permissions, as: 'permissions' - end + class ReferenceSet + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end - class TestIamPermissionsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :permissions, as: 'permissions' - end + class CigarUnit + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end - class ListOperationsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :operations, as: 'operations', class: Google::Apis::GenomicsV1::Operation, decorator: Google::Apis::GenomicsV1::Operation::Representation + class AnnotationSet + class Representation < Google::Apis::Core::JsonRepresentation; end - property :next_page_token, as: 'nextPageToken' - end + include Google::Apis::Core::JsonObjectSupport end - class Operation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - hash :metadata, as: 'metadata' - property :done, as: 'done' - property :error, as: 'error', class: Google::Apis::GenomicsV1::Status, decorator: Google::Apis::GenomicsV1::Status::Representation + class Transcript + class Representation < Google::Apis::Core::JsonRepresentation; end - hash :response, as: 'response' - end - end - - class CancelOperationRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - class ImportReadGroupSetsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :dataset_id, as: 'datasetId' - property :reference_set_id, as: 'referenceSetId' - collection :source_uris, as: 'sourceUris' - property :partition_strategy, as: 'partitionStrategy' - end - end - - class ExportReadGroupSetRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :project_id, as: 'projectId' - property :export_uri, as: 'exportUri' - collection :reference_names, as: 'referenceNames' - end - end - - class SearchReadGroupSetsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :dataset_ids, as: 'datasetIds' - property :name, as: 'name' - property :page_token, as: 'pageToken' - property :page_size, as: 'pageSize' - end - end - - class SearchReadGroupSetsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :read_group_sets, as: 'readGroupSets', class: Google::Apis::GenomicsV1::ReadGroupSet, decorator: Google::Apis::GenomicsV1::ReadGroupSet::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - class ReadGroupSet - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :dataset_id, as: 'datasetId' - property :reference_set_id, as: 'referenceSetId' - property :name, as: 'name' - property :filename, as: 'filename' - collection :read_groups, as: 'readGroups', class: Google::Apis::GenomicsV1::ReadGroup, decorator: Google::Apis::GenomicsV1::ReadGroup::Representation - - hash :info, as: 'info', :class => Array do - include Representable::JSON::Collection - items - end - - end - end - - class ReadGroup - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :dataset_id, as: 'datasetId' - property :name, as: 'name' - property :description, as: 'description' - property :sample_id, as: 'sampleId' - property :experiment, as: 'experiment', class: Google::Apis::GenomicsV1::Experiment, decorator: Google::Apis::GenomicsV1::Experiment::Representation - - property :predicted_insert_size, as: 'predictedInsertSize' - collection :programs, as: 'programs', class: Google::Apis::GenomicsV1::Program, decorator: Google::Apis::GenomicsV1::Program::Representation - - property :reference_set_id, as: 'referenceSetId' - hash :info, as: 'info', :class => Array do - include Representable::JSON::Collection - items - end - - end + include Google::Apis::Core::JsonObjectSupport end class Experiment - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :library_id, as: 'libraryId' - property :platform_unit, as: 'platformUnit' - property :sequencing_center, as: 'sequencingCenter' - property :instrument_model, as: 'instrumentModel' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end - class Program - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :command_line, as: 'commandLine' - property :id, as: 'id' - property :name, as: 'name' - property :prev_program_id, as: 'prevProgramId' - property :version, as: 'version' - end + class ListDatasetsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TestIamPermissionsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ExportReadGroupSetRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Exon + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CallSet + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SearchAnnotationSetsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ImportVariantsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class VariantAnnotation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ListCoverageBucketsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :bucket_width, as: 'bucketWidth' - collection :coverage_buckets, as: 'coverageBuckets', class: Google::Apis::GenomicsV1::CoverageBucket, decorator: Google::Apis::GenomicsV1::CoverageBucket::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :next_page_token, as: 'nextPageToken' - end + include Google::Apis::Core::JsonObjectSupport + end + + class ExportVariantSetRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SearchAnnotationsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class OperationEvent + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CodingSequence + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SearchReferencesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GetIamPolicyRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TestIamPermissionsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SearchAnnotationSetsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SearchReadGroupSetsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class LinearAlignment + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SearchReferencesRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Dataset + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ImportVariantsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ReadGroup + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ReadGroupSet + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SearchVariantSetsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Empty + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Entry + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Position + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SearchReferenceSetsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SearchCallSetsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ImportReadGroupSetsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Policy + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SearchReadsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CancelOperationRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Annotation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Operation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RuntimeMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ImportReadGroupSetsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class VariantCall + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SearchVariantsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListBasesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Status + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UndeleteDatasetRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Binding + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Range + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class VariantSet + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BatchCreateAnnotationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ReferenceBound + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SearchCallSetsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Variant + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListOperationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class OperationMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SearchVariantsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SearchReadGroupSetsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SearchAnnotationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ClinicalCondition + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SearchReadsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Program + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class CoverageBucket # @private class Representation < Google::Apis::Core::JsonRepresentation - property :range, as: 'range', class: Google::Apis::GenomicsV1::Range, decorator: Google::Apis::GenomicsV1::Range::Representation - property :mean_coverage, as: 'meanCoverage' - end - end - - class Range - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :reference_name, as: 'referenceName' - property :start, as: 'start' - property :end, as: 'end' - end - end - - class SearchReadsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :read_group_set_ids, as: 'readGroupSetIds' - collection :read_group_ids, as: 'readGroupIds' - property :reference_name, as: 'referenceName' - property :start, as: 'start' - property :end, as: 'end' - property :page_token, as: 'pageToken' - property :page_size, as: 'pageSize' - end - end - - class SearchReadsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :alignments, as: 'alignments', class: Google::Apis::GenomicsV1::Read, decorator: Google::Apis::GenomicsV1::Read::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - class Read - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :read_group_id, as: 'readGroupId' - property :read_group_set_id, as: 'readGroupSetId' - property :fragment_name, as: 'fragmentName' - property :proper_placement, as: 'properPlacement' - property :duplicate_fragment, as: 'duplicateFragment' - property :fragment_length, as: 'fragmentLength' - property :read_number, as: 'readNumber' - property :number_reads, as: 'numberReads' - property :failed_vendor_quality_checks, as: 'failedVendorQualityChecks' - property :alignment, as: 'alignment', class: Google::Apis::GenomicsV1::LinearAlignment, decorator: Google::Apis::GenomicsV1::LinearAlignment::Representation - - property :secondary_alignment, as: 'secondaryAlignment' - property :supplementary_alignment, as: 'supplementaryAlignment' - property :aligned_sequence, as: 'alignedSequence' - collection :aligned_quality, as: 'alignedQuality' - property :next_mate_position, as: 'nextMatePosition', class: Google::Apis::GenomicsV1::Position, decorator: Google::Apis::GenomicsV1::Position::Representation - - hash :info, as: 'info', :class => Array do - include Representable::JSON::Collection - items - end - - end - end - - class LinearAlignment - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :position, as: 'position', class: Google::Apis::GenomicsV1::Position, decorator: Google::Apis::GenomicsV1::Position::Representation - - property :mapping_quality, as: 'mappingQuality' - collection :cigar, as: 'cigar', class: Google::Apis::GenomicsV1::CigarUnit, decorator: Google::Apis::GenomicsV1::CigarUnit::Representation - - end - end - - class Position - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :reference_name, as: 'referenceName' - property :position, as: 'position' - property :reverse_strand, as: 'reverseStrand' - end - end - - class CigarUnit - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :operation, as: 'operation' - property :operation_length, as: 'operationLength' - property :reference_sequence, as: 'referenceSequence' - end - end - - class StreamReadsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :project_id, as: 'projectId' - property :read_group_set_id, as: 'readGroupSetId' - property :reference_name, as: 'referenceName' - property :start, as: 'start' - property :end, as: 'end' - property :shard, as: 'shard' - property :total_shards, as: 'totalShards' - end - end - - class StreamReadsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :alignments, as: 'alignments', class: Google::Apis::GenomicsV1::Read, decorator: Google::Apis::GenomicsV1::Read::Representation - - end - end - - class SearchReferenceSetsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :md5checksums, as: 'md5checksums' - collection :accessions, as: 'accessions' - property :assembly_id, as: 'assemblyId' - property :page_token, as: 'pageToken' - property :page_size, as: 'pageSize' - end - end - - class SearchReferenceSetsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :reference_sets, as: 'referenceSets', class: Google::Apis::GenomicsV1::ReferenceSet, decorator: Google::Apis::GenomicsV1::ReferenceSet::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - class ReferenceSet - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - collection :reference_ids, as: 'referenceIds' - property :md5checksum, as: 'md5checksum' - property :ncbi_taxon_id, as: 'ncbiTaxonId' - property :description, as: 'description' - property :assembly_id, as: 'assemblyId' - property :source_uri, as: 'sourceUri' - collection :source_accessions, as: 'sourceAccessions' - end - end - - class SearchReferencesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :md5checksums, as: 'md5checksums' - collection :accessions, as: 'accessions' - property :reference_set_id, as: 'referenceSetId' - property :page_token, as: 'pageToken' - property :page_size, as: 'pageSize' - end - end - - class SearchReferencesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :references, as: 'references', class: Google::Apis::GenomicsV1::Reference, decorator: Google::Apis::GenomicsV1::Reference::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - class Reference - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :length, as: 'length' - property :md5checksum, as: 'md5checksum' - property :name, as: 'name' - property :source_uri, as: 'sourceUri' - collection :source_accessions, as: 'sourceAccessions' - property :ncbi_taxon_id, as: 'ncbiTaxonId' - end - end - - class ListBasesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :offset, as: 'offset' - property :sequence, as: 'sequence' - property :next_page_token, as: 'nextPageToken' - end - end - - class ImportVariantsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :variant_set_id, as: 'variantSetId' - collection :source_uris, as: 'sourceUris' - property :format, as: 'format' - property :normalize_reference_names, as: 'normalizeReferenceNames' - hash :info_merge_config, as: 'infoMergeConfig' - end - end - - class VariantSet - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :dataset_id, as: 'datasetId' - property :id, as: 'id' - property :reference_set_id, as: 'referenceSetId' - collection :reference_bounds, as: 'referenceBounds', class: Google::Apis::GenomicsV1::ReferenceBound, decorator: Google::Apis::GenomicsV1::ReferenceBound::Representation - - collection :metadata, as: 'metadata', class: Google::Apis::GenomicsV1::VariantSetMetadata, decorator: Google::Apis::GenomicsV1::VariantSetMetadata::Representation - - property :name, as: 'name' - property :description, as: 'description' - end - end - - class ReferenceBound - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :reference_name, as: 'referenceName' - property :upper_bound, as: 'upperBound' - end - end - - class VariantSetMetadata - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :key, as: 'key' - property :value, as: 'value' - property :id, as: 'id' - property :type, as: 'type' - property :number, as: 'number' - property :description, as: 'description' - hash :info, as: 'info', :class => Array do - include Representable::JSON::Collection - items - end - - end - end - - class ExportVariantSetRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :call_set_ids, as: 'callSetIds' - property :project_id, as: 'projectId' - property :format, as: 'format' - property :bigquery_dataset, as: 'bigqueryDataset' - property :bigquery_table, as: 'bigqueryTable' - end - end - - class SearchVariantSetsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :dataset_ids, as: 'datasetIds' - property :page_token, as: 'pageToken' - property :page_size, as: 'pageSize' - end - end - - class SearchVariantSetsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :variant_sets, as: 'variantSets', class: Google::Apis::GenomicsV1::VariantSet, decorator: Google::Apis::GenomicsV1::VariantSet::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - class SearchVariantsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :variant_set_ids, as: 'variantSetIds' - property :variant_name, as: 'variantName' - collection :call_set_ids, as: 'callSetIds' - property :reference_name, as: 'referenceName' - property :start, as: 'start' - property :end, as: 'end' - property :page_token, as: 'pageToken' - property :page_size, as: 'pageSize' - property :max_calls, as: 'maxCalls' - end - end - - class SearchVariantsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :variants, as: 'variants', class: Google::Apis::GenomicsV1::Variant, decorator: Google::Apis::GenomicsV1::Variant::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - class Variant - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :variant_set_id, as: 'variantSetId' - property :id, as: 'id' - collection :names, as: 'names' - property :created, as: 'created' - property :reference_name, as: 'referenceName' - property :start, as: 'start' - property :end, as: 'end' - property :reference_bases, as: 'referenceBases' - collection :alternate_bases, as: 'alternateBases' - property :quality, as: 'quality' - collection :filter, as: 'filter' - hash :info, as: 'info', :class => Array do - include Representable::JSON::Collection - items - end - - collection :calls, as: 'calls', class: Google::Apis::GenomicsV1::VariantCall, decorator: Google::Apis::GenomicsV1::VariantCall::Representation - - end - end - - class VariantCall - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :call_set_id, as: 'callSetId' - property :call_set_name, as: 'callSetName' - collection :genotype, as: 'genotype' - property :phaseset, as: 'phaseset' - collection :genotype_likelihood, as: 'genotypeLikelihood' - hash :info, as: 'info', :class => Array do - include Representable::JSON::Collection - items - end - - end - end - - class MergeVariantsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :variant_set_id, as: 'variantSetId' - collection :variants, as: 'variants', class: Google::Apis::GenomicsV1::Variant, decorator: Google::Apis::GenomicsV1::Variant::Representation - - hash :info_merge_config, as: 'infoMergeConfig' - end - end - - class SearchCallSetsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :variant_set_ids, as: 'variantSetIds' - property :name, as: 'name' - property :page_token, as: 'pageToken' - property :page_size, as: 'pageSize' - end - end - - class SearchCallSetsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :call_sets, as: 'callSets', class: Google::Apis::GenomicsV1::CallSet, decorator: Google::Apis::GenomicsV1::CallSet::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - class CallSet - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :name, as: 'name' - property :sample_id, as: 'sampleId' - collection :variant_set_ids, as: 'variantSetIds' - property :created, as: 'created' - hash :info, as: 'info', :class => Array do - include Representable::JSON::Collection - items - end - - end - end - - class StreamVariantsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :project_id, as: 'projectId' - property :variant_set_id, as: 'variantSetId' - collection :call_set_ids, as: 'callSetIds' - property :reference_name, as: 'referenceName' - property :start, as: 'start' - property :end, as: 'end' - end - end - - class StreamVariantsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :variants, as: 'variants', class: Google::Apis::GenomicsV1::Variant, decorator: Google::Apis::GenomicsV1::Variant::Representation - - end - end - - class ImportReadGroupSetsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :read_group_set_ids, as: 'readGroupSetIds' - end - end - - class ImportVariantsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :call_set_ids, as: 'callSetIds' - end - end - - class OperationMetadata - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :project_id, as: 'projectId' - property :create_time, as: 'createTime' - property :start_time, as: 'startTime' - property :end_time, as: 'endTime' - hash :request, as: 'request' - collection :events, as: 'events', class: Google::Apis::GenomicsV1::OperationEvent, decorator: Google::Apis::GenomicsV1::OperationEvent::Representation - - property :client_id, as: 'clientId' - hash :runtime_metadata, as: 'runtimeMetadata' - hash :labels, as: 'labels' - end - end - - class OperationEvent - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :start_time, as: 'startTime' - property :end_time, as: 'endTime' - property :description, as: 'description' - end - end - - class RuntimeMetadata - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :compute_engine, as: 'computeEngine', class: Google::Apis::GenomicsV1::ComputeEngine, decorator: Google::Apis::GenomicsV1::ComputeEngine::Representation + property :range, as: 'range', class: Google::Apis::GenomicsV1::Range, decorator: Google::Apis::GenomicsV1::Range::Representation end end @@ -1344,6 +484,801 @@ module Google collection :disk_names, as: 'diskNames' end end + + class ExternalId + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :source_name, as: 'sourceName' + property :id, as: 'id' + end + end + + class Reference + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :ncbi_taxon_id, as: 'ncbiTaxonId' + property :source_uri, as: 'sourceUri' + property :name, as: 'name' + property :md5checksum, as: 'md5checksum' + property :id, as: 'id' + property :length, as: 'length' + collection :source_accessions, as: 'sourceAccessions' + end + end + + class VariantSetMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :number, as: 'number' + property :id, as: 'id' + property :value, as: 'value' + property :key, as: 'key' + property :description, as: 'description' + hash :info, as: 'info', :class => Array do + include Representable::JSON::Collection + items + end + + property :type, as: 'type' + end + end + + class SearchVariantSetsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :dataset_ids, as: 'datasetIds' + property :page_token, as: 'pageToken' + property :page_size, as: 'pageSize' + end + end + + class SearchReferenceSetsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :assembly_id, as: 'assemblyId' + collection :md5checksums, as: 'md5checksums' + collection :accessions, as: 'accessions' + property :page_token, as: 'pageToken' + property :page_size, as: 'pageSize' + end + end + + class SetIamPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :policy, as: 'policy', class: Google::Apis::GenomicsV1::Policy, decorator: Google::Apis::GenomicsV1::Policy::Representation + + end + end + + class MergeVariantsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :info_merge_config, as: 'infoMergeConfig' + property :variant_set_id, as: 'variantSetId' + collection :variants, as: 'variants', class: Google::Apis::GenomicsV1::Variant, decorator: Google::Apis::GenomicsV1::Variant::Representation + + end + end + + class BatchCreateAnnotationsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :annotations, as: 'annotations', class: Google::Apis::GenomicsV1::Annotation, decorator: Google::Apis::GenomicsV1::Annotation::Representation + + property :request_id, as: 'requestId' + end + end + + class Read + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :duplicate_fragment, as: 'duplicateFragment' + property :read_number, as: 'readNumber' + property :read_group_id, as: 'readGroupId' + property :aligned_sequence, as: 'alignedSequence' + hash :info, as: 'info', :class => Array do + include Representable::JSON::Collection + items + end + + property :next_mate_position, as: 'nextMatePosition', class: Google::Apis::GenomicsV1::Position, decorator: Google::Apis::GenomicsV1::Position::Representation + + property :supplementary_alignment, as: 'supplementaryAlignment' + property :proper_placement, as: 'properPlacement' + property :fragment_length, as: 'fragmentLength' + property :failed_vendor_quality_checks, as: 'failedVendorQualityChecks' + collection :aligned_quality, as: 'alignedQuality' + property :alignment, as: 'alignment', class: Google::Apis::GenomicsV1::LinearAlignment, decorator: Google::Apis::GenomicsV1::LinearAlignment::Representation + + property :number_reads, as: 'numberReads' + property :id, as: 'id' + property :secondary_alignment, as: 'secondaryAlignment' + property :fragment_name, as: 'fragmentName' + property :read_group_set_id, as: 'readGroupSetId' + end + end + + class ReferenceSet + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :source_accessions, as: 'sourceAccessions' + property :description, as: 'description' + property :source_uri, as: 'sourceUri' + property :ncbi_taxon_id, as: 'ncbiTaxonId' + collection :reference_ids, as: 'referenceIds' + property :assembly_id, as: 'assemblyId' + property :md5checksum, as: 'md5checksum' + property :id, as: 'id' + end + end + + class CigarUnit + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :reference_sequence, as: 'referenceSequence' + property :operation_length, as: 'operationLength' + property :operation, as: 'operation' + end + end + + class AnnotationSet + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :dataset_id, as: 'datasetId' + property :source_uri, as: 'sourceUri' + property :name, as: 'name' + property :reference_set_id, as: 'referenceSetId' + hash :info, as: 'info', :class => Array do + include Representable::JSON::Collection + items + end + + property :type, as: 'type' + property :id, as: 'id' + end + end + + class Transcript + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :exons, as: 'exons', class: Google::Apis::GenomicsV1::Exon, decorator: Google::Apis::GenomicsV1::Exon::Representation + + property :coding_sequence, as: 'codingSequence', class: Google::Apis::GenomicsV1::CodingSequence, decorator: Google::Apis::GenomicsV1::CodingSequence::Representation + + property :gene_id, as: 'geneId' + end + end + + class Experiment + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :platform_unit, as: 'platformUnit' + property :library_id, as: 'libraryId' + property :instrument_model, as: 'instrumentModel' + property :sequencing_center, as: 'sequencingCenter' + end + end + + class ListDatasetsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :datasets, as: 'datasets', class: Google::Apis::GenomicsV1::Dataset, decorator: Google::Apis::GenomicsV1::Dataset::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class TestIamPermissionsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' + end + end + + class ExportReadGroupSetRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :export_uri, as: 'exportUri' + collection :reference_names, as: 'referenceNames' + property :project_id, as: 'projectId' + end + end + + class Exon + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :start, as: 'start' + property :end, as: 'end' + property :frame, as: 'frame' + end + end + + class CallSet + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :created, as: 'created' + property :sample_id, as: 'sampleId' + property :name, as: 'name' + hash :info, as: 'info', :class => Array do + include Representable::JSON::Collection + items + end + + collection :variant_set_ids, as: 'variantSetIds' + property :id, as: 'id' + end + end + + class SearchAnnotationSetsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :annotation_sets, as: 'annotationSets', class: Google::Apis::GenomicsV1::AnnotationSet, decorator: Google::Apis::GenomicsV1::AnnotationSet::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ImportVariantsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :info_merge_config, as: 'infoMergeConfig' + property :variant_set_id, as: 'variantSetId' + collection :source_uris, as: 'sourceUris' + property :normalize_reference_names, as: 'normalizeReferenceNames' + property :format, as: 'format' + end + end + + class VariantAnnotation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :conditions, as: 'conditions', class: Google::Apis::GenomicsV1::ClinicalCondition, decorator: Google::Apis::GenomicsV1::ClinicalCondition::Representation + + property :effect, as: 'effect' + collection :transcript_ids, as: 'transcriptIds' + property :type, as: 'type' + property :alternate_bases, as: 'alternateBases' + property :gene_id, as: 'geneId' + property :clinical_significance, as: 'clinicalSignificance' + end + end + + class ListCoverageBucketsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :bucket_width, as: 'bucketWidth' + collection :coverage_buckets, as: 'coverageBuckets', class: Google::Apis::GenomicsV1::CoverageBucket, decorator: Google::Apis::GenomicsV1::CoverageBucket::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ExportVariantSetRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :format, as: 'format' + property :bigquery_dataset, as: 'bigqueryDataset' + property :bigquery_table, as: 'bigqueryTable' + collection :call_set_ids, as: 'callSetIds' + property :project_id, as: 'projectId' + end + end + + class SearchAnnotationsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :page_token, as: 'pageToken' + property :page_size, as: 'pageSize' + property :start, as: 'start' + collection :annotation_set_ids, as: 'annotationSetIds' + property :reference_name, as: 'referenceName' + property :reference_id, as: 'referenceId' + property :end, as: 'end' + end + end + + class OperationEvent + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :end_time, as: 'endTime' + property :start_time, as: 'startTime' + property :description, as: 'description' + end + end + + class CodingSequence + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :start, as: 'start' + property :end, as: 'end' + end + end + + class SearchReferencesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :references, as: 'references', class: Google::Apis::GenomicsV1::Reference, decorator: Google::Apis::GenomicsV1::Reference::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class GetIamPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class TestIamPermissionsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' + end + end + + class SearchAnnotationSetsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :page_token, as: 'pageToken' + property :page_size, as: 'pageSize' + collection :dataset_ids, as: 'datasetIds' + collection :types, as: 'types' + property :name, as: 'name' + property :reference_set_id, as: 'referenceSetId' + end + end + + class SearchReadGroupSetsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :read_group_sets, as: 'readGroupSets', class: Google::Apis::GenomicsV1::ReadGroupSet, decorator: Google::Apis::GenomicsV1::ReadGroupSet::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class LinearAlignment + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :position, as: 'position', class: Google::Apis::GenomicsV1::Position, decorator: Google::Apis::GenomicsV1::Position::Representation + + collection :cigar, as: 'cigar', class: Google::Apis::GenomicsV1::CigarUnit, decorator: Google::Apis::GenomicsV1::CigarUnit::Representation + + property :mapping_quality, as: 'mappingQuality' + end + end + + class SearchReferencesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :md5checksums, as: 'md5checksums' + collection :accessions, as: 'accessions' + property :page_token, as: 'pageToken' + property :reference_set_id, as: 'referenceSetId' + property :page_size, as: 'pageSize' + end + end + + class Dataset + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + property :name, as: 'name' + property :project_id, as: 'projectId' + property :id, as: 'id' + end + end + + class ImportVariantsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :call_set_ids, as: 'callSetIds' + end + end + + class ReadGroup + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :reference_set_id, as: 'referenceSetId' + hash :info, as: 'info', :class => Array do + include Representable::JSON::Collection + items + end + + property :id, as: 'id' + property :predicted_insert_size, as: 'predictedInsertSize' + collection :programs, as: 'programs', class: Google::Apis::GenomicsV1::Program, decorator: Google::Apis::GenomicsV1::Program::Representation + + property :description, as: 'description' + property :sample_id, as: 'sampleId' + property :dataset_id, as: 'datasetId' + property :experiment, as: 'experiment', class: Google::Apis::GenomicsV1::Experiment, decorator: Google::Apis::GenomicsV1::Experiment::Representation + + property :name, as: 'name' + end + end + + class ReadGroupSet + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :read_groups, as: 'readGroups', class: Google::Apis::GenomicsV1::ReadGroup, decorator: Google::Apis::GenomicsV1::ReadGroup::Representation + + property :filename, as: 'filename' + property :name, as: 'name' + property :reference_set_id, as: 'referenceSetId' + hash :info, as: 'info', :class => Array do + include Representable::JSON::Collection + items + end + + property :id, as: 'id' + property :dataset_id, as: 'datasetId' + end + end + + class SearchVariantSetsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :variant_sets, as: 'variantSets', class: Google::Apis::GenomicsV1::VariantSet, decorator: Google::Apis::GenomicsV1::VariantSet::Representation + + end + end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class Entry + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :status, as: 'status', class: Google::Apis::GenomicsV1::Status, decorator: Google::Apis::GenomicsV1::Status::Representation + + property :annotation, as: 'annotation', class: Google::Apis::GenomicsV1::Annotation, decorator: Google::Apis::GenomicsV1::Annotation::Representation + + end + end + + class Position + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :reverse_strand, as: 'reverseStrand' + property :position, as: 'position' + property :reference_name, as: 'referenceName' + end + end + + class SearchReferenceSetsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :reference_sets, as: 'referenceSets', class: Google::Apis::GenomicsV1::ReferenceSet, decorator: Google::Apis::GenomicsV1::ReferenceSet::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class SearchCallSetsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :variant_set_ids, as: 'variantSetIds' + property :name, as: 'name' + property :page_token, as: 'pageToken' + property :page_size, as: 'pageSize' + end + end + + class ImportReadGroupSetsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :reference_set_id, as: 'referenceSetId' + property :partition_strategy, as: 'partitionStrategy' + property :dataset_id, as: 'datasetId' + collection :source_uris, as: 'sourceUris' + end + end + + class Policy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :etag, :base64 => true, as: 'etag' + property :version, as: 'version' + collection :bindings, as: 'bindings', class: Google::Apis::GenomicsV1::Binding, decorator: Google::Apis::GenomicsV1::Binding::Representation + + end + end + + class SearchReadsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :reference_name, as: 'referenceName' + collection :read_group_set_ids, as: 'readGroupSetIds' + collection :read_group_ids, as: 'readGroupIds' + property :end, as: 'end' + property :page_token, as: 'pageToken' + property :page_size, as: 'pageSize' + property :start, as: 'start' + end + end + + class CancelOperationRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class Annotation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :transcript, as: 'transcript', class: Google::Apis::GenomicsV1::Transcript, decorator: Google::Apis::GenomicsV1::Transcript::Representation + + property :start, as: 'start' + property :annotation_set_id, as: 'annotationSetId' + property :name, as: 'name' + property :variant, as: 'variant', class: Google::Apis::GenomicsV1::VariantAnnotation, decorator: Google::Apis::GenomicsV1::VariantAnnotation::Representation + + property :reference_id, as: 'referenceId' + property :id, as: 'id' + property :reverse_strand, as: 'reverseStrand' + property :reference_name, as: 'referenceName' + property :type, as: 'type' + hash :info, as: 'info', :class => Array do + include Representable::JSON::Collection + items + end + + property :end, as: 'end' + end + end + + class Operation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :response, as: 'response' + property :name, as: 'name' + property :error, as: 'error', class: Google::Apis::GenomicsV1::Status, decorator: Google::Apis::GenomicsV1::Status::Representation + + hash :metadata, as: 'metadata' + property :done, as: 'done' + end + end + + class RuntimeMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :compute_engine, as: 'computeEngine', class: Google::Apis::GenomicsV1::ComputeEngine, decorator: Google::Apis::GenomicsV1::ComputeEngine::Representation + + end + end + + class ImportReadGroupSetsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :read_group_set_ids, as: 'readGroupSetIds' + end + end + + class VariantCall + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :phaseset, as: 'phaseset' + hash :info, as: 'info', :class => Array do + include Representable::JSON::Collection + items + end + + property :call_set_name, as: 'callSetName' + collection :genotype_likelihood, as: 'genotypeLikelihood' + property :call_set_id, as: 'callSetId' + collection :genotype, as: 'genotype' + end + end + + class SearchVariantsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :variants, as: 'variants', class: Google::Apis::GenomicsV1::Variant, decorator: Google::Apis::GenomicsV1::Variant::Representation + + end + end + + class ListBasesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :sequence, as: 'sequence' + property :offset, as: 'offset' + property :next_page_token, as: 'nextPageToken' + end + end + + class Status + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :message, as: 'message' + collection :details, as: 'details' + property :code, as: 'code' + end + end + + class UndeleteDatasetRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class Binding + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :members, as: 'members' + property :role, as: 'role' + end + end + + class Range + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :start, as: 'start' + property :end, as: 'end' + property :reference_name, as: 'referenceName' + end + end + + class VariantSet + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :metadata, as: 'metadata', class: Google::Apis::GenomicsV1::VariantSetMetadata, decorator: Google::Apis::GenomicsV1::VariantSetMetadata::Representation + + collection :reference_bounds, as: 'referenceBounds', class: Google::Apis::GenomicsV1::ReferenceBound, decorator: Google::Apis::GenomicsV1::ReferenceBound::Representation + + property :id, as: 'id' + property :description, as: 'description' + property :dataset_id, as: 'datasetId' + property :name, as: 'name' + property :reference_set_id, as: 'referenceSetId' + end + end + + class BatchCreateAnnotationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :entries, as: 'entries', class: Google::Apis::GenomicsV1::Entry, decorator: Google::Apis::GenomicsV1::Entry::Representation + + end + end + + class ReferenceBound + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :upper_bound, as: 'upperBound' + property :reference_name, as: 'referenceName' + end + end + + class SearchCallSetsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :call_sets, as: 'callSets', class: Google::Apis::GenomicsV1::CallSet, decorator: Google::Apis::GenomicsV1::CallSet::Representation + + end + end + + class Variant + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :quality, as: 'quality' + property :id, as: 'id' + property :variant_set_id, as: 'variantSetId' + property :reference_name, as: 'referenceName' + hash :info, as: 'info', :class => Array do + include Representable::JSON::Collection + items + end + + property :reference_bases, as: 'referenceBases' + collection :names, as: 'names' + collection :alternate_bases, as: 'alternateBases' + property :end, as: 'end' + collection :filter, as: 'filter' + collection :calls, as: 'calls', class: Google::Apis::GenomicsV1::VariantCall, decorator: Google::Apis::GenomicsV1::VariantCall::Representation + + property :created, as: 'created' + property :start, as: 'start' + end + end + + class ListOperationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :operations, as: 'operations', class: Google::Apis::GenomicsV1::Operation, decorator: Google::Apis::GenomicsV1::Operation::Representation + + end + end + + class OperationMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :events, as: 'events', class: Google::Apis::GenomicsV1::OperationEvent, decorator: Google::Apis::GenomicsV1::OperationEvent::Representation + + property :end_time, as: 'endTime' + property :start_time, as: 'startTime' + hash :request, as: 'request' + hash :runtime_metadata, as: 'runtimeMetadata' + property :create_time, as: 'createTime' + hash :labels, as: 'labels' + property :project_id, as: 'projectId' + property :client_id, as: 'clientId' + end + end + + class SearchVariantsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :page_size, as: 'pageSize' + collection :call_set_ids, as: 'callSetIds' + property :variant_name, as: 'variantName' + property :start, as: 'start' + property :reference_name, as: 'referenceName' + collection :variant_set_ids, as: 'variantSetIds' + property :end, as: 'end' + property :page_token, as: 'pageToken' + property :max_calls, as: 'maxCalls' + end + end + + class SearchReadGroupSetsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :dataset_ids, as: 'datasetIds' + property :name, as: 'name' + property :page_token, as: 'pageToken' + property :page_size, as: 'pageSize' + end + end + + class SearchAnnotationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :annotations, as: 'annotations', class: Google::Apis::GenomicsV1::Annotation, decorator: Google::Apis::GenomicsV1::Annotation::Representation + + end + end + + class ClinicalCondition + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :omim_id, as: 'omimId' + collection :external_ids, as: 'externalIds', class: Google::Apis::GenomicsV1::ExternalId, decorator: Google::Apis::GenomicsV1::ExternalId::Representation + + property :concept_id, as: 'conceptId' + collection :names, as: 'names' + end + end + + class SearchReadsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :alignments, as: 'alignments', class: Google::Apis::GenomicsV1::Read, decorator: Google::Apis::GenomicsV1::Read::Representation + + end + end + + class Program + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + property :command_line, as: 'commandLine' + property :prev_program_id, as: 'prevProgramId' + property :id, as: 'id' + property :version, as: 'version' + end + end end end end diff --git a/generated/google/apis/genomics_v1/service.rb b/generated/google/apis/genomics_v1/service.rb index 8ae3dc920..a24ede9e9 100644 --- a/generated/google/apis/genomics_v1/service.rb +++ b/generated/google/apis/genomics_v1/service.rb @@ -22,7 +22,7 @@ module Google module GenomicsV1 # Genomics API # - # Stores, processes, explores and shares genomic data. + # Upload, process, query, and search Genomics data in the cloud. # # @example # require 'google/apis/genomics_v1' @@ -30,7 +30,7 @@ module Google # Genomics = Google::Apis::GenomicsV1 # Alias the module # service = Genomics::GenomicsService.new # - # @see https://cloud.google.com/genomics/ + # @see https://cloud.google.com/genomics class GenomicsService < Google::Apis::Core::BaseService # @return [String] # API key. Your API key identifies your project and provides you with API access, @@ -46,1204 +46,19 @@ module Google super('https://genomics.googleapis.com/', '') end - # Creates a new annotation set. Caller must have WRITE permission for the - # associated dataset. The following fields are required: * datasetId * - # referenceSetId All other fields may be optionally specified, unless documented - # as being server-generated (for example, the `id` field). - # @param [Google::Apis::GenomicsV1::AnnotationSet] annotation_set_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::AnnotationSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::AnnotationSet] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_annotation_set(annotation_set_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/annotationsets', options) - command.request_representation = Google::Apis::GenomicsV1::AnnotationSet::Representation - command.request_object = annotation_set_object - command.response_representation = Google::Apis::GenomicsV1::AnnotationSet::Representation - command.response_class = Google::Apis::GenomicsV1::AnnotationSet - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets an annotation set. Caller must have READ permission for the associated - # dataset. - # @param [String] annotation_set_id - # The ID of the annotation set to be retrieved. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::AnnotationSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::AnnotationSet] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_annotation_set(annotation_set_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/annotationsets/{annotationSetId}', options) - command.response_representation = Google::Apis::GenomicsV1::AnnotationSet::Representation - command.response_class = Google::Apis::GenomicsV1::AnnotationSet - command.params['annotationSetId'] = annotation_set_id unless annotation_set_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Updates an annotation set. The update must respect all mutability restrictions - # and other invariants described on the annotation set resource. Caller must - # have WRITE permission for the associated dataset. - # @param [String] annotation_set_id - # The ID of the annotation set to be updated. - # @param [Google::Apis::GenomicsV1::AnnotationSet] annotation_set_object - # @param [String] update_mask - # An optional mask specifying which fields to update. Mutable fields are name, - # source_uri, and info. If unspecified, all mutable fields will be updated. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::AnnotationSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::AnnotationSet] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_annotationset(annotation_set_id, annotation_set_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:put, 'v1/annotationsets/{annotationSetId}', options) - command.request_representation = Google::Apis::GenomicsV1::AnnotationSet::Representation - command.request_object = annotation_set_object - command.response_representation = Google::Apis::GenomicsV1::AnnotationSet::Representation - command.response_class = Google::Apis::GenomicsV1::AnnotationSet - command.params['annotationSetId'] = annotation_set_id unless annotation_set_id.nil? - command.query['updateMask'] = update_mask unless update_mask.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes an annotation set. Caller must have WRITE permission for the - # associated annotation set. - # @param [String] annotation_set_id - # The ID of the annotation set to be deleted. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_annotationset(annotation_set_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/annotationsets/{annotationSetId}', options) - command.response_representation = Google::Apis::GenomicsV1::Empty::Representation - command.response_class = Google::Apis::GenomicsV1::Empty - command.params['annotationSetId'] = annotation_set_id unless annotation_set_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Searches for annotation sets that match the given criteria. Annotation sets - # are returned in an unspecified order. This order is consistent, such that two - # queries for the same content (regardless of page size) yield annotation sets - # in the same order across their respective streams of paginated responses. - # Caller must have READ permission for the queried datasets. - # @param [Google::Apis::GenomicsV1::SearchAnnotationSetsRequest] search_annotation_sets_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::SearchAnnotationSetsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::SearchAnnotationSetsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def search_annotationset_annotation_sets(search_annotation_sets_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/annotationsets/search', options) - command.request_representation = Google::Apis::GenomicsV1::SearchAnnotationSetsRequest::Representation - command.request_object = search_annotation_sets_request_object - command.response_representation = Google::Apis::GenomicsV1::SearchAnnotationSetsResponse::Representation - command.response_class = Google::Apis::GenomicsV1::SearchAnnotationSetsResponse - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates a new annotation. Caller must have WRITE permission for the associated - # annotation set. The following fields are required: * annotationSetId * - # referenceName or referenceId ### Transcripts For annotations of type - # TRANSCRIPT, the following fields of transcript must be provided: * exons.start - # * exons.end All other fields may be optionally specified, unless documented as - # being server-generated (for example, the `id` field). The annotated range must - # be no longer than 100Mbp (mega base pairs). See the Annotation resource for - # additional restrictions on each field. - # @param [Google::Apis::GenomicsV1::Annotation] annotation_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Annotation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Annotation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_annotation(annotation_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/annotations', options) - command.request_representation = Google::Apis::GenomicsV1::Annotation::Representation - command.request_object = annotation_object - command.response_representation = Google::Apis::GenomicsV1::Annotation::Representation - command.response_class = Google::Apis::GenomicsV1::Annotation - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates one or more new annotations atomically. All annotations must belong to - # the same annotation set. Caller must have WRITE permission for this annotation - # set. For optimal performance, batch positionally adjacent annotations together. - # If the request has a systemic issue, such as an attempt to write to an - # inaccessible annotation set, the entire RPC will fail accordingly. For lesser - # data issues, when possible an error will be isolated to the corresponding - # batch entry in the response; the remaining well formed annotations will be - # created normally. For details on the requirements for each individual - # annotation resource, see CreateAnnotation. - # @param [Google::Apis::GenomicsV1::BatchCreateAnnotationsRequest] batch_create_annotations_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::BatchCreateAnnotationsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::BatchCreateAnnotationsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_create_annotations(batch_create_annotations_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/annotations:batchCreate', options) - command.request_representation = Google::Apis::GenomicsV1::BatchCreateAnnotationsRequest::Representation - command.request_object = batch_create_annotations_request_object - command.response_representation = Google::Apis::GenomicsV1::BatchCreateAnnotationsResponse::Representation - command.response_class = Google::Apis::GenomicsV1::BatchCreateAnnotationsResponse - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets an annotation. Caller must have READ permission for the associated - # annotation set. - # @param [String] annotation_id - # The ID of the annotation to be retrieved. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Annotation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Annotation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_annotation(annotation_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/annotations/{annotationId}', options) - command.response_representation = Google::Apis::GenomicsV1::Annotation::Representation - command.response_class = Google::Apis::GenomicsV1::Annotation - command.params['annotationId'] = annotation_id unless annotation_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Updates an annotation. Caller must have WRITE permission for the associated - # dataset. - # @param [String] annotation_id - # The ID of the annotation to be updated. - # @param [Google::Apis::GenomicsV1::Annotation] annotation_object - # @param [String] update_mask - # An optional mask specifying which fields to update. Mutable fields are name, - # variant, transcript, and info. If unspecified, all mutable fields will be - # updated. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Annotation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Annotation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_annotation(annotation_id, annotation_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:put, 'v1/annotations/{annotationId}', options) - command.request_representation = Google::Apis::GenomicsV1::Annotation::Representation - command.request_object = annotation_object - command.response_representation = Google::Apis::GenomicsV1::Annotation::Representation - command.response_class = Google::Apis::GenomicsV1::Annotation - command.params['annotationId'] = annotation_id unless annotation_id.nil? - command.query['updateMask'] = update_mask unless update_mask.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes an annotation. Caller must have WRITE permission for the associated - # annotation set. - # @param [String] annotation_id - # The ID of the annotation to be deleted. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_annotation(annotation_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/annotations/{annotationId}', options) - command.response_representation = Google::Apis::GenomicsV1::Empty::Representation - command.response_class = Google::Apis::GenomicsV1::Empty - command.params['annotationId'] = annotation_id unless annotation_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Searches for annotations that match the given criteria. Results are ordered by - # genomic coordinate (by reference sequence, then position). Annotations with - # equivalent genomic coordinates are returned in an unspecified order. This - # order is consistent, such that two queries for the same content (regardless of - # page size) yield annotations in the same order across their respective streams - # of paginated responses. Caller must have READ permission for the queried - # annotation sets. - # @param [Google::Apis::GenomicsV1::SearchAnnotationsRequest] search_annotations_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::SearchAnnotationsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::SearchAnnotationsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def search_annotations(search_annotations_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/annotations/search', options) - command.request_representation = Google::Apis::GenomicsV1::SearchAnnotationsRequest::Representation - command.request_object = search_annotations_request_object - command.response_representation = Google::Apis::GenomicsV1::SearchAnnotationsResponse::Representation - command.response_class = Google::Apis::GenomicsV1::SearchAnnotationsResponse - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Lists datasets within a project. For the definitions of datasets and other - # genomics resources, see [Fundamentals of Google Genomics](https://cloud.google. - # com/genomics/fundamentals-of-google-genomics) - # @param [String] project_id - # Required. The Google Cloud project ID to list datasets for. - # @param [Fixnum] page_size - # The maximum number of results to return in a single page. If unspecified, - # defaults to 50. The maximum value is 1024. - # @param [String] page_token - # The continuation token, which is used to page through large result sets. To - # get the next page of results, set this parameter to the value of ` - # nextPageToken` from the previous response. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::ListDatasetsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::ListDatasetsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_datasets(project_id: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/datasets', options) - command.response_representation = Google::Apis::GenomicsV1::ListDatasetsResponse::Representation - command.response_class = Google::Apis::GenomicsV1::ListDatasetsResponse - command.query['projectId'] = project_id unless project_id.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates a new dataset. For the definitions of datasets and other genomics - # resources, see [Fundamentals of Google Genomics](https://cloud.google.com/ - # genomics/fundamentals-of-google-genomics) - # @param [Google::Apis::GenomicsV1::Dataset] dataset_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Dataset] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Dataset] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_dataset(dataset_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/datasets', options) - command.request_representation = Google::Apis::GenomicsV1::Dataset::Representation - command.request_object = dataset_object - command.response_representation = Google::Apis::GenomicsV1::Dataset::Representation - command.response_class = Google::Apis::GenomicsV1::Dataset - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets a dataset by ID. For the definitions of datasets and other genomics - # resources, see [Fundamentals of Google Genomics](https://cloud.google.com/ - # genomics/fundamentals-of-google-genomics) - # @param [String] dataset_id - # The ID of the dataset. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Dataset] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Dataset] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_dataset(dataset_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/datasets/{datasetId}', options) - command.response_representation = Google::Apis::GenomicsV1::Dataset::Representation - command.response_class = Google::Apis::GenomicsV1::Dataset - command.params['datasetId'] = dataset_id unless dataset_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Updates a dataset. For the definitions of datasets and other genomics - # resources, see [Fundamentals of Google Genomics](https://cloud.google.com/ - # genomics/fundamentals-of-google-genomics) This method supports patch semantics. - # @param [String] dataset_id - # The ID of the dataset to be updated. - # @param [Google::Apis::GenomicsV1::Dataset] dataset_object - # @param [String] update_mask - # An optional mask specifying which fields to update. At this time, the only - # mutable field is name. The only acceptable value is "name". If unspecified, - # all mutable fields will be updated. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Dataset] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Dataset] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def patch_dataset(dataset_id, dataset_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:patch, 'v1/datasets/{datasetId}', options) - command.request_representation = Google::Apis::GenomicsV1::Dataset::Representation - command.request_object = dataset_object - command.response_representation = Google::Apis::GenomicsV1::Dataset::Representation - command.response_class = Google::Apis::GenomicsV1::Dataset - command.params['datasetId'] = dataset_id unless dataset_id.nil? - command.query['updateMask'] = update_mask unless update_mask.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a dataset and all of its contents (all read group sets, reference sets, - # variant sets, call sets, annotation sets, etc.) This is reversible (up to one - # week after the deletion) via the datasets.undelete operation. For the - # definitions of datasets and other genomics resources, see [Fundamentals of - # Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google- - # genomics) - # @param [String] dataset_id - # The ID of the dataset to be deleted. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_dataset(dataset_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/datasets/{datasetId}', options) - command.response_representation = Google::Apis::GenomicsV1::Empty::Representation - command.response_class = Google::Apis::GenomicsV1::Empty - command.params['datasetId'] = dataset_id unless dataset_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Undeletes a dataset by restoring a dataset which was deleted via this API. For - # the definitions of datasets and other genomics resources, see [Fundamentals of - # Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google- - # genomics) This operation is only possible for a week after the deletion - # occurred. - # @param [String] dataset_id - # The ID of the dataset to be undeleted. - # @param [Google::Apis::GenomicsV1::UndeleteDatasetRequest] undelete_dataset_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Dataset] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Dataset] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def undelete_dataset(dataset_id, undelete_dataset_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/datasets/{datasetId}:undelete', options) - command.request_representation = Google::Apis::GenomicsV1::UndeleteDatasetRequest::Representation - command.request_object = undelete_dataset_request_object - command.response_representation = Google::Apis::GenomicsV1::Dataset::Representation - command.response_class = Google::Apis::GenomicsV1::Dataset - command.params['datasetId'] = dataset_id unless dataset_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Sets the access control policy on the specified dataset. Replaces any existing - # policy. For the definitions of datasets and other genomics resources, see [ - # Fundamentals of Google Genomics](https://cloud.google.com/genomics/ - # fundamentals-of-google-genomics) See Setting a Policy for more information. - # @param [String] resource - # REQUIRED: The resource for which policy is being specified. Format is ` - # datasets/`. - # @param [Google::Apis::GenomicsV1::SetIamPolicyRequest] set_iam_policy_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Policy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Policy] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_dataset_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options) - command.request_representation = Google::Apis::GenomicsV1::SetIamPolicyRequest::Representation - command.request_object = set_iam_policy_request_object - command.response_representation = Google::Apis::GenomicsV1::Policy::Representation - command.response_class = Google::Apis::GenomicsV1::Policy - command.params['resource'] = resource unless resource.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets the access control policy for the dataset. This is empty if the policy or - # resource does not exist. See Getting a Policy for more information. For the - # definitions of datasets and other genomics resources, see [Fundamentals of - # Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google- - # genomics) - # @param [String] resource - # REQUIRED: The resource for which policy is being specified. Format is ` - # datasets/`. - # @param [Google::Apis::GenomicsV1::GetIamPolicyRequest] get_iam_policy_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Policy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Policy] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_dataset_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options) - command.request_representation = Google::Apis::GenomicsV1::GetIamPolicyRequest::Representation - command.request_object = get_iam_policy_request_object - command.response_representation = Google::Apis::GenomicsV1::Policy::Representation - command.response_class = Google::Apis::GenomicsV1::Policy - command.params['resource'] = resource unless resource.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Returns permissions that a caller has on the specified resource. See Testing - # Permissions for more information. For the definitions of datasets and other - # genomics resources, see [Fundamentals of Google Genomics](https://cloud.google. - # com/genomics/fundamentals-of-google-genomics) - # @param [String] resource - # REQUIRED: The resource for which policy is being specified. Format is ` - # datasets/`. - # @param [Google::Apis::GenomicsV1::TestIamPermissionsRequest] test_iam_permissions_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::TestIamPermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::TestIamPermissionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def test_dataset_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options) - command.request_representation = Google::Apis::GenomicsV1::TestIamPermissionsRequest::Representation - command.request_object = test_iam_permissions_request_object - command.response_representation = Google::Apis::GenomicsV1::TestIamPermissionsResponse::Representation - command.response_class = Google::Apis::GenomicsV1::TestIamPermissionsResponse - command.params['resource'] = resource unless resource.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Lists operations that match the specified filter in the request. - # @param [String] name - # The name of the operation collection. - # @param [String] filter - # A string for filtering Operations. The following filter fields are supported: * - # projectId: Required. Corresponds to OperationMetadata.projectId. * createTime: - # The time this job was created, in seconds from the [epoch](http://en. - # wikipedia.org/wiki/Unix_time). Can use `>=` and/or `= 1432140000` * `projectId - # = my-project AND createTime >= 1432140000 AND createTime <= 1432150000 AND - # status = RUNNING` * `projectId = my-project AND labels.color = *` * `projectId - # = my-project AND labels.color = red` - # @param [Fixnum] page_size - # The maximum number of results to return. If unspecified, defaults to 256. The - # maximum value is 2048. - # @param [String] page_token - # The standard list page token. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::ListOperationsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::ListOperationsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+name}', options) - command.response_representation = Google::Apis::GenomicsV1::ListOperationsResponse::Representation - command.response_class = Google::Apis::GenomicsV1::ListOperationsResponse - command.params['name'] = name unless name.nil? - command.query['filter'] = filter unless filter.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets the latest state of a long-running operation. Clients can use this method - # to poll the operation result at intervals as recommended by the API service. - # @param [String] name - # The name of the operation resource. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_operation(name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+name}', options) - command.response_representation = Google::Apis::GenomicsV1::Operation::Representation - command.response_class = Google::Apis::GenomicsV1::Operation - command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Starts asynchronous cancellation on a long-running operation. The server makes - # a best effort to cancel the operation, but success is not guaranteed. Clients - # may use Operations.GetOperation or Operations.ListOperations to check whether - # the cancellation succeeded or the operation completed despite cancellation. - # @param [String] name - # The name of the operation resource to be cancelled. - # @param [Google::Apis::GenomicsV1::CancelOperationRequest] cancel_operation_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+name}:cancel', options) - command.request_representation = Google::Apis::GenomicsV1::CancelOperationRequest::Representation - command.request_object = cancel_operation_request_object - command.response_representation = Google::Apis::GenomicsV1::Empty::Representation - command.response_class = Google::Apis::GenomicsV1::Empty - command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates read group sets by asynchronously importing the provided information. - # For the definitions of read group sets and other genomics resources, see [ - # Fundamentals of Google Genomics](https://cloud.google.com/genomics/ - # fundamentals-of-google-genomics) The caller must have WRITE permissions to the - # dataset. ## Notes on [BAM](https://samtools.github.io/hts-specs/SAMv1.pdf) - # import - Tags will be converted to strings - tag types are not preserved - - # Comments (`@CO`) in the input file header will not be preserved - Original - # header order of references (`@SQ`) will not be preserved - Any reverse - # stranded unmapped reads will be reverse complemented, and their qualities ( - # also the "BQ" and "OQ" tags, if any) will be reversed - Unmapped reads will be - # stripped of positional information (reference name and position) - # @param [Google::Apis::GenomicsV1::ImportReadGroupSetsRequest] import_read_group_sets_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def import_read_group_sets(import_read_group_sets_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/readgroupsets:import', options) - command.request_representation = Google::Apis::GenomicsV1::ImportReadGroupSetsRequest::Representation - command.request_object = import_read_group_sets_request_object - command.response_representation = Google::Apis::GenomicsV1::Operation::Representation - command.response_class = Google::Apis::GenomicsV1::Operation - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Exports a read group set to a BAM file in Google Cloud Storage. For the - # definitions of read group sets and other genomics resources, see [Fundamentals - # of Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google- - # genomics) Note that currently there may be some differences between exported - # BAM files and the original BAM file at the time of import. See - # ImportReadGroupSets for caveats. - # @param [String] read_group_set_id - # Required. The ID of the read group set to export. The caller must have READ - # access to this read group set. - # @param [Google::Apis::GenomicsV1::ExportReadGroupSetRequest] export_read_group_set_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def export_read_group_sets(read_group_set_id, export_read_group_set_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/readgroupsets/{readGroupSetId}:export', options) - command.request_representation = Google::Apis::GenomicsV1::ExportReadGroupSetRequest::Representation - command.request_object = export_read_group_set_request_object - command.response_representation = Google::Apis::GenomicsV1::Operation::Representation - command.response_class = Google::Apis::GenomicsV1::Operation - command.params['readGroupSetId'] = read_group_set_id unless read_group_set_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Searches for read group sets matching the criteria. For the definitions of - # read group sets and other genomics resources, see [Fundamentals of Google + # Searches for reference sets which match the given criteria. + # For the definitions of references and other genomics resources, see + # [Fundamentals of Google # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # Implements [GlobalAllianceApi.searchReadGroupSets](https://github.com/ga4gh/ - # schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L135). - # @param [Google::Apis::GenomicsV1::SearchReadGroupSetsRequest] search_read_group_sets_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::SearchReadGroupSetsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::SearchReadGroupSetsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def search_read_group_sets(search_read_group_sets_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/readgroupsets/search', options) - command.request_representation = Google::Apis::GenomicsV1::SearchReadGroupSetsRequest::Representation - command.request_object = search_read_group_sets_request_object - command.response_representation = Google::Apis::GenomicsV1::SearchReadGroupSetsResponse::Representation - command.response_class = Google::Apis::GenomicsV1::SearchReadGroupSetsResponse - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Updates a read group set. For the definitions of read group sets and other - # genomics resources, see [Fundamentals of Google Genomics](https://cloud.google. - # com/genomics/fundamentals-of-google-genomics) This method supports patch - # semantics. - # @param [String] read_group_set_id - # The ID of the read group set to be updated. The caller must have WRITE - # permissions to the dataset associated with this read group set. - # @param [Google::Apis::GenomicsV1::ReadGroupSet] read_group_set_object - # @param [String] update_mask - # An optional mask specifying which fields to update. Supported fields: * name. * - # referenceSetId. Leaving `updateMask` unset is equivalent to specifying all - # mutable fields. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::ReadGroupSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::ReadGroupSet] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def patch_read_group_set(read_group_set_id, read_group_set_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:patch, 'v1/readgroupsets/{readGroupSetId}', options) - command.request_representation = Google::Apis::GenomicsV1::ReadGroupSet::Representation - command.request_object = read_group_set_object - command.response_representation = Google::Apis::GenomicsV1::ReadGroupSet::Representation - command.response_class = Google::Apis::GenomicsV1::ReadGroupSet - command.params['readGroupSetId'] = read_group_set_id unless read_group_set_id.nil? - command.query['updateMask'] = update_mask unless update_mask.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a read group set. For the definitions of read group sets and other - # genomics resources, see [Fundamentals of Google Genomics](https://cloud.google. - # com/genomics/fundamentals-of-google-genomics) - # @param [String] read_group_set_id - # The ID of the read group set to be deleted. The caller must have WRITE - # permissions to the dataset associated with this read group set. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_read_group_set(read_group_set_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/readgroupsets/{readGroupSetId}', options) - command.response_representation = Google::Apis::GenomicsV1::Empty::Representation - command.response_class = Google::Apis::GenomicsV1::Empty - command.params['readGroupSetId'] = read_group_set_id unless read_group_set_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets a read group set by ID. For the definitions of read group sets and other - # genomics resources, see [Fundamentals of Google Genomics](https://cloud.google. - # com/genomics/fundamentals-of-google-genomics) - # @param [String] read_group_set_id - # The ID of the read group set. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::ReadGroupSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::ReadGroupSet] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_read_group_set(read_group_set_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/readgroupsets/{readGroupSetId}', options) - command.response_representation = Google::Apis::GenomicsV1::ReadGroupSet::Representation - command.response_class = Google::Apis::GenomicsV1::ReadGroupSet - command.params['readGroupSetId'] = read_group_set_id unless read_group_set_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Lists fixed width coverage buckets for a read group set, each of which - # correspond to a range of a reference sequence. Each bucket summarizes coverage - # information across its corresponding genomic range. For the definitions of - # read group sets and other genomics resources, see [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # Coverage is defined as the number of reads which are aligned to a given base - # in the reference sequence. Coverage buckets are available at several - # precomputed bucket widths, enabling retrieval of various coverage 'zoom levels' - # . The caller must have READ permissions for the target read group set. - # @param [String] read_group_set_id - # Required. The ID of the read group set over which coverage is requested. - # @param [String] reference_name - # The name of the reference to query, within the reference set associated with - # this query. Optional. - # @param [String] start - # The start position of the range on the reference, 0-based inclusive. If - # specified, `referenceName` must also be specified. Defaults to 0. - # @param [String] end_ - # The end position of the range on the reference, 0-based exclusive. If - # specified, `referenceName` must also be specified. If unset or 0, defaults to - # the length of the reference. - # @param [String] target_bucket_width - # The desired width of each reported coverage bucket in base pairs. This will be - # rounded down to the nearest precomputed bucket width; the value of which is - # returned as `bucketWidth` in the response. Defaults to infinity (each bucket - # spans an entire reference sequence) or the length of the target range, if - # specified. The smallest precomputed `bucketWidth` is currently 2048 base pairs; - # this is subject to change. - # @param [String] page_token - # The continuation token, which is used to page through large result sets. To - # get the next page of results, set this parameter to the value of ` - # nextPageToken` from the previous response. - # @param [Fixnum] page_size - # The maximum number of results to return in a single page. If unspecified, - # defaults to 1024. The maximum value is 2048. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::ListCoverageBucketsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::ListCoverageBucketsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_coverage_buckets(read_group_set_id, reference_name: nil, start: nil, end_: nil, target_bucket_width: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/readgroupsets/{readGroupSetId}/coveragebuckets', options) - command.response_representation = Google::Apis::GenomicsV1::ListCoverageBucketsResponse::Representation - command.response_class = Google::Apis::GenomicsV1::ListCoverageBucketsResponse - command.params['readGroupSetId'] = read_group_set_id unless read_group_set_id.nil? - command.query['referenceName'] = reference_name unless reference_name.nil? - command.query['start'] = start unless start.nil? - command.query['end'] = end_ unless end_.nil? - command.query['targetBucketWidth'] = target_bucket_width unless target_bucket_width.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets a list of reads for one or more read group sets. For the definitions of - # read group sets and other genomics resources, see [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # Reads search operates over a genomic coordinate space of reference sequence & - # position defined over the reference sequences to which the requested read - # group sets are aligned. If a target positional range is specified, search - # returns all reads whose alignment to the reference genome overlap the range. A - # query which specifies only read group set IDs yields all reads in those read - # group sets, including unmapped reads. All reads returned (including reads on - # subsequent pages) are ordered by genomic coordinate (by reference sequence, - # then position). Reads with equivalent genomic coordinates are returned in an - # unspecified order. This order is consistent, such that two queries for the - # same content (regardless of page size) yield reads in the same order across - # their respective streams of paginated responses. Implements [GlobalAllianceApi. - # searchReads](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/ - # avro/readmethods.avdl#L85). - # @param [Google::Apis::GenomicsV1::SearchReadsRequest] search_reads_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::SearchReadsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::SearchReadsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def search_reads(search_reads_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/reads/search', options) - command.request_representation = Google::Apis::GenomicsV1::SearchReadsRequest::Representation - command.request_object = search_reads_request_object - command.response_representation = Google::Apis::GenomicsV1::SearchReadsResponse::Representation - command.response_class = Google::Apis::GenomicsV1::SearchReadsResponse - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Returns a stream of all the reads matching the search request, ordered by - # reference name, position, and ID. - # @param [Google::Apis::GenomicsV1::StreamReadsRequest] stream_reads_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::StreamReadsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::StreamReadsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def stream_reads(stream_reads_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/reads:stream', options) - command.request_representation = Google::Apis::GenomicsV1::StreamReadsRequest::Representation - command.request_object = stream_reads_request_object - command.response_representation = Google::Apis::GenomicsV1::StreamReadsResponse::Representation - command.response_class = Google::Apis::GenomicsV1::StreamReadsResponse - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Searches for reference sets which match the given criteria. For the - # definitions of references and other genomics resources, see [Fundamentals of - # Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google- - # genomics) Implements [GlobalAllianceApi.searchReferenceSets](https://github. - # com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl# - # L71) + # Implements + # [GlobalAllianceApi.searchReferenceSets](https://github.com/ga4gh/schemas/blob/ + # v0.5.1/src/main/resources/avro/referencemethods.avdl#L71) # @param [Google::Apis::GenomicsV1::SearchReferenceSetsRequest] search_reference_sets_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1256,29 +71,31 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def search_reference_sets(search_reference_sets_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def search_reference_sets(search_reference_sets_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/referencesets/search', options) command.request_representation = Google::Apis::GenomicsV1::SearchReferenceSetsRequest::Representation command.request_object = search_reference_sets_request_object command.response_representation = Google::Apis::GenomicsV1::SearchReferenceSetsResponse::Representation command.response_class = Google::Apis::GenomicsV1::SearchReferenceSetsResponse - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end - # Gets a reference set. For the definitions of references and other genomics - # resources, see [Fundamentals of Google Genomics](https://cloud.google.com/ - # genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi. - # getReferenceSet](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/ - # resources/avro/referencemethods.avdl#L83). + # Gets a reference set. + # For the definitions of references and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # Implements + # [GlobalAllianceApi.getReferenceSet](https://github.com/ga4gh/schemas/blob/v0.5. + # 1/src/main/resources/avro/referencemethods.avdl#L83). # @param [String] reference_set_id # The ID of the reference set. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1291,580 +108,379 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_reference_set(reference_set_id, fields: nil, quota_user: nil, options: nil, &block) + def get_reference_set(reference_set_id, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/referencesets/{referenceSetId}', options) command.response_representation = Google::Apis::GenomicsV1::ReferenceSet::Representation command.response_class = Google::Apis::GenomicsV1::ReferenceSet command.params['referenceSetId'] = reference_set_id unless reference_set_id.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end - # Searches for references which match the given criteria. For the definitions of - # references and other genomics resources, see [Fundamentals of Google Genomics]( - # https://cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [ - # GlobalAllianceApi.searchReferences](https://github.com/ga4gh/schemas/blob/v0.5. - # 1/src/main/resources/avro/referencemethods.avdl#L146). - # @param [Google::Apis::GenomicsV1::SearchReferencesRequest] search_references_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. + # Creates read group sets by asynchronously importing the provided + # information. + # For the definitions of read group sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # The caller must have WRITE permissions to the dataset. + # ## Notes on [BAM](https://samtools.github.io/hts-specs/SAMv1.pdf) import + # - Tags will be converted to strings - tag types are not preserved + # - Comments (`@CO`) in the input file header will not be preserved + # - Original header order of references (`@SQ`) will not be preserved + # - Any reverse stranded unmapped reads will be reverse complemented, and + # their qualities (also the "BQ" and "OQ" tags, if any) will be reversed + # - Unmapped reads will be stripped of positional information (reference name + # and position) + # @param [Google::Apis::GenomicsV1::ImportReadGroupSetsRequest] import_read_group_sets_request_object # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::SearchReferencesResponse] parsed result object + # @yieldparam result [Google::Apis::GenomicsV1::Operation] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::GenomicsV1::SearchReferencesResponse] + # @return [Google::Apis::GenomicsV1::Operation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def search_references(search_references_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/references/search', options) - command.request_representation = Google::Apis::GenomicsV1::SearchReferencesRequest::Representation - command.request_object = search_references_request_object - command.response_representation = Google::Apis::GenomicsV1::SearchReferencesResponse::Representation - command.response_class = Google::Apis::GenomicsV1::SearchReferencesResponse - command.query['fields'] = fields unless fields.nil? + def import_read_group_sets(import_read_group_sets_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/readgroupsets:import', options) + command.request_representation = Google::Apis::GenomicsV1::ImportReadGroupSetsRequest::Representation + command.request_object = import_read_group_sets_request_object + command.response_representation = Google::Apis::GenomicsV1::Operation::Representation + command.response_class = Google::Apis::GenomicsV1::Operation command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end - # Gets a reference. For the definitions of references and other genomics - # resources, see [Fundamentals of Google Genomics](https://cloud.google.com/ - # genomics/fundamentals-of-google-genomics) Implements [GlobalAllianceApi. - # getReference](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/ - # avro/referencemethods.avdl#L158). - # @param [String] reference_id - # The ID of the reference. - # @param [String] fields - # Selector specifying which fields to include in a partial response. + # Deletes a read group set. + # For the definitions of read group sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] read_group_set_id + # The ID of the read group set to be deleted. The caller must have WRITE + # permissions to the dataset associated with this read group set. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Reference] parsed result object + # @yieldparam result [Google::Apis::GenomicsV1::Empty] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::GenomicsV1::Reference] + # @return [Google::Apis::GenomicsV1::Empty] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_reference(reference_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/references/{referenceId}', options) - command.response_representation = Google::Apis::GenomicsV1::Reference::Representation - command.response_class = Google::Apis::GenomicsV1::Reference - command.params['referenceId'] = reference_id unless reference_id.nil? - command.query['fields'] = fields unless fields.nil? + def delete_read_group_set(read_group_set_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/readgroupsets/{readGroupSetId}', options) + command.response_representation = Google::Apis::GenomicsV1::Empty::Representation + command.response_class = Google::Apis::GenomicsV1::Empty + command.params['readGroupSetId'] = read_group_set_id unless read_group_set_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end - # Lists the bases in a reference, optionally restricted to a range. For the - # definitions of references and other genomics resources, see [Fundamentals of - # Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google- - # genomics) Implements [GlobalAllianceApi.getReferenceBases](https://github.com/ - # ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L221). - # @param [String] reference_id - # The ID of the reference. - # @param [String] start_position - # The start position (0-based) of this query. Defaults to 0. - # @param [String] end_position - # The end position (0-based, exclusive) of this query. Defaults to the length of - # this reference. + # Exports a read group set to a BAM file in Google Cloud Storage. + # For the definitions of read group sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # Note that currently there may be some differences between exported BAM + # files and the original BAM file at the time of import. See + # ImportReadGroupSets + # for caveats. + # @param [String] read_group_set_id + # Required. The ID of the read group set to export. The caller must have + # READ access to this read group set. + # @param [Google::Apis::GenomicsV1::ExportReadGroupSetRequest] export_read_group_set_request_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def export_read_group_sets(read_group_set_id, export_read_group_set_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/readgroupsets/{readGroupSetId}:export', options) + command.request_representation = Google::Apis::GenomicsV1::ExportReadGroupSetRequest::Representation + command.request_object = export_read_group_set_request_object + command.response_representation = Google::Apis::GenomicsV1::Operation::Representation + command.response_class = Google::Apis::GenomicsV1::Operation + command.params['readGroupSetId'] = read_group_set_id unless read_group_set_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Searches for read group sets matching the criteria. + # For the definitions of read group sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # Implements + # [GlobalAllianceApi.searchReadGroupSets](https://github.com/ga4gh/schemas/blob/ + # v0.5.1/src/main/resources/avro/readmethods.avdl#L135). + # @param [Google::Apis::GenomicsV1::SearchReadGroupSetsRequest] search_read_group_sets_request_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::SearchReadGroupSetsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::SearchReadGroupSetsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def search_read_group_sets(search_read_group_sets_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/readgroupsets/search', options) + command.request_representation = Google::Apis::GenomicsV1::SearchReadGroupSetsRequest::Representation + command.request_object = search_read_group_sets_request_object + command.response_representation = Google::Apis::GenomicsV1::SearchReadGroupSetsResponse::Representation + command.response_class = Google::Apis::GenomicsV1::SearchReadGroupSetsResponse + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Updates a read group set. + # For the definitions of read group sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # This method supports patch semantics. + # @param [String] read_group_set_id + # The ID of the read group set to be updated. The caller must have WRITE + # permissions to the dataset associated with this read group set. + # @param [Google::Apis::GenomicsV1::ReadGroupSet] read_group_set_object + # @param [String] update_mask + # An optional mask specifying which fields to update. Supported fields: + # * name. + # * referenceSetId. + # Leaving `updateMask` unset is equivalent to specifying all mutable + # fields. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::ReadGroupSet] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::ReadGroupSet] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_read_group_set(read_group_set_id, read_group_set_object = nil, update_mask: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/readgroupsets/{readGroupSetId}', options) + command.request_representation = Google::Apis::GenomicsV1::ReadGroupSet::Representation + command.request_object = read_group_set_object + command.response_representation = Google::Apis::GenomicsV1::ReadGroupSet::Representation + command.response_class = Google::Apis::GenomicsV1::ReadGroupSet + command.params['readGroupSetId'] = read_group_set_id unless read_group_set_id.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets a read group set by ID. + # For the definitions of read group sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] read_group_set_id + # The ID of the read group set. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::ReadGroupSet] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::ReadGroupSet] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_read_group_set(read_group_set_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/readgroupsets/{readGroupSetId}', options) + command.response_representation = Google::Apis::GenomicsV1::ReadGroupSet::Representation + command.response_class = Google::Apis::GenomicsV1::ReadGroupSet + command.params['readGroupSetId'] = read_group_set_id unless read_group_set_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Lists fixed width coverage buckets for a read group set, each of which + # correspond to a range of a reference sequence. Each bucket summarizes + # coverage information across its corresponding genomic range. + # For the definitions of read group sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # Coverage is defined as the number of reads which are aligned to a given + # base in the reference sequence. Coverage buckets are available at several + # precomputed bucket widths, enabling retrieval of various coverage 'zoom + # levels'. The caller must have READ permissions for the target read group + # set. + # @param [String] read_group_set_id + # Required. The ID of the read group set over which coverage is requested. + # @param [String] end_ + # The end position of the range on the reference, 0-based exclusive. If + # specified, `referenceName` must also be specified. If unset or 0, defaults + # to the length of the reference. # @param [String] page_token - # The continuation token, which is used to page through large result sets. To - # get the next page of results, set this parameter to the value of ` - # nextPageToken` from the previous response. + # The continuation token, which is used to page through large result sets. + # To get the next page of results, set this parameter to the value of + # `nextPageToken` from the previous response. # @param [Fixnum] page_size - # The maximum number of bases to return in a single page. If unspecified, - # defaults to 200Kbp (kilo base pairs). The maximum value is 10Mbp (mega base - # pairs). - # @param [String] fields - # Selector specifying which fields to include in a partial response. + # The maximum number of results to return in a single page. If unspecified, + # defaults to 1024. The maximum value is 2048. + # @param [String] start + # The start position of the range on the reference, 0-based inclusive. If + # specified, `referenceName` must also be specified. Defaults to 0. + # @param [String] target_bucket_width + # The desired width of each reported coverage bucket in base pairs. This + # will be rounded down to the nearest precomputed bucket width; the value + # of which is returned as `bucketWidth` in the response. Defaults + # to infinity (each bucket spans an entire reference sequence) or the length + # of the target range, if specified. The smallest precomputed + # `bucketWidth` is currently 2048 base pairs; this is subject to + # change. + # @param [String] reference_name + # The name of the reference to query, within the reference set associated + # with this query. Optional. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::ListBasesResponse] parsed result object + # @yieldparam result [Google::Apis::GenomicsV1::ListCoverageBucketsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::GenomicsV1::ListBasesResponse] + # @return [Google::Apis::GenomicsV1::ListCoverageBucketsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_reference_bases(reference_id, start_position: nil, end_position: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/references/{referenceId}/bases', options) - command.response_representation = Google::Apis::GenomicsV1::ListBasesResponse::Representation - command.response_class = Google::Apis::GenomicsV1::ListBasesResponse - command.params['referenceId'] = reference_id unless reference_id.nil? - command.query['start'] = start_position unless start_position.nil? - command.query['end'] = end_position unless end_position.nil? + def list_coverage_buckets(read_group_set_id, end_: nil, page_token: nil, page_size: nil, start: nil, target_bucket_width: nil, reference_name: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/readgroupsets/{readGroupSetId}/coveragebuckets', options) + command.response_representation = Google::Apis::GenomicsV1::ListCoverageBucketsResponse::Representation + command.response_class = Google::Apis::GenomicsV1::ListCoverageBucketsResponse + command.params['readGroupSetId'] = read_group_set_id unless read_group_set_id.nil? + command.query['end'] = end_ unless end_.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['fields'] = fields unless fields.nil? + command.query['start'] = start unless start.nil? + command.query['targetBucketWidth'] = target_bucket_width unless target_bucket_width.nil? + command.query['referenceName'] = reference_name unless reference_name.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end - # Creates variant data by asynchronously importing the provided information. For - # the definitions of variant sets and other genomics resources, see [ - # Fundamentals of Google Genomics](https://cloud.google.com/genomics/ - # fundamentals-of-google-genomics) The variants for import will be merged with - # any existing variant that matches its reference sequence, start, end, - # reference bases, and alternative bases. If no such variant exists, a new one - # will be created. When variants are merged, the call information from the new - # variant is added to the existing variant, and Variant info fields are merged - # as specified in infoMergeConfig. As a special case, for single-sample VCF - # files, QUAL and FILTER fields will be moved to the call level; these are - # sometimes interpreted in a call-specific context. Imported VCF headers are - # appended to the metadata already in a variant set. - # @param [Google::Apis::GenomicsV1::ImportVariantsRequest] import_variants_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def import_variants(import_variants_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/variants:import', options) - command.request_representation = Google::Apis::GenomicsV1::ImportVariantsRequest::Representation - command.request_object = import_variants_request_object - command.response_representation = Google::Apis::GenomicsV1::Operation::Representation - command.response_class = Google::Apis::GenomicsV1::Operation - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets a list of variants matching the criteria. For the definitions of variants - # and other genomics resources, see [Fundamentals of Google Genomics](https:// - # cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [ - # GlobalAllianceApi.searchVariants](https://github.com/ga4gh/schemas/blob/v0.5.1/ - # src/main/resources/avro/variantmethods.avdl#L126). - # @param [Google::Apis::GenomicsV1::SearchVariantsRequest] search_variants_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::SearchVariantsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::SearchVariantsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def search_variants(search_variants_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/variants/search', options) - command.request_representation = Google::Apis::GenomicsV1::SearchVariantsRequest::Representation - command.request_object = search_variants_request_object - command.response_representation = Google::Apis::GenomicsV1::SearchVariantsResponse::Representation - command.response_class = Google::Apis::GenomicsV1::SearchVariantsResponse - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates a new variant. For the definitions of variants and other genomics - # resources, see [Fundamentals of Google Genomics](https://cloud.google.com/ - # genomics/fundamentals-of-google-genomics) - # @param [Google::Apis::GenomicsV1::Variant] variant_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Variant] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Variant] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_variant(variant_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/variants', options) - command.request_representation = Google::Apis::GenomicsV1::Variant::Representation - command.request_object = variant_object - command.response_representation = Google::Apis::GenomicsV1::Variant::Representation - command.response_class = Google::Apis::GenomicsV1::Variant - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Updates a variant. For the definitions of variants and other genomics - # resources, see [Fundamentals of Google Genomics](https://cloud.google.com/ - # genomics/fundamentals-of-google-genomics) This method supports patch semantics. - # Returns the modified variant without its calls. - # @param [String] variant_id - # The ID of the variant to be updated. - # @param [Google::Apis::GenomicsV1::Variant] variant_object - # @param [String] update_mask - # An optional mask specifying which fields to update. At this time, mutable - # fields are names and info. Acceptable values are "names" and "info". If - # unspecified, all mutable fields will be updated. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Variant] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Variant] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def patch_variant(variant_id, variant_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:patch, 'v1/variants/{variantId}', options) - command.request_representation = Google::Apis::GenomicsV1::Variant::Representation - command.request_object = variant_object - command.response_representation = Google::Apis::GenomicsV1::Variant::Representation - command.response_class = Google::Apis::GenomicsV1::Variant - command.params['variantId'] = variant_id unless variant_id.nil? - command.query['updateMask'] = update_mask unless update_mask.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a variant. For the definitions of variants and other genomics - # resources, see [Fundamentals of Google Genomics](https://cloud.google.com/ - # genomics/fundamentals-of-google-genomics) - # @param [String] variant_id - # The ID of the variant to be deleted. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_variant(variant_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/variants/{variantId}', options) - command.response_representation = Google::Apis::GenomicsV1::Empty::Representation - command.response_class = Google::Apis::GenomicsV1::Empty - command.params['variantId'] = variant_id unless variant_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets a variant by ID. For the definitions of variants and other genomics - # resources, see [Fundamentals of Google Genomics](https://cloud.google.com/ - # genomics/fundamentals-of-google-genomics) - # @param [String] variant_id - # The ID of the variant. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Variant] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Variant] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_variant(variant_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/variants/{variantId}', options) - command.response_representation = Google::Apis::GenomicsV1::Variant::Representation - command.response_class = Google::Apis::GenomicsV1::Variant - command.params['variantId'] = variant_id unless variant_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Merges the given variants with existing variants. For the definitions of - # variants and other genomics resources, see [Fundamentals of Google Genomics]( - # https://cloud.google.com/genomics/fundamentals-of-google-genomics) Each - # variant will be merged with an existing variant that matches its reference - # sequence, start, end, reference bases, and alternative bases. If no such - # variant exists, a new one will be created. When variants are merged, the call - # information from the new variant is added to the existing variant. Variant - # info fields are merged as specified in the infoMergeConfig field of the - # MergeVariantsRequest. Please exercise caution when using this method! It is - # easy to introduce mistakes in existing variants and difficult to back out of - # them. For example, suppose you were trying to merge a new variant with an - # existing one and both variants contain calls that belong to callsets with the - # same callset ID. // Existing variant - irrelevant fields trimmed for clarity ` - # "variantSetId": "10473108253681171589", "referenceName": "1", "start": "10582", - # "referenceBases": "G", "alternateBases": [ "A" ], "calls": [ ` "callSetId": " - # 10473108253681171589-0", "callSetName": "CALLSET0", "genotype": [ 0, 1 ], ` ] ` - # // New variant with conflicting call information ` "variantSetId": " - # 10473108253681171589", "referenceName": "1", "start": "10582", "referenceBases" - # : "G", "alternateBases": [ "A" ], "calls": [ ` "callSetId": " - # 10473108253681171589-0", "callSetName": "CALLSET0", "genotype": [ 1, 1 ], ` ] ` - # The resulting merged variant would overwrite the existing calls with those - # from the new variant: ` "variantSetId": "10473108253681171589", "referenceName" - # : "1", "start": "10582", "referenceBases": "G", "alternateBases": [ "A" ], " - # calls": [ ` "callSetId": "10473108253681171589-0", "callSetName": "CALLSET0", " - # genotype": [ 1, 1 ], ` ] ` This may be the desired outcome, but it is up to - # the user to determine if if that is indeed the case. - # @param [Google::Apis::GenomicsV1::MergeVariantsRequest] merge_variants_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def merge_variants(merge_variants_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/variants:merge', options) - command.request_representation = Google::Apis::GenomicsV1::MergeVariantsRequest::Representation - command.request_object = merge_variants_request_object - command.response_representation = Google::Apis::GenomicsV1::Empty::Representation - command.response_class = Google::Apis::GenomicsV1::Empty - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Returns a stream of all the variants matching the search request, ordered by - # reference name, position, and ID. - # @param [Google::Apis::GenomicsV1::StreamVariantsRequest] stream_variants_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::StreamVariantsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::StreamVariantsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def stream_variants(stream_variants_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/variants:stream', options) - command.request_representation = Google::Apis::GenomicsV1::StreamVariantsRequest::Representation - command.request_object = stream_variants_request_object - command.response_representation = Google::Apis::GenomicsV1::StreamVariantsResponse::Representation - command.response_class = Google::Apis::GenomicsV1::StreamVariantsResponse - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates a new variant set. For the definitions of variant sets and other - # genomics resources, see [Fundamentals of Google Genomics](https://cloud.google. - # com/genomics/fundamentals-of-google-genomics) The provided variant set must - # have a valid `datasetId` set - all other fields are optional. Note that the ` - # id` field will be ignored, as this is assigned by the server. - # @param [Google::Apis::GenomicsV1::VariantSet] variant_set_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::VariantSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::VariantSet] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_variantset(variant_set_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/variantsets', options) - command.request_representation = Google::Apis::GenomicsV1::VariantSet::Representation - command.request_object = variant_set_object - command.response_representation = Google::Apis::GenomicsV1::VariantSet::Representation - command.response_class = Google::Apis::GenomicsV1::VariantSet - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Exports variant set data to an external destination. For the definitions of - # variant sets and other genomics resources, see [Fundamentals of Google + # Gets a list of reads for one or more read group sets. + # For the definitions of read group sets and other genomics resources, see + # [Fundamentals of Google # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # @param [String] variant_set_id - # Required. The ID of the variant set that contains variant data which should be - # exported. The caller must have READ access to this variant set. - # @param [Google::Apis::GenomicsV1::ExportVariantSetRequest] export_variant_set_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. + # Reads search operates over a genomic coordinate space of reference sequence + # & position defined over the reference sequences to which the requested + # read group sets are aligned. + # If a target positional range is specified, search returns all reads whose + # alignment to the reference genome overlap the range. A query which + # specifies only read group set IDs yields all reads in those read group + # sets, including unmapped reads. + # All reads returned (including reads on subsequent pages) are ordered by + # genomic coordinate (by reference sequence, then position). Reads with + # equivalent genomic coordinates are returned in an unspecified order. This + # order is consistent, such that two queries for the same content (regardless + # of page size) yield reads in the same order across their respective streams + # of paginated responses. + # Implements + # [GlobalAllianceApi.searchReads](https://github.com/ga4gh/schemas/blob/v0.5.1/ + # src/main/resources/avro/readmethods.avdl#L85). + # @param [Google::Apis::GenomicsV1::SearchReadsRequest] search_reads_request_object # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Operation] parsed result object + # @yieldparam result [Google::Apis::GenomicsV1::SearchReadsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::GenomicsV1::Operation] + # @return [Google::Apis::GenomicsV1::SearchReadsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def export_variant_set(variant_set_id, export_variant_set_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/variantsets/{variantSetId}:export', options) - command.request_representation = Google::Apis::GenomicsV1::ExportVariantSetRequest::Representation - command.request_object = export_variant_set_request_object - command.response_representation = Google::Apis::GenomicsV1::Operation::Representation - command.response_class = Google::Apis::GenomicsV1::Operation - command.params['variantSetId'] = variant_set_id unless variant_set_id.nil? - command.query['fields'] = fields unless fields.nil? + def search_reads(search_reads_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/reads/search', options) + command.request_representation = Google::Apis::GenomicsV1::SearchReadsRequest::Representation + command.request_object = search_reads_request_object + command.response_representation = Google::Apis::GenomicsV1::SearchReadsResponse::Representation + command.response_class = Google::Apis::GenomicsV1::SearchReadsResponse command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end - # Gets a variant set by ID. For the definitions of variant sets and other - # genomics resources, see [Fundamentals of Google Genomics](https://cloud.google. - # com/genomics/fundamentals-of-google-genomics) - # @param [String] variant_set_id - # Required. The ID of the variant set. - # @param [String] fields - # Selector specifying which fields to include in a partial response. + # Deletes a call set. + # For the definitions of call sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] call_set_id + # The ID of the call set to be deleted. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::VariantSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::VariantSet] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_variantset(variant_set_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/variantsets/{variantSetId}', options) - command.response_representation = Google::Apis::GenomicsV1::VariantSet::Representation - command.response_class = Google::Apis::GenomicsV1::VariantSet - command.params['variantSetId'] = variant_set_id unless variant_set_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Returns a list of all variant sets matching search criteria. For the - # definitions of variant sets and other genomics resources, see [Fundamentals of - # Google Genomics](https://cloud.google.com/genomics/fundamentals-of-google- - # genomics) Implements [GlobalAllianceApi.searchVariantSets](https://github.com/ - # ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L49). - # @param [Google::Apis::GenomicsV1::SearchVariantSetsRequest] search_variant_sets_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::SearchVariantSetsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::SearchVariantSetsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def search_variant_sets(search_variant_sets_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/variantsets/search', options) - command.request_representation = Google::Apis::GenomicsV1::SearchVariantSetsRequest::Representation - command.request_object = search_variant_sets_request_object - command.response_representation = Google::Apis::GenomicsV1::SearchVariantSetsResponse::Representation - command.response_class = Google::Apis::GenomicsV1::SearchVariantSetsResponse - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a variant set including all variants, call sets, and calls within. - # This is not reversible. For the definitions of variant sets and other genomics - # resources, see [Fundamentals of Google Genomics](https://cloud.google.com/ - # genomics/fundamentals-of-google-genomics) - # @param [String] variant_set_id - # The ID of the variant set to be deleted. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1877,67 +493,29 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_variantset(variant_set_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/variantsets/{variantSetId}', options) + def delete_call_set(call_set_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/callsets/{callSetId}', options) command.response_representation = Google::Apis::GenomicsV1::Empty::Representation command.response_class = Google::Apis::GenomicsV1::Empty - command.params['variantSetId'] = variant_set_id unless variant_set_id.nil? - command.query['fields'] = fields unless fields.nil? + command.params['callSetId'] = call_set_id unless call_set_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end - # Updates a variant set using patch semantics. For the definitions of variant - # sets and other genomics resources, see [Fundamentals of Google Genomics](https: - # //cloud.google.com/genomics/fundamentals-of-google-genomics) - # @param [String] variant_set_id - # The ID of the variant to be updated (must already exist). - # @param [Google::Apis::GenomicsV1::VariantSet] variant_set_object - # @param [String] update_mask - # An optional mask specifying which fields to update. Supported fields: * - # metadata. * name. * description. Leaving `updateMask` unset is equivalent to - # specifying all mutable fields. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::VariantSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::VariantSet] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def patch_variantset(variant_set_id, variant_set_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:patch, 'v1/variantsets/{variantSetId}', options) - command.request_representation = Google::Apis::GenomicsV1::VariantSet::Representation - command.request_object = variant_set_object - command.response_representation = Google::Apis::GenomicsV1::VariantSet::Representation - command.response_class = Google::Apis::GenomicsV1::VariantSet - command.params['variantSetId'] = variant_set_id unless variant_set_id.nil? - command.query['updateMask'] = update_mask unless update_mask.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets a list of call sets matching the criteria. For the definitions of call - # sets and other genomics resources, see [Fundamentals of Google Genomics](https: - # //cloud.google.com/genomics/fundamentals-of-google-genomics) Implements [ - # GlobalAllianceApi.searchCallSets](https://github.com/ga4gh/schemas/blob/v0.5.1/ - # src/main/resources/avro/variantmethods.avdl#L178). + # Gets a list of call sets matching the criteria. + # For the definitions of call sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # Implements + # [GlobalAllianceApi.searchCallSets](https://github.com/ga4gh/schemas/blob/v0.5. + # 1/src/main/resources/avro/variantmethods.avdl#L178). # @param [Google::Apis::GenomicsV1::SearchCallSetsRequest] search_call_sets_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1950,64 +528,35 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def search_call_sets(search_call_sets_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def search_call_sets(search_call_sets_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/callsets/search', options) command.request_representation = Google::Apis::GenomicsV1::SearchCallSetsRequest::Representation command.request_object = search_call_sets_request_object command.response_representation = Google::Apis::GenomicsV1::SearchCallSetsResponse::Representation command.response_class = Google::Apis::GenomicsV1::SearchCallSetsResponse - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end - # Creates a new call set. For the definitions of call sets and other genomics - # resources, see [Fundamentals of Google Genomics](https://cloud.google.com/ - # genomics/fundamentals-of-google-genomics) - # @param [Google::Apis::GenomicsV1::CallSet] call_set_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::CallSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::CallSet] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_call_set(call_set_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/callsets', options) - command.request_representation = Google::Apis::GenomicsV1::CallSet::Representation - command.request_object = call_set_object - command.response_representation = Google::Apis::GenomicsV1::CallSet::Representation - command.response_class = Google::Apis::GenomicsV1::CallSet - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Updates a call set. For the definitions of call sets and other genomics - # resources, see [Fundamentals of Google Genomics](https://cloud.google.com/ - # genomics/fundamentals-of-google-genomics) This method supports patch semantics. + # Updates a call set. + # For the definitions of call sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # This method supports patch semantics. # @param [String] call_set_id # The ID of the call set to be updated. # @param [Google::Apis::GenomicsV1::CallSet] call_set_object # @param [String] update_mask # An optional mask specifying which fields to update. At this time, the only - # mutable field is name. The only acceptable value is "name". If unspecified, - # all mutable fields will be updated. - # @param [String] fields - # Selector specifying which fields to include in a partial response. + # mutable field is name. The only + # acceptable value is "name". If unspecified, all mutable fields will be + # updated. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -2020,7 +569,7 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def patch_call_set(call_set_id, call_set_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + def patch_call_set(call_set_id, call_set_object = nil, update_mask: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/callsets/{callSetId}', options) command.request_representation = Google::Apis::GenomicsV1::CallSet::Representation command.request_object = call_set_object @@ -2028,21 +577,86 @@ module Google command.response_class = Google::Apis::GenomicsV1::CallSet command.params['callSetId'] = call_set_id unless call_set_id.nil? command.query['updateMask'] = update_mask unless update_mask.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end - # Deletes a call set. For the definitions of call sets and other genomics - # resources, see [Fundamentals of Google Genomics](https://cloud.google.com/ - # genomics/fundamentals-of-google-genomics) + # Gets a call set by ID. + # For the definitions of call sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) # @param [String] call_set_id - # The ID of the call set to be deleted. - # @param [String] fields - # Selector specifying which fields to include in a partial response. + # The ID of the call set. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::CallSet] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::CallSet] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_call_set(call_set_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/callsets/{callSetId}', options) + command.response_representation = Google::Apis::GenomicsV1::CallSet::Representation + command.response_class = Google::Apis::GenomicsV1::CallSet + command.params['callSetId'] = call_set_id unless call_set_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Creates a new call set. + # For the definitions of call sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [Google::Apis::GenomicsV1::CallSet] call_set_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::CallSet] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::CallSet] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_call_set(call_set_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/callsets', options) + command.request_representation = Google::Apis::GenomicsV1::CallSet::Representation + command.request_object = call_set_object + command.response_representation = Google::Apis::GenomicsV1::CallSet::Representation + command.response_class = Google::Apis::GenomicsV1::CallSet + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Deletes an annotation set. Caller must have WRITE permission + # for the associated annotation set. + # @param [String] annotation_set_id + # The ID of the annotation set to be deleted. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -2055,45 +669,1529 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_call_set(call_set_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/callsets/{callSetId}', options) + def delete_annotationset(annotation_set_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/annotationsets/{annotationSetId}', options) command.response_representation = Google::Apis::GenomicsV1::Empty::Representation command.response_class = Google::Apis::GenomicsV1::Empty - command.params['callSetId'] = call_set_id unless call_set_id.nil? - command.query['fields'] = fields unless fields.nil? + command.params['annotationSetId'] = annotation_set_id unless annotation_set_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end - # Gets a call set by ID. For the definitions of call sets and other genomics - # resources, see [Fundamentals of Google Genomics](https://cloud.google.com/ - # genomics/fundamentals-of-google-genomics) - # @param [String] call_set_id - # The ID of the call set. - # @param [String] fields - # Selector specifying which fields to include in a partial response. + # Searches for annotation sets that match the given criteria. Annotation sets + # are returned in an unspecified order. This order is consistent, such that + # two queries for the same content (regardless of page size) yield annotation + # sets in the same order across their respective streams of paginated + # responses. Caller must have READ permission for the queried datasets. + # @param [Google::Apis::GenomicsV1::SearchAnnotationSetsRequest] search_annotation_sets_request_object # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::CallSet] parsed result object + # @yieldparam result [Google::Apis::GenomicsV1::SearchAnnotationSetsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::GenomicsV1::CallSet] + # @return [Google::Apis::GenomicsV1::SearchAnnotationSetsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_call_set(call_set_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/callsets/{callSetId}', options) - command.response_representation = Google::Apis::GenomicsV1::CallSet::Representation - command.response_class = Google::Apis::GenomicsV1::CallSet - command.params['callSetId'] = call_set_id unless call_set_id.nil? - command.query['fields'] = fields unless fields.nil? + def search_annotationset_annotation_sets(search_annotation_sets_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/annotationsets/search', options) + command.request_representation = Google::Apis::GenomicsV1::SearchAnnotationSetsRequest::Representation + command.request_object = search_annotation_sets_request_object + command.response_representation = Google::Apis::GenomicsV1::SearchAnnotationSetsResponse::Representation + command.response_class = Google::Apis::GenomicsV1::SearchAnnotationSetsResponse command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets an annotation set. Caller must have READ permission for + # the associated dataset. + # @param [String] annotation_set_id + # The ID of the annotation set to be retrieved. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::AnnotationSet] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::AnnotationSet] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_annotation_set(annotation_set_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/annotationsets/{annotationSetId}', options) + command.response_representation = Google::Apis::GenomicsV1::AnnotationSet::Representation + command.response_class = Google::Apis::GenomicsV1::AnnotationSet + command.params['annotationSetId'] = annotation_set_id unless annotation_set_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Updates an annotation set. The update must respect all mutability + # restrictions and other invariants described on the annotation set resource. + # Caller must have WRITE permission for the associated dataset. + # @param [String] annotation_set_id + # The ID of the annotation set to be updated. + # @param [Google::Apis::GenomicsV1::AnnotationSet] annotation_set_object + # @param [String] update_mask + # An optional mask specifying which fields to update. Mutable fields are + # name, + # source_uri, and + # info. If unspecified, all + # mutable fields will be updated. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::AnnotationSet] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::AnnotationSet] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_annotationset(annotation_set_id, annotation_set_object = nil, update_mask: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:put, 'v1/annotationsets/{annotationSetId}', options) + command.request_representation = Google::Apis::GenomicsV1::AnnotationSet::Representation + command.request_object = annotation_set_object + command.response_representation = Google::Apis::GenomicsV1::AnnotationSet::Representation + command.response_class = Google::Apis::GenomicsV1::AnnotationSet + command.params['annotationSetId'] = annotation_set_id unless annotation_set_id.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Creates a new annotation set. Caller must have WRITE permission for the + # associated dataset. + # The following fields are required: + # * datasetId + # * referenceSetId + # All other fields may be optionally specified, unless documented as being + # server-generated (for example, the `id` field). + # @param [Google::Apis::GenomicsV1::AnnotationSet] annotation_set_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::AnnotationSet] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::AnnotationSet] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_annotation_set(annotation_set_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/annotationsets', options) + command.request_representation = Google::Apis::GenomicsV1::AnnotationSet::Representation + command.request_object = annotation_set_object + command.response_representation = Google::Apis::GenomicsV1::AnnotationSet::Representation + command.response_class = Google::Apis::GenomicsV1::AnnotationSet + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Creates a new variant. + # For the definitions of variants and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [Google::Apis::GenomicsV1::Variant] variant_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Variant] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Variant] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_variant(variant_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/variants', options) + command.request_representation = Google::Apis::GenomicsV1::Variant::Representation + command.request_object = variant_object + command.response_representation = Google::Apis::GenomicsV1::Variant::Representation + command.response_class = Google::Apis::GenomicsV1::Variant + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets a list of variants matching the criteria. + # For the definitions of variants and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # Implements + # [GlobalAllianceApi.searchVariants](https://github.com/ga4gh/schemas/blob/v0.5. + # 1/src/main/resources/avro/variantmethods.avdl#L126). + # @param [Google::Apis::GenomicsV1::SearchVariantsRequest] search_variants_request_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::SearchVariantsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::SearchVariantsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def search_variants(search_variants_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/variants/search', options) + command.request_representation = Google::Apis::GenomicsV1::SearchVariantsRequest::Representation + command.request_object = search_variants_request_object + command.response_representation = Google::Apis::GenomicsV1::SearchVariantsResponse::Representation + command.response_class = Google::Apis::GenomicsV1::SearchVariantsResponse + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Updates a variant. + # For the definitions of variants and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # This method supports patch semantics. Returns the modified variant without + # its calls. + # @param [String] variant_id + # The ID of the variant to be updated. + # @param [Google::Apis::GenomicsV1::Variant] variant_object + # @param [String] update_mask + # An optional mask specifying which fields to update. At this time, mutable + # fields are names and + # info. Acceptable values are "names" and + # "info". If unspecified, all mutable fields will be updated. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Variant] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Variant] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_variant(variant_id, variant_object = nil, update_mask: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/variants/{variantId}', options) + command.request_representation = Google::Apis::GenomicsV1::Variant::Representation + command.request_object = variant_object + command.response_representation = Google::Apis::GenomicsV1::Variant::Representation + command.response_class = Google::Apis::GenomicsV1::Variant + command.params['variantId'] = variant_id unless variant_id.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets a variant by ID. + # For the definitions of variants and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] variant_id + # The ID of the variant. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Variant] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Variant] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_variant(variant_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/variants/{variantId}', options) + command.response_representation = Google::Apis::GenomicsV1::Variant::Representation + command.response_class = Google::Apis::GenomicsV1::Variant + command.params['variantId'] = variant_id unless variant_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a variant. + # For the definitions of variants and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] variant_id + # The ID of the variant to be deleted. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_variant(variant_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/variants/{variantId}', options) + command.response_representation = Google::Apis::GenomicsV1::Empty::Representation + command.response_class = Google::Apis::GenomicsV1::Empty + command.params['variantId'] = variant_id unless variant_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Creates variant data by asynchronously importing the provided information. + # For the definitions of variant sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # The variants for import will be merged with any existing variant that + # matches its reference sequence, start, end, reference bases, and + # alternative bases. If no such variant exists, a new one will be created. + # When variants are merged, the call information from the new variant + # is added to the existing variant, and Variant info fields are merged + # as specified in + # infoMergeConfig. + # As a special case, for single-sample VCF files, QUAL and FILTER fields will + # be moved to the call level; these are sometimes interpreted in a + # call-specific context. + # Imported VCF headers are appended to the metadata already in a variant set. + # @param [Google::Apis::GenomicsV1::ImportVariantsRequest] import_variants_request_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def import_variants(import_variants_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/variants:import', options) + command.request_representation = Google::Apis::GenomicsV1::ImportVariantsRequest::Representation + command.request_object = import_variants_request_object + command.response_representation = Google::Apis::GenomicsV1::Operation::Representation + command.response_class = Google::Apis::GenomicsV1::Operation + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Merges the given variants with existing variants. + # For the definitions of variants and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # Each variant will be + # merged with an existing variant that matches its reference sequence, + # start, end, reference bases, and alternative bases. If no such variant + # exists, a new one will be created. + # When variants are merged, the call information from the new variant + # is added to the existing variant. Variant info fields are merged as + # specified in the + # infoMergeConfig + # field of the MergeVariantsRequest. + # Please exercise caution when using this method! It is easy to introduce + # mistakes in existing variants and difficult to back out of them. For + # example, + # suppose you were trying to merge a new variant with an existing one and + # both + # variants contain calls that belong to callsets with the same callset ID. + # // Existing variant - irrelevant fields trimmed for clarity + # ` + # "variantSetId": "10473108253681171589", + # "referenceName": "1", + # "start": "10582", + # "referenceBases": "G", + # "alternateBases": [ + # "A" + # ], + # "calls": [ + # ` + # "callSetId": "10473108253681171589-0", + # "callSetName": "CALLSET0", + # "genotype": [ + # 0, + # 1 + # ], + # ` + # ] + # ` + # // New variant with conflicting call information + # ` + # "variantSetId": "10473108253681171589", + # "referenceName": "1", + # "start": "10582", + # "referenceBases": "G", + # "alternateBases": [ + # "A" + # ], + # "calls": [ + # ` + # "callSetId": "10473108253681171589-0", + # "callSetName": "CALLSET0", + # "genotype": [ + # 1, + # 1 + # ], + # ` + # ] + # ` + # The resulting merged variant would overwrite the existing calls with those + # from the new variant: + # ` + # "variantSetId": "10473108253681171589", + # "referenceName": "1", + # "start": "10582", + # "referenceBases": "G", + # "alternateBases": [ + # "A" + # ], + # "calls": [ + # ` + # "callSetId": "10473108253681171589-0", + # "callSetName": "CALLSET0", + # "genotype": [ + # 1, + # 1 + # ], + # ` + # ] + # ` + # This may be the desired outcome, but it is up to the user to determine if + # if that is indeed the case. + # @param [Google::Apis::GenomicsV1::MergeVariantsRequest] merge_variants_request_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def merge_variants(merge_variants_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/variants:merge', options) + command.request_representation = Google::Apis::GenomicsV1::MergeVariantsRequest::Representation + command.request_object = merge_variants_request_object + command.response_representation = Google::Apis::GenomicsV1::Empty::Representation + command.response_class = Google::Apis::GenomicsV1::Empty + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Searches for references which match the given criteria. + # For the definitions of references and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # Implements + # [GlobalAllianceApi.searchReferences](https://github.com/ga4gh/schemas/blob/v0. + # 5.1/src/main/resources/avro/referencemethods.avdl#L146). + # @param [Google::Apis::GenomicsV1::SearchReferencesRequest] search_references_request_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::SearchReferencesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::SearchReferencesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def search_references(search_references_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/references/search', options) + command.request_representation = Google::Apis::GenomicsV1::SearchReferencesRequest::Representation + command.request_object = search_references_request_object + command.response_representation = Google::Apis::GenomicsV1::SearchReferencesResponse::Representation + command.response_class = Google::Apis::GenomicsV1::SearchReferencesResponse + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets a reference. + # For the definitions of references and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # Implements + # [GlobalAllianceApi.getReference](https://github.com/ga4gh/schemas/blob/v0.5.1/ + # src/main/resources/avro/referencemethods.avdl#L158). + # @param [String] reference_id + # The ID of the reference. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Reference] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Reference] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_reference(reference_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/references/{referenceId}', options) + command.response_representation = Google::Apis::GenomicsV1::Reference::Representation + command.response_class = Google::Apis::GenomicsV1::Reference + command.params['referenceId'] = reference_id unless reference_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Lists the bases in a reference, optionally restricted to a range. + # For the definitions of references and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # Implements + # [GlobalAllianceApi.getReferenceBases](https://github.com/ga4gh/schemas/blob/v0. + # 5.1/src/main/resources/avro/referencemethods.avdl#L221). + # @param [String] reference_id + # The ID of the reference. + # @param [String] start_position + # The start position (0-based) of this query. Defaults to 0. + # @param [String] end_position + # The end position (0-based, exclusive) of this query. Defaults to the length + # of this reference. + # @param [String] page_token + # The continuation token, which is used to page through large result sets. + # To get the next page of results, set this parameter to the value of + # `nextPageToken` from the previous response. + # @param [Fixnum] page_size + # The maximum number of bases to return in a single page. If unspecified, + # defaults to 200Kbp (kilo base pairs). The maximum value is 10Mbp (mega base + # pairs). + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::ListBasesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::ListBasesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_reference_bases(reference_id, start_position: nil, end_position: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/references/{referenceId}/bases', options) + command.response_representation = Google::Apis::GenomicsV1::ListBasesResponse::Representation + command.response_class = Google::Apis::GenomicsV1::ListBasesResponse + command.params['referenceId'] = reference_id unless reference_id.nil? + command.query['start'] = start_position unless start_position.nil? + command.query['end'] = end_position unless end_position.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets the access control policy for the dataset. This is empty if the + # policy or resource does not exist. + # See Getting a + # Policy for more information. + # For the definitions of datasets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] resource + # REQUIRED: The resource for which policy is being specified. Format is + # `datasets/`. + # @param [Google::Apis::GenomicsV1::GetIamPolicyRequest] get_iam_policy_request_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Policy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_dataset_iam_policy(resource, get_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options) + command.request_representation = Google::Apis::GenomicsV1::GetIamPolicyRequest::Representation + command.request_object = get_iam_policy_request_object + command.response_representation = Google::Apis::GenomicsV1::Policy::Representation + command.response_class = Google::Apis::GenomicsV1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Updates a dataset. + # For the definitions of datasets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # This method supports patch semantics. + # @param [String] dataset_id + # The ID of the dataset to be updated. + # @param [Google::Apis::GenomicsV1::Dataset] dataset_object + # @param [String] update_mask + # An optional mask specifying which fields to update. At this time, the only + # mutable field is name. The only + # acceptable value is "name". If unspecified, all mutable fields will be + # updated. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Dataset] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Dataset] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_dataset(dataset_id, dataset_object = nil, update_mask: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/datasets/{datasetId}', options) + command.request_representation = Google::Apis::GenomicsV1::Dataset::Representation + command.request_object = dataset_object + command.response_representation = Google::Apis::GenomicsV1::Dataset::Representation + command.response_class = Google::Apis::GenomicsV1::Dataset + command.params['datasetId'] = dataset_id unless dataset_id.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets a dataset by ID. + # For the definitions of datasets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] dataset_id + # The ID of the dataset. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Dataset] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Dataset] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_dataset(dataset_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/datasets/{datasetId}', options) + command.response_representation = Google::Apis::GenomicsV1::Dataset::Representation + command.response_class = Google::Apis::GenomicsV1::Dataset + command.params['datasetId'] = dataset_id unless dataset_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Undeletes a dataset by restoring a dataset which was deleted via this API. + # For the definitions of datasets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # This operation is only possible for a week after the deletion occurred. + # @param [String] dataset_id + # The ID of the dataset to be undeleted. + # @param [Google::Apis::GenomicsV1::UndeleteDatasetRequest] undelete_dataset_request_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Dataset] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Dataset] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def undelete_dataset(dataset_id, undelete_dataset_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/datasets/{datasetId}:undelete', options) + command.request_representation = Google::Apis::GenomicsV1::UndeleteDatasetRequest::Representation + command.request_object = undelete_dataset_request_object + command.response_representation = Google::Apis::GenomicsV1::Dataset::Representation + command.response_class = Google::Apis::GenomicsV1::Dataset + command.params['datasetId'] = dataset_id unless dataset_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Returns permissions that a caller has on the specified resource. + # See Testing + # Permissions for more information. + # For the definitions of datasets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] resource + # REQUIRED: The resource for which policy is being specified. Format is + # `datasets/`. + # @param [Google::Apis::GenomicsV1::TestIamPermissionsRequest] test_iam_permissions_request_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::TestIamPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::TestIamPermissionsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def test_dataset_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options) + command.request_representation = Google::Apis::GenomicsV1::TestIamPermissionsRequest::Representation + command.request_object = test_iam_permissions_request_object + command.response_representation = Google::Apis::GenomicsV1::TestIamPermissionsResponse::Representation + command.response_class = Google::Apis::GenomicsV1::TestIamPermissionsResponse + command.params['resource'] = resource unless resource.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a dataset and all of its contents (all read group sets, + # reference sets, variant sets, call sets, annotation sets, etc.) + # This is reversible (up to one week after the deletion) via + # the + # datasets.undelete + # operation. + # For the definitions of datasets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] dataset_id + # The ID of the dataset to be deleted. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_dataset(dataset_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/datasets/{datasetId}', options) + command.response_representation = Google::Apis::GenomicsV1::Empty::Representation + command.response_class = Google::Apis::GenomicsV1::Empty + command.params['datasetId'] = dataset_id unless dataset_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Lists datasets within a project. + # For the definitions of datasets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] page_token + # The continuation token, which is used to page through large result sets. + # To get the next page of results, set this parameter to the value of + # `nextPageToken` from the previous response. + # @param [Fixnum] page_size + # The maximum number of results to return in a single page. If unspecified, + # defaults to 50. The maximum value is 1024. + # @param [String] project_id + # Required. The Google Cloud project ID to list datasets for. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::ListDatasetsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::ListDatasetsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_datasets(page_token: nil, page_size: nil, project_id: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/datasets', options) + command.response_representation = Google::Apis::GenomicsV1::ListDatasetsResponse::Representation + command.response_class = Google::Apis::GenomicsV1::ListDatasetsResponse + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['projectId'] = project_id unless project_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Sets the access control policy on the specified dataset. Replaces any + # existing policy. + # For the definitions of datasets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # See Setting a + # Policy for more information. + # @param [String] resource + # REQUIRED: The resource for which policy is being specified. Format is + # `datasets/`. + # @param [Google::Apis::GenomicsV1::SetIamPolicyRequest] set_iam_policy_request_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Policy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def set_dataset_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options) + command.request_representation = Google::Apis::GenomicsV1::SetIamPolicyRequest::Representation + command.request_object = set_iam_policy_request_object + command.response_representation = Google::Apis::GenomicsV1::Policy::Representation + command.response_class = Google::Apis::GenomicsV1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Creates a new dataset. + # For the definitions of datasets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [Google::Apis::GenomicsV1::Dataset] dataset_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Dataset] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Dataset] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_dataset(dataset_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/datasets', options) + command.request_representation = Google::Apis::GenomicsV1::Dataset::Representation + command.request_object = dataset_object + command.response_representation = Google::Apis::GenomicsV1::Dataset::Representation + command.response_class = Google::Apis::GenomicsV1::Dataset + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a variant set including all variants, call sets, and calls within. + # This is not reversible. + # For the definitions of variant sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] variant_set_id + # The ID of the variant set to be deleted. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_variantset(variant_set_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/variantsets/{variantSetId}', options) + command.response_representation = Google::Apis::GenomicsV1::Empty::Representation + command.response_class = Google::Apis::GenomicsV1::Empty + command.params['variantSetId'] = variant_set_id unless variant_set_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Creates a new variant set. + # For the definitions of variant sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # The provided variant set must have a valid `datasetId` set - all other + # fields are optional. Note that the `id` field will be ignored, as this is + # assigned by the server. + # @param [Google::Apis::GenomicsV1::VariantSet] variant_set_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::VariantSet] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::VariantSet] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_variantset(variant_set_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/variantsets', options) + command.request_representation = Google::Apis::GenomicsV1::VariantSet::Representation + command.request_object = variant_set_object + command.response_representation = Google::Apis::GenomicsV1::VariantSet::Representation + command.response_class = Google::Apis::GenomicsV1::VariantSet + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Exports variant set data to an external destination. + # For the definitions of variant sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] variant_set_id + # Required. The ID of the variant set that contains variant data which + # should be exported. The caller must have READ access to this variant set. + # @param [Google::Apis::GenomicsV1::ExportVariantSetRequest] export_variant_set_request_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def export_variant_set(variant_set_id, export_variant_set_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/variantsets/{variantSetId}:export', options) + command.request_representation = Google::Apis::GenomicsV1::ExportVariantSetRequest::Representation + command.request_object = export_variant_set_request_object + command.response_representation = Google::Apis::GenomicsV1::Operation::Representation + command.response_class = Google::Apis::GenomicsV1::Operation + command.params['variantSetId'] = variant_set_id unless variant_set_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Returns a list of all variant sets matching search criteria. + # For the definitions of variant sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # Implements + # [GlobalAllianceApi.searchVariantSets](https://github.com/ga4gh/schemas/blob/v0. + # 5.1/src/main/resources/avro/variantmethods.avdl#L49). + # @param [Google::Apis::GenomicsV1::SearchVariantSetsRequest] search_variant_sets_request_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::SearchVariantSetsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::SearchVariantSetsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def search_variant_sets(search_variant_sets_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/variantsets/search', options) + command.request_representation = Google::Apis::GenomicsV1::SearchVariantSetsRequest::Representation + command.request_object = search_variant_sets_request_object + command.response_representation = Google::Apis::GenomicsV1::SearchVariantSetsResponse::Representation + command.response_class = Google::Apis::GenomicsV1::SearchVariantSetsResponse + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets a variant set by ID. + # For the definitions of variant sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] variant_set_id + # Required. The ID of the variant set. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::VariantSet] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::VariantSet] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_variantset(variant_set_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/variantsets/{variantSetId}', options) + command.response_representation = Google::Apis::GenomicsV1::VariantSet::Representation + command.response_class = Google::Apis::GenomicsV1::VariantSet + command.params['variantSetId'] = variant_set_id unless variant_set_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Updates a variant set using patch semantics. + # For the definitions of variant sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] variant_set_id + # The ID of the variant to be updated (must already exist). + # @param [Google::Apis::GenomicsV1::VariantSet] variant_set_object + # @param [String] update_mask + # An optional mask specifying which fields to update. Supported fields: + # * metadata. + # * name. + # * description. + # Leaving `updateMask` unset is equivalent to specifying all mutable + # fields. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::VariantSet] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::VariantSet] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_variantset(variant_set_id, variant_set_object = nil, update_mask: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/variantsets/{variantSetId}', options) + command.request_representation = Google::Apis::GenomicsV1::VariantSet::Representation + command.request_object = variant_set_object + command.response_representation = Google::Apis::GenomicsV1::VariantSet::Representation + command.response_class = Google::Apis::GenomicsV1::VariantSet + command.params['variantSetId'] = variant_set_id unless variant_set_id.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Creates one or more new annotations atomically. All annotations must + # belong to the same annotation set. Caller must have WRITE + # permission for this annotation set. For optimal performance, batch + # positionally adjacent annotations together. + # If the request has a systemic issue, such as an attempt to write to + # an inaccessible annotation set, the entire RPC will fail accordingly. For + # lesser data issues, when possible an error will be isolated to the + # corresponding batch entry in the response; the remaining well formed + # annotations will be created normally. + # For details on the requirements for each individual annotation resource, + # see + # CreateAnnotation. + # @param [Google::Apis::GenomicsV1::BatchCreateAnnotationsRequest] batch_create_annotations_request_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::BatchCreateAnnotationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::BatchCreateAnnotationsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def batch_create_annotations(batch_create_annotations_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/annotations:batchCreate', options) + command.request_representation = Google::Apis::GenomicsV1::BatchCreateAnnotationsRequest::Representation + command.request_object = batch_create_annotations_request_object + command.response_representation = Google::Apis::GenomicsV1::BatchCreateAnnotationsResponse::Representation + command.response_class = Google::Apis::GenomicsV1::BatchCreateAnnotationsResponse + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Searches for annotations that match the given criteria. Results are + # ordered by genomic coordinate (by reference sequence, then position). + # Annotations with equivalent genomic coordinates are returned in an + # unspecified order. This order is consistent, such that two queries for the + # same content (regardless of page size) yield annotations in the same order + # across their respective streams of paginated responses. Caller must have + # READ permission for the queried annotation sets. + # @param [Google::Apis::GenomicsV1::SearchAnnotationsRequest] search_annotations_request_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::SearchAnnotationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::SearchAnnotationsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def search_annotations(search_annotations_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/annotations/search', options) + command.request_representation = Google::Apis::GenomicsV1::SearchAnnotationsRequest::Representation + command.request_object = search_annotations_request_object + command.response_representation = Google::Apis::GenomicsV1::SearchAnnotationsResponse::Representation + command.response_class = Google::Apis::GenomicsV1::SearchAnnotationsResponse + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets an annotation. Caller must have READ permission + # for the associated annotation set. + # @param [String] annotation_id + # The ID of the annotation to be retrieved. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Annotation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Annotation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_annotation(annotation_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/annotations/{annotationId}', options) + command.response_representation = Google::Apis::GenomicsV1::Annotation::Representation + command.response_class = Google::Apis::GenomicsV1::Annotation + command.params['annotationId'] = annotation_id unless annotation_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Updates an annotation. Caller must have + # WRITE permission for the associated dataset. + # @param [String] annotation_id + # The ID of the annotation to be updated. + # @param [Google::Apis::GenomicsV1::Annotation] annotation_object + # @param [String] update_mask + # An optional mask specifying which fields to update. Mutable fields are + # name, + # variant, + # transcript, and + # info. If unspecified, all mutable + # fields will be updated. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Annotation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Annotation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_annotation(annotation_id, annotation_object = nil, update_mask: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:put, 'v1/annotations/{annotationId}', options) + command.request_representation = Google::Apis::GenomicsV1::Annotation::Representation + command.request_object = annotation_object + command.response_representation = Google::Apis::GenomicsV1::Annotation::Representation + command.response_class = Google::Apis::GenomicsV1::Annotation + command.params['annotationId'] = annotation_id unless annotation_id.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Deletes an annotation. Caller must have WRITE permission for + # the associated annotation set. + # @param [String] annotation_id + # The ID of the annotation to be deleted. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_annotation(annotation_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/annotations/{annotationId}', options) + command.response_representation = Google::Apis::GenomicsV1::Empty::Representation + command.response_class = Google::Apis::GenomicsV1::Empty + command.params['annotationId'] = annotation_id unless annotation_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Creates a new annotation. Caller must have WRITE permission + # for the associated annotation set. + # The following fields are required: + # * annotationSetId + # * referenceName or + # referenceId + # ### Transcripts + # For annotations of type TRANSCRIPT, the following fields of + # transcript must be provided: + # * exons.start + # * exons.end + # All other fields may be optionally specified, unless documented as being + # server-generated (for example, the `id` field). The annotated + # range must be no longer than 100Mbp (mega base pairs). See the + # Annotation resource + # for additional restrictions on each field. + # @param [Google::Apis::GenomicsV1::Annotation] annotation_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Annotation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Annotation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_annotation(annotation_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/annotations', options) + command.request_representation = Google::Apis::GenomicsV1::Annotation::Representation + command.request_object = annotation_object + command.response_representation = Google::Apis::GenomicsV1::Annotation::Representation + command.response_class = Google::Apis::GenomicsV1::Annotation + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Starts asynchronous cancellation on a long-running operation. The server makes + # a best effort to cancel the operation, but success is not guaranteed. Clients + # may use Operations.GetOperation or Operations.ListOperations to check whether + # the cancellation succeeded or the operation completed despite cancellation. + # @param [String] name + # The name of the operation resource to be cancelled. + # @param [Google::Apis::GenomicsV1::CancelOperationRequest] cancel_operation_request_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def cancel_operation(name, cancel_operation_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+name}:cancel', options) + command.request_representation = Google::Apis::GenomicsV1::CancelOperationRequest::Representation + command.request_object = cancel_operation_request_object + command.response_representation = Google::Apis::GenomicsV1::Empty::Representation + command.response_class = Google::Apis::GenomicsV1::Empty + command.params['name'] = name unless name.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Lists operations that match the specified filter in the request. + # @param [String] name + # The name of the operation collection. + # @param [String] page_token + # The standard list page token. + # @param [Fixnum] page_size + # The maximum number of results to return. If unspecified, defaults to + # 256. The maximum value is 2048. + # @param [String] filter + # A string for filtering Operations. + # The following filter fields are supported: + # * projectId: Required. Corresponds to + # OperationMetadata.projectId. + # * createTime: The time this job was created, in seconds from the + # [epoch](http://en.wikipedia.org/wiki/Unix_time). Can use `>=` and/or `<=` + # operators. + # * status: Can be `RUNNING`, `SUCCESS`, `FAILURE`, or `CANCELED`. Only + # one status may be specified. + # * labels.key where key is a label key. + # Examples: + # * `projectId = my-project AND createTime >= 1432140000` + # * `projectId = my-project AND createTime >= 1432140000 AND createTime <= + # 1432150000 AND status = RUNNING` + # * `projectId = my-project AND labels.color = *` + # * `projectId = my-project AND labels.color = red` + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::ListOperationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::ListOperationsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_operations(name, page_token: nil, page_size: nil, filter: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::GenomicsV1::ListOperationsResponse::Representation + command.response_class = Google::Apis::GenomicsV1::ListOperationsResponse + command.params['name'] = name unless name.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['filter'] = filter unless filter.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # @param [String] name + # The name of the operation resource. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_operation(name, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::GenomicsV1::Operation::Representation + command.response_class = Google::Apis::GenomicsV1::Operation + command.params['name'] = name unless name.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/gmail_v1.rb b/generated/google/apis/gmail_v1.rb index fd5c7b429..ee9d50c0d 100644 --- a/generated/google/apis/gmail_v1.rb +++ b/generated/google/apis/gmail_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/gmail/api/ module GmailV1 VERSION = 'V1' - REVISION = '20170117' + REVISION = '20170124' # View and manage your mail AUTH_SCOPE = 'https://mail.google.com/' diff --git a/generated/google/apis/logging_v2beta1.rb b/generated/google/apis/logging_v2beta1.rb index 0dbc78a52..d5c67dbd3 100644 --- a/generated/google/apis/logging_v2beta1.rb +++ b/generated/google/apis/logging_v2beta1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/logging/docs/ module LoggingV2beta1 VERSION = 'V2beta1' - REVISION = '20170114' + REVISION = '20170121' # View your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only' diff --git a/generated/google/apis/logging_v2beta1/classes.rb b/generated/google/apis/logging_v2beta1/classes.rb index 9aad362ed..c65182159 100644 --- a/generated/google/apis/logging_v2beta1/classes.rb +++ b/generated/google/apis/logging_v2beta1/classes.rb @@ -22,640 +22,6 @@ module Google module Apis module LoggingV2beta1 - # Describes a logs-based metric. The value of the metric is the number of log - # entries that match a logs filter in a given time interval. - class LogMetric - include Google::Apis::Core::Hashable - - # Output only. The API version that created or updated this metric. The version - # also dictates the syntax of the filter expression. When a value for this field - # is missing, the default value of V2 should be assumed. - # Corresponds to the JSON property `version` - # @return [String] - attr_accessor :version - - # Required. An advanced logs filter which is used to match log entries. Example: - # "resource.type=gae_app AND severity>=ERROR" - # The maximum length of the filter is 20000 characters. - # Corresponds to the JSON property `filter` - # @return [String] - attr_accessor :filter - - # Required. The client-assigned metric identifier. Examples: "error_count", " - # nginx/requests".Metric identifiers are limited to 100 characters and can - # include only the following characters: A-Z, a-z, 0-9, and the special - # characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy - # of name pieces, and it cannot be the first character of the name.The metric - # identifier in this field must not be URL-encoded (https://en.wikipedia.org/ - # wiki/Percent-encoding). However, when the metric identifier appears as the [ - # METRIC_ID] part of a metric_name API parameter, then the metric identifier - # must be URL-encoded. Example: "projects/my-project/metrics/nginx%2Frequests". - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Optional. A description of this metric, which is used in documentation. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @version = args[:version] if args.key?(:version) - @filter = args[:filter] if args.key?(:filter) - @name = args[:name] if args.key?(:name) - @description = args[:description] if args.key?(:description) - end - end - - # Additional information about a potentially long-running operation with which a - # log entry is associated. - class LogEntryOperation - include Google::Apis::Core::Hashable - - # Optional. An arbitrary operation identifier. Log entries with the same - # identifier are assumed to be part of the same operation. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Optional. An arbitrary producer identifier. The combination of id and producer - # must be globally unique. Examples for producer: "MyDivision.MyBigCompany.com", - # "github.com/MyProject/MyApplication". - # Corresponds to the JSON property `producer` - # @return [String] - attr_accessor :producer - - # Optional. Set this to True if this is the first log entry in the operation. - # Corresponds to the JSON property `first` - # @return [Boolean] - attr_accessor :first - alias_method :first?, :first - - # Optional. Set this to True if this is the last log entry in the operation. - # Corresponds to the JSON property `last` - # @return [Boolean] - attr_accessor :last - alias_method :last?, :last - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] if args.key?(:id) - @producer = args[:producer] if args.key?(:producer) - @first = args[:first] if args.key?(:first) - @last = args[:last] if args.key?(:last) - end - end - - # Result returned from WriteLogEntries. empty - class WriteLogEntriesResponse - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # An object representing a resource that can be used for monitoring, logging, - # billing, or other purposes. Examples include virtual machine instances, - # databases, and storage devices such as disks. The type field identifies a - # MonitoredResourceDescriptor object that describes the resource's schema. - # Information in the labels field identifies the actual resource and its - # attributes according to the schema. For example, a particular Compute Engine - # VM instance could be represented by the following object, because the - # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and " - # zone": - # ` "type": "gce_instance", - # "labels": ` "instance_id": "12345678901234", - # "zone": "us-central1-a" `` - class MonitoredResource - include Google::Apis::Core::Hashable - - # Required. Values for all of the labels listed in the associated monitored - # resource descriptor. For example, Cloud SQL databases use the labels " - # database_id" and "zone". - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels - - # Required. The monitored resource type. This field must match the type field of - # a MonitoredResourceDescriptor object. For example, the type of a Cloud SQL - # database is "cloudsql_database". - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @labels = args[:labels] if args.key?(:labels) - @type = args[:type] if args.key?(:type) - end - end - - # Describes a sink used to export log entries to one of the following - # destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a - # Cloud Pub/Sub topic. A logs filter controls which log entries are exported. - # The sink must be created within a project or organization. - class LogSink - include Google::Apis::Core::Hashable - - # Output only. An IAM identity—a service account or group—under - # which Stackdriver Logging writes the exported log entries to the sink's - # destination. This field is set by sinks.create and sinks.update, based on the - # setting of unique_writer_identity in those methods.Until you grant this - # identity write-access to the destination, log entry exports from this sink - # will fail. For more information, see Granting access for a resource. Consult - # the destination service's documentation to determine the appropriate IAM roles - # to assign to the identity. - # Corresponds to the JSON property `writerIdentity` - # @return [String] - attr_accessor :writer_identity - - # Optional. The time at which this sink will begin exporting log entries. Log - # entries are exported only if their timestamp is not earlier than the start - # time. The default value of this field is the time the sink is created or - # updated. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - # Optional. The log entry format to use for this sink's exported log entries. - # The v2 format is used by default. The v1 format is deprecated and should be - # used only as part of a migration effort to v2. See Migration to the v2 API. - # Corresponds to the JSON property `outputVersionFormat` - # @return [String] - attr_accessor :output_version_format - - # Required. The client-assigned sink identifier, unique within the project. - # Example: "my-syslog-errors-to-pubsub". Sink identifiers are limited to 100 - # characters and can include only the following characters: upper and lower-case - # alphanumeric characters, underscores, hyphens, and periods. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Optional. An advanced logs filter. The only exported log entries are those - # that are in the resource owning the sink and that match the filter. The filter - # must use the log entry format specified by the output_version_format parameter. - # For example, in the v2 format: - # logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR - # Corresponds to the JSON property `filter` - # @return [String] - attr_accessor :filter - - # Required. The export destination: - # "storage.googleapis.com/[GCS_BUCKET]" - # "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" - # "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" - # The sink's writer_identity, set when the sink is created, must have permission - # to write to the destination or else the log entries are not exported. For more - # information, see Exporting Logs With Sinks. - # Corresponds to the JSON property `destination` - # @return [String] - attr_accessor :destination - - # Optional. The time at which this sink will stop exporting log entries. Log - # entries are exported only if their timestamp is earlier than the end time. If - # this field is not supplied, there is no end time. If both a start time and an - # end time are provided, then the end time must be later than the start time. - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @writer_identity = args[:writer_identity] if args.key?(:writer_identity) - @start_time = args[:start_time] if args.key?(:start_time) - @output_version_format = args[:output_version_format] if args.key?(:output_version_format) - @name = args[:name] if args.key?(:name) - @filter = args[:filter] if args.key?(:filter) - @destination = args[:destination] if args.key?(:destination) - @end_time = args[:end_time] if args.key?(:end_time) - end - end - - # The parameters to WriteLogEntries. - class WriteLogEntriesRequest - include Google::Apis::Core::Hashable - - # Optional. Default labels that are added to the labels field of all log entries - # in entries. If a log entry already has a label with the same key as a label in - # this parameter, then the log entry's label is not changed. See LogEntry. - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels - - # An object representing a resource that can be used for monitoring, logging, - # billing, or other purposes. Examples include virtual machine instances, - # databases, and storage devices such as disks. The type field identifies a - # MonitoredResourceDescriptor object that describes the resource's schema. - # Information in the labels field identifies the actual resource and its - # attributes according to the schema. For example, a particular Compute Engine - # VM instance could be represented by the following object, because the - # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and " - # zone": - # ` "type": "gce_instance", - # "labels": ` "instance_id": "12345678901234", - # "zone": "us-central1-a" `` - # Corresponds to the JSON property `resource` - # @return [Google::Apis::LoggingV2beta1::MonitoredResource] - attr_accessor :resource - - # Optional. A default log resource name that is assigned to all log entries in - # entries that do not specify a value for log_name: - # "projects/[PROJECT_ID]/logs/[LOG_ID]" - # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog" - # or "organizations/1234567890/logs/cloudresourcemanager.googleapis.com% - # 2Factivity". For more information about log names, see LogEntry. - # Corresponds to the JSON property `logName` - # @return [String] - attr_accessor :log_name - - # Required. The log entries to write. Values supplied for the fields log_name, - # resource, and labels in this entries.write request are added to those log - # entries that do not provide their own values for the fields.To improve - # throughput and to avoid exceeding the quota limit for calls to entries.write, - # you should write multiple log entries at once rather than calling this method - # for each individual log entry. - # Corresponds to the JSON property `entries` - # @return [Array] - attr_accessor :entries - - # Optional. Whether valid entries should be written even if some other entries - # fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any entry is not - # written, the response status will be the error associated with one of the - # failed entries and include error details in the form of - # WriteLogEntriesPartialErrors. - # Corresponds to the JSON property `partialSuccess` - # @return [Boolean] - attr_accessor :partial_success - alias_method :partial_success?, :partial_success - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @labels = args[:labels] if args.key?(:labels) - @resource = args[:resource] if args.key?(:resource) - @log_name = args[:log_name] if args.key?(:log_name) - @entries = args[:entries] if args.key?(:entries) - @partial_success = args[:partial_success] if args.key?(:partial_success) - end - end - - # Result returned from ListLogs. - class ListLogsResponse - include Google::Apis::Core::Hashable - - # A list of log names. For example, "projects/my-project/syslog" or " - # organizations/123/cloudresourcemanager.googleapis.com%2Factivity". - # Corresponds to the JSON property `logNames` - # @return [Array] - attr_accessor :log_names - - # If there might be more results than those appearing in this response, then - # nextPageToken is included. To get the next set of results, call this method - # again using the value of nextPageToken as pageToken. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @log_names = args[:log_names] if args.key?(:log_names) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # A common proto for logging HTTP requests. Only contains semantics defined by - # the HTTP specification. Product-specific logging information MUST be defined - # in a separate message. - class HttpRequest - include Google::Apis::Core::Hashable - - # Whether or not a cache lookup was attempted. - # Corresponds to the JSON property `cacheLookup` - # @return [Boolean] - attr_accessor :cache_lookup - alias_method :cache_lookup?, :cache_lookup - - # Whether or not an entity was served from cache (with or without validation). - # Corresponds to the JSON property `cacheHit` - # @return [Boolean] - attr_accessor :cache_hit - alias_method :cache_hit?, :cache_hit - - # Whether or not the response was validated with the origin server before being - # served from cache. This field is only meaningful if cache_hit is True. - # Corresponds to the JSON property `cacheValidatedWithOriginServer` - # @return [Boolean] - attr_accessor :cache_validated_with_origin_server - alias_method :cache_validated_with_origin_server?, :cache_validated_with_origin_server - - # The response code indicating the status of response. Examples: 200, 404. - # Corresponds to the JSON property `status` - # @return [Fixnum] - attr_accessor :status - - # The referer URL of the request, as defined in HTTP/1.1 Header Field - # Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). - # Corresponds to the JSON property `referer` - # @return [String] - attr_accessor :referer - - # The request processing latency on the server, from the time the request was - # received until the response was sent. - # Corresponds to the JSON property `latency` - # @return [String] - attr_accessor :latency - - # The user agent sent by the client. Example: "Mozilla/4.0 (compatible; MSIE 6.0; - # Windows 98; Q312461; .NET CLR 1.0.3705)". - # Corresponds to the JSON property `userAgent` - # @return [String] - attr_accessor :user_agent - - # The number of HTTP response bytes inserted into cache. Set only when a cache - # fill was attempted. - # Corresponds to the JSON property `cacheFillBytes` - # @return [String] - attr_accessor :cache_fill_bytes - - # The request method. Examples: "GET", "HEAD", "PUT", "POST". - # Corresponds to the JSON property `requestMethod` - # @return [String] - attr_accessor :request_method - - # The size of the HTTP response message sent back to the client, in bytes, - # including the response headers and the response body. - # Corresponds to the JSON property `responseSize` - # @return [String] - attr_accessor :response_size - - # The size of the HTTP request message in bytes, including the request headers - # and the request body. - # Corresponds to the JSON property `requestSize` - # @return [String] - attr_accessor :request_size - - # The scheme (http, https), the host name, the path and the query portion of the - # URL that was requested. Example: "http://example.com/some/info?color=red". - # Corresponds to the JSON property `requestUrl` - # @return [String] - attr_accessor :request_url - - # The IP address (IPv4 or IPv6) of the origin server that the request was sent - # to. - # Corresponds to the JSON property `serverIp` - # @return [String] - attr_accessor :server_ip - - # The IP address (IPv4 or IPv6) of the client that issued the HTTP request. - # Examples: "192.168.1.1", "FE80::0202:B3FF:FE1E:8329". - # Corresponds to the JSON property `remoteIp` - # @return [String] - attr_accessor :remote_ip - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cache_lookup = args[:cache_lookup] if args.key?(:cache_lookup) - @cache_hit = args[:cache_hit] if args.key?(:cache_hit) - @cache_validated_with_origin_server = args[:cache_validated_with_origin_server] if args.key?(:cache_validated_with_origin_server) - @status = args[:status] if args.key?(:status) - @referer = args[:referer] if args.key?(:referer) - @latency = args[:latency] if args.key?(:latency) - @user_agent = args[:user_agent] if args.key?(:user_agent) - @cache_fill_bytes = args[:cache_fill_bytes] if args.key?(:cache_fill_bytes) - @request_method = args[:request_method] if args.key?(:request_method) - @response_size = args[:response_size] if args.key?(:response_size) - @request_size = args[:request_size] if args.key?(:request_size) - @request_url = args[:request_url] if args.key?(:request_url) - @server_ip = args[:server_ip] if args.key?(:server_ip) - @remote_ip = args[:remote_ip] if args.key?(:remote_ip) - end - end - - # Result returned from ListSinks. - class ListSinksResponse - include Google::Apis::Core::Hashable - - # If there might be more results than appear in this response, then - # nextPageToken is included. To get the next set of results, call the same - # method again using the value of nextPageToken as pageToken. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # A list of sinks. - # Corresponds to the JSON property `sinks` - # @return [Array] - attr_accessor :sinks - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @sinks = args[:sinks] if args.key?(:sinks) - end - end - - # A description of a label. - class LabelDescriptor - include Google::Apis::Core::Hashable - - # The label key. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # A human-readable description for the label. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The type of data that can be assigned to the label. - # Corresponds to the JSON property `valueType` - # @return [String] - attr_accessor :value_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @key = args[:key] if args.key?(:key) - @description = args[:description] if args.key?(:description) - @value_type = args[:value_type] if args.key?(:value_type) - end - end - - # An object that describes the schema of a MonitoredResource object using a type - # name and a set of labels. For example, the monitored resource descriptor for - # Google Compute Engine VM instances has a type of "gce_instance" and specifies - # the use of the labels "instance_id" and "zone" to identify particular VM - # instances.Different APIs can support different monitored resource types. APIs - # generally provide a list method that returns the monitored resource - # descriptors used by the API. - class MonitoredResourceDescriptor - include Google::Apis::Core::Hashable - - # Optional. The resource name of the monitored resource descriptor: "projects/` - # project_id`/monitoredResourceDescriptors/`type`" where `type` is the value of - # the type field in this object and `project_id` is a project ID that provides - # API-specific context for accessing the type. APIs that do not use project - # information can use the resource name format "monitoredResourceDescriptors/` - # type`". - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Optional. A concise name for the monitored resource type that might be - # displayed in user interfaces. It should be a Title Cased Noun Phrase, without - # any article or other determiners. For example, "Google Cloud SQL Database". - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # Optional. A detailed description of the monitored resource type that might be - # used in documentation. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Required. The monitored resource type. For example, the type " - # cloudsql_database" represents databases in Google Cloud SQL. The maximum - # length of this value is 256 characters. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Required. A set of labels used to describe instances of this monitored - # resource type. For example, an individual Google Cloud SQL database is - # identified by values for the labels "database_id" and "zone". - # Corresponds to the JSON property `labels` - # @return [Array] - attr_accessor :labels - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - @display_name = args[:display_name] if args.key?(:display_name) - @description = args[:description] if args.key?(:description) - @type = args[:type] if args.key?(:type) - @labels = args[:labels] if args.key?(:labels) - end - end - - # Additional information about the source code location that produced the log - # entry. - class LogEntrySourceLocation - include Google::Apis::Core::Hashable - - # Optional. Line within the source file. 1-based; 0 indicates no line number - # available. - # Corresponds to the JSON property `line` - # @return [String] - attr_accessor :line - - # Optional. Source file name. Depending on the runtime environment, this might - # be a simple name or a fully-qualified name. - # Corresponds to the JSON property `file` - # @return [String] - attr_accessor :file - - # Optional. Human-readable name of the function or method being invoked, with - # optional context such as the class or package name. This information may be - # used in contexts such as the logs viewer, where a file and line number are - # less meaningful. The format can vary by language. For example: qual.if.ied. - # Class.method (Java), dir/package.func (Go), function (Python). - # Corresponds to the JSON property `function` - # @return [String] - attr_accessor :function - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @line = args[:line] if args.key?(:line) - @file = args[:file] if args.key?(:file) - @function = args[:function] if args.key?(:function) - end - end - - # Result returned from ListLogEntries. - class ListLogEntriesResponse - include Google::Apis::Core::Hashable - - # A list of log entries. - # Corresponds to the JSON property `entries` - # @return [Array] - attr_accessor :entries - - # If there might be more results than those appearing in this response, then - # nextPageToken is included. To get the next set of results, call this method - # again using the value of nextPageToken as pageToken.If a value for - # next_page_token appears and the entries field is empty, it means that the - # search found no log entries so far but it did not have time to search all the - # possible log entries. Retry the method with this value for page_token to - # continue the search. Alternatively, consider speeding up the search by - # changing your filter to specify a single log name or resource type, or to - # narrow the time range of the search. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @entries = args[:entries] if args.key?(:entries) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - # Application log line emitted while processing a request. class LogLine include Google::Apis::Core::Hashable @@ -720,35 +86,10 @@ module Google end end - # A generic empty message that you can re-use to avoid defining duplicated empty - # messages in your APIs. A typical example is to use it as the request or the - # response type of an API method. For instance: - # service Foo ` - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # ` - # The JSON representation for Empty is empty JSON object ``. - class Empty - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - # An individual entry in a log. class LogEntry include Google::Apis::Core::Hashable - # Optional. A set of user-defined (key, value) data that provides additional - # information about the log entry. - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels - # Optional. Resource name of the trace associated with the log entry, if any. If # it contains a relative resource name, the name is assumed to be relative to // # tracing.googleapis.com. Example: projects/my-projectid/traces/ @@ -757,6 +98,12 @@ module Google # @return [String] attr_accessor :trace + # Optional. A set of user-defined (key, value) data that provides additional + # information about the log entry. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + # Optional. The severity of the log entry. The default value is LogSeverity. # DEFAULT. # Corresponds to the JSON property `severity` @@ -851,8 +198,8 @@ module Google # Update properties of this object def update!(**args) - @labels = args[:labels] if args.key?(:labels) @trace = args[:trace] if args.key?(:trace) + @labels = args[:labels] if args.key?(:labels) @severity = args[:severity] if args.key?(:severity) @source_location = args[:source_location] if args.key?(:source_location) @timestamp = args[:timestamp] if args.key?(:timestamp) @@ -867,15 +214,29 @@ module Google end end + # A generic empty message that you can re-use to avoid defining duplicated empty + # messages in your APIs. A typical example is to use it as the request or the + # response type of an API method. For instance: + # service Foo ` + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # ` + # The JSON representation for Empty is empty JSON object ``. + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + # Specifies a location in a source code file. class SourceLocation include Google::Apis::Core::Hashable - # Line within the source file. - # Corresponds to the JSON property `line` - # @return [String] - attr_accessor :line - # Source file name. Depending on the runtime environment, this might be a simple # name or a fully-qualified name. # Corresponds to the JSON property `file` @@ -891,15 +252,20 @@ module Google # @return [String] attr_accessor :function_name + # Line within the source file. + # Corresponds to the JSON property `line` + # @return [String] + attr_accessor :line + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @line = args[:line] if args.key?(:line) @file = args[:file] if args.key?(:file) @function_name = args[:function_name] if args.key?(:function_name) + @line = args[:line] if args.key?(:line) end end @@ -907,24 +273,6 @@ module Google class ListLogEntriesRequest include Google::Apis::Core::Hashable - # Optional. How the results should be sorted. Presently, the only permitted - # values are "timestamp asc" (default) and "timestamp desc". The first option - # returns entries in order of increasing values of LogEntry.timestamp (oldest - # first), and the second option returns entries in order of decreasing - # timestamps (newest first). Entries with equal timestamps are returned in order - # of LogEntry.insertId. - # Corresponds to the JSON property `orderBy` - # @return [String] - attr_accessor :order_by - - # Required. Names of one or more resources from which to retrieve log entries: - # "projects/[PROJECT_ID]" - # "organizations/[ORGANIZATION_ID]" - # Projects listed in the project_ids field are added to this list. - # Corresponds to the JSON property `resourceNames` - # @return [Array] - attr_accessor :resource_names - # Optional. A filter that chooses which log entries to return. See Advanced Logs # Filters. Only log entries that match the filter are returned. An empty filter # matches all log entries in the resources listed in resource_names. Referencing @@ -957,18 +305,36 @@ module Google # @return [Fixnum] attr_accessor :page_size + # Optional. How the results should be sorted. Presently, the only permitted + # values are "timestamp asc" (default) and "timestamp desc". The first option + # returns entries in order of increasing values of LogEntry.timestamp (oldest + # first), and the second option returns entries in order of decreasing + # timestamps (newest first). Entries with equal timestamps are returned in order + # of LogEntry.insertId. + # Corresponds to the JSON property `orderBy` + # @return [String] + attr_accessor :order_by + + # Required. Names of one or more resources from which to retrieve log entries: + # "projects/[PROJECT_ID]" + # "organizations/[ORGANIZATION_ID]" + # Projects listed in the project_ids field are added to this list. + # Corresponds to the JSON property `resourceNames` + # @return [Array] + attr_accessor :resource_names + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @order_by = args[:order_by] if args.key?(:order_by) - @resource_names = args[:resource_names] if args.key?(:resource_names) @filter = args[:filter] if args.key?(:filter) @project_ids = args[:project_ids] if args.key?(:project_ids) @page_token = args[:page_token] if args.key?(:page_token) @page_size = args[:page_size] if args.key?(:page_size) + @order_by = args[:order_by] if args.key?(:order_by) + @resource_names = args[:resource_names] if args.key?(:resource_names) end end @@ -977,108 +343,6 @@ module Google class RequestLog include Google::Apis::Core::Hashable - # Version of the application that handled this request. - # Corresponds to the JSON property `versionId` - # @return [String] - attr_accessor :version_id - - # Module of the application that handled this request. - # Corresponds to the JSON property `moduleId` - # @return [String] - attr_accessor :module_id - - # Time when the request finished. - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - # User agent that made the request. - # Corresponds to the JSON property `userAgent` - # @return [String] - attr_accessor :user_agent - - # Whether this was a loading request for the instance. - # Corresponds to the JSON property `wasLoadingRequest` - # @return [Boolean] - attr_accessor :was_loading_request - alias_method :was_loading_request?, :was_loading_request - - # Source code for the application that handled this request. There can be more - # than one source reference per deployed application if source code is - # distributed among multiple repositories. - # Corresponds to the JSON property `sourceReference` - # @return [Array] - attr_accessor :source_reference - - # Size in bytes sent back to client by request. - # Corresponds to the JSON property `responseSize` - # @return [String] - attr_accessor :response_size - - # Stackdriver Trace identifier for this request. - # Corresponds to the JSON property `traceId` - # @return [String] - attr_accessor :trace_id - - # A list of log lines emitted by the application while serving this request. - # Corresponds to the JSON property `line` - # @return [Array] - attr_accessor :line - - # Referrer URL of request. - # Corresponds to the JSON property `referrer` - # @return [String] - attr_accessor :referrer - - # Queue name of the request, in the case of an offline request. - # Corresponds to the JSON property `taskQueueName` - # @return [String] - attr_accessor :task_queue_name - - # Globally unique identifier for a request, which is based on the request start - # time. Request IDs for requests which started later will compare greater as - # strings than those for requests which started earlier. - # Corresponds to the JSON property `requestId` - # @return [String] - attr_accessor :request_id - - # The logged-in user who made the request.Most likely, this is the part of the - # user's email before the @ sign. The field value is the same for different - # requests from the same user, but different users can have similar names. This - # information is also available to the application via the App Engine Users API. - # This field will be populated starting with App Engine 1.9.21. - # Corresponds to the JSON property `nickname` - # @return [String] - attr_accessor :nickname - - # Contains the path and query portion of the URL that was requested. For example, - # if the URL was "http://example.com/app?name=val", the resource would be "/app? - # name=val". The fragment identifier, which is identified by the # character, is - # not included. - # Corresponds to the JSON property `resource` - # @return [String] - attr_accessor :resource - - # Time this request spent in the pending request queue. - # Corresponds to the JSON property `pendingTime` - # @return [String] - attr_accessor :pending_time - - # HTTP response status code. Example: 200, 404. - # Corresponds to the JSON property `status` - # @return [Fixnum] - attr_accessor :status - - # Task name of the request, in the case of an offline request. - # Corresponds to the JSON property `taskName` - # @return [String] - attr_accessor :task_name - - # File or class that handled the request. - # Corresponds to the JSON property `urlMapEntry` - # @return [String] - attr_accessor :url_map_entry - # If the instance processing this request belongs to a manually scaled module, # then this is the 0-based index of the instance. Otherwise, this value is -1. # Corresponds to the JSON property `instanceIndex` @@ -1154,30 +418,114 @@ module Google attr_accessor :first alias_method :first?, :first + # Version of the application that handled this request. + # Corresponds to the JSON property `versionId` + # @return [String] + attr_accessor :version_id + + # Module of the application that handled this request. + # Corresponds to the JSON property `moduleId` + # @return [String] + attr_accessor :module_id + + # Time when the request finished. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # User agent that made the request. + # Corresponds to the JSON property `userAgent` + # @return [String] + attr_accessor :user_agent + + # Whether this was a loading request for the instance. + # Corresponds to the JSON property `wasLoadingRequest` + # @return [Boolean] + attr_accessor :was_loading_request + alias_method :was_loading_request?, :was_loading_request + + # Source code for the application that handled this request. There can be more + # than one source reference per deployed application if source code is + # distributed among multiple repositories. + # Corresponds to the JSON property `sourceReference` + # @return [Array] + attr_accessor :source_reference + + # Size in bytes sent back to client by request. + # Corresponds to the JSON property `responseSize` + # @return [String] + attr_accessor :response_size + + # Stackdriver Trace identifier for this request. + # Corresponds to the JSON property `traceId` + # @return [String] + attr_accessor :trace_id + + # A list of log lines emitted by the application while serving this request. + # Corresponds to the JSON property `line` + # @return [Array] + attr_accessor :line + + # Referrer URL of request. + # Corresponds to the JSON property `referrer` + # @return [String] + attr_accessor :referrer + + # Queue name of the request, in the case of an offline request. + # Corresponds to the JSON property `taskQueueName` + # @return [String] + attr_accessor :task_queue_name + + # Globally unique identifier for a request, which is based on the request start + # time. Request IDs for requests which started later will compare greater as + # strings than those for requests which started earlier. + # Corresponds to the JSON property `requestId` + # @return [String] + attr_accessor :request_id + + # The logged-in user who made the request.Most likely, this is the part of the + # user's email before the @ sign. The field value is the same for different + # requests from the same user, but different users can have similar names. This + # information is also available to the application via the App Engine Users API. + # This field will be populated starting with App Engine 1.9.21. + # Corresponds to the JSON property `nickname` + # @return [String] + attr_accessor :nickname + + # HTTP response status code. Example: 200, 404. + # Corresponds to the JSON property `status` + # @return [Fixnum] + attr_accessor :status + + # Time this request spent in the pending request queue. + # Corresponds to the JSON property `pendingTime` + # @return [String] + attr_accessor :pending_time + + # Contains the path and query portion of the URL that was requested. For example, + # if the URL was "http://example.com/app?name=val", the resource would be "/app? + # name=val". The fragment identifier, which is identified by the # character, is + # not included. + # Corresponds to the JSON property `resource` + # @return [String] + attr_accessor :resource + + # Task name of the request, in the case of an offline request. + # Corresponds to the JSON property `taskName` + # @return [String] + attr_accessor :task_name + + # File or class that handled the request. + # Corresponds to the JSON property `urlMapEntry` + # @return [String] + attr_accessor :url_map_entry + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @version_id = args[:version_id] if args.key?(:version_id) - @module_id = args[:module_id] if args.key?(:module_id) - @end_time = args[:end_time] if args.key?(:end_time) - @user_agent = args[:user_agent] if args.key?(:user_agent) - @was_loading_request = args[:was_loading_request] if args.key?(:was_loading_request) - @source_reference = args[:source_reference] if args.key?(:source_reference) - @response_size = args[:response_size] if args.key?(:response_size) - @trace_id = args[:trace_id] if args.key?(:trace_id) - @line = args[:line] if args.key?(:line) - @referrer = args[:referrer] if args.key?(:referrer) - @task_queue_name = args[:task_queue_name] if args.key?(:task_queue_name) - @request_id = args[:request_id] if args.key?(:request_id) - @nickname = args[:nickname] if args.key?(:nickname) - @resource = args[:resource] if args.key?(:resource) - @pending_time = args[:pending_time] if args.key?(:pending_time) - @status = args[:status] if args.key?(:status) - @task_name = args[:task_name] if args.key?(:task_name) - @url_map_entry = args[:url_map_entry] if args.key?(:url_map_entry) @instance_index = args[:instance_index] if args.key?(:instance_index) @host = args[:host] if args.key?(:host) @finished = args[:finished] if args.key?(:finished) @@ -1192,6 +540,24 @@ module Google @instance_id = args[:instance_id] if args.key?(:instance_id) @mega_cycles = args[:mega_cycles] if args.key?(:mega_cycles) @first = args[:first] if args.key?(:first) + @version_id = args[:version_id] if args.key?(:version_id) + @module_id = args[:module_id] if args.key?(:module_id) + @end_time = args[:end_time] if args.key?(:end_time) + @user_agent = args[:user_agent] if args.key?(:user_agent) + @was_loading_request = args[:was_loading_request] if args.key?(:was_loading_request) + @source_reference = args[:source_reference] if args.key?(:source_reference) + @response_size = args[:response_size] if args.key?(:response_size) + @trace_id = args[:trace_id] if args.key?(:trace_id) + @line = args[:line] if args.key?(:line) + @referrer = args[:referrer] if args.key?(:referrer) + @task_queue_name = args[:task_queue_name] if args.key?(:task_queue_name) + @request_id = args[:request_id] if args.key?(:request_id) + @nickname = args[:nickname] if args.key?(:nickname) + @status = args[:status] if args.key?(:status) + @pending_time = args[:pending_time] if args.key?(:pending_time) + @resource = args[:resource] if args.key?(:resource) + @task_name = args[:task_name] if args.key?(:task_name) + @url_map_entry = args[:url_map_entry] if args.key?(:url_map_entry) end end @@ -1199,11 +565,6 @@ module Google class ListMonitoredResourceDescriptorsResponse include Google::Apis::Core::Hashable - # A list of resource descriptors. - # Corresponds to the JSON property `resourceDescriptors` - # @return [Array] - attr_accessor :resource_descriptors - # If there might be more results than those appearing in this response, then # nextPageToken is included. To get the next set of results, call this method # again using the value of nextPageToken as pageToken. @@ -1211,14 +572,19 @@ module Google # @return [String] attr_accessor :next_page_token + # A list of resource descriptors. + # Corresponds to the JSON property `resourceDescriptors` + # @return [Array] + attr_accessor :resource_descriptors + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @resource_descriptors = args[:resource_descriptors] if args.key?(:resource_descriptors) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @resource_descriptors = args[:resource_descriptors] if args.key?(:resource_descriptors) end end @@ -1227,26 +593,660 @@ module Google class SourceReference include Google::Apis::Core::Hashable - # Optional. A URI string identifying the repository. Example: "https://github. - # com/GoogleCloudPlatform/kubernetes.git" - # Corresponds to the JSON property `repository` - # @return [String] - attr_accessor :repository - # The canonical and persistent identifier of the deployed revision. Example (git) # : "0035781c50ec7aa23385dc841529ce8a4b70db1b" # Corresponds to the JSON property `revisionId` # @return [String] attr_accessor :revision_id + # Optional. A URI string identifying the repository. Example: "https://github. + # com/GoogleCloudPlatform/kubernetes.git" + # Corresponds to the JSON property `repository` + # @return [String] + attr_accessor :repository + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @repository = args[:repository] if args.key?(:repository) @revision_id = args[:revision_id] if args.key?(:revision_id) + @repository = args[:repository] if args.key?(:repository) + end + end + + # Result returned from WriteLogEntries. empty + class WriteLogEntriesResponse + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Additional information about a potentially long-running operation with which a + # log entry is associated. + class LogEntryOperation + include Google::Apis::Core::Hashable + + # Optional. Set this to True if this is the last log entry in the operation. + # Corresponds to the JSON property `last` + # @return [Boolean] + attr_accessor :last + alias_method :last?, :last + + # Optional. An arbitrary operation identifier. Log entries with the same + # identifier are assumed to be part of the same operation. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Optional. An arbitrary producer identifier. The combination of id and producer + # must be globally unique. Examples for producer: "MyDivision.MyBigCompany.com", + # "github.com/MyProject/MyApplication". + # Corresponds to the JSON property `producer` + # @return [String] + attr_accessor :producer + + # Optional. Set this to True if this is the first log entry in the operation. + # Corresponds to the JSON property `first` + # @return [Boolean] + attr_accessor :first + alias_method :first?, :first + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @last = args[:last] if args.key?(:last) + @id = args[:id] if args.key?(:id) + @producer = args[:producer] if args.key?(:producer) + @first = args[:first] if args.key?(:first) + end + end + + # Describes a logs-based metric. The value of the metric is the number of log + # entries that match a logs filter in a given time interval. + class LogMetric + include Google::Apis::Core::Hashable + + # Output only. The API version that created or updated this metric. The version + # also dictates the syntax of the filter expression. When a value for this field + # is missing, the default value of V2 should be assumed. + # Corresponds to the JSON property `version` + # @return [String] + attr_accessor :version + + # Required. An advanced logs filter which is used to match log entries. Example: + # "resource.type=gae_app AND severity>=ERROR" + # The maximum length of the filter is 20000 characters. + # Corresponds to the JSON property `filter` + # @return [String] + attr_accessor :filter + + # Required. The client-assigned metric identifier. Examples: "error_count", " + # nginx/requests".Metric identifiers are limited to 100 characters and can + # include only the following characters: A-Z, a-z, 0-9, and the special + # characters _-.,+!*',()%/. The forward-slash character (/) denotes a hierarchy + # of name pieces, and it cannot be the first character of the name.The metric + # identifier in this field must not be URL-encoded (https://en.wikipedia.org/ + # wiki/Percent-encoding). However, when the metric identifier appears as the [ + # METRIC_ID] part of a metric_name API parameter, then the metric identifier + # must be URL-encoded. Example: "projects/my-project/metrics/nginx%2Frequests". + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Optional. A description of this metric, which is used in documentation. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @version = args[:version] if args.key?(:version) + @filter = args[:filter] if args.key?(:filter) + @name = args[:name] if args.key?(:name) + @description = args[:description] if args.key?(:description) + end + end + + # An object representing a resource that can be used for monitoring, logging, + # billing, or other purposes. Examples include virtual machine instances, + # databases, and storage devices such as disks. The type field identifies a + # MonitoredResourceDescriptor object that describes the resource's schema. + # Information in the labels field identifies the actual resource and its + # attributes according to the schema. For example, a particular Compute Engine + # VM instance could be represented by the following object, because the + # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and " + # zone": + # ` "type": "gce_instance", + # "labels": ` "instance_id": "12345678901234", + # "zone": "us-central1-a" `` + class MonitoredResource + include Google::Apis::Core::Hashable + + # Required. The monitored resource type. This field must match the type field of + # a MonitoredResourceDescriptor object. For example, the type of a Cloud SQL + # database is "cloudsql_database". + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # Required. Values for all of the labels listed in the associated monitored + # resource descriptor. For example, Cloud SQL databases use the labels " + # database_id" and "zone". + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type = args[:type] if args.key?(:type) + @labels = args[:labels] if args.key?(:labels) + end + end + + # The parameters to WriteLogEntries. + class WriteLogEntriesRequest + include Google::Apis::Core::Hashable + + # Optional. A default log resource name that is assigned to all log entries in + # entries that do not specify a value for log_name: + # "projects/[PROJECT_ID]/logs/[LOG_ID]" + # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog" + # or "organizations/1234567890/logs/cloudresourcemanager.googleapis.com% + # 2Factivity". For more information about log names, see LogEntry. + # Corresponds to the JSON property `logName` + # @return [String] + attr_accessor :log_name + + # Required. The log entries to write. Values supplied for the fields log_name, + # resource, and labels in this entries.write request are added to those log + # entries that do not provide their own values for the fields.To improve + # throughput and to avoid exceeding the quota limit for calls to entries.write, + # you should write multiple log entries at once rather than calling this method + # for each individual log entry. + # Corresponds to the JSON property `entries` + # @return [Array] + attr_accessor :entries + + # Optional. Whether valid entries should be written even if some other entries + # fail due to INVALID_ARGUMENT or PERMISSION_DENIED errors. If any entry is not + # written, the response status will be the error associated with one of the + # failed entries and include error details in the form of + # WriteLogEntriesPartialErrors. + # Corresponds to the JSON property `partialSuccess` + # @return [Boolean] + attr_accessor :partial_success + alias_method :partial_success?, :partial_success + + # Optional. Default labels that are added to the labels field of all log entries + # in entries. If a log entry already has a label with the same key as a label in + # this parameter, then the log entry's label is not changed. See LogEntry. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # An object representing a resource that can be used for monitoring, logging, + # billing, or other purposes. Examples include virtual machine instances, + # databases, and storage devices such as disks. The type field identifies a + # MonitoredResourceDescriptor object that describes the resource's schema. + # Information in the labels field identifies the actual resource and its + # attributes according to the schema. For example, a particular Compute Engine + # VM instance could be represented by the following object, because the + # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and " + # zone": + # ` "type": "gce_instance", + # "labels": ` "instance_id": "12345678901234", + # "zone": "us-central1-a" `` + # Corresponds to the JSON property `resource` + # @return [Google::Apis::LoggingV2beta1::MonitoredResource] + attr_accessor :resource + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @log_name = args[:log_name] if args.key?(:log_name) + @entries = args[:entries] if args.key?(:entries) + @partial_success = args[:partial_success] if args.key?(:partial_success) + @labels = args[:labels] if args.key?(:labels) + @resource = args[:resource] if args.key?(:resource) + end + end + + # Describes a sink used to export log entries to one of the following + # destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a + # Cloud Pub/Sub topic. A logs filter controls which log entries are exported. + # The sink must be created within a project or organization. + class LogSink + include Google::Apis::Core::Hashable + + # Required. The export destination: + # "storage.googleapis.com/[GCS_BUCKET]" + # "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" + # "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" + # The sink's writer_identity, set when the sink is created, must have permission + # to write to the destination or else the log entries are not exported. For more + # information, see Exporting Logs With Sinks. + # Corresponds to the JSON property `destination` + # @return [String] + attr_accessor :destination + + # Optional. An advanced logs filter. The only exported log entries are those + # that are in the resource owning the sink and that match the filter. The filter + # must use the log entry format specified by the output_version_format parameter. + # For example, in the v2 format: + # logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR + # Corresponds to the JSON property `filter` + # @return [String] + attr_accessor :filter + + # Optional. The time at which this sink will stop exporting log entries. Log + # entries are exported only if their timestamp is earlier than the end time. If + # this field is not supplied, there is no end time. If both a start time and an + # end time are provided, then the end time must be later than the start time. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # Optional. The time at which this sink will begin exporting log entries. Log + # entries are exported only if their timestamp is not earlier than the start + # time. The default value of this field is the time the sink is created or + # updated. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + # Output only. An IAM identity—a service account or group—under + # which Stackdriver Logging writes the exported log entries to the sink's + # destination. This field is set by sinks.create and sinks.update, based on the + # setting of unique_writer_identity in those methods.Until you grant this + # identity write-access to the destination, log entry exports from this sink + # will fail. For more information, see Granting access for a resource. Consult + # the destination service's documentation to determine the appropriate IAM roles + # to assign to the identity. + # Corresponds to the JSON property `writerIdentity` + # @return [String] + attr_accessor :writer_identity + + # Optional. The log entry format to use for this sink's exported log entries. + # The v2 format is used by default. The v1 format is deprecated and should be + # used only as part of a migration effort to v2. See Migration to the v2 API. + # Corresponds to the JSON property `outputVersionFormat` + # @return [String] + attr_accessor :output_version_format + + # Required. The client-assigned sink identifier, unique within the project. + # Example: "my-syslog-errors-to-pubsub". Sink identifiers are limited to 100 + # characters and can include only the following characters: upper and lower-case + # alphanumeric characters, underscores, hyphens, and periods. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @destination = args[:destination] if args.key?(:destination) + @filter = args[:filter] if args.key?(:filter) + @end_time = args[:end_time] if args.key?(:end_time) + @start_time = args[:start_time] if args.key?(:start_time) + @writer_identity = args[:writer_identity] if args.key?(:writer_identity) + @output_version_format = args[:output_version_format] if args.key?(:output_version_format) + @name = args[:name] if args.key?(:name) + end + end + + # Result returned from ListLogs. + class ListLogsResponse + include Google::Apis::Core::Hashable + + # If there might be more results than those appearing in this response, then + # nextPageToken is included. To get the next set of results, call this method + # again using the value of nextPageToken as pageToken. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # A list of log names. For example, "projects/my-project/syslog" or " + # organizations/123/cloudresourcemanager.googleapis.com%2Factivity". + # Corresponds to the JSON property `logNames` + # @return [Array] + attr_accessor :log_names + + 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) + @log_names = args[:log_names] if args.key?(:log_names) + end + end + + # A common proto for logging HTTP requests. Only contains semantics defined by + # the HTTP specification. Product-specific logging information MUST be defined + # in a separate message. + class HttpRequest + include Google::Apis::Core::Hashable + + # The IP address (IPv4 or IPv6) of the origin server that the request was sent + # to. + # Corresponds to the JSON property `serverIp` + # @return [String] + attr_accessor :server_ip + + # The IP address (IPv4 or IPv6) of the client that issued the HTTP request. + # Examples: "192.168.1.1", "FE80::0202:B3FF:FE1E:8329". + # Corresponds to the JSON property `remoteIp` + # @return [String] + attr_accessor :remote_ip + + # Whether or not a cache lookup was attempted. + # Corresponds to the JSON property `cacheLookup` + # @return [Boolean] + attr_accessor :cache_lookup + alias_method :cache_lookup?, :cache_lookup + + # Whether or not an entity was served from cache (with or without validation). + # Corresponds to the JSON property `cacheHit` + # @return [Boolean] + attr_accessor :cache_hit + alias_method :cache_hit?, :cache_hit + + # Whether or not the response was validated with the origin server before being + # served from cache. This field is only meaningful if cache_hit is True. + # Corresponds to the JSON property `cacheValidatedWithOriginServer` + # @return [Boolean] + attr_accessor :cache_validated_with_origin_server + alias_method :cache_validated_with_origin_server?, :cache_validated_with_origin_server + + # The response code indicating the status of response. Examples: 200, 404. + # Corresponds to the JSON property `status` + # @return [Fixnum] + attr_accessor :status + + # The referer URL of the request, as defined in HTTP/1.1 Header Field + # Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). + # Corresponds to the JSON property `referer` + # @return [String] + attr_accessor :referer + + # The user agent sent by the client. Example: "Mozilla/4.0 (compatible; MSIE 6.0; + # Windows 98; Q312461; .NET CLR 1.0.3705)". + # Corresponds to the JSON property `userAgent` + # @return [String] + attr_accessor :user_agent + + # The request processing latency on the server, from the time the request was + # received until the response was sent. + # Corresponds to the JSON property `latency` + # @return [String] + attr_accessor :latency + + # The number of HTTP response bytes inserted into cache. Set only when a cache + # fill was attempted. + # Corresponds to the JSON property `cacheFillBytes` + # @return [String] + attr_accessor :cache_fill_bytes + + # The request method. Examples: "GET", "HEAD", "PUT", "POST". + # Corresponds to the JSON property `requestMethod` + # @return [String] + attr_accessor :request_method + + # The size of the HTTP request message in bytes, including the request headers + # and the request body. + # Corresponds to the JSON property `requestSize` + # @return [String] + attr_accessor :request_size + + # The size of the HTTP response message sent back to the client, in bytes, + # including the response headers and the response body. + # Corresponds to the JSON property `responseSize` + # @return [String] + attr_accessor :response_size + + # The scheme (http, https), the host name, the path and the query portion of the + # URL that was requested. Example: "http://example.com/some/info?color=red". + # Corresponds to the JSON property `requestUrl` + # @return [String] + attr_accessor :request_url + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @server_ip = args[:server_ip] if args.key?(:server_ip) + @remote_ip = args[:remote_ip] if args.key?(:remote_ip) + @cache_lookup = args[:cache_lookup] if args.key?(:cache_lookup) + @cache_hit = args[:cache_hit] if args.key?(:cache_hit) + @cache_validated_with_origin_server = args[:cache_validated_with_origin_server] if args.key?(:cache_validated_with_origin_server) + @status = args[:status] if args.key?(:status) + @referer = args[:referer] if args.key?(:referer) + @user_agent = args[:user_agent] if args.key?(:user_agent) + @latency = args[:latency] if args.key?(:latency) + @cache_fill_bytes = args[:cache_fill_bytes] if args.key?(:cache_fill_bytes) + @request_method = args[:request_method] if args.key?(:request_method) + @request_size = args[:request_size] if args.key?(:request_size) + @response_size = args[:response_size] if args.key?(:response_size) + @request_url = args[:request_url] if args.key?(:request_url) + end + end + + # Result returned from ListSinks. + class ListSinksResponse + include Google::Apis::Core::Hashable + + # If there might be more results than appear in this response, then + # nextPageToken is included. To get the next set of results, call the same + # method again using the value of nextPageToken as pageToken. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # A list of sinks. + # Corresponds to the JSON property `sinks` + # @return [Array] + attr_accessor :sinks + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @sinks = args[:sinks] if args.key?(:sinks) + end + end + + # A description of a label. + class LabelDescriptor + include Google::Apis::Core::Hashable + + # The label key. + # Corresponds to the JSON property `key` + # @return [String] + attr_accessor :key + + # A human-readable description for the label. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The type of data that can be assigned to the label. + # Corresponds to the JSON property `valueType` + # @return [String] + attr_accessor :value_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @key = args[:key] if args.key?(:key) + @description = args[:description] if args.key?(:description) + @value_type = args[:value_type] if args.key?(:value_type) + end + end + + # An object that describes the schema of a MonitoredResource object using a type + # name and a set of labels. For example, the monitored resource descriptor for + # Google Compute Engine VM instances has a type of "gce_instance" and specifies + # the use of the labels "instance_id" and "zone" to identify particular VM + # instances.Different APIs can support different monitored resource types. APIs + # generally provide a list method that returns the monitored resource + # descriptors used by the API. + class MonitoredResourceDescriptor + include Google::Apis::Core::Hashable + + # Required. A set of labels used to describe instances of this monitored + # resource type. For example, an individual Google Cloud SQL database is + # identified by values for the labels "database_id" and "zone". + # Corresponds to the JSON property `labels` + # @return [Array] + attr_accessor :labels + + # Optional. The resource name of the monitored resource descriptor: "projects/` + # project_id`/monitoredResourceDescriptors/`type`" where `type` is the value of + # the type field in this object and `project_id` is a project ID that provides + # API-specific context for accessing the type. APIs that do not use project + # information can use the resource name format "monitoredResourceDescriptors/` + # type`". + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Optional. A concise name for the monitored resource type that might be + # displayed in user interfaces. It should be a Title Cased Noun Phrase, without + # any article or other determiners. For example, "Google Cloud SQL Database". + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Optional. A detailed description of the monitored resource type that might be + # used in documentation. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Required. The monitored resource type. For example, the type " + # cloudsql_database" represents databases in Google Cloud SQL. The maximum + # length of this value is 256 characters. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @labels = args[:labels] if args.key?(:labels) + @name = args[:name] if args.key?(:name) + @display_name = args[:display_name] if args.key?(:display_name) + @description = args[:description] if args.key?(:description) + @type = args[:type] if args.key?(:type) + end + end + + # Additional information about the source code location that produced the log + # entry. + class LogEntrySourceLocation + include Google::Apis::Core::Hashable + + # Optional. Source file name. Depending on the runtime environment, this might + # be a simple name or a fully-qualified name. + # Corresponds to the JSON property `file` + # @return [String] + attr_accessor :file + + # Optional. Human-readable name of the function or method being invoked, with + # optional context such as the class or package name. This information may be + # used in contexts such as the logs viewer, where a file and line number are + # less meaningful. The format can vary by language. For example: qual.if.ied. + # Class.method (Java), dir/package.func (Go), function (Python). + # Corresponds to the JSON property `function` + # @return [String] + attr_accessor :function + + # Optional. Line within the source file. 1-based; 0 indicates no line number + # available. + # Corresponds to the JSON property `line` + # @return [String] + attr_accessor :line + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @file = args[:file] if args.key?(:file) + @function = args[:function] if args.key?(:function) + @line = args[:line] if args.key?(:line) + end + end + + # Result returned from ListLogEntries. + class ListLogEntriesResponse + include Google::Apis::Core::Hashable + + # If there might be more results than those appearing in this response, then + # nextPageToken is included. To get the next set of results, call this method + # again using the value of nextPageToken as pageToken.If a value for + # next_page_token appears and the entries field is empty, it means that the + # search found no log entries so far but it did not have time to search all the + # possible log entries. Retry the method with this value for page_token to + # continue the search. Alternatively, consider speeding up the search by + # changing your filter to specify a single log name or resource type, or to + # narrow the time range of the search. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # A list of log entries. + # Corresponds to the JSON property `entries` + # @return [Array] + attr_accessor :entries + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @entries = args[:entries] if args.key?(:entries) end end end diff --git a/generated/google/apis/logging_v2beta1/representations.rb b/generated/google/apis/logging_v2beta1/representations.rb index 73051c44d..5e558d10e 100644 --- a/generated/google/apis/logging_v2beta1/representations.rb +++ b/generated/google/apis/logging_v2beta1/representations.rb @@ -22,13 +22,55 @@ module Google module Apis module LoggingV2beta1 - class LogMetric + class LogLine class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class LogEntryOperation + class ListLogMetricsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class LogEntry + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Empty + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SourceLocation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListLogEntriesRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RequestLog + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListMonitoredResourceDescriptorsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SourceReference class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -40,19 +82,31 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class LogEntryOperation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class LogMetric + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class MonitoredResource class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class LogSink + class WriteLogEntriesRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class WriteLogEntriesRequest + class LogSink class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -101,57 +155,146 @@ module Google end class LogLine - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :severity, as: 'severity' + property :log_message, as: 'logMessage' + property :source_location, as: 'sourceLocation', class: Google::Apis::LoggingV2beta1::SourceLocation, decorator: Google::Apis::LoggingV2beta1::SourceLocation::Representation - include Google::Apis::Core::JsonObjectSupport + property :time, as: 'time' + end end class ListLogMetricsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :metrics, as: 'metrics', class: Google::Apis::LoggingV2beta1::LogMetric, decorator: Google::Apis::LoggingV2beta1::LogMetric::Representation - include Google::Apis::Core::JsonObjectSupport - end - - class Empty - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + property :next_page_token, as: 'nextPageToken' + end end class LogEntry - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :trace, as: 'trace' + hash :labels, as: 'labels' + property :severity, as: 'severity' + property :source_location, as: 'sourceLocation', class: Google::Apis::LoggingV2beta1::LogEntrySourceLocation, decorator: Google::Apis::LoggingV2beta1::LogEntrySourceLocation::Representation - include Google::Apis::Core::JsonObjectSupport + property :timestamp, as: 'timestamp' + property :log_name, as: 'logName' + property :http_request, as: 'httpRequest', class: Google::Apis::LoggingV2beta1::HttpRequest, decorator: Google::Apis::LoggingV2beta1::HttpRequest::Representation + + property :resource, as: 'resource', class: Google::Apis::LoggingV2beta1::MonitoredResource, decorator: Google::Apis::LoggingV2beta1::MonitoredResource::Representation + + hash :json_payload, as: 'jsonPayload' + property :operation, as: 'operation', class: Google::Apis::LoggingV2beta1::LogEntryOperation, decorator: Google::Apis::LoggingV2beta1::LogEntryOperation::Representation + + property :insert_id, as: 'insertId' + property :text_payload, as: 'textPayload' + hash :proto_payload, as: 'protoPayload' + end + end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end end class SourceLocation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :file, as: 'file' + property :function_name, as: 'functionName' + property :line, as: 'line' + end end class ListLogEntriesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :filter, as: 'filter' + collection :project_ids, as: 'projectIds' + property :page_token, as: 'pageToken' + property :page_size, as: 'pageSize' + property :order_by, as: 'orderBy' + collection :resource_names, as: 'resourceNames' + end end class RequestLog - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :instance_index, as: 'instanceIndex' + property :host, as: 'host' + property :finished, as: 'finished' + property :http_version, as: 'httpVersion' + property :start_time, as: 'startTime' + property :latency, as: 'latency' + property :ip, as: 'ip' + property :app_id, as: 'appId' + property :app_engine_release, as: 'appEngineRelease' + property :method_prop, as: 'method' + property :cost, as: 'cost' + property :instance_id, as: 'instanceId' + property :mega_cycles, as: 'megaCycles' + property :first, as: 'first' + property :version_id, as: 'versionId' + property :module_id, as: 'moduleId' + property :end_time, as: 'endTime' + property :user_agent, as: 'userAgent' + property :was_loading_request, as: 'wasLoadingRequest' + collection :source_reference, as: 'sourceReference', class: Google::Apis::LoggingV2beta1::SourceReference, decorator: Google::Apis::LoggingV2beta1::SourceReference::Representation - include Google::Apis::Core::JsonObjectSupport + property :response_size, as: 'responseSize' + property :trace_id, as: 'traceId' + collection :line, as: 'line', class: Google::Apis::LoggingV2beta1::LogLine, decorator: Google::Apis::LoggingV2beta1::LogLine::Representation + + property :referrer, as: 'referrer' + property :task_queue_name, as: 'taskQueueName' + property :request_id, as: 'requestId' + property :nickname, as: 'nickname' + property :status, as: 'status' + property :pending_time, as: 'pendingTime' + property :resource, as: 'resource' + property :task_name, as: 'taskName' + property :url_map_entry, as: 'urlMapEntry' + end end class ListMonitoredResourceDescriptorsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :resource_descriptors, as: 'resourceDescriptors', class: Google::Apis::LoggingV2beta1::MonitoredResourceDescriptor, decorator: Google::Apis::LoggingV2beta1::MonitoredResourceDescriptor::Representation - include Google::Apis::Core::JsonObjectSupport + end end class SourceReference - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :revision_id, as: 'revisionId' + property :repository, as: 'repository' + end + end - include Google::Apis::Core::JsonObjectSupport + class WriteLogEntriesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class LogEntryOperation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :last, as: 'last' + property :id, as: 'id' + property :producer, as: 'producer' + property :first, as: 'first' + end end class LogMetric @@ -164,81 +307,65 @@ module Google end end - class LogEntryOperation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :producer, as: 'producer' - property :first, as: 'first' - property :last, as: 'last' - end - end - - class WriteLogEntriesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - class MonitoredResource # @private class Representation < Google::Apis::Core::JsonRepresentation - hash :labels, as: 'labels' property :type, as: 'type' - end - end - - class LogSink - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :writer_identity, as: 'writerIdentity' - property :start_time, as: 'startTime' - property :output_version_format, as: 'outputVersionFormat' - property :name, as: 'name' - property :filter, as: 'filter' - property :destination, as: 'destination' - property :end_time, as: 'endTime' + hash :labels, as: 'labels' end end class WriteLogEntriesRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - hash :labels, as: 'labels' - property :resource, as: 'resource', class: Google::Apis::LoggingV2beta1::MonitoredResource, decorator: Google::Apis::LoggingV2beta1::MonitoredResource::Representation - property :log_name, as: 'logName' collection :entries, as: 'entries', class: Google::Apis::LoggingV2beta1::LogEntry, decorator: Google::Apis::LoggingV2beta1::LogEntry::Representation property :partial_success, as: 'partialSuccess' + hash :labels, as: 'labels' + property :resource, as: 'resource', class: Google::Apis::LoggingV2beta1::MonitoredResource, decorator: Google::Apis::LoggingV2beta1::MonitoredResource::Representation + + end + end + + class LogSink + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :destination, as: 'destination' + property :filter, as: 'filter' + property :end_time, as: 'endTime' + property :start_time, as: 'startTime' + property :writer_identity, as: 'writerIdentity' + property :output_version_format, as: 'outputVersionFormat' + property :name, as: 'name' end end class ListLogsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :log_names, as: 'logNames' property :next_page_token, as: 'nextPageToken' + collection :log_names, as: 'logNames' end end class HttpRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + property :server_ip, as: 'serverIp' + property :remote_ip, as: 'remoteIp' property :cache_lookup, as: 'cacheLookup' property :cache_hit, as: 'cacheHit' property :cache_validated_with_origin_server, as: 'cacheValidatedWithOriginServer' property :status, as: 'status' property :referer, as: 'referer' - property :latency, as: 'latency' property :user_agent, as: 'userAgent' + property :latency, as: 'latency' property :cache_fill_bytes, as: 'cacheFillBytes' property :request_method, as: 'requestMethod' - property :response_size, as: 'responseSize' property :request_size, as: 'requestSize' + property :response_size, as: 'responseSize' property :request_url, as: 'requestUrl' - property :server_ip, as: 'serverIp' - property :remote_ip, as: 'remoteIp' end end @@ -263,157 +390,30 @@ module Google class MonitoredResourceDescriptor # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :labels, as: 'labels', class: Google::Apis::LoggingV2beta1::LabelDescriptor, decorator: Google::Apis::LoggingV2beta1::LabelDescriptor::Representation + property :name, as: 'name' property :display_name, as: 'displayName' property :description, as: 'description' property :type, as: 'type' - collection :labels, as: 'labels', class: Google::Apis::LoggingV2beta1::LabelDescriptor, decorator: Google::Apis::LoggingV2beta1::LabelDescriptor::Representation - end end class LogEntrySourceLocation # @private class Representation < Google::Apis::Core::JsonRepresentation - property :line, as: 'line' property :file, as: 'file' property :function, as: 'function' + property :line, as: 'line' end end class ListLogEntriesResponse # @private class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' collection :entries, as: 'entries', class: Google::Apis::LoggingV2beta1::LogEntry, decorator: Google::Apis::LoggingV2beta1::LogEntry::Representation - property :next_page_token, as: 'nextPageToken' - end - end - - class LogLine - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :severity, as: 'severity' - property :log_message, as: 'logMessage' - property :source_location, as: 'sourceLocation', class: Google::Apis::LoggingV2beta1::SourceLocation, decorator: Google::Apis::LoggingV2beta1::SourceLocation::Representation - - property :time, as: 'time' - end - end - - class ListLogMetricsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :metrics, as: 'metrics', class: Google::Apis::LoggingV2beta1::LogMetric, decorator: Google::Apis::LoggingV2beta1::LogMetric::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - class Empty - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - class LogEntry - # @private - class Representation < Google::Apis::Core::JsonRepresentation - hash :labels, as: 'labels' - property :trace, as: 'trace' - property :severity, as: 'severity' - property :source_location, as: 'sourceLocation', class: Google::Apis::LoggingV2beta1::LogEntrySourceLocation, decorator: Google::Apis::LoggingV2beta1::LogEntrySourceLocation::Representation - - property :timestamp, as: 'timestamp' - property :log_name, as: 'logName' - property :http_request, as: 'httpRequest', class: Google::Apis::LoggingV2beta1::HttpRequest, decorator: Google::Apis::LoggingV2beta1::HttpRequest::Representation - - property :resource, as: 'resource', class: Google::Apis::LoggingV2beta1::MonitoredResource, decorator: Google::Apis::LoggingV2beta1::MonitoredResource::Representation - - hash :json_payload, as: 'jsonPayload' - property :operation, as: 'operation', class: Google::Apis::LoggingV2beta1::LogEntryOperation, decorator: Google::Apis::LoggingV2beta1::LogEntryOperation::Representation - - property :insert_id, as: 'insertId' - property :text_payload, as: 'textPayload' - hash :proto_payload, as: 'protoPayload' - end - end - - class SourceLocation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :line, as: 'line' - property :file, as: 'file' - property :function_name, as: 'functionName' - end - end - - class ListLogEntriesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :order_by, as: 'orderBy' - collection :resource_names, as: 'resourceNames' - property :filter, as: 'filter' - collection :project_ids, as: 'projectIds' - property :page_token, as: 'pageToken' - property :page_size, as: 'pageSize' - end - end - - class RequestLog - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :version_id, as: 'versionId' - property :module_id, as: 'moduleId' - property :end_time, as: 'endTime' - property :user_agent, as: 'userAgent' - property :was_loading_request, as: 'wasLoadingRequest' - collection :source_reference, as: 'sourceReference', class: Google::Apis::LoggingV2beta1::SourceReference, decorator: Google::Apis::LoggingV2beta1::SourceReference::Representation - - property :response_size, as: 'responseSize' - property :trace_id, as: 'traceId' - collection :line, as: 'line', class: Google::Apis::LoggingV2beta1::LogLine, decorator: Google::Apis::LoggingV2beta1::LogLine::Representation - - property :referrer, as: 'referrer' - property :task_queue_name, as: 'taskQueueName' - property :request_id, as: 'requestId' - property :nickname, as: 'nickname' - property :resource, as: 'resource' - property :pending_time, as: 'pendingTime' - property :status, as: 'status' - property :task_name, as: 'taskName' - property :url_map_entry, as: 'urlMapEntry' - property :instance_index, as: 'instanceIndex' - property :host, as: 'host' - property :finished, as: 'finished' - property :http_version, as: 'httpVersion' - property :start_time, as: 'startTime' - property :latency, as: 'latency' - property :ip, as: 'ip' - property :app_id, as: 'appId' - property :app_engine_release, as: 'appEngineRelease' - property :method_prop, as: 'method' - property :cost, as: 'cost' - property :instance_id, as: 'instanceId' - property :mega_cycles, as: 'megaCycles' - property :first, as: 'first' - end - end - - class ListMonitoredResourceDescriptorsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :resource_descriptors, as: 'resourceDescriptors', class: Google::Apis::LoggingV2beta1::MonitoredResourceDescriptor, decorator: Google::Apis::LoggingV2beta1::MonitoredResourceDescriptor::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - class SourceReference - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :repository, as: 'repository' - property :revision_id, as: 'revisionId' end end end diff --git a/generated/google/apis/logging_v2beta1/service.rb b/generated/google/apis/logging_v2beta1/service.rb index b417dc992..b519bc190 100644 --- a/generated/google/apis/logging_v2beta1/service.rb +++ b/generated/google/apis/logging_v2beta1/service.rb @@ -32,146 +32,28 @@ module Google # # @see https://cloud.google.com/logging/docs/ class LoggingService < Google::Apis::Core::BaseService - # @return [String] - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - attr_accessor :quota_user - # @return [String] # API key. Your API key identifies your project and provides you with API access, # quota, and reports. Required unless you provide an OAuth 2.0 token. attr_accessor :key + # @return [String] + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + attr_accessor :quota_user + def initialize super('https://logging.googleapis.com/', '') end - # Lists the descriptors for monitored resource types used by Stackdriver Logging. - # @param [String] page_token - # Optional. If present, then retrieve the next batch of results from the - # preceding call to this method. pageToken must be the value of nextPageToken - # from the previous response. The values of other method parameters should be - # identical to those in the previous call. - # @param [Fixnum] page_size - # Optional. The maximum number of results to return from this request. Non- - # positive values are ignored. The presence of nextPageToken in the response - # indicates that more results might be available. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2beta1::ListMonitoredResourceDescriptorsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2beta1::ListMonitoredResourceDescriptorsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_monitored_resource_descriptors(page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v2beta1/monitoredResourceDescriptors', options) - command.response_representation = Google::Apis::LoggingV2beta1::ListMonitoredResourceDescriptorsResponse::Representation - command.response_class = Google::Apis::LoggingV2beta1::ListMonitoredResourceDescriptorsResponse - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Deletes all the log entries in a log. The log reappears if it receives new - # entries. - # @param [String] log_name - # Required. The resource name of the log to delete: - # "projects/[PROJECT_ID]/logs/[LOG_ID]" - # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog" - # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com% - # 2Factivity". For more information about log names, see LogEntry. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2beta1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2beta1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_organization_log(log_name, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:delete, 'v2beta1/{+logName}', options) - command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation - command.response_class = Google::Apis::LoggingV2beta1::Empty - command.params['logName'] = log_name unless log_name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Lists the logs in projects or organizations. Only logs that have entries are - # listed. - # @param [String] parent - # Required. The resource name that owns the logs: - # "projects/[PROJECT_ID]" - # "organizations/[ORGANIZATION_ID]" - # @param [String] page_token - # Optional. If present, then retrieve the next batch of results from the - # preceding call to this method. pageToken must be the value of nextPageToken - # from the previous response. The values of other method parameters should be - # identical to those in the previous call. - # @param [Fixnum] page_size - # Optional. The maximum number of results to return from this request. Non- - # positive values are ignored. The presence of nextPageToken in the response - # indicates that more results might be available. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2beta1::ListLogsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2beta1::ListLogsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_organization_logs(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v2beta1/{+parent}/logs', options) - command.response_representation = Google::Apis::LoggingV2beta1::ListLogsResponse::Representation - command.response_class = Google::Apis::LoggingV2beta1::ListLogsResponse - command.params['parent'] = parent unless parent.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - # Lists log entries. Use this method to retrieve log entries from Stackdriver # Logging. For ways to export log entries, see Exporting Logs. # @param [Google::Apis::LoggingV2beta1::ListLogEntriesRequest] list_log_entries_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -184,25 +66,25 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_entry_log_entries(list_log_entries_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def list_entry_log_entries(list_log_entries_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta1/entries:list', options) command.request_representation = Google::Apis::LoggingV2beta1::ListLogEntriesRequest::Representation command.request_object = list_log_entries_request_object command.response_representation = Google::Apis::LoggingV2beta1::ListLogEntriesResponse::Representation command.response_class = Google::Apis::LoggingV2beta1::ListLogEntriesResponse - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Writes log entries to Stackdriver Logging. All log entries are written by this # method. # @param [Google::Apis::LoggingV2beta1::WriteLogEntriesRequest] write_log_entries_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -215,31 +97,61 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def write_entry_log_entries(write_log_entries_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def write_entry_log_entries(write_log_entries_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta1/entries:write', options) command.request_representation = Google::Apis::LoggingV2beta1::WriteLogEntriesRequest::Representation command.request_object = write_log_entries_request_object command.response_representation = Google::Apis::LoggingV2beta1::WriteLogEntriesResponse::Representation command.response_class = Google::Apis::LoggingV2beta1::WriteLogEntriesResponse - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - # Deletes all the log entries in a log. The log reappears if it receives new - # entries. - # @param [String] log_name - # Required. The resource name of the log to delete: - # "projects/[PROJECT_ID]/logs/[LOG_ID]" - # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog" - # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com% - # 2Factivity". For more information about log names, see LogEntry. + # Creates a logs-based metric. + # @param [String] parent + # The resource name of the project in which to create the metric: + # "projects/[PROJECT_ID]" + # The new metric must be provided in the request. + # @param [Google::Apis::LoggingV2beta1::LogMetric] log_metric_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2beta1::LogMetric] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_metric(parent, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2beta1/{+parent}/metrics', options) + command.request_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation + command.request_object = log_metric_object + command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation + command.response_class = Google::Apis::LoggingV2beta1::LogMetric + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a logs-based metric. + # @param [String] metric_name + # The resource name of the metric to delete: + # "projects/[PROJECT_ID]/metrics/[METRIC_ID]" # @param [String] fields # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -252,13 +164,159 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_log(log_name, quota_user: nil, fields: nil, options: nil, &block) + def delete_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v2beta1/{+metricName}', options) + command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation + command.response_class = Google::Apis::LoggingV2beta1::Empty + command.params['metricName'] = metric_name unless metric_name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists logs-based metrics. + # @param [String] parent + # Required. The name of the project containing the metrics: + # "projects/[PROJECT_ID]" + # @param [Fixnum] page_size + # Optional. The maximum number of results to return from this request. Non- + # positive values are ignored. The presence of nextPageToken in the response + # indicates that more results might be available. + # @param [String] page_token + # Optional. If present, then retrieve the next batch of results from the + # preceding call to this method. pageToken must be the value of nextPageToken + # from the previous response. The values of other method parameters should be + # identical to those in the previous call. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::LoggingV2beta1::ListLogMetricsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2beta1::ListLogMetricsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_metrics(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2beta1/{+parent}/metrics', options) + command.response_representation = Google::Apis::LoggingV2beta1::ListLogMetricsResponse::Representation + command.response_class = Google::Apis::LoggingV2beta1::ListLogMetricsResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a logs-based metric. + # @param [String] metric_name + # The resource name of the desired metric: + # "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2beta1::LogMetric] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2beta1/{+metricName}', options) + command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation + command.response_class = Google::Apis::LoggingV2beta1::LogMetric + command.params['metricName'] = metric_name unless metric_name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates or updates a logs-based metric. + # @param [String] metric_name + # The resource name of the metric to update: + # "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + # The updated metric must be provided in the request and it's name field must be + # the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a + # new metric is created. + # @param [Google::Apis::LoggingV2beta1::LogMetric] log_metric_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2beta1::LogMetric] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_project_metric(metric_name, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'v2beta1/{+metricName}', options) + command.request_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation + command.request_object = log_metric_object + command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation + command.response_class = Google::Apis::LoggingV2beta1::LogMetric + command.params['metricName'] = metric_name unless metric_name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes all the log entries in a log. The log reappears if it receives new + # entries. + # @param [String] log_name + # Required. The resource name of the log to delete: + # "projects/[PROJECT_ID]/logs/[LOG_ID]" + # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog" + # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com% + # 2Factivity". For more information about log names, see LogEntry. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::LoggingV2beta1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2beta1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_log(log_name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v2beta1/{+logName}', options) command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation command.response_class = Google::Apis::LoggingV2beta1::Empty command.params['logName'] = log_name unless log_name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -277,11 +335,11 @@ module Google # Optional. The maximum number of results to return from this request. Non- # positive values are ignored. The presence of nextPageToken in the response # indicates that more results might be available. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -294,15 +352,15 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_logs(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta1/{+parent}/logs', options) command.response_representation = Google::Apis::LoggingV2beta1::ListLogsResponse::Representation command.response_class = Google::Apis::LoggingV2beta1::ListLogsResponse command.params['parent'] = parent unless parent.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -315,11 +373,11 @@ module Google # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" # It is an error if the sink does not exist. Example: "projects/my-project-id/ # sinks/my-sink-id". It is an error if the sink does not exist. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -332,13 +390,13 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_project_sink(sink_name, quota_user: nil, fields: nil, options: nil, &block) + def delete_project_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v2beta1/{+sinkName}', options) command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation command.response_class = Google::Apis::LoggingV2beta1::Empty command.params['sinkName'] = sink_name unless sink_name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -355,11 +413,11 @@ module Google # Optional. The maximum number of results to return from this request. Non- # positive values are ignored. The presence of nextPageToken in the response # indicates that more results might be available. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -372,15 +430,15 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_project_sinks(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_project_sinks(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta1/{+parent}/sinks', options) command.response_representation = Google::Apis::LoggingV2beta1::ListSinksResponse::Representation command.response_class = Google::Apis::LoggingV2beta1::ListSinksResponse command.params['parent'] = parent unless parent.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -390,11 +448,11 @@ module Google # "projects/[PROJECT_ID]/sinks/[SINK_ID]" # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" # Example: "projects/my-project-id/sinks/my-sink-id". + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -407,13 +465,13 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_sink(sink_name, quota_user: nil, fields: nil, options: nil, &block) + def get_project_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta1/{+sinkName}', options) command.response_representation = Google::Apis::LoggingV2beta1::LogSink::Representation command.response_class = Google::Apis::LoggingV2beta1::LogSink command.params['sinkName'] = sink_name unless sink_name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -439,11 +497,11 @@ module Google # If the old value was false and the new value is true, then writer_identity is # changed to a unique service account. # It is an error if the old value was true and the new value is false. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -456,7 +514,7 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_project_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, quota_user: nil, fields: nil, options: nil, &block) + def update_project_sink(sink_name, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:put, 'v2beta1/{+sinkName}', options) command.request_representation = Google::Apis::LoggingV2beta1::LogSink::Representation command.request_object = log_sink_object @@ -464,8 +522,8 @@ module Google command.response_class = Google::Apis::LoggingV2beta1::LogSink command.params['sinkName'] = sink_name unless sink_name.nil? command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -484,17 +542,17 @@ module Google # Optional. Determines the kind of IAM identity returned as writer_identity in # the new sink. If this value is omitted or set to false, and if the sink's # parent is a project, then the value returned as writer_identity is cloud-logs@ - # google.com, the same identity used before the addition of writer identities to - # this API. The sink's destination must be in the same project as the sink - # itself.If this field is set to true, or if the sink is owned by a non-project - # resource such as an organization, then the value of writer_identity will be a - # unique service account used only for exports from the new sink. For more - # information, see writer_identity in LogSink. + # system.gserviceaccount.com, the same identity used before the addition of + # writer identities to this API. The sink's destination must be in the same + # project as the sink itself.If this field is set to true, or if the sink is + # owned by a non-project resource such as an organization, then the value of + # writer_identity will be a unique service account used only for exports from + # the new sink. For more information, see writer_identity in LogSink. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -507,7 +565,7 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_project_sink(parent, log_sink_object = nil, unique_writer_identity: nil, quota_user: nil, fields: nil, options: nil, &block) + def create_project_sink(parent, log_sink_object = nil, unique_writer_identity: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta1/{+parent}/sinks', options) command.request_representation = Google::Apis::LoggingV2beta1::LogSink::Representation command.request_object = log_sink_object @@ -515,184 +573,8 @@ module Google command.response_class = Google::Apis::LoggingV2beta1::LogSink command.params['parent'] = parent unless parent.nil? command.query['uniqueWriterIdentity'] = unique_writer_identity unless unique_writer_identity.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a logs-based metric. - # @param [String] metric_name - # The resource name of the metric to delete: - # "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2beta1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2beta1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_project_metric(metric_name, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:delete, 'v2beta1/{+metricName}', options) - command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation - command.response_class = Google::Apis::LoggingV2beta1::Empty - command.params['metricName'] = metric_name unless metric_name.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Lists logs-based metrics. - # @param [String] parent - # Required. The name of the project containing the metrics: - # "projects/[PROJECT_ID]" - # @param [String] page_token - # Optional. If present, then retrieve the next batch of results from the - # preceding call to this method. pageToken must be the value of nextPageToken - # from the previous response. The values of other method parameters should be - # identical to those in the previous call. - # @param [Fixnum] page_size - # Optional. The maximum number of results to return from this request. Non- - # positive values are ignored. The presence of nextPageToken in the response - # indicates that more results might be available. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2beta1::ListLogMetricsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2beta1::ListLogMetricsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_project_metrics(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v2beta1/{+parent}/metrics', options) - command.response_representation = Google::Apis::LoggingV2beta1::ListLogMetricsResponse::Representation - command.response_class = Google::Apis::LoggingV2beta1::ListLogMetricsResponse - command.params['parent'] = parent unless parent.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Gets a logs-based metric. - # @param [String] metric_name - # The resource name of the desired metric: - # "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2beta1::LogMetric] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_metric(metric_name, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v2beta1/{+metricName}', options) - command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation - command.response_class = Google::Apis::LoggingV2beta1::LogMetric - command.params['metricName'] = metric_name unless metric_name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Creates or updates a logs-based metric. - # @param [String] metric_name - # The resource name of the metric to update: - # "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - # The updated metric must be provided in the request and it's name field must be - # the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a - # new metric is created. - # @param [Google::Apis::LoggingV2beta1::LogMetric] log_metric_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2beta1::LogMetric] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_project_metric(metric_name, log_metric_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:put, 'v2beta1/{+metricName}', options) - command.request_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation - command.request_object = log_metric_object - command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation - command.response_class = Google::Apis::LoggingV2beta1::LogMetric - command.params['metricName'] = metric_name unless metric_name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Creates a logs-based metric. - # @param [String] parent - # The resource name of the project in which to create the metric: - # "projects/[PROJECT_ID]" - # The new metric must be provided in the request. - # @param [Google::Apis::LoggingV2beta1::LogMetric] log_metric_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2beta1::LogMetric] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_project_metric(parent, log_metric_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v2beta1/{+parent}/metrics', options) - command.request_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation - command.request_object = log_metric_object - command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation - command.response_class = Google::Apis::LoggingV2beta1::LogMetric - command.params['parent'] = parent unless parent.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -705,11 +587,11 @@ module Google # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog" # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com% # 2Factivity". For more information about log names, see LogEntry. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -722,13 +604,13 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_billing_account_log(log_name, quota_user: nil, fields: nil, options: nil, &block) + def delete_billing_account_log(log_name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v2beta1/{+logName}', options) command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation command.response_class = Google::Apis::LoggingV2beta1::Empty command.params['logName'] = log_name unless log_name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -747,11 +629,11 @@ module Google # Optional. The maximum number of results to return from this request. Non- # positive values are ignored. The presence of nextPageToken in the response # indicates that more results might be available. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -764,23 +646,141 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_billing_account_logs(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_billing_account_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta1/{+parent}/logs', options) command.response_representation = Google::Apis::LoggingV2beta1::ListLogsResponse::Representation command.response_class = Google::Apis::LoggingV2beta1::ListLogsResponse command.params['parent'] = parent unless parent.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists the descriptors for monitored resource types used by Stackdriver Logging. + # @param [Fixnum] page_size + # Optional. The maximum number of results to return from this request. Non- + # positive values are ignored. The presence of nextPageToken in the response + # indicates that more results might be available. + # @param [String] page_token + # Optional. If present, then retrieve the next batch of results from the + # preceding call to this method. pageToken must be the value of nextPageToken + # from the previous response. The values of other method parameters should be + # identical to those in the previous call. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::LoggingV2beta1::ListMonitoredResourceDescriptorsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2beta1::ListMonitoredResourceDescriptorsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_monitored_resource_descriptors(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2beta1/monitoredResourceDescriptors', options) + command.response_representation = Google::Apis::LoggingV2beta1::ListMonitoredResourceDescriptorsResponse::Representation + command.response_class = Google::Apis::LoggingV2beta1::ListMonitoredResourceDescriptorsResponse + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes all the log entries in a log. The log reappears if it receives new + # entries. + # @param [String] log_name + # Required. The resource name of the log to delete: + # "projects/[PROJECT_ID]/logs/[LOG_ID]" + # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog" + # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com% + # 2Factivity". For more information about log names, see LogEntry. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::LoggingV2beta1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2beta1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_organization_log(log_name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v2beta1/{+logName}', options) + command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation + command.response_class = Google::Apis::LoggingV2beta1::Empty + command.params['logName'] = log_name unless log_name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists the logs in projects or organizations. Only logs that have entries are + # listed. + # @param [String] parent + # Required. The resource name that owns the logs: + # "projects/[PROJECT_ID]" + # "organizations/[ORGANIZATION_ID]" + # @param [String] page_token + # Optional. If present, then retrieve the next batch of results from the + # preceding call to this method. pageToken must be the value of nextPageToken + # from the previous response. The values of other method parameters should be + # identical to those in the previous call. + # @param [Fixnum] page_size + # Optional. The maximum number of results to return from this request. Non- + # positive values are ignored. The presence of nextPageToken in the response + # indicates that more results might be available. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::LoggingV2beta1::ListLogsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2beta1::ListLogsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_organization_logs(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2beta1/{+parent}/logs', options) + command.response_representation = Google::Apis::LoggingV2beta1::ListLogsResponse::Representation + command.response_class = Google::Apis::LoggingV2beta1::ListLogsResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end protected def apply_command_defaults(command) - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? end end end diff --git a/generated/google/apis/manufacturers_v1.rb b/generated/google/apis/manufacturers_v1.rb new file mode 100644 index 000000000..1db89133b --- /dev/null +++ b/generated/google/apis/manufacturers_v1.rb @@ -0,0 +1,34 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/manufacturers_v1/service.rb' +require 'google/apis/manufacturers_v1/classes.rb' +require 'google/apis/manufacturers_v1/representations.rb' + +module Google + module Apis + # Manufacturer Center API + # + # Public API for managing Manufacturer Center related data. + # + # @see https://developers.google.com/manufacturers/ + module ManufacturersV1 + VERSION = 'V1' + REVISION = '20161028' + + # Manage your product listings for Google Manufacturer Center + AUTH_MANUFACTURERCENTER = 'https://www.googleapis.com/auth/manufacturercenter' + end + end +end diff --git a/generated/google/apis/manufacturers_v1/classes.rb b/generated/google/apis/manufacturers_v1/classes.rb new file mode 100644 index 000000000..81b79ef7b --- /dev/null +++ b/generated/google/apis/manufacturers_v1/classes.rb @@ -0,0 +1,258 @@ +# 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 ManufacturersV1 + + # + class ListProductsResponse + include Google::Apis::Core::Hashable + + # The token for the retrieval of the next page of product statuses. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # List of the products. + # Corresponds to the JSON property `products` + # @return [Array] + attr_accessor :products + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @products = args[:products] if args.key?(:products) + end + end + + # Product issue. + class Issue + include Google::Apis::Core::Hashable + + # The severity of the issue. + # Corresponds to the JSON property `severity` + # @return [String] + attr_accessor :severity + + # Description of the issue. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # If present, the attribute that triggered the issue. For more information + # about attributes, see + # https://support.google.com/manufacturers/answer/6124116. + # Corresponds to the JSON property `attribute` + # @return [String] + attr_accessor :attribute + + # The server-generated type of the issue, for example, + # “INCORRECT_TEXT_FORMATTING”, “IMAGE_NOT_SERVEABLE”, etc. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @severity = args[:severity] if args.key?(:severity) + @description = args[:description] if args.key?(:description) + @attribute = args[:attribute] if args.key?(:attribute) + @type = args[:type] if args.key?(:type) + end + end + + # Attributes of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116. + class Attributes + include Google::Apis::Core::Hashable + + # The URL of the manufacturer's detail page of the product. For more + # information, see + # https://support.google.com/manufacturers/answer/6124116#productpage. + # Corresponds to the JSON property `productPageUrl` + # @return [String] + attr_accessor :product_page_url + + # The Manufacturer Part Number (MPN) of the product. For more information, + # see https://support.google.com/manufacturers/answer/6124116#mpn. + # Corresponds to the JSON property `mpn` + # @return [String] + attr_accessor :mpn + + # The title of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#title. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # The name of the group of products related to the product. For more + # information, see + # https://support.google.com/manufacturers/answer/6124116#productline. + # Corresponds to the JSON property `productLine` + # @return [String] + attr_accessor :product_line + + # The canonical name of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#productname. + # Corresponds to the JSON property `productName` + # @return [String] + attr_accessor :product_name + + # The brand name of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#brand. + # Corresponds to the JSON property `brand` + # @return [String] + attr_accessor :brand + + # The manufacturer's category of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#producttype. + # Corresponds to the JSON property `productType` + # @return [Array] + attr_accessor :product_type + + # The Global Trade Item Number (GTIN) of the product. For more information, + # see https://support.google.com/manufacturers/answer/6124116#gtin. + # Corresponds to the JSON property `gtin` + # @return [Array] + attr_accessor :gtin + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @product_page_url = args[:product_page_url] if args.key?(:product_page_url) + @mpn = args[:mpn] if args.key?(:mpn) + @title = args[:title] if args.key?(:title) + @product_line = args[:product_line] if args.key?(:product_line) + @product_name = args[:product_name] if args.key?(:product_name) + @brand = args[:brand] if args.key?(:brand) + @product_type = args[:product_type] if args.key?(:product_type) + @gtin = args[:gtin] if args.key?(:gtin) + end + end + + # Product data. + class Product + include Google::Apis::Core::Hashable + + # Parent ID in the format `accounts/`account_id``. + # `account_id` - The ID of the Manufacturer Center account. + # @OutputOnly + # Corresponds to the JSON property `parent` + # @return [String] + attr_accessor :parent + + # The target country of the product as a CLDR territory code (for example, + # US). + # @OutputOnly + # Corresponds to the JSON property `targetCountry` + # @return [String] + attr_accessor :target_country + + # The content language of the product as a two-letter ISO 639-1 language code + # (for example, en). + # @OutputOnly + # Corresponds to the JSON property `contentLanguage` + # @return [String] + attr_accessor :content_language + + # Names of the attributes of the product deleted manually via the + # Manufacturer Center UI. + # @OutputOnly + # Corresponds to the JSON property `manuallyDeletedAttributes` + # @return [Array] + attr_accessor :manually_deleted_attributes + + # The ID of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#id. + # @OutputOnly + # Corresponds to the JSON property `productId` + # @return [String] + attr_accessor :product_id + + # Attributes of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116. + # Corresponds to the JSON property `finalAttributes` + # @return [Google::Apis::ManufacturersV1::Attributes] + attr_accessor :final_attributes + + # A server-generated list of issues associated with the product. + # @OutputOnly + # Corresponds to the JSON property `issues` + # @return [Array] + attr_accessor :issues + + # Name in the format ``target_country`:`content_language`:`product_id``. + # `target_country` - The target country of the product as a CLDR territory + # code (for example, US). + # `content_language` - The content language of the product as a two-letter + # ISO 639-1 language code (for example, en). + # `product_id` - The ID of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116# + # id. + # @OutputOnly + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Attributes of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116. + # Corresponds to the JSON property `uploadedAttributes` + # @return [Google::Apis::ManufacturersV1::Attributes] + attr_accessor :uploaded_attributes + + # Attributes of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116. + # Corresponds to the JSON property `manuallyProvidedAttributes` + # @return [Google::Apis::ManufacturersV1::Attributes] + attr_accessor :manually_provided_attributes + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @parent = args[:parent] if args.key?(:parent) + @target_country = args[:target_country] if args.key?(:target_country) + @content_language = args[:content_language] if args.key?(:content_language) + @manually_deleted_attributes = args[:manually_deleted_attributes] if args.key?(:manually_deleted_attributes) + @product_id = args[:product_id] if args.key?(:product_id) + @final_attributes = args[:final_attributes] if args.key?(:final_attributes) + @issues = args[:issues] if args.key?(:issues) + @name = args[:name] if args.key?(:name) + @uploaded_attributes = args[:uploaded_attributes] if args.key?(:uploaded_attributes) + @manually_provided_attributes = args[:manually_provided_attributes] if args.key?(:manually_provided_attributes) + end + end + end + end +end diff --git a/generated/google/apis/manufacturers_v1/representations.rb b/generated/google/apis/manufacturers_v1/representations.rb new file mode 100644 index 000000000..080483f4f --- /dev/null +++ b/generated/google/apis/manufacturers_v1/representations.rb @@ -0,0 +1,103 @@ +# 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 ManufacturersV1 + + class ListProductsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Issue + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Attributes + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Product + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListProductsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :products, as: 'products', class: Google::Apis::ManufacturersV1::Product, decorator: Google::Apis::ManufacturersV1::Product::Representation + + end + end + + class Issue + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :severity, as: 'severity' + property :description, as: 'description' + property :attribute, as: 'attribute' + property :type, as: 'type' + end + end + + class Attributes + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :product_page_url, as: 'productPageUrl' + property :mpn, as: 'mpn' + property :title, as: 'title' + property :product_line, as: 'productLine' + property :product_name, as: 'productName' + property :brand, as: 'brand' + collection :product_type, as: 'productType' + collection :gtin, as: 'gtin' + end + end + + class Product + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :parent, as: 'parent' + property :target_country, as: 'targetCountry' + property :content_language, as: 'contentLanguage' + collection :manually_deleted_attributes, as: 'manuallyDeletedAttributes' + property :product_id, as: 'productId' + property :final_attributes, as: 'finalAttributes', class: Google::Apis::ManufacturersV1::Attributes, decorator: Google::Apis::ManufacturersV1::Attributes::Representation + + collection :issues, as: 'issues', class: Google::Apis::ManufacturersV1::Issue, decorator: Google::Apis::ManufacturersV1::Issue::Representation + + property :name, as: 'name' + property :uploaded_attributes, as: 'uploadedAttributes', class: Google::Apis::ManufacturersV1::Attributes, decorator: Google::Apis::ManufacturersV1::Attributes::Representation + + property :manually_provided_attributes, as: 'manuallyProvidedAttributes', class: Google::Apis::ManufacturersV1::Attributes, decorator: Google::Apis::ManufacturersV1::Attributes::Representation + + end + end + end + end +end diff --git a/generated/google/apis/manufacturers_v1/service.rb b/generated/google/apis/manufacturers_v1/service.rb new file mode 100644 index 000000000..fb2e63a2c --- /dev/null +++ b/generated/google/apis/manufacturers_v1/service.rb @@ -0,0 +1,138 @@ +# 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 ManufacturersV1 + # Manufacturer Center API + # + # Public API for managing Manufacturer Center related data. + # + # @example + # require 'google/apis/manufacturers_v1' + # + # Manufacturers = Google::Apis::ManufacturersV1 # Alias the module + # service = Manufacturers::ManufacturerCenterService.new + # + # @see https://developers.google.com/manufacturers/ + class ManufacturerCenterService < Google::Apis::Core::BaseService + # @return [String] + # API key. Your API key identifies your project and provides you with API access, + # quota, and reports. Required unless you provide an OAuth 2.0 token. + attr_accessor :key + + # @return [String] + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + attr_accessor :quota_user + + def initialize + super('https://manufacturers.googleapis.com/', '') + end + + # Gets the product from a Manufacturer Center account, including product + # issues. + # @param [String] parent + # Parent ID in the format `accounts/`account_id``. + # `account_id` - The ID of the Manufacturer Center account. + # @param [String] name + # Name in the format ``target_country`:`content_language`:`product_id``. + # `target_country` - The target country of the product as a CLDR territory + # code (for example, US). + # `content_language` - The content language of the product as a two-letter + # ISO 639-1 language code (for example, en). + # `product_id` - The ID of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116# + # id. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ManufacturersV1::Product] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ManufacturersV1::Product] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_account_product(parent, name, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+parent}/products/{+name}', options) + command.response_representation = Google::Apis::ManufacturersV1::Product::Representation + command.response_class = Google::Apis::ManufacturersV1::Product + command.params['parent'] = parent unless parent.nil? + command.params['name'] = name unless name.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Lists all the products in a Manufacturer Center account. + # @param [String] parent + # Parent ID in the format `accounts/`account_id``. + # `account_id` - The ID of the Manufacturer Center account. + # @param [Fixnum] page_size + # Maximum number of product statuses to return in the response, used for + # paging. + # @param [String] page_token + # The token returned by the previous request. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ManufacturersV1::ListProductsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ManufacturersV1::ListProductsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_account_products(parent, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+parent}/products', options) + command.response_representation = Google::Apis::ManufacturersV1::ListProductsResponse::Representation + command.response_class = Google::Apis::ManufacturersV1::ListProductsResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + protected + + def apply_command_defaults(command) + command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + end + end + end + end +end diff --git a/generated/google/apis/monitoring_v3.rb b/generated/google/apis/monitoring_v3.rb index 481fab98e..f2889a189 100644 --- a/generated/google/apis/monitoring_v3.rb +++ b/generated/google/apis/monitoring_v3.rb @@ -27,19 +27,19 @@ module Google # @see https://cloud.google.com/monitoring/api/ module MonitoringV3 VERSION = 'V3' - REVISION = '20170123' + REVISION = '20170126' + + # View and write monitoring data for all of your Google and third-party Cloud and API projects + AUTH_MONITORING = 'https://www.googleapis.com/auth/monitoring' + + # Publish metric data to your Google Cloud projects + AUTH_MONITORING_WRITE = 'https://www.googleapis.com/auth/monitoring.write' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' # View monitoring data for all of your Google Cloud and third-party projects AUTH_MONITORING_READ = 'https://www.googleapis.com/auth/monitoring.read' - - # Publish metric data to your Google Cloud projects - AUTH_MONITORING_WRITE = 'https://www.googleapis.com/auth/monitoring.write' - - # View and write monitoring data for all of your Google and third-party Cloud and API projects - AUTH_MONITORING = 'https://www.googleapis.com/auth/monitoring' end end end diff --git a/generated/google/apis/monitoring_v3/classes.rb b/generated/google/apis/monitoring_v3/classes.rb index 8657c8687..41293bd12 100644 --- a/generated/google/apis/monitoring_v3/classes.rb +++ b/generated/google/apis/monitoring_v3/classes.rb @@ -22,22 +22,53 @@ module Google module Apis module MonitoringV3 - # A specific metric, identified by specifying values for all of the labels of a - # MetricDescriptor. - class Metric + # A Distribution may optionally contain a histogram of the values in the + # population. The histogram is given in bucket_counts as counts of values that + # fall into one of a sequence of non-overlapping buckets. The sequence of + # buckets is described by bucket_options.A bucket specifies an inclusive lower + # bound and exclusive upper bound for the values that are counted for that + # bucket. The upper bound of a bucket is strictly greater than the lower bound. + # The sequence of N buckets for a Distribution consists of an underflow bucket ( + # number 0), zero or more finite buckets (number 1 through N - 2) and an + # overflow bucket (number N - 1). The buckets are contiguous: the lower bound of + # bucket i (i > 0) is the same as the upper bound of bucket i - 1. The buckets + # span the whole range of finite values: lower bound of the underflow bucket is - + # infinity and the upper bound of the overflow bucket is +infinity. The finite + # buckets are so-called because both bounds are finite.BucketOptions describes + # bucket boundaries in one of three ways. Two describe the boundaries by giving + # parameters for a formula to generate boundaries and one gives the bucket + # boundaries explicitly.If bucket_options is not given, then no bucket_counts + # may be given. + class BucketOptions include Google::Apis::Core::Hashable - # The set of label values that uniquely identify this metric. All labels listed - # in the MetricDescriptor must be assigned values. - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels + # Specify a sequence of buckets that have a width that is proportional to the + # value of the lower bound. Each bucket represents a constant relative + # uncertainty on a specific value in the bucket.Defines num_finite_buckets + 2 (= + # N) buckets with these boundaries for bucket i:Upper bound (0 <= i < N-1): + # scale * (growth_factor ^ i). Lower bound (1 <= i < N): scale * (growth_factor + # ^ (i - 1)). + # Corresponds to the JSON property `exponentialBuckets` + # @return [Google::Apis::MonitoringV3::Exponential] + attr_accessor :exponential_buckets - # An existing metric type, see google.api.MetricDescriptor. For example, custom. - # googleapis.com/invoice/paid/amount. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type + # Specify a sequence of buckets that all have the same width (except overflow + # and underflow). Each bucket represents a constant absolute uncertainty on the + # specific value in the bucket.Defines num_finite_buckets + 2 (= N) buckets with + # these boundaries for bucket i:Upper bound (0 <= i < N-1): offset + (width * i). + # Lower bound (1 <= i < N): offset + (width * (i - 1)). + # Corresponds to the JSON property `linearBuckets` + # @return [Google::Apis::MonitoringV3::Linear] + attr_accessor :linear_buckets + + # A set of buckets with arbitrary widths.Defines size(bounds) + 1 (= N) buckets + # with these boundaries for bucket i:Upper bound (0 <= i < N-1): boundsi Lower + # bound (1 <= i < N); boundsi - 1There must be at least one element in bounds. + # If bounds has only one element, there are no finite buckets, and that single + # element is the common boundary of the overflow and underflow buckets. + # Corresponds to the JSON property `explicitBuckets` + # @return [Google::Apis::MonitoringV3::Explicit] + attr_accessor :explicit_buckets def initialize(**args) update!(**args) @@ -45,192 +76,9 @@ module Google # Update properties of this object def update!(**args) - @labels = args[:labels] if args.key?(:labels) - @type = args[:type] if args.key?(:type) - end - end - - # The ListGroupMembers response. - class ListGroupMembersResponse - include Google::Apis::Core::Hashable - - # A set of monitored resources in the group. - # Corresponds to the JSON property `members` - # @return [Array] - attr_accessor :members - - # If there are more results than have been returned, then this field is set to a - # non-empty value. To see the additional results, use that value as pageToken in - # the next call to this method. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The total number of elements matching this request. - # Corresponds to the JSON property `totalSize` - # @return [Fixnum] - attr_accessor :total_size - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @members = args[:members] if args.key?(:members) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @total_size = args[:total_size] if args.key?(:total_size) - end - end - - # A time interval extending just after a start time through an end time. If the - # start time is the same as the end time, then the interval represents a single - # point in time. - class TimeInterval - include Google::Apis::Core::Hashable - - # Required. The end of the time interval. - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - # Optional. The beginning of the time interval. The default value for the start - # time is the end time. The start time must not be later than the end time. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end_time = args[:end_time] if args.key?(:end_time) - @start_time = args[:start_time] if args.key?(:start_time) - end - end - - # The description of a dynamic collection of monitored resources. Each group has - # a filter that is matched against monitored resources and their associated - # metadata. If a group's filter matches an available monitored resource, then - # that resource is a member of that group. Groups can contain any number of - # monitored resources, and each monitored resource can be a member of any number - # of groups.Groups can be nested in parent-child hierarchies. The parentName - # field identifies an optional parent for each group. If a group has a parent, - # then the only monitored resources available to be matched by the group's - # filter are the resources contained in the parent group. In other words, a - # group contains the monitored resources that match its filter and the filters - # of all the group's ancestors. A group without a parent can contain any - # monitored resource.For example, consider an infrastructure running a set of - # instances with two user-defined tags: "environment" and "role". A parent group - # has a filter, environment="production". A child of that parent group has a - # filter, role="transcoder". The parent group contains all instances in the - # production environment, regardless of their roles. The child group contains - # instances that have the transcoder role and are in the production environment. - # The monitored resources contained in a group can change at any moment, - # depending on what resources exist and what filters are associated with the - # group and its ancestors. - class Group - include Google::Apis::Core::Hashable - - # A user-assigned name for this group, used only for display purposes. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The name of the group's parent, if it has one. The format is "projects/` - # project_id_or_number`/groups/`group_id`". For groups with no parent, - # parentName is the empty string, "". - # Corresponds to the JSON property `parentName` - # @return [String] - attr_accessor :parent_name - - # If true, the members of this group are considered to be a cluster. The system - # can perform additional analysis on groups that are clusters. - # Corresponds to the JSON property `isCluster` - # @return [Boolean] - attr_accessor :is_cluster - alias_method :is_cluster?, :is_cluster - - # The filter used to determine which monitored resources belong to this group. - # Corresponds to the JSON property `filter` - # @return [String] - attr_accessor :filter - - # Output only. The name of this group. The format is "projects/` - # project_id_or_number`/groups/`group_id`". When creating a group, this field is - # ignored and a new name is created consisting of the project specified in the - # call to CreateGroup and a unique `group_id` that is generated automatically. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @display_name = args[:display_name] if args.key?(:display_name) - @parent_name = args[:parent_name] if args.key?(:parent_name) - @is_cluster = args[:is_cluster] if args.key?(:is_cluster) - @filter = args[:filter] if args.key?(:filter) - @name = args[:name] if args.key?(:name) - end - end - - # The ListTimeSeries response. - class ListTimeSeriesResponse - include Google::Apis::Core::Hashable - - # One or more time series that match the filter included in the request. - # Corresponds to the JSON property `timeSeries` - # @return [Array] - attr_accessor :time_series - - # If there are more results than have been returned, then this field is set to a - # non-empty value. To see the additional results, use that value as pageToken in - # the next call to this method. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @time_series = args[:time_series] if args.key?(:time_series) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # A single data point in a time series. - class Point - include Google::Apis::Core::Hashable - - # A single strongly-typed value. - # Corresponds to the JSON property `value` - # @return [Google::Apis::MonitoringV3::TypedValue] - attr_accessor :value - - # A time interval extending just after a start time through an end time. If the - # start time is the same as the end time, then the interval represents a single - # point in time. - # Corresponds to the JSON property `interval` - # @return [Google::Apis::MonitoringV3::TimeInterval] - attr_accessor :interval - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @value = args[:value] if args.key?(:value) - @interval = args[:interval] if args.key?(:interval) + @exponential_buckets = args[:exponential_buckets] if args.key?(:exponential_buckets) + @linear_buckets = args[:linear_buckets] if args.key?(:linear_buckets) + @explicit_buckets = args[:explicit_buckets] if args.key?(:explicit_buckets) end end @@ -238,17 +86,17 @@ module Google class CollectdValue include Google::Apis::Core::Hashable - # A single strongly-typed value. - # Corresponds to the JSON property `value` - # @return [Google::Apis::MonitoringV3::TypedValue] - attr_accessor :value - # The data source for the collectd value. For example there are two data sources # for network measurements: "rx" and "tx". # Corresponds to the JSON property `dataSourceName` # @return [String] attr_accessor :data_source_name + # A single strongly-typed value. + # Corresponds to the JSON property `value` + # @return [Google::Apis::MonitoringV3::TypedValue] + attr_accessor :value + # The type of measurement. # Corresponds to the JSON property `dataSourceType` # @return [String] @@ -260,70 +108,22 @@ module Google # Update properties of this object def update!(**args) - @value = args[:value] if args.key?(:value) @data_source_name = args[:data_source_name] if args.key?(:data_source_name) + @value = args[:value] if args.key?(:value) @data_source_type = args[:data_source_type] if args.key?(:data_source_type) end end - # A collection of data points that describes the time-varying values of a metric. - # A time series is identified by a combination of a fully-specified monitored - # resource and a fully-specified metric. This type is used for both listing and - # creating time series. - class TimeSeries + # SourceContext represents information about the source of a protobuf element, + # like the file in which it is defined. + class SourceContext include Google::Apis::Core::Hashable - # A specific metric, identified by specifying values for all of the labels of a - # MetricDescriptor. - # Corresponds to the JSON property `metric` - # @return [Google::Apis::MonitoringV3::Metric] - attr_accessor :metric - - # The data points of this time series. When listing time series, the order of - # the points is specified by the list method.When creating a time series, this - # field must contain exactly one point and the point's type must be the same as - # the value type of the associated metric. If the associated metric's descriptor - # must be auto-created, then the value type of the descriptor is determined by - # the point's type, which must be BOOL, INT64, DOUBLE, or DISTRIBUTION. - # Corresponds to the JSON property `points` - # @return [Array] - attr_accessor :points - - # The value type of the time series. When listing time series, this value type - # might be different from the value type of the associated metric if this time - # series is an alignment or reduction of other time series.When creating a time - # series, this field is optional. If present, it must be the same as the type of - # the data in the points field. - # Corresponds to the JSON property `valueType` + # The path-qualified name of the .proto file that contained the associated + # protobuf element. For example: "google/protobuf/source_context.proto". + # Corresponds to the JSON property `fileName` # @return [String] - attr_accessor :value_type - - # An object representing a resource that can be used for monitoring, logging, - # billing, or other purposes. Examples include virtual machine instances, - # databases, and storage devices such as disks. The type field identifies a - # MonitoredResourceDescriptor object that describes the resource's schema. - # Information in the labels field identifies the actual resource and its - # attributes according to the schema. For example, a particular Compute Engine - # VM instance could be represented by the following object, because the - # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and " - # zone": - # ` "type": "gce_instance", - # "labels": ` "instance_id": "12345678901234", - # "zone": "us-central1-a" `` - # Corresponds to the JSON property `resource` - # @return [Google::Apis::MonitoringV3::MonitoredResource] - attr_accessor :resource - - # The metric kind of the time series. When listing time series, this metric kind - # might be different from the metric kind of the associated metric if this time - # series is an alignment or reduction of other time series.When creating a time - # series, this field is optional. If present, it must be the same as the metric - # kind of the associated metric. If the associated metric's descriptor must be - # auto-created, then this field specifies the metric kind of the new descriptor - # and must be either GAUGE (the default) or CUMULATIVE. - # Corresponds to the JSON property `metricKind` - # @return [String] - attr_accessor :metric_kind + attr_accessor :file_name def initialize(**args) update!(**args) @@ -331,11 +131,7 @@ module Google # Update properties of this object def update!(**args) - @metric = args[:metric] if args.key?(:metric) - @points = args[:points] if args.key?(:points) - @value_type = args[:value_type] if args.key?(:value_type) - @resource = args[:resource] if args.key?(:resource) - @metric_kind = args[:metric_kind] if args.key?(:metric_kind) + @file_name = args[:file_name] if args.key?(:file_name) end end @@ -345,11 +141,6 @@ module Google class MetricDescriptor include Google::Apis::Core::Hashable - # A detailed description of the metric, which can be used in documentation. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - # The unit in which the metric value is reported. It is only applicable if the # value_type is INT64, DOUBLE, or DISTRIBUTION. The supported units are a subset # of The Unified Code for Units of Measure (http://unitsofmeasure.org/ucum.html) @@ -409,24 +200,6 @@ module Google # @return [Array] attr_accessor :labels - # Whether the metric records instantaneous values, changes to a value, etc. Some - # combinations of metric_kind and value_type might not be supported. - # Corresponds to the JSON property `metricKind` - # @return [String] - attr_accessor :metric_kind - - # Whether the measurement is an integer, a floating-point number, etc. Some - # combinations of metric_kind and value_type might not be supported. - # Corresponds to the JSON property `valueType` - # @return [String] - attr_accessor :value_type - - # A concise name for the metric, which can be displayed in user interfaces. Use - # sentence case without an ending period, for example "Request count". - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - # The resource name of the metric descriptor. Depending on the implementation, # the name typically includes: (1) the parent resource name that defines the # scope of the metric type or of its data; and (2) the metric's URL-encoded type, @@ -448,20 +221,769 @@ module Google # @return [String] attr_accessor :type + # Whether the measurement is an integer, a floating-point number, etc. Some + # combinations of metric_kind and value_type might not be supported. + # Corresponds to the JSON property `valueType` + # @return [String] + attr_accessor :value_type + + # Whether the metric records instantaneous values, changes to a value, etc. Some + # combinations of metric_kind and value_type might not be supported. + # Corresponds to the JSON property `metricKind` + # @return [String] + attr_accessor :metric_kind + + # A concise name for the metric, which can be displayed in user interfaces. Use + # sentence case without an ending period, for example "Request count". + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # A detailed description of the metric, which can be used in documentation. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @description = args[:description] if args.key?(:description) @unit = args[:unit] if args.key?(:unit) @labels = args[:labels] if args.key?(:labels) - @metric_kind = args[:metric_kind] if args.key?(:metric_kind) - @value_type = args[:value_type] if args.key?(:value_type) - @display_name = args[:display_name] if args.key?(:display_name) @name = args[:name] if args.key?(:name) @type = args[:type] if args.key?(:type) + @value_type = args[:value_type] if args.key?(:value_type) + @metric_kind = args[:metric_kind] if args.key?(:metric_kind) + @display_name = args[:display_name] if args.key?(:display_name) + @description = args[:description] if args.key?(:description) + end + end + + # The range of the population values. + class Range + include Google::Apis::Core::Hashable + + # The minimum of the population values. + # Corresponds to the JSON property `min` + # @return [Float] + attr_accessor :min + + # The maximum of the population values. + # Corresponds to the JSON property `max` + # @return [Float] + attr_accessor :max + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @min = args[:min] if args.key?(:min) + @max = args[:max] if args.key?(:max) + end + end + + # The ListGroups response. + class ListGroupsResponse + include Google::Apis::Core::Hashable + + # The groups that match the specified filters. + # Corresponds to the JSON property `group` + # @return [Array] + attr_accessor :group + + # If there are more results than have been returned, then this field is set to a + # non-empty value. To see the additional results, use that value as pageToken in + # the next call to this method. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @group = args[:group] if args.key?(:group) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # The CreateCollectdTimeSeries request. + class CreateCollectdTimeSeriesRequest + include Google::Apis::Core::Hashable + + # An object representing a resource that can be used for monitoring, logging, + # billing, or other purposes. Examples include virtual machine instances, + # databases, and storage devices such as disks. The type field identifies a + # MonitoredResourceDescriptor object that describes the resource's schema. + # Information in the labels field identifies the actual resource and its + # attributes according to the schema. For example, a particular Compute Engine + # VM instance could be represented by the following object, because the + # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and " + # zone": + # ` "type": "gce_instance", + # "labels": ` "instance_id": "12345678901234", + # "zone": "us-central1-a" `` + # Corresponds to the JSON property `resource` + # @return [Google::Apis::MonitoringV3::MonitoredResource] + attr_accessor :resource + + # The collectd payloads representing the time series data. You must not include + # more than a single point for each time series, so no two payloads can have the + # same values for all of the fields plugin, plugin_instance, type, and + # type_instance. + # Corresponds to the JSON property `collectdPayloads` + # @return [Array] + attr_accessor :collectd_payloads + + # The version of collectd that collected the data. Example: "5.3.0-192.el6". + # Corresponds to the JSON property `collectdVersion` + # @return [String] + attr_accessor :collectd_version + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @resource = args[:resource] if args.key?(:resource) + @collectd_payloads = args[:collectd_payloads] if args.key?(:collectd_payloads) + @collectd_version = args[:collectd_version] if args.key?(:collectd_version) + end + end + + # The ListGroupMembers response. + class ListGroupMembersResponse + include Google::Apis::Core::Hashable + + # If there are more results than have been returned, then this field is set to a + # non-empty value. To see the additional results, use that value as pageToken in + # the next call to this method. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The total number of elements matching this request. + # Corresponds to the JSON property `totalSize` + # @return [Fixnum] + attr_accessor :total_size + + # A set of monitored resources in the group. + # Corresponds to the JSON property `members` + # @return [Array] + attr_accessor :members + + 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) + @total_size = args[:total_size] if args.key?(:total_size) + @members = args[:members] if args.key?(:members) + end + end + + # The ListMonitoredResourcDescriptors response. + class ListMonitoredResourceDescriptorsResponse + include Google::Apis::Core::Hashable + + # If there are more results than have been returned, then this field is set to a + # non-empty value. To see the additional results, use that value as pageToken in + # the next call to this method. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The monitored resource descriptors that are available to this project and that + # match filter, if present. + # Corresponds to the JSON property `resourceDescriptors` + # @return [Array] + attr_accessor :resource_descriptors + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @resource_descriptors = args[:resource_descriptors] if args.key?(:resource_descriptors) + end + end + + # A collection of data points that describes the time-varying values of a metric. + # A time series is identified by a combination of a fully-specified monitored + # resource and a fully-specified metric. This type is used for both listing and + # creating time series. + class TimeSeries + include Google::Apis::Core::Hashable + + # The metric kind of the time series. When listing time series, this metric kind + # might be different from the metric kind of the associated metric if this time + # series is an alignment or reduction of other time series.When creating a time + # series, this field is optional. If present, it must be the same as the metric + # kind of the associated metric. If the associated metric's descriptor must be + # auto-created, then this field specifies the metric kind of the new descriptor + # and must be either GAUGE (the default) or CUMULATIVE. + # Corresponds to the JSON property `metricKind` + # @return [String] + attr_accessor :metric_kind + + # A specific metric, identified by specifying values for all of the labels of a + # MetricDescriptor. + # Corresponds to the JSON property `metric` + # @return [Google::Apis::MonitoringV3::Metric] + attr_accessor :metric + + # The data points of this time series. When listing time series, the order of + # the points is specified by the list method.When creating a time series, this + # field must contain exactly one point and the point's type must be the same as + # the value type of the associated metric. If the associated metric's descriptor + # must be auto-created, then the value type of the descriptor is determined by + # the point's type, which must be BOOL, INT64, DOUBLE, or DISTRIBUTION. + # Corresponds to the JSON property `points` + # @return [Array] + attr_accessor :points + + # The value type of the time series. When listing time series, this value type + # might be different from the value type of the associated metric if this time + # series is an alignment or reduction of other time series.When creating a time + # series, this field is optional. If present, it must be the same as the type of + # the data in the points field. + # Corresponds to the JSON property `valueType` + # @return [String] + attr_accessor :value_type + + # An object representing a resource that can be used for monitoring, logging, + # billing, or other purposes. Examples include virtual machine instances, + # databases, and storage devices such as disks. The type field identifies a + # MonitoredResourceDescriptor object that describes the resource's schema. + # Information in the labels field identifies the actual resource and its + # attributes according to the schema. For example, a particular Compute Engine + # VM instance could be represented by the following object, because the + # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and " + # zone": + # ` "type": "gce_instance", + # "labels": ` "instance_id": "12345678901234", + # "zone": "us-central1-a" `` + # Corresponds to the JSON property `resource` + # @return [Google::Apis::MonitoringV3::MonitoredResource] + attr_accessor :resource + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @metric_kind = args[:metric_kind] if args.key?(:metric_kind) + @metric = args[:metric] if args.key?(:metric) + @points = args[:points] if args.key?(:points) + @value_type = args[:value_type] if args.key?(:value_type) + @resource = args[:resource] if args.key?(:resource) + end + end + + # The CreateTimeSeries request. + class CreateTimeSeriesRequest + include Google::Apis::Core::Hashable + + # The new data to be added to a list of time series. Adds at most one data point + # to each of several time series. The new data point must be more recent than + # any other point in its time series. Each TimeSeries value must fully specify a + # unique time series by supplying all label values for the metric and the + # monitored resource. + # Corresponds to the JSON property `timeSeries` + # @return [Array] + attr_accessor :time_series + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @time_series = args[:time_series] if args.key?(:time_series) + end + end + + # Distribution contains summary statistics for a population of values and, + # optionally, a histogram representing the distribution of those values across a + # specified set of histogram buckets.The summary statistics are the count, mean, + # sum of the squared deviation from the mean, the minimum, and the maximum of + # the set of population of values.The histogram is based on a sequence of + # buckets and gives a count of values that fall into each bucket. The boundaries + # of the buckets are given either explicitly or by specifying parameters for a + # method of computing them (buckets of fixed width or buckets of exponentially + # increasing width).Although it is not forbidden, it is generally a bad idea to + # include non-finite values (infinities or NaNs) in the population of values, as + # this will render the mean and sum_of_squared_deviation fields meaningless. + class Distribution + include Google::Apis::Core::Hashable + + # A Distribution may optionally contain a histogram of the values in the + # population. The histogram is given in bucket_counts as counts of values that + # fall into one of a sequence of non-overlapping buckets. The sequence of + # buckets is described by bucket_options.A bucket specifies an inclusive lower + # bound and exclusive upper bound for the values that are counted for that + # bucket. The upper bound of a bucket is strictly greater than the lower bound. + # The sequence of N buckets for a Distribution consists of an underflow bucket ( + # number 0), zero or more finite buckets (number 1 through N - 2) and an + # overflow bucket (number N - 1). The buckets are contiguous: the lower bound of + # bucket i (i > 0) is the same as the upper bound of bucket i - 1. The buckets + # span the whole range of finite values: lower bound of the underflow bucket is - + # infinity and the upper bound of the overflow bucket is +infinity. The finite + # buckets are so-called because both bounds are finite.BucketOptions describes + # bucket boundaries in one of three ways. Two describe the boundaries by giving + # parameters for a formula to generate boundaries and one gives the bucket + # boundaries explicitly.If bucket_options is not given, then no bucket_counts + # may be given. + # Corresponds to the JSON property `bucketOptions` + # @return [Google::Apis::MonitoringV3::BucketOptions] + attr_accessor :bucket_options + + # The sum of squared deviations from the mean of the values in the population. + # For values x_i this is: + # Sum[i=1..n]((x_i - mean)^2) + # Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition + # describes Welford's method for accumulating this sum in one pass.If count is + # zero then this field must be zero. + # Corresponds to the JSON property `sumOfSquaredDeviation` + # @return [Float] + attr_accessor :sum_of_squared_deviation + + # The range of the population values. + # Corresponds to the JSON property `range` + # @return [Google::Apis::MonitoringV3::Range] + attr_accessor :range + + # The number of values in the population. Must be non-negative. + # Corresponds to the JSON property `count` + # @return [String] + attr_accessor :count + + # The arithmetic mean of the values in the population. If count is zero then + # this field must be zero. + # Corresponds to the JSON property `mean` + # @return [Float] + attr_accessor :mean + + # If bucket_options is given, then the sum of the values in bucket_counts must + # equal the value in count. If bucket_options is not given, no bucket_counts + # fields may be given.Bucket counts are given in order under the numbering + # scheme described above (the underflow bucket has number 0; the finite buckets, + # if any, have numbers 1 through N-2; the overflow bucket has number N-1).The + # size of bucket_counts must be no greater than N as defined in bucket_options. + # Any suffix of trailing zero bucket_count fields may be omitted. + # Corresponds to the JSON property `bucketCounts` + # @return [Array] + attr_accessor :bucket_counts + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @bucket_options = args[:bucket_options] if args.key?(:bucket_options) + @sum_of_squared_deviation = args[:sum_of_squared_deviation] if args.key?(:sum_of_squared_deviation) + @range = args[:range] if args.key?(:range) + @count = args[:count] if args.key?(:count) + @mean = args[:mean] if args.key?(:mean) + @bucket_counts = args[:bucket_counts] if args.key?(:bucket_counts) + end + end + + # An object representing a resource that can be used for monitoring, logging, + # billing, or other purposes. Examples include virtual machine instances, + # databases, and storage devices such as disks. The type field identifies a + # MonitoredResourceDescriptor object that describes the resource's schema. + # Information in the labels field identifies the actual resource and its + # attributes according to the schema. For example, a particular Compute Engine + # VM instance could be represented by the following object, because the + # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and " + # zone": + # ` "type": "gce_instance", + # "labels": ` "instance_id": "12345678901234", + # "zone": "us-central1-a" `` + class MonitoredResource + include Google::Apis::Core::Hashable + + # Required. The monitored resource type. This field must match the type field of + # a MonitoredResourceDescriptor object. For example, the type of a Cloud SQL + # database is "cloudsql_database". + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # Required. Values for all of the labels listed in the associated monitored + # resource descriptor. For example, Cloud SQL databases use the labels " + # database_id" and "zone". + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type = args[:type] if args.key?(:type) + @labels = args[:labels] if args.key?(:labels) + end + end + + # The ListMetricDescriptors response. + class ListMetricDescriptorsResponse + include Google::Apis::Core::Hashable + + # The metric descriptors that are available to the project and that match the + # value of filter, if present. + # Corresponds to the JSON property `metricDescriptors` + # @return [Array] + attr_accessor :metric_descriptors + + # If there are more results than have been returned, then this field is set to a + # non-empty value. To see the additional results, use that value as pageToken in + # the next call to this method. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @metric_descriptors = args[:metric_descriptors] if args.key?(:metric_descriptors) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # An object that describes the schema of a MonitoredResource object using a type + # name and a set of labels. For example, the monitored resource descriptor for + # Google Compute Engine VM instances has a type of "gce_instance" and specifies + # the use of the labels "instance_id" and "zone" to identify particular VM + # instances.Different APIs can support different monitored resource types. APIs + # generally provide a list method that returns the monitored resource + # descriptors used by the API. + class MonitoredResourceDescriptor + include Google::Apis::Core::Hashable + + # Required. A set of labels used to describe instances of this monitored + # resource type. For example, an individual Google Cloud SQL database is + # identified by values for the labels "database_id" and "zone". + # Corresponds to the JSON property `labels` + # @return [Array] + attr_accessor :labels + + # Optional. The resource name of the monitored resource descriptor: "projects/` + # project_id`/monitoredResourceDescriptors/`type`" where `type` is the value of + # the type field in this object and `project_id` is a project ID that provides + # API-specific context for accessing the type. APIs that do not use project + # information can use the resource name format "monitoredResourceDescriptors/` + # type`". + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Optional. A concise name for the monitored resource type that might be + # displayed in user interfaces. It should be a Title Cased Noun Phrase, without + # any article or other determiners. For example, "Google Cloud SQL Database". + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Optional. A detailed description of the monitored resource type that might be + # used in documentation. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Required. The monitored resource type. For example, the type " + # cloudsql_database" represents databases in Google Cloud SQL. The maximum + # length of this value is 256 characters. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @labels = args[:labels] if args.key?(:labels) + @name = args[:name] if args.key?(:name) + @display_name = args[:display_name] if args.key?(:display_name) + @description = args[:description] if args.key?(:description) + @type = args[:type] if args.key?(:type) + end + end + + # A single strongly-typed value. + class TypedValue + include Google::Apis::Core::Hashable + + # A 64-bit integer. Its range is approximately ±9.2x1018. + # Corresponds to the JSON property `int64Value` + # @return [String] + attr_accessor :int64_value + + # Distribution contains summary statistics for a population of values and, + # optionally, a histogram representing the distribution of those values across a + # specified set of histogram buckets.The summary statistics are the count, mean, + # sum of the squared deviation from the mean, the minimum, and the maximum of + # the set of population of values.The histogram is based on a sequence of + # buckets and gives a count of values that fall into each bucket. The boundaries + # of the buckets are given either explicitly or by specifying parameters for a + # method of computing them (buckets of fixed width or buckets of exponentially + # increasing width).Although it is not forbidden, it is generally a bad idea to + # include non-finite values (infinities or NaNs) in the population of values, as + # this will render the mean and sum_of_squared_deviation fields meaningless. + # Corresponds to the JSON property `distributionValue` + # @return [Google::Apis::MonitoringV3::Distribution] + attr_accessor :distribution_value + + # A Boolean value: true or false. + # Corresponds to the JSON property `boolValue` + # @return [Boolean] + attr_accessor :bool_value + alias_method :bool_value?, :bool_value + + # A variable-length string value. + # Corresponds to the JSON property `stringValue` + # @return [String] + attr_accessor :string_value + + # A 64-bit double-precision floating-point number. Its magnitude is + # approximately ±10±300 and it has 16 significant + # digits of precision. + # Corresponds to the JSON property `doubleValue` + # @return [Float] + attr_accessor :double_value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @int64_value = args[:int64_value] if args.key?(:int64_value) + @distribution_value = args[:distribution_value] if args.key?(:distribution_value) + @bool_value = args[:bool_value] if args.key?(:bool_value) + @string_value = args[:string_value] if args.key?(:string_value) + @double_value = args[:double_value] if args.key?(:double_value) + end + end + + # A collection of data points sent from a collectd-based plugin. See the + # collectd documentation for more information. + class CollectdPayload + include Google::Apis::Core::Hashable + + # The measurement type instance. Example: "used". + # Corresponds to the JSON property `typeInstance` + # @return [String] + attr_accessor :type_instance + + # The measurement metadata. Example: "process_id" -> 12345 + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # The measurement type. Example: "memory". + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The name of the plugin. Example: "disk". + # Corresponds to the JSON property `plugin` + # @return [String] + attr_accessor :plugin + + # The instance name of the plugin Example: "hdcl". + # Corresponds to the JSON property `pluginInstance` + # @return [String] + attr_accessor :plugin_instance + + # The end time of the interval. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # The start time of the interval. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + # The measured values during this time interval. Each value must have a + # different dataSourceName. + # Corresponds to the JSON property `values` + # @return [Array] + attr_accessor :values + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type_instance = args[:type_instance] if args.key?(:type_instance) + @metadata = args[:metadata] if args.key?(:metadata) + @type = args[:type] if args.key?(:type) + @plugin = args[:plugin] if args.key?(:plugin) + @plugin_instance = args[:plugin_instance] if args.key?(:plugin_instance) + @end_time = args[:end_time] if args.key?(:end_time) + @start_time = args[:start_time] if args.key?(:start_time) + @values = args[:values] if args.key?(:values) + end + end + + # Specify a sequence of buckets that all have the same width (except overflow + # and underflow). Each bucket represents a constant absolute uncertainty on the + # specific value in the bucket.Defines num_finite_buckets + 2 (= N) buckets with + # these boundaries for bucket i:Upper bound (0 <= i < N-1): offset + (width * i). + # Lower bound (1 <= i < N): offset + (width * (i - 1)). + class Linear + include Google::Apis::Core::Hashable + + # Must be greater than 0. + # Corresponds to the JSON property `width` + # @return [Float] + attr_accessor :width + + # Lower bound of the first bucket. + # Corresponds to the JSON property `offset` + # @return [Float] + attr_accessor :offset + + # Must be greater than 0. + # Corresponds to the JSON property `numFiniteBuckets` + # @return [Fixnum] + attr_accessor :num_finite_buckets + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @width = args[:width] if args.key?(:width) + @offset = args[:offset] if args.key?(:offset) + @num_finite_buckets = args[:num_finite_buckets] if args.key?(:num_finite_buckets) + end + end + + # A generic empty message that you can re-use to avoid defining duplicated empty + # messages in your APIs. A typical example is to use it as the request or the + # response type of an API method. For instance: + # service Foo ` + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # ` + # The JSON representation for Empty is empty JSON object ``. + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # A protocol buffer option, which can be attached to a message, field, + # enumeration, etc. + class Option + include Google::Apis::Core::Hashable + + # The option's value packed in an Any message. If the value is a primitive, the + # corresponding wrapper type defined in google/protobuf/wrappers.proto should be + # used. If the value is an enum, it should be stored as an int32 value using the + # google.protobuf.Int32Value type. + # Corresponds to the JSON property `value` + # @return [Hash] + attr_accessor :value + + # The option's name. For protobuf built-in options (options defined in + # descriptor.proto), this is the short name. For example, "map_entry". For + # custom options, it should be the fully-qualified name. For example, "google. + # api.http". + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @value = args[:value] if args.key?(:value) + @name = args[:name] if args.key?(:name) + end + end + + # A time interval extending just after a start time through an end time. If the + # start time is the same as the end time, then the interval represents a single + # point in time. + class TimeInterval + include Google::Apis::Core::Hashable + + # Optional. The beginning of the time interval. The default value for the start + # time is the end time. The start time must not be later than the end time. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + # Required. The end of the time interval. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @start_time = args[:start_time] if args.key?(:start_time) + @end_time = args[:end_time] if args.key?(:end_time) + end + end + + # A set of buckets with arbitrary widths.Defines size(bounds) + 1 (= N) buckets + # with these boundaries for bucket i:Upper bound (0 <= i < N-1): boundsi Lower + # bound (1 <= i < N); boundsi - 1There must be at least one element in bounds. + # If bounds has only one element, there are no finite buckets, and that single + # element is the common boundary of the overflow and underflow buckets. + class Explicit + include Google::Apis::Core::Hashable + + # The values must be monotonically increasing. + # Corresponds to the JSON property `bounds` + # @return [Array] + attr_accessor :bounds + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @bounds = args[:bounds] if args.key?(:bounds) end end @@ -501,18 +1023,21 @@ module Google end end - # A set of buckets with arbitrary widths.Defines size(bounds) + 1 (= N) buckets - # with these boundaries for bucket i:Upper bound (0 <= i < N-1): boundsi Lower - # bound (1 <= i < N); boundsi - 1There must be at least one element in bounds. - # If bounds has only one element, there are no finite buckets, and that single - # element is the common boundary of the overflow and underflow buckets. - class Explicit + # A single data point in a time series. + class Point include Google::Apis::Core::Hashable - # The values must be monotonically increasing. - # Corresponds to the JSON property `bounds` - # @return [Array] - attr_accessor :bounds + # A time interval extending just after a start time through an end time. If the + # start time is the same as the end time, then the interval represents a single + # point in time. + # Corresponds to the JSON property `interval` + # @return [Google::Apis::MonitoringV3::TimeInterval] + attr_accessor :interval + + # A single strongly-typed value. + # Corresponds to the JSON property `value` + # @return [Google::Apis::MonitoringV3::TypedValue] + attr_accessor :value def initialize(**args) update!(**args) @@ -520,248 +1045,24 @@ module Google # Update properties of this object def update!(**args) - @bounds = args[:bounds] if args.key?(:bounds) + @interval = args[:interval] if args.key?(:interval) + @value = args[:value] if args.key?(:value) end end - # Specify a sequence of buckets that all have the same width (except overflow - # and underflow). Each bucket represents a constant absolute uncertainty on the - # specific value in the bucket.Defines num_finite_buckets + 2 (= N) buckets with - # these boundaries for bucket i:Upper bound (0 <= i < N-1): offset + (width * i). - # Lower bound (1 <= i < N): offset + (width * (i - 1)). - class Linear + # A specific metric, identified by specifying values for all of the labels of a + # MetricDescriptor. + class Metric include Google::Apis::Core::Hashable - # Must be greater than 0. - # Corresponds to the JSON property `width` - # @return [Float] - attr_accessor :width - - # Lower bound of the first bucket. - # Corresponds to the JSON property `offset` - # @return [Float] - attr_accessor :offset - - # Must be greater than 0. - # Corresponds to the JSON property `numFiniteBuckets` - # @return [Fixnum] - attr_accessor :num_finite_buckets - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @width = args[:width] if args.key?(:width) - @offset = args[:offset] if args.key?(:offset) - @num_finite_buckets = args[:num_finite_buckets] if args.key?(:num_finite_buckets) - end - end - - # A collection of data points sent from a collectd-based plugin. See the - # collectd documentation for more information. - class CollectdPayload - include Google::Apis::Core::Hashable - - # The end time of the interval. - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - # The measurement metadata. Example: "process_id" -> 12345 - # Corresponds to the JSON property `metadata` - # @return [Hash] - attr_accessor :metadata - - # The measured values during this time interval. Each value must have a - # different dataSourceName. - # Corresponds to the JSON property `values` - # @return [Array] - attr_accessor :values - - # The instance name of the plugin Example: "hdcl". - # Corresponds to the JSON property `pluginInstance` - # @return [String] - attr_accessor :plugin_instance - - # The start time of the interval. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - # The measurement type instance. Example: "used". - # Corresponds to the JSON property `typeInstance` - # @return [String] - attr_accessor :type_instance - - # The measurement type. Example: "memory". - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The name of the plugin. Example: "disk". - # Corresponds to the JSON property `plugin` - # @return [String] - attr_accessor :plugin - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @end_time = args[:end_time] if args.key?(:end_time) - @metadata = args[:metadata] if args.key?(:metadata) - @values = args[:values] if args.key?(:values) - @plugin_instance = args[:plugin_instance] if args.key?(:plugin_instance) - @start_time = args[:start_time] if args.key?(:start_time) - @type_instance = args[:type_instance] if args.key?(:type_instance) - @type = args[:type] if args.key?(:type) - @plugin = args[:plugin] if args.key?(:plugin) - end - end - - # The ListMetricDescriptors response. - class ListMetricDescriptorsResponse - include Google::Apis::Core::Hashable - - # The metric descriptors that are available to the project and that match the - # value of filter, if present. - # Corresponds to the JSON property `metricDescriptors` - # @return [Array] - attr_accessor :metric_descriptors - - # If there are more results than have been returned, then this field is set to a - # non-empty value. To see the additional results, use that value as pageToken in - # the next call to this method. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @metric_descriptors = args[:metric_descriptors] if args.key?(:metric_descriptors) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # Distribution contains summary statistics for a population of values and, - # optionally, a histogram representing the distribution of those values across a - # specified set of histogram buckets.The summary statistics are the count, mean, - # sum of the squared deviation from the mean, the minimum, and the maximum of - # the set of population of values.The histogram is based on a sequence of - # buckets and gives a count of values that fall into each bucket. The boundaries - # of the buckets are given either explicitly or by specifying parameters for a - # method of computing them (buckets of fixed width or buckets of exponentially - # increasing width).Although it is not forbidden, it is generally a bad idea to - # include non-finite values (infinities or NaNs) in the population of values, as - # this will render the mean and sum_of_squared_deviation fields meaningless. - class Distribution - include Google::Apis::Core::Hashable - - # If bucket_options is given, then the sum of the values in bucket_counts must - # equal the value in count. If bucket_options is not given, no bucket_counts - # fields may be given.Bucket counts are given in order under the numbering - # scheme described above (the underflow bucket has number 0; the finite buckets, - # if any, have numbers 1 through N-2; the overflow bucket has number N-1).The - # size of bucket_counts must be no greater than N as defined in bucket_options. - # Any suffix of trailing zero bucket_count fields may be omitted. - # Corresponds to the JSON property `bucketCounts` - # @return [Array] - attr_accessor :bucket_counts - - # A Distribution may optionally contain a histogram of the values in the - # population. The histogram is given in bucket_counts as counts of values that - # fall into one of a sequence of non-overlapping buckets. The sequence of - # buckets is described by bucket_options.A bucket specifies an inclusive lower - # bound and exclusive upper bound for the values that are counted for that - # bucket. The upper bound of a bucket is strictly greater than the lower bound. - # The sequence of N buckets for a Distribution consists of an underflow bucket ( - # number 0), zero or more finite buckets (number 1 through N - 2) and an - # overflow bucket (number N - 1). The buckets are contiguous: the lower bound of - # bucket i (i > 0) is the same as the upper bound of bucket i - 1. The buckets - # span the whole range of finite values: lower bound of the underflow bucket is - - # infinity and the upper bound of the overflow bucket is +infinity. The finite - # buckets are so-called because both bounds are finite.BucketOptions describes - # bucket boundaries in one of three ways. Two describe the boundaries by giving - # parameters for a formula to generate boundaries and one gives the bucket - # boundaries explicitly.If bucket_options is not given, then no bucket_counts - # may be given. - # Corresponds to the JSON property `bucketOptions` - # @return [Google::Apis::MonitoringV3::BucketOptions] - attr_accessor :bucket_options - - # The number of values in the population. Must be non-negative. - # Corresponds to the JSON property `count` - # @return [String] - attr_accessor :count - - # The sum of squared deviations from the mean of the values in the population. - # For values x_i this is: - # Sum[i=1..n]((x_i - mean)^2) - # Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition - # describes Welford's method for accumulating this sum in one pass.If count is - # zero then this field must be zero. - # Corresponds to the JSON property `sumOfSquaredDeviation` - # @return [Float] - attr_accessor :sum_of_squared_deviation - - # The arithmetic mean of the values in the population. If count is zero then - # this field must be zero. - # Corresponds to the JSON property `mean` - # @return [Float] - attr_accessor :mean - - # The range of the population values. - # Corresponds to the JSON property `range` - # @return [Google::Apis::MonitoringV3::Range] - attr_accessor :range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bucket_counts = args[:bucket_counts] if args.key?(:bucket_counts) - @bucket_options = args[:bucket_options] if args.key?(:bucket_options) - @count = args[:count] if args.key?(:count) - @sum_of_squared_deviation = args[:sum_of_squared_deviation] if args.key?(:sum_of_squared_deviation) - @mean = args[:mean] if args.key?(:mean) - @range = args[:range] if args.key?(:range) - end - end - - # An object representing a resource that can be used for monitoring, logging, - # billing, or other purposes. Examples include virtual machine instances, - # databases, and storage devices such as disks. The type field identifies a - # MonitoredResourceDescriptor object that describes the resource's schema. - # Information in the labels field identifies the actual resource and its - # attributes according to the schema. For example, a particular Compute Engine - # VM instance could be represented by the following object, because the - # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and " - # zone": - # ` "type": "gce_instance", - # "labels": ` "instance_id": "12345678901234", - # "zone": "us-central1-a" `` - class MonitoredResource - include Google::Apis::Core::Hashable - - # Required. Values for all of the labels listed in the associated monitored - # resource descriptor. For example, Cloud SQL databases use the labels " - # database_id" and "zone". + # The set of label values that uniquely identify this metric. All labels listed + # in the MetricDescriptor must be assigned values. # Corresponds to the JSON property `labels` # @return [Hash] attr_accessor :labels - # Required. The monitored resource type. This field must match the type field of - # a MonitoredResourceDescriptor object. For example, the type of a Cloud SQL - # database is "cloudsql_database". + # An existing metric type, see google.api.MetricDescriptor. For example, custom. + # googleapis.com/invoice/paid/amount. # Corresponds to the JSON property `type` # @return [String] attr_accessor :type @@ -777,190 +1078,30 @@ module Google end end - # A description of a label. - class LabelDescriptor - include Google::Apis::Core::Hashable - - # A human-readable description for the label. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The type of data that can be assigned to the label. - # Corresponds to the JSON property `valueType` - # @return [String] - attr_accessor :value_type - - # The label key. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @description = args[:description] if args.key?(:description) - @value_type = args[:value_type] if args.key?(:value_type) - @key = args[:key] if args.key?(:key) - end - end - - # An object that describes the schema of a MonitoredResource object using a type - # name and a set of labels. For example, the monitored resource descriptor for - # Google Compute Engine VM instances has a type of "gce_instance" and specifies - # the use of the labels "instance_id" and "zone" to identify particular VM - # instances.Different APIs can support different monitored resource types. APIs - # generally provide a list method that returns the monitored resource - # descriptors used by the API. - class MonitoredResourceDescriptor - include Google::Apis::Core::Hashable - - # Optional. A concise name for the monitored resource type that might be - # displayed in user interfaces. It should be a Title Cased Noun Phrase, without - # any article or other determiners. For example, "Google Cloud SQL Database". - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # Optional. A detailed description of the monitored resource type that might be - # used in documentation. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Required. A set of labels used to describe instances of this monitored - # resource type. For example, an individual Google Cloud SQL database is - # identified by values for the labels "database_id" and "zone". - # Corresponds to the JSON property `labels` - # @return [Array] - attr_accessor :labels - - # Required. The monitored resource type. For example, the type " - # cloudsql_database" represents databases in Google Cloud SQL. The maximum - # length of this value is 256 characters. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Optional. The resource name of the monitored resource descriptor: "projects/` - # project_id`/monitoredResourceDescriptors/`type`" where `type` is the value of - # the type field in this object and `project_id` is a project ID that provides - # API-specific context for accessing the type. APIs that do not use project - # information can use the resource name format "monitoredResourceDescriptors/` - # type`". - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @display_name = args[:display_name] if args.key?(:display_name) - @description = args[:description] if args.key?(:description) - @labels = args[:labels] if args.key?(:labels) - @type = args[:type] if args.key?(:type) - @name = args[:name] if args.key?(:name) - end - end - - # A single strongly-typed value. - class TypedValue - include Google::Apis::Core::Hashable - - # A Boolean value: true or false. - # Corresponds to the JSON property `boolValue` - # @return [Boolean] - attr_accessor :bool_value - alias_method :bool_value?, :bool_value - - # A variable-length string value. - # Corresponds to the JSON property `stringValue` - # @return [String] - attr_accessor :string_value - - # A 64-bit integer. Its range is approximately ±9.2x1018. - # Corresponds to the JSON property `int64Value` - # @return [String] - attr_accessor :int64_value - - # A 64-bit double-precision floating-point number. Its magnitude is - # approximately ±10±300 and it has 16 significant - # digits of precision. - # Corresponds to the JSON property `doubleValue` - # @return [Float] - attr_accessor :double_value - - # Distribution contains summary statistics for a population of values and, - # optionally, a histogram representing the distribution of those values across a - # specified set of histogram buckets.The summary statistics are the count, mean, - # sum of the squared deviation from the mean, the minimum, and the maximum of - # the set of population of values.The histogram is based on a sequence of - # buckets and gives a count of values that fall into each bucket. The boundaries - # of the buckets are given either explicitly or by specifying parameters for a - # method of computing them (buckets of fixed width or buckets of exponentially - # increasing width).Although it is not forbidden, it is generally a bad idea to - # include non-finite values (infinities or NaNs) in the population of values, as - # this will render the mean and sum_of_squared_deviation fields meaningless. - # Corresponds to the JSON property `distributionValue` - # @return [Google::Apis::MonitoringV3::Distribution] - attr_accessor :distribution_value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bool_value = args[:bool_value] if args.key?(:bool_value) - @string_value = args[:string_value] if args.key?(:string_value) - @int64_value = args[:int64_value] if args.key?(:int64_value) - @double_value = args[:double_value] if args.key?(:double_value) - @distribution_value = args[:distribution_value] if args.key?(:distribution_value) - end - end - - # The ListMonitoredResourcDescriptors response. - class ListMonitoredResourceDescriptorsResponse - include Google::Apis::Core::Hashable - - # If there are more results than have been returned, then this field is set to a - # non-empty value. To see the additional results, use that value as pageToken in - # the next call to this method. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The monitored resource descriptors that are available to this project and that - # match filter, if present. - # Corresponds to the JSON property `resourceDescriptors` - # @return [Array] - attr_accessor :resource_descriptors - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @resource_descriptors = args[:resource_descriptors] if args.key?(:resource_descriptors) - end - end - # A single field of a message type. class Field include Google::Apis::Core::Hashable - # The string value of the default value of this field. Proto2 syntax only. - # Corresponds to the JSON property `defaultValue` + # The field name. + # Corresponds to the JSON property `name` # @return [String] - attr_accessor :default_value + attr_accessor :name + + # The field type URL, without the scheme, for message or enumeration types. + # Example: "type.googleapis.com/google.protobuf.Timestamp". + # Corresponds to the JSON property `typeUrl` + # @return [String] + attr_accessor :type_url + + # The field number. + # Corresponds to the JSON property `number` + # @return [Fixnum] + attr_accessor :number + + # The field type. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind # The field JSON name. # Corresponds to the JSON property `jsonName` @@ -978,37 +1119,21 @@ module Google # @return [Fixnum] attr_accessor :oneof_index - # The field cardinality. - # Corresponds to the JSON property `cardinality` - # @return [String] - attr_accessor :cardinality - - # The field type URL, without the scheme, for message or enumeration types. - # Example: "type.googleapis.com/google.protobuf.Timestamp". - # Corresponds to the JSON property `typeUrl` - # @return [String] - attr_accessor :type_url - - # The field name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - # Whether to use alternative packed wire representation. # Corresponds to the JSON property `packed` # @return [Boolean] attr_accessor :packed alias_method :packed?, :packed - # The field number. - # Corresponds to the JSON property `number` - # @return [Fixnum] - attr_accessor :number - - # The field type. - # Corresponds to the JSON property `kind` + # The field cardinality. + # Corresponds to the JSON property `cardinality` # @return [String] - attr_accessor :kind + attr_accessor :cardinality + + # The string value of the default value of this field. Proto2 syntax only. + # Corresponds to the JSON property `defaultValue` + # @return [String] + attr_accessor :default_value def initialize(**args) update!(**args) @@ -1016,303 +1141,28 @@ module Google # Update properties of this object def update!(**args) - @default_value = args[:default_value] if args.key?(:default_value) + @name = args[:name] if args.key?(:name) + @type_url = args[:type_url] if args.key?(:type_url) + @number = args[:number] if args.key?(:number) + @kind = args[:kind] if args.key?(:kind) @json_name = args[:json_name] if args.key?(:json_name) @options = args[:options] if args.key?(:options) @oneof_index = args[:oneof_index] if args.key?(:oneof_index) - @cardinality = args[:cardinality] if args.key?(:cardinality) - @type_url = args[:type_url] if args.key?(:type_url) - @name = args[:name] if args.key?(:name) @packed = args[:packed] if args.key?(:packed) - @number = args[:number] if args.key?(:number) - @kind = args[:kind] if args.key?(:kind) + @cardinality = args[:cardinality] if args.key?(:cardinality) + @default_value = args[:default_value] if args.key?(:default_value) end end - # A protocol buffer option, which can be attached to a message, field, - # enumeration, etc. - class Option + # The ListTimeSeries response. + class ListTimeSeriesResponse include Google::Apis::Core::Hashable - # The option's value packed in an Any message. If the value is a primitive, the - # corresponding wrapper type defined in google/protobuf/wrappers.proto should be - # used. If the value is an enum, it should be stored as an int32 value using the - # google.protobuf.Int32Value type. - # Corresponds to the JSON property `value` - # @return [Hash] - attr_accessor :value - - # The option's name. For protobuf built-in options (options defined in - # descriptor.proto), this is the short name. For example, "map_entry". For - # custom options, it should be the fully-qualified name. For example, "google. - # api.http". - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @value = args[:value] if args.key?(:value) - @name = args[:name] if args.key?(:name) - end - end - - # A generic empty message that you can re-use to avoid defining duplicated empty - # messages in your APIs. A typical example is to use it as the request or the - # response type of an API method. For instance: - # service Foo ` - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # ` - # The JSON representation for Empty is empty JSON object ``. - class Empty - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # SourceContext represents information about the source of a protobuf element, - # like the file in which it is defined. - class SourceContext - include Google::Apis::Core::Hashable - - # The path-qualified name of the .proto file that contained the associated - # protobuf element. For example: "google/protobuf/source_context.proto". - # Corresponds to the JSON property `fileName` - # @return [String] - attr_accessor :file_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @file_name = args[:file_name] if args.key?(:file_name) - end - end - - # The range of the population values. - class Range - include Google::Apis::Core::Hashable - - # The maximum of the population values. - # Corresponds to the JSON property `max` - # @return [Float] - attr_accessor :max - - # The minimum of the population values. - # Corresponds to the JSON property `min` - # @return [Float] - attr_accessor :min - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @max = args[:max] if args.key?(:max) - @min = args[:min] if args.key?(:min) - end - end - - # The CreateTimeSeries request. - class CreateTimeSeriesRequest - include Google::Apis::Core::Hashable - - # The new data to be added to a list of time series. Adds at most one data point - # to each of several time series. The new data point must be more recent than - # any other point in its time series. Each TimeSeries value must fully specify a - # unique time series by supplying all label values for the metric and the - # monitored resource. + # One or more time series that match the filter included in the request. # Corresponds to the JSON property `timeSeries` # @return [Array] attr_accessor :time_series - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @time_series = args[:time_series] if args.key?(:time_series) - end - end - - # A Distribution may optionally contain a histogram of the values in the - # population. The histogram is given in bucket_counts as counts of values that - # fall into one of a sequence of non-overlapping buckets. The sequence of - # buckets is described by bucket_options.A bucket specifies an inclusive lower - # bound and exclusive upper bound for the values that are counted for that - # bucket. The upper bound of a bucket is strictly greater than the lower bound. - # The sequence of N buckets for a Distribution consists of an underflow bucket ( - # number 0), zero or more finite buckets (number 1 through N - 2) and an - # overflow bucket (number N - 1). The buckets are contiguous: the lower bound of - # bucket i (i > 0) is the same as the upper bound of bucket i - 1. The buckets - # span the whole range of finite values: lower bound of the underflow bucket is - - # infinity and the upper bound of the overflow bucket is +infinity. The finite - # buckets are so-called because both bounds are finite.BucketOptions describes - # bucket boundaries in one of three ways. Two describe the boundaries by giving - # parameters for a formula to generate boundaries and one gives the bucket - # boundaries explicitly.If bucket_options is not given, then no bucket_counts - # may be given. - class BucketOptions - include Google::Apis::Core::Hashable - - # A set of buckets with arbitrary widths.Defines size(bounds) + 1 (= N) buckets - # with these boundaries for bucket i:Upper bound (0 <= i < N-1): boundsi Lower - # bound (1 <= i < N); boundsi - 1There must be at least one element in bounds. - # If bounds has only one element, there are no finite buckets, and that single - # element is the common boundary of the overflow and underflow buckets. - # Corresponds to the JSON property `explicitBuckets` - # @return [Google::Apis::MonitoringV3::Explicit] - attr_accessor :explicit_buckets - - # Specify a sequence of buckets that have a width that is proportional to the - # value of the lower bound. Each bucket represents a constant relative - # uncertainty on a specific value in the bucket.Defines num_finite_buckets + 2 (= - # N) buckets with these boundaries for bucket i:Upper bound (0 <= i < N-1): - # scale * (growth_factor ^ i). Lower bound (1 <= i < N): scale * (growth_factor - # ^ (i - 1)). - # Corresponds to the JSON property `exponentialBuckets` - # @return [Google::Apis::MonitoringV3::Exponential] - attr_accessor :exponential_buckets - - # Specify a sequence of buckets that all have the same width (except overflow - # and underflow). Each bucket represents a constant absolute uncertainty on the - # specific value in the bucket.Defines num_finite_buckets + 2 (= N) buckets with - # these boundaries for bucket i:Upper bound (0 <= i < N-1): offset + (width * i). - # Lower bound (1 <= i < N): offset + (width * (i - 1)). - # Corresponds to the JSON property `linearBuckets` - # @return [Google::Apis::MonitoringV3::Linear] - attr_accessor :linear_buckets - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @explicit_buckets = args[:explicit_buckets] if args.key?(:explicit_buckets) - @exponential_buckets = args[:exponential_buckets] if args.key?(:exponential_buckets) - @linear_buckets = args[:linear_buckets] if args.key?(:linear_buckets) - end - end - - # The CreateCollectdTimeSeries request. - class CreateCollectdTimeSeriesRequest - include Google::Apis::Core::Hashable - - # The collectd payloads representing the time series data. You must not include - # more than a single point for each time series, so no two payloads can have the - # same values for all of the fields plugin, plugin_instance, type, and - # type_instance. - # Corresponds to the JSON property `collectdPayloads` - # @return [Array] - attr_accessor :collectd_payloads - - # The version of collectd that collected the data. Example: "5.3.0-192.el6". - # Corresponds to the JSON property `collectdVersion` - # @return [String] - attr_accessor :collectd_version - - # An object representing a resource that can be used for monitoring, logging, - # billing, or other purposes. Examples include virtual machine instances, - # databases, and storage devices such as disks. The type field identifies a - # MonitoredResourceDescriptor object that describes the resource's schema. - # Information in the labels field identifies the actual resource and its - # attributes according to the schema. For example, a particular Compute Engine - # VM instance could be represented by the following object, because the - # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and " - # zone": - # ` "type": "gce_instance", - # "labels": ` "instance_id": "12345678901234", - # "zone": "us-central1-a" `` - # Corresponds to the JSON property `resource` - # @return [Google::Apis::MonitoringV3::MonitoredResource] - attr_accessor :resource - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @collectd_payloads = args[:collectd_payloads] if args.key?(:collectd_payloads) - @collectd_version = args[:collectd_version] if args.key?(:collectd_version) - @resource = args[:resource] if args.key?(:resource) - end - end - - # A protocol buffer message type. - class Type - include Google::Apis::Core::Hashable - - # The list of types appearing in oneof definitions in this type. - # Corresponds to the JSON property `oneofs` - # @return [Array] - attr_accessor :oneofs - - # The protocol buffer options. - # Corresponds to the JSON property `options` - # @return [Array] - attr_accessor :options - - # SourceContext represents information about the source of a protobuf element, - # like the file in which it is defined. - # Corresponds to the JSON property `sourceContext` - # @return [Google::Apis::MonitoringV3::SourceContext] - attr_accessor :source_context - - # The list of fields. - # Corresponds to the JSON property `fields` - # @return [Array] - attr_accessor :fields - - # The fully qualified message name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The source syntax. - # Corresponds to the JSON property `syntax` - # @return [String] - attr_accessor :syntax - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @oneofs = args[:oneofs] if args.key?(:oneofs) - @options = args[:options] if args.key?(:options) - @source_context = args[:source_context] if args.key?(:source_context) - @fields = args[:fields] if args.key?(:fields) - @name = args[:name] if args.key?(:name) - @syntax = args[:syntax] if args.key?(:syntax) - end - end - - # The ListGroups response. - class ListGroupsResponse - include Google::Apis::Core::Hashable - - # The groups that match the specified filters. - # Corresponds to the JSON property `group` - # @return [Array] - attr_accessor :group - # If there are more results than have been returned, then this field is set to a # non-empty value. To see the additional results, use that value as pageToken in # the next call to this method. @@ -1326,10 +1176,160 @@ module Google # Update properties of this object def update!(**args) - @group = args[:group] if args.key?(:group) + @time_series = args[:time_series] if args.key?(:time_series) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) end end + + # A description of a label. + class LabelDescriptor + include Google::Apis::Core::Hashable + + # The label key. + # Corresponds to the JSON property `key` + # @return [String] + attr_accessor :key + + # A human-readable description for the label. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The type of data that can be assigned to the label. + # Corresponds to the JSON property `valueType` + # @return [String] + attr_accessor :value_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @key = args[:key] if args.key?(:key) + @description = args[:description] if args.key?(:description) + @value_type = args[:value_type] if args.key?(:value_type) + end + end + + # The description of a dynamic collection of monitored resources. Each group has + # a filter that is matched against monitored resources and their associated + # metadata. If a group's filter matches an available monitored resource, then + # that resource is a member of that group. Groups can contain any number of + # monitored resources, and each monitored resource can be a member of any number + # of groups.Groups can be nested in parent-child hierarchies. The parentName + # field identifies an optional parent for each group. If a group has a parent, + # then the only monitored resources available to be matched by the group's + # filter are the resources contained in the parent group. In other words, a + # group contains the monitored resources that match its filter and the filters + # of all the group's ancestors. A group without a parent can contain any + # monitored resource.For example, consider an infrastructure running a set of + # instances with two user-defined tags: "environment" and "role". A parent group + # has a filter, environment="production". A child of that parent group has a + # filter, role="transcoder". The parent group contains all instances in the + # production environment, regardless of their roles. The child group contains + # instances that have the transcoder role and are in the production environment. + # The monitored resources contained in a group can change at any moment, + # depending on what resources exist and what filters are associated with the + # group and its ancestors. + class Group + include Google::Apis::Core::Hashable + + # The filter used to determine which monitored resources belong to this group. + # Corresponds to the JSON property `filter` + # @return [String] + attr_accessor :filter + + # Output only. The name of this group. The format is "projects/` + # project_id_or_number`/groups/`group_id`". When creating a group, this field is + # ignored and a new name is created consisting of the project specified in the + # call to CreateGroup and a unique `group_id` that is generated automatically. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The name of the group's parent, if it has one. The format is "projects/` + # project_id_or_number`/groups/`group_id`". For groups with no parent, + # parentName is the empty string, "". + # Corresponds to the JSON property `parentName` + # @return [String] + attr_accessor :parent_name + + # A user-assigned name for this group, used only for display purposes. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # If true, the members of this group are considered to be a cluster. The system + # can perform additional analysis on groups that are clusters. + # Corresponds to the JSON property `isCluster` + # @return [Boolean] + attr_accessor :is_cluster + alias_method :is_cluster?, :is_cluster + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @filter = args[:filter] if args.key?(:filter) + @name = args[:name] if args.key?(:name) + @parent_name = args[:parent_name] if args.key?(:parent_name) + @display_name = args[:display_name] if args.key?(:display_name) + @is_cluster = args[:is_cluster] if args.key?(:is_cluster) + end + end + + # A protocol buffer message type. + class Type + include Google::Apis::Core::Hashable + + # The list of fields. + # Corresponds to the JSON property `fields` + # @return [Array] + attr_accessor :fields + + # The fully qualified message name. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The list of types appearing in oneof definitions in this type. + # Corresponds to the JSON property `oneofs` + # @return [Array] + attr_accessor :oneofs + + # SourceContext represents information about the source of a protobuf element, + # like the file in which it is defined. + # Corresponds to the JSON property `sourceContext` + # @return [Google::Apis::MonitoringV3::SourceContext] + attr_accessor :source_context + + # The source syntax. + # Corresponds to the JSON property `syntax` + # @return [String] + attr_accessor :syntax + + # The protocol buffer options. + # Corresponds to the JSON property `options` + # @return [Array] + attr_accessor :options + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @fields = args[:fields] if args.key?(:fields) + @name = args[:name] if args.key?(:name) + @oneofs = args[:oneofs] if args.key?(:oneofs) + @source_context = args[:source_context] if args.key?(:source_context) + @syntax = args[:syntax] if args.key?(:syntax) + @options = args[:options] if args.key?(:options) + end + end end end end diff --git a/generated/google/apis/monitoring_v3/representations.rb b/generated/google/apis/monitoring_v3/representations.rb index e958b3ea8..b10a4a09c 100644 --- a/generated/google/apis/monitoring_v3/representations.rb +++ b/generated/google/apis/monitoring_v3/representations.rb @@ -22,37 +22,7 @@ module Google module Apis module MonitoringV3 - class Metric - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListGroupMembersResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TimeInterval - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Group - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListTimeSeriesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Point + class BucketOptions class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -64,196 +34,182 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class TimeSeries - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MetricDescriptor - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Exponential - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Explicit - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Linear - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CollectdPayload - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListMetricDescriptorsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Distribution - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MonitoredResource - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class LabelDescriptor - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MonitoredResourceDescriptor - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TypedValue - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListMonitoredResourceDescriptorsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Field - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Option - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Empty - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class SourceContext class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class MetricDescriptor + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Range class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class CreateTimeSeriesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BucketOptions - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CreateCollectdTimeSeriesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Type - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class ListGroupsResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Metric - # @private - class Representation < Google::Apis::Core::JsonRepresentation - hash :labels, as: 'labels' - property :type, as: 'type' - end + class CreateCollectdTimeSeriesRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ListGroupMembersResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :members, as: 'members', class: Google::Apis::MonitoringV3::MonitoredResource, decorator: Google::Apis::MonitoringV3::MonitoredResource::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :next_page_token, as: 'nextPageToken' - property :total_size, as: 'totalSize' - end + include Google::Apis::Core::JsonObjectSupport + end + + class ListMonitoredResourceDescriptorsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TimeSeries + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CreateTimeSeriesRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Distribution + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class MonitoredResource + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListMetricDescriptorsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class MonitoredResourceDescriptor + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TypedValue + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CollectdPayload + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Linear + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Empty + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Option + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class TimeInterval - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :end_time, as: 'endTime' - property :start_time, as: 'startTime' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end - class Group - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :display_name, as: 'displayName' - property :parent_name, as: 'parentName' - property :is_cluster, as: 'isCluster' - property :filter, as: 'filter' - property :name, as: 'name' - end + class Explicit + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end - class ListTimeSeriesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :time_series, as: 'timeSeries', class: Google::Apis::MonitoringV3::TimeSeries, decorator: Google::Apis::MonitoringV3::TimeSeries::Representation + class Exponential + class Representation < Google::Apis::Core::JsonRepresentation; end - property :next_page_token, as: 'nextPageToken' - end + include Google::Apis::Core::JsonObjectSupport end class Point + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Metric + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Field + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListTimeSeriesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class LabelDescriptor + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Group + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Type + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BucketOptions # @private class Representation < Google::Apis::Core::JsonRepresentation - property :value, as: 'value', class: Google::Apis::MonitoringV3::TypedValue, decorator: Google::Apis::MonitoringV3::TypedValue::Representation + property :exponential_buckets, as: 'exponentialBuckets', class: Google::Apis::MonitoringV3::Exponential, decorator: Google::Apis::MonitoringV3::Exponential::Representation - property :interval, as: 'interval', class: Google::Apis::MonitoringV3::TimeInterval, decorator: Google::Apis::MonitoringV3::TimeInterval::Representation + property :linear_buckets, as: 'linearBuckets', class: Google::Apis::MonitoringV3::Linear, decorator: Google::Apis::MonitoringV3::Linear::Representation + + property :explicit_buckets, as: 'explicitBuckets', class: Google::Apis::MonitoringV3::Explicit, decorator: Google::Apis::MonitoringV3::Explicit::Representation end end @@ -261,143 +217,69 @@ module Google class CollectdValue # @private class Representation < Google::Apis::Core::JsonRepresentation + property :data_source_name, as: 'dataSourceName' property :value, as: 'value', class: Google::Apis::MonitoringV3::TypedValue, decorator: Google::Apis::MonitoringV3::TypedValue::Representation - property :data_source_name, as: 'dataSourceName' property :data_source_type, as: 'dataSourceType' end end - class TimeSeries + class SourceContext # @private class Representation < Google::Apis::Core::JsonRepresentation - property :metric, as: 'metric', class: Google::Apis::MonitoringV3::Metric, decorator: Google::Apis::MonitoringV3::Metric::Representation - - collection :points, as: 'points', class: Google::Apis::MonitoringV3::Point, decorator: Google::Apis::MonitoringV3::Point::Representation - - property :value_type, as: 'valueType' - property :resource, as: 'resource', class: Google::Apis::MonitoringV3::MonitoredResource, decorator: Google::Apis::MonitoringV3::MonitoredResource::Representation - - property :metric_kind, as: 'metricKind' + property :file_name, as: 'fileName' end end class MetricDescriptor # @private class Representation < Google::Apis::Core::JsonRepresentation - property :description, as: 'description' property :unit, as: 'unit' collection :labels, as: 'labels', class: Google::Apis::MonitoringV3::LabelDescriptor, decorator: Google::Apis::MonitoringV3::LabelDescriptor::Representation - property :metric_kind, as: 'metricKind' - property :value_type, as: 'valueType' - property :display_name, as: 'displayName' property :name, as: 'name' property :type, as: 'type' + property :value_type, as: 'valueType' + property :metric_kind, as: 'metricKind' + property :display_name, as: 'displayName' + property :description, as: 'description' end end - class Exponential + class Range # @private class Representation < Google::Apis::Core::JsonRepresentation - property :growth_factor, as: 'growthFactor' - property :scale, as: 'scale' - property :num_finite_buckets, as: 'numFiniteBuckets' + property :min, as: 'min' + property :max, as: 'max' end end - class Explicit + class ListGroupsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :bounds, as: 'bounds' - end - end - - class Linear - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :width, as: 'width' - property :offset, as: 'offset' - property :num_finite_buckets, as: 'numFiniteBuckets' - end - end - - class CollectdPayload - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :end_time, as: 'endTime' - hash :metadata, as: 'metadata', class: Google::Apis::MonitoringV3::TypedValue, decorator: Google::Apis::MonitoringV3::TypedValue::Representation - - collection :values, as: 'values', class: Google::Apis::MonitoringV3::CollectdValue, decorator: Google::Apis::MonitoringV3::CollectdValue::Representation - - property :plugin_instance, as: 'pluginInstance' - property :start_time, as: 'startTime' - property :type_instance, as: 'typeInstance' - property :type, as: 'type' - property :plugin, as: 'plugin' - end - end - - class ListMetricDescriptorsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :metric_descriptors, as: 'metricDescriptors', class: Google::Apis::MonitoringV3::MetricDescriptor, decorator: Google::Apis::MonitoringV3::MetricDescriptor::Representation + collection :group, as: 'group', class: Google::Apis::MonitoringV3::Group, decorator: Google::Apis::MonitoringV3::Group::Representation property :next_page_token, as: 'nextPageToken' end end - class Distribution + class CreateCollectdTimeSeriesRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :bucket_counts, as: 'bucketCounts' - property :bucket_options, as: 'bucketOptions', class: Google::Apis::MonitoringV3::BucketOptions, decorator: Google::Apis::MonitoringV3::BucketOptions::Representation + property :resource, as: 'resource', class: Google::Apis::MonitoringV3::MonitoredResource, decorator: Google::Apis::MonitoringV3::MonitoredResource::Representation - property :count, as: 'count' - property :sum_of_squared_deviation, as: 'sumOfSquaredDeviation' - property :mean, as: 'mean' - property :range, as: 'range', class: Google::Apis::MonitoringV3::Range, decorator: Google::Apis::MonitoringV3::Range::Representation + collection :collectd_payloads, as: 'collectdPayloads', class: Google::Apis::MonitoringV3::CollectdPayload, decorator: Google::Apis::MonitoringV3::CollectdPayload::Representation + property :collectd_version, as: 'collectdVersion' end end - class MonitoredResource + class ListGroupMembersResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - hash :labels, as: 'labels' - property :type, as: 'type' - end - end - - class LabelDescriptor - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :description, as: 'description' - property :value_type, as: 'valueType' - property :key, as: 'key' - end - end - - class MonitoredResourceDescriptor - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :display_name, as: 'displayName' - property :description, as: 'description' - collection :labels, as: 'labels', class: Google::Apis::MonitoringV3::LabelDescriptor, decorator: Google::Apis::MonitoringV3::LabelDescriptor::Representation - - property :type, as: 'type' - property :name, as: 'name' - end - end - - class TypedValue - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :bool_value, as: 'boolValue' - property :string_value, as: 'stringValue' - property :int64_value, as: 'int64Value' - property :double_value, as: 'doubleValue' - property :distribution_value, as: 'distributionValue', class: Google::Apis::MonitoringV3::Distribution, decorator: Google::Apis::MonitoringV3::Distribution::Representation + property :next_page_token, as: 'nextPageToken' + property :total_size, as: 'totalSize' + collection :members, as: 'members', class: Google::Apis::MonitoringV3::MonitoredResource, decorator: Google::Apis::MonitoringV3::MonitoredResource::Representation end end @@ -411,49 +293,17 @@ module Google end end - class Field + class TimeSeries # @private class Representation < Google::Apis::Core::JsonRepresentation - property :default_value, as: 'defaultValue' - property :json_name, as: 'jsonName' - collection :options, as: 'options', class: Google::Apis::MonitoringV3::Option, decorator: Google::Apis::MonitoringV3::Option::Representation + property :metric_kind, as: 'metricKind' + property :metric, as: 'metric', class: Google::Apis::MonitoringV3::Metric, decorator: Google::Apis::MonitoringV3::Metric::Representation - property :oneof_index, as: 'oneofIndex' - property :cardinality, as: 'cardinality' - property :type_url, as: 'typeUrl' - property :name, as: 'name' - property :packed, as: 'packed' - property :number, as: 'number' - property :kind, as: 'kind' - end - end + collection :points, as: 'points', class: Google::Apis::MonitoringV3::Point, decorator: Google::Apis::MonitoringV3::Point::Representation - class Option - # @private - class Representation < Google::Apis::Core::JsonRepresentation - hash :value, as: 'value' - property :name, as: 'name' - end - end + property :value_type, as: 'valueType' + property :resource, as: 'resource', class: Google::Apis::MonitoringV3::MonitoredResource, decorator: Google::Apis::MonitoringV3::MonitoredResource::Representation - class Empty - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - class SourceContext - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :file_name, as: 'fileName' - end - end - - class Range - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :max, as: 'max' - property :min, as: 'min' end end @@ -465,50 +315,200 @@ module Google end end - class BucketOptions + class Distribution # @private class Representation < Google::Apis::Core::JsonRepresentation - property :explicit_buckets, as: 'explicitBuckets', class: Google::Apis::MonitoringV3::Explicit, decorator: Google::Apis::MonitoringV3::Explicit::Representation + property :bucket_options, as: 'bucketOptions', class: Google::Apis::MonitoringV3::BucketOptions, decorator: Google::Apis::MonitoringV3::BucketOptions::Representation - property :exponential_buckets, as: 'exponentialBuckets', class: Google::Apis::MonitoringV3::Exponential, decorator: Google::Apis::MonitoringV3::Exponential::Representation + property :sum_of_squared_deviation, as: 'sumOfSquaredDeviation' + property :range, as: 'range', class: Google::Apis::MonitoringV3::Range, decorator: Google::Apis::MonitoringV3::Range::Representation - property :linear_buckets, as: 'linearBuckets', class: Google::Apis::MonitoringV3::Linear, decorator: Google::Apis::MonitoringV3::Linear::Representation + property :count, as: 'count' + property :mean, as: 'mean' + collection :bucket_counts, as: 'bucketCounts' + end + end + + class MonitoredResource + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' + hash :labels, as: 'labels' + end + end + + class ListMetricDescriptorsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :metric_descriptors, as: 'metricDescriptors', class: Google::Apis::MonitoringV3::MetricDescriptor, decorator: Google::Apis::MonitoringV3::MetricDescriptor::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class MonitoredResourceDescriptor + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :labels, as: 'labels', class: Google::Apis::MonitoringV3::LabelDescriptor, decorator: Google::Apis::MonitoringV3::LabelDescriptor::Representation + + property :name, as: 'name' + property :display_name, as: 'displayName' + property :description, as: 'description' + property :type, as: 'type' + end + end + + class TypedValue + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :int64_value, as: 'int64Value' + property :distribution_value, as: 'distributionValue', class: Google::Apis::MonitoringV3::Distribution, decorator: Google::Apis::MonitoringV3::Distribution::Representation + + property :bool_value, as: 'boolValue' + property :string_value, as: 'stringValue' + property :double_value, as: 'doubleValue' + end + end + + class CollectdPayload + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :type_instance, as: 'typeInstance' + hash :metadata, as: 'metadata', class: Google::Apis::MonitoringV3::TypedValue, decorator: Google::Apis::MonitoringV3::TypedValue::Representation + + property :type, as: 'type' + property :plugin, as: 'plugin' + property :plugin_instance, as: 'pluginInstance' + property :end_time, as: 'endTime' + property :start_time, as: 'startTime' + collection :values, as: 'values', class: Google::Apis::MonitoringV3::CollectdValue, decorator: Google::Apis::MonitoringV3::CollectdValue::Representation end end - class CreateCollectdTimeSeriesRequest + class Linear # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :collectd_payloads, as: 'collectdPayloads', class: Google::Apis::MonitoringV3::CollectdPayload, decorator: Google::Apis::MonitoringV3::CollectdPayload::Representation + property :width, as: 'width' + property :offset, as: 'offset' + property :num_finite_buckets, as: 'numFiniteBuckets' + end + end - property :collectd_version, as: 'collectdVersion' - property :resource, as: 'resource', class: Google::Apis::MonitoringV3::MonitoredResource, decorator: Google::Apis::MonitoringV3::MonitoredResource::Representation + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + class Option + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :value, as: 'value' + property :name, as: 'name' + end + end + + class TimeInterval + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :start_time, as: 'startTime' + property :end_time, as: 'endTime' + end + end + + class Explicit + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :bounds, as: 'bounds' + end + end + + class Exponential + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :growth_factor, as: 'growthFactor' + property :scale, as: 'scale' + property :num_finite_buckets, as: 'numFiniteBuckets' + end + end + + class Point + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :interval, as: 'interval', class: Google::Apis::MonitoringV3::TimeInterval, decorator: Google::Apis::MonitoringV3::TimeInterval::Representation + + property :value, as: 'value', class: Google::Apis::MonitoringV3::TypedValue, decorator: Google::Apis::MonitoringV3::TypedValue::Representation + + end + end + + class Metric + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :labels, as: 'labels' + property :type, as: 'type' + end + end + + class Field + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + property :type_url, as: 'typeUrl' + property :number, as: 'number' + property :kind, as: 'kind' + property :json_name, as: 'jsonName' + collection :options, as: 'options', class: Google::Apis::MonitoringV3::Option, decorator: Google::Apis::MonitoringV3::Option::Representation + + property :oneof_index, as: 'oneofIndex' + property :packed, as: 'packed' + property :cardinality, as: 'cardinality' + property :default_value, as: 'defaultValue' + end + end + + class ListTimeSeriesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :time_series, as: 'timeSeries', class: Google::Apis::MonitoringV3::TimeSeries, decorator: Google::Apis::MonitoringV3::TimeSeries::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class LabelDescriptor + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :key, as: 'key' + property :description, as: 'description' + property :value_type, as: 'valueType' + end + end + + class Group + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :filter, as: 'filter' + property :name, as: 'name' + property :parent_name, as: 'parentName' + property :display_name, as: 'displayName' + property :is_cluster, as: 'isCluster' end end class Type # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :oneofs, as: 'oneofs' - collection :options, as: 'options', class: Google::Apis::MonitoringV3::Option, decorator: Google::Apis::MonitoringV3::Option::Representation - - property :source_context, as: 'sourceContext', class: Google::Apis::MonitoringV3::SourceContext, decorator: Google::Apis::MonitoringV3::SourceContext::Representation - collection :fields, as: 'fields', class: Google::Apis::MonitoringV3::Field, decorator: Google::Apis::MonitoringV3::Field::Representation property :name, as: 'name' + collection :oneofs, as: 'oneofs' + property :source_context, as: 'sourceContext', class: Google::Apis::MonitoringV3::SourceContext, decorator: Google::Apis::MonitoringV3::SourceContext::Representation + property :syntax, as: 'syntax' - end - end + collection :options, as: 'options', class: Google::Apis::MonitoringV3::Option, decorator: Google::Apis::MonitoringV3::Option::Representation - class ListGroupsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :group, as: 'group', class: Google::Apis::MonitoringV3::Group, decorator: Google::Apis::MonitoringV3::Group::Representation - - property :next_page_token, as: 'nextPageToken' end end end diff --git a/generated/google/apis/monitoring_v3/service.rb b/generated/google/apis/monitoring_v3/service.rb index 854d9e13e..b4fdbe59b 100644 --- a/generated/google/apis/monitoring_v3/service.rb +++ b/generated/google/apis/monitoring_v3/service.rb @@ -55,11 +55,11 @@ module Google # The project in which to create the time series. The format is "projects/ # PROJECT_ID_OR_NUMBER". # @param [Google::Apis::MonitoringV3::CreateCollectdTimeSeriesRequest] create_collectd_time_series_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -72,444 +72,15 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_collectd_time_series(name, create_collectd_time_series_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def create_collectd_time_series(name, create_collectd_time_series_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v3/{+name}/collectdTimeSeries', options) command.request_representation = Google::Apis::MonitoringV3::CreateCollectdTimeSeriesRequest::Representation command.request_object = create_collectd_time_series_request_object command.response_representation = Google::Apis::MonitoringV3::Empty::Representation command.response_class = Google::Apis::MonitoringV3::Empty command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Updates an existing group. You can change any group attributes except name. - # @param [String] name - # Output only. The name of this group. The format is "projects/` - # project_id_or_number`/groups/`group_id`". When creating a group, this field is - # ignored and a new name is created consisting of the project specified in the - # call to CreateGroup and a unique `group_id` that is generated automatically. - # @param [Google::Apis::MonitoringV3::Group] group_object - # @param [Boolean] validate_only - # If true, validate this request but do not update the existing group. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MonitoringV3::Group] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MonitoringV3::Group] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_project_group(name, group_object = nil, validate_only: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:put, 'v3/{+name}', options) - command.request_representation = Google::Apis::MonitoringV3::Group::Representation - command.request_object = group_object - command.response_representation = Google::Apis::MonitoringV3::Group::Representation - command.response_class = Google::Apis::MonitoringV3::Group - command.params['name'] = name unless name.nil? - command.query['validateOnly'] = validate_only unless validate_only.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Gets a single group. - # @param [String] name - # The group to retrieve. The format is "projects/`project_id_or_number`/groups/` - # group_id`". - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MonitoringV3::Group] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MonitoringV3::Group] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_group(name, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v3/{+name}', options) - command.response_representation = Google::Apis::MonitoringV3::Group::Representation - command.response_class = Google::Apis::MonitoringV3::Group - command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Creates a new group. - # @param [String] name - # The project in which to create the group. The format is "projects/` - # project_id_or_number`". - # @param [Google::Apis::MonitoringV3::Group] group_object - # @param [Boolean] validate_only - # If true, validate this request but do not create the group. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MonitoringV3::Group] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MonitoringV3::Group] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_project_group(name, group_object = nil, validate_only: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v3/{+name}/groups', options) - command.request_representation = Google::Apis::MonitoringV3::Group::Representation - command.request_object = group_object - command.response_representation = Google::Apis::MonitoringV3::Group::Representation - command.response_class = Google::Apis::MonitoringV3::Group - command.params['name'] = name unless name.nil? - command.query['validateOnly'] = validate_only unless validate_only.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Lists the existing groups. - # @param [String] name - # The project whose groups are to be listed. The format is "projects/` - # project_id_or_number`". - # @param [String] descendants_of_group - # A group name: "projects/`project_id_or_number`/groups/`group_id`". Returns the - # descendants of the specified group. This is a superset of the results returned - # by the childrenOfGroup filter, and includes children-of-children, and so forth. - # @param [Fixnum] page_size - # A positive number that is the maximum number of results to return. - # @param [String] children_of_group - # A group name: "projects/`project_id_or_number`/groups/`group_id`". Returns - # groups whose parentName field contains the group name. If no groups have this - # parent, the results are empty. - # @param [String] ancestors_of_group - # A group name: "projects/`project_id_or_number`/groups/`group_id`". Returns - # groups that are ancestors of the specified group. The groups are returned in - # order, starting with the immediate parent and ending with the most distant - # ancestor. If the specified group has no immediate parent, the results are - # empty. - # @param [String] page_token - # If this field is not empty then it must contain the nextPageToken value - # returned by a previous call to this method. Using this field causes the method - # to return additional results from the previous method call. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MonitoringV3::ListGroupsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MonitoringV3::ListGroupsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_project_groups(name, descendants_of_group: nil, page_size: nil, children_of_group: nil, ancestors_of_group: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v3/{+name}/groups', options) - command.response_representation = Google::Apis::MonitoringV3::ListGroupsResponse::Representation - command.response_class = Google::Apis::MonitoringV3::ListGroupsResponse - command.params['name'] = name unless name.nil? - command.query['descendantsOfGroup'] = descendants_of_group unless descendants_of_group.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['childrenOfGroup'] = children_of_group unless children_of_group.nil? - command.query['ancestorsOfGroup'] = ancestors_of_group unless ancestors_of_group.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Deletes an existing group. - # @param [String] name - # The group to delete. The format is "projects/`project_id_or_number`/groups/` - # group_id`". - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MonitoringV3::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MonitoringV3::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_project_group(name, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:delete, 'v3/{+name}', options) - command.response_representation = Google::Apis::MonitoringV3::Empty::Representation - command.response_class = Google::Apis::MonitoringV3::Empty - command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Lists the monitored resources that are members of a group. - # @param [String] name - # The group whose members are listed. The format is "projects/` - # project_id_or_number`/groups/`group_id`". - # @param [String] filter - # An optional list filter describing the members to be returned. The filter may - # reference the type, labels, and metadata of monitored resources that comprise - # the group. For example, to return only resources representing Compute Engine - # VM instances, use this filter: - # resource.type = "gce_instance" - # @param [String] interval_end_time - # Required. The end of the time interval. - # @param [String] interval_start_time - # Optional. The beginning of the time interval. The default value for the start - # time is the end time. The start time must not be later than the end time. - # @param [Fixnum] page_size - # A positive number that is the maximum number of results to return. - # @param [String] page_token - # If this field is not empty then it must contain the nextPageToken value - # returned by a previous call to this method. Using this field causes the method - # to return additional results from the previous method call. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MonitoringV3::ListGroupMembersResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MonitoringV3::ListGroupMembersResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_project_group_members(name, filter: nil, interval_end_time: nil, interval_start_time: nil, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v3/{+name}/members', options) - command.response_representation = Google::Apis::MonitoringV3::ListGroupMembersResponse::Representation - command.response_class = Google::Apis::MonitoringV3::ListGroupMembersResponse - command.params['name'] = name unless name.nil? - command.query['filter'] = filter unless filter.nil? - command.query['interval.endTime'] = interval_end_time unless interval_end_time.nil? - command.query['interval.startTime'] = interval_start_time unless interval_start_time.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Gets a single metric descriptor. This method does not require a Stackdriver - # account. - # @param [String] name - # The metric descriptor on which to execute the request. The format is "projects/ - # `project_id_or_number`/metricDescriptors/`metric_id`". An example value of ` - # metric_id` is "compute.googleapis.com/instance/disk/read_bytes_count". - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MonitoringV3::MetricDescriptor] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MonitoringV3::MetricDescriptor] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_metric_descriptor(name, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v3/{+name}', options) - command.response_representation = Google::Apis::MonitoringV3::MetricDescriptor::Representation - command.response_class = Google::Apis::MonitoringV3::MetricDescriptor - command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Creates a new metric descriptor. User-created metric descriptors define custom - # metrics. - # @param [String] name - # The project on which to execute the request. The format is "projects/` - # project_id_or_number`". - # @param [Google::Apis::MonitoringV3::MetricDescriptor] metric_descriptor_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MonitoringV3::MetricDescriptor] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MonitoringV3::MetricDescriptor] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_project_metric_descriptor(name, metric_descriptor_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v3/{+name}/metricDescriptors', options) - command.request_representation = Google::Apis::MonitoringV3::MetricDescriptor::Representation - command.request_object = metric_descriptor_object - command.response_representation = Google::Apis::MonitoringV3::MetricDescriptor::Representation - command.response_class = Google::Apis::MonitoringV3::MetricDescriptor - command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Lists metric descriptors that match a filter. This method does not require a - # Stackdriver account. - # @param [String] name - # The project on which to execute the request. The format is "projects/` - # project_id_or_number`". - # @param [Fixnum] page_size - # A positive number that is the maximum number of results to return. - # @param [String] filter - # If this field is empty, all custom and system-defined metric descriptors are - # returned. Otherwise, the filter specifies which metric descriptors are to be - # returned. For example, the following filter matches all custom metrics: - # metric.type = starts_with("custom.googleapis.com/") - # @param [String] page_token - # If this field is not empty then it must contain the nextPageToken value - # returned by a previous call to this method. Using this field causes the method - # to return additional results from the previous method call. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MonitoringV3::ListMetricDescriptorsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MonitoringV3::ListMetricDescriptorsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_project_metric_descriptors(name, page_size: nil, filter: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v3/{+name}/metricDescriptors', options) - command.response_representation = Google::Apis::MonitoringV3::ListMetricDescriptorsResponse::Representation - command.response_class = Google::Apis::MonitoringV3::ListMetricDescriptorsResponse - command.params['name'] = name unless name.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['filter'] = filter unless filter.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a metric descriptor. Only user-created custom metrics can be deleted. - # @param [String] name - # The metric descriptor on which to execute the request. The format is "projects/ - # `project_id_or_number`/metricDescriptors/`metric_id`". An example of ` - # metric_id` is: "custom.googleapis.com/my_test_metric". - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MonitoringV3::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MonitoringV3::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_project_metric_descriptor(name, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:delete, 'v3/{+name}', options) - command.response_representation = Google::Apis::MonitoringV3::Empty::Representation - command.response_class = Google::Apis::MonitoringV3::Empty - command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Creates or adds data to one or more time series. The response is empty if all - # time series in the request were written. If any time series could not be - # written, a corresponding failure message is included in the error response. - # @param [String] name - # The project on which to execute the request. The format is "projects/` - # project_id_or_number`". - # @param [Google::Apis::MonitoringV3::CreateTimeSeriesRequest] create_time_series_request_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MonitoringV3::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MonitoringV3::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_time_series(name, create_time_series_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v3/{+name}/timeSeries', options) - command.request_representation = Google::Apis::MonitoringV3::CreateTimeSeriesRequest::Representation - command.request_object = create_time_series_request_object - command.response_representation = Google::Apis::MonitoringV3::Empty::Representation - command.response_class = Google::Apis::MonitoringV3::Empty - command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -518,12 +89,37 @@ module Google # @param [String] name # The project on which to execute the request. The format is "projects/` # project_id_or_number`". + # @param [String] aggregation_cross_series_reducer + # The approach to be used to combine time series. Not all reducer functions may + # be applied to all time series, depending on the metric type and the value type + # of the original time series. Reduction may change the metric type of value + # type of the time series.Time series data must be aligned in order to perform + # cross-time series reduction. If crossSeriesReducer is specified, then + # perSeriesAligner must be specified and not equal ALIGN_NONE and + # alignmentPeriod must be specified; otherwise, an error is returned. # @param [String] filter # A monitoring filter that specifies which time series should be returned. The # filter must specify a single metric type, and can additionally specify metric # labels and other information. For example: # metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND # metric.label.instance_name = "my-instance-name" + # @param [String] page_token + # If this field is not empty then it must contain the nextPageToken value + # returned by a previous call to this method. Using this field causes the method + # to return additional results from the previous method call. + # @param [String] aggregation_per_series_aligner + # The approach to be used to align individual time series. Not all alignment + # functions may be applied to all time series, depending on the metric type and + # value type of the original time series. Alignment may change the metric type + # or the value type of the time series.Time series data must be aligned in order + # to perform cross-time series reduction. If crossSeriesReducer is specified, + # then perSeriesAligner must be specified and not equal ALIGN_NONE and + # alignmentPeriod must be specified; otherwise, an error is returned. + # @param [String] interval_start_time + # Optional. The beginning of the time interval. The default value for the start + # time is the end time. The start time must not be later than the end time. + # @param [String] view + # Specifies which information is returned about the time series. # @param [Array, String] aggregation_group_by_fields # The set of fields to preserve when crossSeriesReducer is specified. The # groupByFields determine how the time series are partitioned into subsets prior @@ -536,25 +132,8 @@ module Google # specified and all the time series have the same resource type, then the time # series are aggregated into a single output time series. If crossSeriesReducer # is not defined, this field is ignored. - # @param [String] aggregation_cross_series_reducer - # The approach to be used to combine time series. Not all reducer functions may - # be applied to all time series, depending on the metric type and the value type - # of the original time series. Reduction may change the metric type of value - # type of the time series.Time series data must be aligned in order to perform - # cross-time series reduction. If crossSeriesReducer is specified, then - # perSeriesAligner must be specified and not equal ALIGN_NONE and - # alignmentPeriod must be specified; otherwise, an error is returned. # @param [String] interval_end_time # Required. The end of the time interval. - # @param [String] interval_start_time - # Optional. The beginning of the time interval. The default value for the start - # time is the end time. The start time must not be later than the end time. - # @param [Fixnum] page_size - # A positive number that is the maximum number of results to return. When view - # field sets to FULL, it limits the number of Points server will return; if view - # field is HEADERS, it limits the number of TimeSeries server will return. - # @param [String] view - # Specifies which information is returned about the time series. # @param [String] aggregation_alignment_period # The alignment period for per-time series alignment. If present, # alignmentPeriod must be at least 60 seconds. After per-time series alignment, @@ -562,26 +141,18 @@ module Google # perSeriesAligner is not specified or equals ALIGN_NONE, then this field is # ignored. If perSeriesAligner is specified and does not equal ALIGN_NONE, then # this field must be defined; otherwise an error is returned. - # @param [String] aggregation_per_series_aligner - # The approach to be used to align individual time series. Not all alignment - # functions may be applied to all time series, depending on the metric type and - # value type of the original time series. Alignment may change the metric type - # or the value type of the time series.Time series data must be aligned in order - # to perform cross-time series reduction. If crossSeriesReducer is specified, - # then perSeriesAligner must be specified and not equal ALIGN_NONE and - # alignmentPeriod must be specified; otherwise, an error is returned. + # @param [Fixnum] page_size + # A positive number that is the maximum number of results to return. When view + # field sets to FULL, it limits the number of Points server will return; if view + # field is HEADERS, it limits the number of TimeSeries server will return. # @param [String] order_by # Specifies the order in which the points of the time series should be returned. # By default, results are not ordered. Currently, this field must be left blank. - # @param [String] page_token - # If this field is not empty then it must contain the nextPageToken value - # returned by a previous call to this method. Using this field causes the method - # to return additional results from the previous method call. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -594,57 +165,206 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_project_time_series(name, filter: nil, aggregation_group_by_fields: nil, aggregation_cross_series_reducer: nil, interval_end_time: nil, interval_start_time: nil, page_size: nil, view: nil, aggregation_alignment_period: nil, aggregation_per_series_aligner: nil, order_by: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_project_time_series(name, aggregation_cross_series_reducer: nil, filter: nil, page_token: nil, aggregation_per_series_aligner: nil, interval_start_time: nil, view: nil, aggregation_group_by_fields: nil, interval_end_time: nil, aggregation_alignment_period: nil, page_size: nil, order_by: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v3/{+name}/timeSeries', options) command.response_representation = Google::Apis::MonitoringV3::ListTimeSeriesResponse::Representation command.response_class = Google::Apis::MonitoringV3::ListTimeSeriesResponse command.params['name'] = name unless name.nil? - command.query['filter'] = filter unless filter.nil? - command.query['aggregation.groupByFields'] = aggregation_group_by_fields unless aggregation_group_by_fields.nil? command.query['aggregation.crossSeriesReducer'] = aggregation_cross_series_reducer unless aggregation_cross_series_reducer.nil? - command.query['interval.endTime'] = interval_end_time unless interval_end_time.nil? - command.query['interval.startTime'] = interval_start_time unless interval_start_time.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['view'] = view unless view.nil? - command.query['aggregation.alignmentPeriod'] = aggregation_alignment_period unless aggregation_alignment_period.nil? - command.query['aggregation.perSeriesAligner'] = aggregation_per_series_aligner unless aggregation_per_series_aligner.nil? - command.query['orderBy'] = order_by unless order_by.nil? + command.query['filter'] = filter unless filter.nil? command.query['pageToken'] = page_token unless page_token.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['aggregation.perSeriesAligner'] = aggregation_per_series_aligner unless aggregation_per_series_aligner.nil? + command.query['interval.startTime'] = interval_start_time unless interval_start_time.nil? + command.query['view'] = view unless view.nil? + command.query['aggregation.groupByFields'] = aggregation_group_by_fields unless aggregation_group_by_fields.nil? + command.query['interval.endTime'] = interval_end_time unless interval_end_time.nil? + command.query['aggregation.alignmentPeriod'] = aggregation_alignment_period unless aggregation_alignment_period.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['orderBy'] = order_by unless order_by.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - # Gets a single monitored resource descriptor. This method does not require a - # Stackdriver account. + # Creates or adds data to one or more time series. The response is empty if all + # time series in the request were written. If any time series could not be + # written, a corresponding failure message is included in the error response. # @param [String] name - # The monitored resource descriptor to get. The format is "projects/` - # project_id_or_number`/monitoredResourceDescriptors/`resource_type`". The ` - # resource_type` is a predefined type, such as cloudsql_database. + # The project on which to execute the request. The format is "projects/` + # project_id_or_number`". + # @param [Google::Apis::MonitoringV3::CreateTimeSeriesRequest] create_time_series_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MonitoringV3::MonitoredResourceDescriptor] parsed result object + # @yieldparam result [Google::Apis::MonitoringV3::Empty] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::MonitoringV3::MonitoredResourceDescriptor] + # @return [Google::Apis::MonitoringV3::Empty] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_monitored_resource_descriptor(name, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v3/{+name}', options) - command.response_representation = Google::Apis::MonitoringV3::MonitoredResourceDescriptor::Representation - command.response_class = Google::Apis::MonitoringV3::MonitoredResourceDescriptor + def create_time_series(name, create_time_series_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v3/{+name}/timeSeries', options) + command.request_representation = Google::Apis::MonitoringV3::CreateTimeSeriesRequest::Representation + command.request_object = create_time_series_request_object + command.response_representation = Google::Apis::MonitoringV3::Empty::Representation + command.response_class = Google::Apis::MonitoringV3::Empty command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a metric descriptor. Only user-created custom metrics can be deleted. + # @param [String] name + # The metric descriptor on which to execute the request. The format is "projects/ + # `project_id_or_number`/metricDescriptors/`metric_id`". An example of ` + # metric_id` is: "custom.googleapis.com/my_test_metric". + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MonitoringV3::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV3::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_metric_descriptor(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v3/{+name}', options) + command.response_representation = Google::Apis::MonitoringV3::Empty::Representation + command.response_class = Google::Apis::MonitoringV3::Empty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists metric descriptors that match a filter. This method does not require a + # Stackdriver account. + # @param [String] name + # The project on which to execute the request. The format is "projects/` + # project_id_or_number`". + # @param [String] page_token + # If this field is not empty then it must contain the nextPageToken value + # returned by a previous call to this method. Using this field causes the method + # to return additional results from the previous method call. + # @param [Fixnum] page_size + # A positive number that is the maximum number of results to return. + # @param [String] filter + # If this field is empty, all custom and system-defined metric descriptors are + # returned. Otherwise, the filter specifies which metric descriptors are to be + # returned. For example, the following filter matches all custom metrics: + # metric.type = starts_with("custom.googleapis.com/") + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MonitoringV3::ListMetricDescriptorsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV3::ListMetricDescriptorsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_metric_descriptors(name, page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v3/{+name}/metricDescriptors', options) + command.response_representation = Google::Apis::MonitoringV3::ListMetricDescriptorsResponse::Representation + command.response_class = Google::Apis::MonitoringV3::ListMetricDescriptorsResponse + command.params['name'] = name unless name.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['filter'] = filter unless filter.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a single metric descriptor. This method does not require a Stackdriver + # account. + # @param [String] name + # The metric descriptor on which to execute the request. The format is "projects/ + # `project_id_or_number`/metricDescriptors/`metric_id`". An example value of ` + # metric_id` is "compute.googleapis.com/instance/disk/read_bytes_count". + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MonitoringV3::MetricDescriptor] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV3::MetricDescriptor] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_metric_descriptor(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v3/{+name}', options) + command.response_representation = Google::Apis::MonitoringV3::MetricDescriptor::Representation + command.response_class = Google::Apis::MonitoringV3::MetricDescriptor + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a new metric descriptor. User-created metric descriptors define custom + # metrics. + # @param [String] name + # The project on which to execute the request. The format is "projects/` + # project_id_or_number`". + # @param [Google::Apis::MonitoringV3::MetricDescriptor] metric_descriptor_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MonitoringV3::MetricDescriptor] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV3::MetricDescriptor] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_metric_descriptor(name, metric_descriptor_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v3/{+name}/metricDescriptors', options) + command.request_representation = Google::Apis::MonitoringV3::MetricDescriptor::Representation + command.request_object = metric_descriptor_object + command.response_representation = Google::Apis::MonitoringV3::MetricDescriptor::Representation + command.response_class = Google::Apis::MonitoringV3::MetricDescriptor + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -653,6 +373,10 @@ module Google # @param [String] name # The project on which to execute the request. The format is "projects/` # project_id_or_number`". + # @param [String] page_token + # If this field is not empty then it must contain the nextPageToken value + # returned by a previous call to this method. Using this field causes the method + # to return additional results from the previous method call. # @param [Fixnum] page_size # A positive number that is the maximum number of results to return. # @param [String] filter @@ -660,15 +384,11 @@ module Google # reference the descriptor's type and labels. For example, the following filter # returns only Google Compute Engine descriptors that have an id label: # resource.type = starts_with("gce_") AND resource.label:id - # @param [String] page_token - # If this field is not empty then it must contain the nextPageToken value - # returned by a previous call to this method. Using this field causes the method - # to return additional results from the previous method call. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -681,16 +401,296 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_project_monitored_resource_descriptors(name, page_size: nil, filter: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_project_monitored_resource_descriptors(name, page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v3/{+name}/monitoredResourceDescriptors', options) command.response_representation = Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse::Representation command.response_class = Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse command.params['name'] = name unless name.nil? + command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['filter'] = filter unless filter.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a single monitored resource descriptor. This method does not require a + # Stackdriver account. + # @param [String] name + # The monitored resource descriptor to get. The format is "projects/` + # project_id_or_number`/monitoredResourceDescriptors/`resource_type`". The ` + # resource_type` is a predefined type, such as cloudsql_database. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MonitoringV3::MonitoredResourceDescriptor] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV3::MonitoredResourceDescriptor] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_monitored_resource_descriptor(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v3/{+name}', options) + command.response_representation = Google::Apis::MonitoringV3::MonitoredResourceDescriptor::Representation + command.response_class = Google::Apis::MonitoringV3::MonitoredResourceDescriptor + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes an existing group. + # @param [String] name + # The group to delete. The format is "projects/`project_id_or_number`/groups/` + # group_id`". + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MonitoringV3::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV3::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_group(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v3/{+name}', options) + command.response_representation = Google::Apis::MonitoringV3::Empty::Representation + command.response_class = Google::Apis::MonitoringV3::Empty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists the existing groups. + # @param [String] name + # The project whose groups are to be listed. The format is "projects/` + # project_id_or_number`". + # @param [String] children_of_group + # A group name: "projects/`project_id_or_number`/groups/`group_id`". Returns + # groups whose parentName field contains the group name. If no groups have this + # parent, the results are empty. + # @param [String] descendants_of_group + # A group name: "projects/`project_id_or_number`/groups/`group_id`". Returns the + # descendants of the specified group. This is a superset of the results returned + # by the childrenOfGroup filter, and includes children-of-children, and so forth. + # @param [String] page_token + # If this field is not empty then it must contain the nextPageToken value + # returned by a previous call to this method. Using this field causes the method + # to return additional results from the previous method call. + # @param [Fixnum] page_size + # A positive number that is the maximum number of results to return. + # @param [String] ancestors_of_group + # A group name: "projects/`project_id_or_number`/groups/`group_id`". Returns + # groups that are ancestors of the specified group. The groups are returned in + # order, starting with the immediate parent and ending with the most distant + # ancestor. If the specified group has no immediate parent, the results are + # empty. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MonitoringV3::ListGroupsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV3::ListGroupsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_groups(name, children_of_group: nil, descendants_of_group: nil, page_token: nil, page_size: nil, ancestors_of_group: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v3/{+name}/groups', options) + command.response_representation = Google::Apis::MonitoringV3::ListGroupsResponse::Representation + command.response_class = Google::Apis::MonitoringV3::ListGroupsResponse + command.params['name'] = name unless name.nil? + command.query['childrenOfGroup'] = children_of_group unless children_of_group.nil? + command.query['descendantsOfGroup'] = descendants_of_group unless descendants_of_group.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['ancestorsOfGroup'] = ancestors_of_group unless ancestors_of_group.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a single group. + # @param [String] name + # The group to retrieve. The format is "projects/`project_id_or_number`/groups/` + # group_id`". + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MonitoringV3::Group] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV3::Group] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_group(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v3/{+name}', options) + command.response_representation = Google::Apis::MonitoringV3::Group::Representation + command.response_class = Google::Apis::MonitoringV3::Group + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates an existing group. You can change any group attributes except name. + # @param [String] name + # Output only. The name of this group. The format is "projects/` + # project_id_or_number`/groups/`group_id`". When creating a group, this field is + # ignored and a new name is created consisting of the project specified in the + # call to CreateGroup and a unique `group_id` that is generated automatically. + # @param [Google::Apis::MonitoringV3::Group] group_object + # @param [Boolean] validate_only + # If true, validate this request but do not update the existing group. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MonitoringV3::Group] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV3::Group] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_project_group(name, group_object = nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'v3/{+name}', options) + command.request_representation = Google::Apis::MonitoringV3::Group::Representation + command.request_object = group_object + command.response_representation = Google::Apis::MonitoringV3::Group::Representation + command.response_class = Google::Apis::MonitoringV3::Group + command.params['name'] = name unless name.nil? + command.query['validateOnly'] = validate_only unless validate_only.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a new group. + # @param [String] name + # The project in which to create the group. The format is "projects/` + # project_id_or_number`". + # @param [Google::Apis::MonitoringV3::Group] group_object + # @param [Boolean] validate_only + # If true, validate this request but do not create the group. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MonitoringV3::Group] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV3::Group] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_group(name, group_object = nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v3/{+name}/groups', options) + command.request_representation = Google::Apis::MonitoringV3::Group::Representation + command.request_object = group_object + command.response_representation = Google::Apis::MonitoringV3::Group::Representation + command.response_class = Google::Apis::MonitoringV3::Group + command.params['name'] = name unless name.nil? + command.query['validateOnly'] = validate_only unless validate_only.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists the monitored resources that are members of a group. + # @param [String] name + # The group whose members are listed. The format is "projects/` + # project_id_or_number`/groups/`group_id`". + # @param [String] interval_end_time + # Required. The end of the time interval. + # @param [String] filter + # An optional list filter describing the members to be returned. The filter may + # reference the type, labels, and metadata of monitored resources that comprise + # the group. For example, to return only resources representing Compute Engine + # VM instances, use this filter: + # resource.type = "gce_instance" + # @param [String] page_token + # If this field is not empty then it must contain the nextPageToken value + # returned by a previous call to this method. Using this field causes the method + # to return additional results from the previous method call. + # @param [String] interval_start_time + # Optional. The beginning of the time interval. The default value for the start + # time is the end time. The start time must not be later than the end time. + # @param [Fixnum] page_size + # A positive number that is the maximum number of results to return. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MonitoringV3::ListGroupMembersResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV3::ListGroupMembersResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_group_members(name, interval_end_time: nil, filter: nil, page_token: nil, interval_start_time: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v3/{+name}/members', options) + command.response_representation = Google::Apis::MonitoringV3::ListGroupMembersResponse::Representation + command.response_class = Google::Apis::MonitoringV3::ListGroupMembersResponse + command.params['name'] = name unless name.nil? + command.query['interval.endTime'] = interval_end_time unless interval_end_time.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['interval.startTime'] = interval_start_time unless interval_start_time.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/plus_domains_v1.rb b/generated/google/apis/plus_domains_v1.rb index 44f663082..15aced69f 100644 --- a/generated/google/apis/plus_domains_v1.rb +++ b/generated/google/apis/plus_domains_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/+/domains/ module PlusDomainsV1 VERSION = 'V1' - REVISION = '20170123' + REVISION = '20170124' # View your circles and the people and pages in them AUTH_PLUS_CIRCLES_READ = 'https://www.googleapis.com/auth/plus.circles.read' diff --git a/generated/google/apis/plus_v1.rb b/generated/google/apis/plus_v1.rb index 376d68035..d7b926249 100644 --- a/generated/google/apis/plus_v1.rb +++ b/generated/google/apis/plus_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/+/api/ module PlusV1 VERSION = 'V1' - REVISION = '20170123' + REVISION = '20170124' # Know the list of people in your circles, your age range, and language AUTH_PLUS_LOGIN = 'https://www.googleapis.com/auth/plus.login' diff --git a/generated/google/apis/pubsub_v1.rb b/generated/google/apis/pubsub_v1.rb index 4ab9dc062..cfb3b2227 100644 --- a/generated/google/apis/pubsub_v1.rb +++ b/generated/google/apis/pubsub_v1.rb @@ -27,11 +27,11 @@ module Google VERSION = 'V1' REVISION = '20170105' - # View and manage your data across Google Cloud Platform services - AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' - # View and manage Pub/Sub topics and subscriptions AUTH_PUBSUB = 'https://www.googleapis.com/auth/pubsub' + + # View and manage your data across Google Cloud Platform services + AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' end end end diff --git a/generated/google/apis/pubsub_v1/classes.rb b/generated/google/apis/pubsub_v1/classes.rb index aeb0caca4..104d89be4 100644 --- a/generated/google/apis/pubsub_v1/classes.rb +++ b/generated/google/apis/pubsub_v1/classes.rb @@ -46,163 +46,6 @@ module Google end end - # Request message for `SetIamPolicy` method. - class SetIamPolicyRequest - include Google::Apis::Core::Hashable - - # Defines an Identity and Access Management (IAM) policy. It is used to - # specify access control policies for Cloud Platform resources. - # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of - # `members` to a `role`, where the members can be user accounts, Google groups, - # Google domains, and service accounts. A `role` is a named list of permissions - # defined by IAM. - # **Example** - # ` - # "bindings": [ - # ` - # "role": "roles/owner", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-other-app@appspot.gserviceaccount.com", - # ] - # `, - # ` - # "role": "roles/viewer", - # "members": ["user:sean@example.com"] - # ` - # ] - # ` - # For a description of IAM and its features, see the - # [IAM developer's guide](https://cloud.google.com/iam). - # Corresponds to the JSON property `policy` - # @return [Google::Apis::PubsubV1::Policy] - attr_accessor :policy - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @policy = args[:policy] if args.key?(:policy) - end - end - - # A message and its corresponding acknowledgment ID. - class ReceivedMessage - include Google::Apis::Core::Hashable - - # This ID can be used to acknowledge the received message. - # Corresponds to the JSON property `ackId` - # @return [String] - attr_accessor :ack_id - - # A message data and its attributes. The message payload must not be empty; - # it must contain either a non-empty data field, or at least one attribute. - # Corresponds to the JSON property `message` - # @return [Google::Apis::PubsubV1::Message] - attr_accessor :message - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ack_id = args[:ack_id] if args.key?(:ack_id) - @message = args[:message] if args.key?(:message) - end - end - - # Request for the Publish method. - class PublishRequest - include Google::Apis::Core::Hashable - - # The messages to publish. - # Corresponds to the JSON property `messages` - # @return [Array] - attr_accessor :messages - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @messages = args[:messages] if args.key?(:messages) - end - end - - # Response message for `TestIamPermissions` method. - class TestIamPermissionsResponse - include Google::Apis::Core::Hashable - - # A subset of `TestPermissionsRequest.permissions` that the caller is - # allowed. - # Corresponds to the JSON property `permissions` - # @return [Array] - attr_accessor :permissions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @permissions = args[:permissions] if args.key?(:permissions) - end - end - - # Response for the `Publish` method. - class PublishResponse - include Google::Apis::Core::Hashable - - # The server-assigned ID of each published message, in the same order as - # the messages in the request. IDs are guaranteed to be unique within - # the topic. - # Corresponds to the JSON property `messageIds` - # @return [Array] - attr_accessor :message_ids - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @message_ids = args[:message_ids] if args.key?(:message_ids) - end - end - - # Response for the `ListSubscriptions` method. - class ListSubscriptionsResponse - include Google::Apis::Core::Hashable - - # The subscriptions that match the request. - # Corresponds to the JSON property `subscriptions` - # @return [Array] - attr_accessor :subscriptions - - # If not empty, indicates that there may be more subscriptions that match - # the request; this value should be passed in a new - # `ListSubscriptionsRequest` to get more subscriptions. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @subscriptions = args[:subscriptions] if args.key?(:subscriptions) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - # Defines an Identity and Access Management (IAM) policy. It is used to # specify access control policies for Cloud Platform resources. # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of @@ -269,93 +112,6 @@ module Google end end - # Response for the `ListTopicSubscriptions` method. - class ListTopicSubscriptionsResponse - include Google::Apis::Core::Hashable - - # The names of the subscriptions that match the request. - # Corresponds to the JSON property `subscriptions` - # @return [Array] - attr_accessor :subscriptions - - # If not empty, indicates that there may be more subscriptions that match - # the request; this value should be passed in a new - # `ListTopicSubscriptionsRequest` to get more subscriptions. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @subscriptions = args[:subscriptions] if args.key?(:subscriptions) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # A subscription resource. - class Subscription - include Google::Apis::Core::Hashable - - # Configuration for a push delivery endpoint. - # Corresponds to the JSON property `pushConfig` - # @return [Google::Apis::PubsubV1::PushConfig] - attr_accessor :push_config - - # The name of the topic from which this subscription is receiving messages. - # Format is `projects/`project`/topics/`topic``. - # The value of this field will be `_deleted-topic_` if the topic has been - # deleted. - # Corresponds to the JSON property `topic` - # @return [String] - attr_accessor :topic - - # This value is the maximum time after a subscriber receives a message - # before the subscriber should acknowledge the message. After message - # delivery but before the ack deadline expires and before the message is - # acknowledged, it is an outstanding message and will not be delivered - # again during that time (on a best-effort basis). - # For pull subscriptions, this value is used as the initial value for the ack - # deadline. To override this value for a given message, call - # `ModifyAckDeadline` with the corresponding `ack_id` if using - # pull. - # The minimum custom deadline you can specify is 10 seconds. - # The maximum custom deadline you can specify is 600 seconds (10 minutes). - # If this parameter is 0, a default value of 10 seconds is used. - # For push delivery, this value is also used to set the request timeout for - # the call to the push endpoint. - # If the subscriber never acknowledges the message, the Pub/Sub - # system will eventually redeliver the message. - # Corresponds to the JSON property `ackDeadlineSeconds` - # @return [Fixnum] - attr_accessor :ack_deadline_seconds - - # The name of the subscription. It must have the format - # `"projects/`project`/subscriptions/`subscription`"`. ``subscription`` must - # start with a letter, and contain only letters (`[A-Za-z]`), numbers - # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), - # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters - # in length, and it must not start with `"goog"`. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @push_config = args[:push_config] if args.key?(:push_config) - @topic = args[:topic] if args.key?(:topic) - @ack_deadline_seconds = args[:ack_deadline_seconds] if args.key?(:ack_deadline_seconds) - @name = args[:name] if args.key?(:name) - end - end - # Request for the ModifyAckDeadline method. class ModifyAckDeadlineRequest include Google::Apis::Core::Hashable @@ -387,17 +143,39 @@ module Google end end - # Request message for `TestIamPermissions` method. - class TestIamPermissionsRequest + # Request message for `SetIamPolicy` method. + class SetIamPolicyRequest include Google::Apis::Core::Hashable - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # Corresponds to the JSON property `permissions` - # @return [Array] - attr_accessor :permissions + # Defines an Identity and Access Management (IAM) policy. It is used to + # specify access control policies for Cloud Platform resources. + # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of + # `members` to a `role`, where the members can be user accounts, Google groups, + # Google domains, and service accounts. A `role` is a named list of permissions + # defined by IAM. + # **Example** + # ` + # "bindings": [ + # ` + # "role": "roles/owner", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-other-app@appspot.gserviceaccount.com", + # ] + # `, + # ` + # "role": "roles/viewer", + # "members": ["user:sean@example.com"] + # ` + # ] + # ` + # For a description of IAM and its features, see the + # [IAM developer's guide](https://cloud.google.com/iam). + # Corresponds to the JSON property `policy` + # @return [Google::Apis::PubsubV1::Policy] + attr_accessor :policy def initialize(**args) update!(**args) @@ -405,122 +183,7 @@ module Google # Update properties of this object def update!(**args) - @permissions = args[:permissions] if args.key?(:permissions) - end - end - - # Configuration for a push delivery endpoint. - class PushConfig - include Google::Apis::Core::Hashable - - # Endpoint configuration attributes. - # Every endpoint has a set of API supported attributes that can be used to - # control different aspects of the message delivery. - # The currently supported attribute is `x-goog-version`, which you can - # use to change the format of the push message. This attribute - # indicates the version of the data expected by the endpoint. This - # controls the shape of the envelope (i.e. its fields and metadata). - # The endpoint version is based on the version of the Pub/Sub - # API. - # If not present during the `CreateSubscription` call, it will default to - # the version of the API used to make such call. If not present during a - # `ModifyPushConfig` call, its value will not be changed. `GetSubscription` - # calls will always return a valid version, even if the subscription was - # created without this attribute. - # The possible values for this attribute are: - # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. - # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API. - # Corresponds to the JSON property `attributes` - # @return [Hash] - attr_accessor :attributes - - # A URL locating the endpoint to which messages should be pushed. - # For example, a Webhook endpoint might use "https://example.com/push". - # Corresponds to the JSON property `pushEndpoint` - # @return [String] - attr_accessor :push_endpoint - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @attributes = args[:attributes] if args.key?(:attributes) - @push_endpoint = args[:push_endpoint] if args.key?(:push_endpoint) - end - end - - # Request for the `Pull` method. - class PullRequest - include Google::Apis::Core::Hashable - - # If this field set to true, the system will respond immediately even if - # it there are no messages available to return in the `Pull` response. - # Otherwise, the system may wait (for a bounded amount of time) until at - # least one message is available, rather than returning no messages. The - # client may cancel the request if it does not wish to wait any longer for - # the response. - # Corresponds to the JSON property `returnImmediately` - # @return [Boolean] - attr_accessor :return_immediately - alias_method :return_immediately?, :return_immediately - - # The maximum number of messages returned for this request. The Pub/Sub - # system may return fewer than the number specified. - # Corresponds to the JSON property `maxMessages` - # @return [Fixnum] - attr_accessor :max_messages - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @return_immediately = args[:return_immediately] if args.key?(:return_immediately) - @max_messages = args[:max_messages] if args.key?(:max_messages) - end - end - - # Request for the ModifyPushConfig method. - class ModifyPushConfigRequest - include Google::Apis::Core::Hashable - - # Configuration for a push delivery endpoint. - # Corresponds to the JSON property `pushConfig` - # @return [Google::Apis::PubsubV1::PushConfig] - attr_accessor :push_config - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @push_config = args[:push_config] if args.key?(:push_config) - end - end - - # Response for the `Pull` method. - class PullResponse - include Google::Apis::Core::Hashable - - # Received Pub/Sub messages. The Pub/Sub system will return zero messages if - # there are no more available in the backlog. The Pub/Sub system may return - # fewer than the `maxMessages` requested even if there are more messages - # available in the backlog. - # Corresponds to the JSON property `receivedMessages` - # @return [Array] - attr_accessor :received_messages - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @received_messages = args[:received_messages] if args.key?(:received_messages) + @policy = args[:policy] if args.key?(:policy) end end @@ -567,6 +230,65 @@ module Google end end + # Request for the ModifyPushConfig method. + class ModifyPushConfigRequest + include Google::Apis::Core::Hashable + + # Configuration for a push delivery endpoint. + # Corresponds to the JSON property `pushConfig` + # @return [Google::Apis::PubsubV1::PushConfig] + attr_accessor :push_config + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @push_config = args[:push_config] if args.key?(:push_config) + end + end + + # Associates `members` with a `role`. + class Binding + include Google::Apis::Core::Hashable + + # Specifies the identities requesting access for a Cloud Platform resource. + # `members` can have the following values: + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # * `user:`emailid``: An email address that represents a specific Google + # account. For example, `alice@gmail.com` or `joe@example.com`. + # * `serviceAccount:`emailid``: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # * `group:`emailid``: An email address that represents a Google group. + # For example, `admins@example.com`. + # * `domain:`domain``: A Google Apps domain name that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # Corresponds to the JSON property `members` + # @return [Array] + attr_accessor :members + + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # Corresponds to the JSON property `role` + # @return [String] + attr_accessor :role + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @members = args[:members] if args.key?(:members) + @role = args[:role] if args.key?(:role) + end + end + # Request for the Acknowledge method. class AcknowledgeRequest include Google::Apis::Core::Hashable @@ -610,16 +332,43 @@ module Google class ListTopicsResponse include Google::Apis::Core::Hashable + # The resulting topics. + # Corresponds to the JSON property `topics` + # @return [Array] + attr_accessor :topics + # If not empty, indicates that there may be more topics that match the # request; this value should be passed in a new `ListTopicsRequest`. # Corresponds to the JSON property `nextPageToken` # @return [String] attr_accessor :next_page_token - # The resulting topics. - # Corresponds to the JSON property `topics` - # @return [Array] - attr_accessor :topics + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @topics = args[:topics] if args.key?(:topics) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # Response for the `ListTopicSubscriptions` method. + class ListTopicSubscriptionsResponse + include Google::Apis::Core::Hashable + + # If not empty, indicates that there may be more subscriptions that match + # the request; this value should be passed in a new + # `ListTopicSubscriptionsRequest` to get more subscriptions. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The names of the subscriptions that match the request. + # Corresponds to the JSON property `subscriptions` + # @return [Array] + attr_accessor :subscriptions def initialize(**args) update!(**args) @@ -628,38 +377,21 @@ module Google # Update properties of this object def update!(**args) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @topics = args[:topics] if args.key?(:topics) + @subscriptions = args[:subscriptions] if args.key?(:subscriptions) end end - # Associates `members` with a `role`. - class Binding + # Response for the `Pull` method. + class PullResponse include Google::Apis::Core::Hashable - # Specifies the identities requesting access for a Cloud Platform resource. - # `members` can have the following values: - # * `allUsers`: A special identifier that represents anyone who is - # on the internet; with or without a Google account. - # * `allAuthenticatedUsers`: A special identifier that represents anyone - # who is authenticated with a Google account or a service account. - # * `user:`emailid``: An email address that represents a specific Google - # account. For example, `alice@gmail.com` or `joe@example.com`. - # * `serviceAccount:`emailid``: An email address that represents a service - # account. For example, `my-other-app@appspot.gserviceaccount.com`. - # * `group:`emailid``: An email address that represents a Google group. - # For example, `admins@example.com`. - # * `domain:`domain``: A Google Apps domain name that represents all the - # users of that domain. For example, `google.com` or `example.com`. - # Corresponds to the JSON property `members` - # @return [Array] - attr_accessor :members - - # Role that is assigned to `members`. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # Required - # Corresponds to the JSON property `role` - # @return [String] - attr_accessor :role + # Received Pub/Sub messages. The Pub/Sub system will return zero messages if + # there are no more available in the backlog. The Pub/Sub system may return + # fewer than the `maxMessages` requested even if there are more messages + # available in the backlog. + # Corresponds to the JSON property `receivedMessages` + # @return [Array] + attr_accessor :received_messages def initialize(**args) update!(**args) @@ -667,8 +399,276 @@ module Google # Update properties of this object def update!(**args) - @members = args[:members] if args.key?(:members) - @role = args[:role] if args.key?(:role) + @received_messages = args[:received_messages] if args.key?(:received_messages) + end + end + + # A message and its corresponding acknowledgment ID. + class ReceivedMessage + include Google::Apis::Core::Hashable + + # A message data and its attributes. The message payload must not be empty; + # it must contain either a non-empty data field, or at least one attribute. + # Corresponds to the JSON property `message` + # @return [Google::Apis::PubsubV1::Message] + attr_accessor :message + + # This ID can be used to acknowledge the received message. + # Corresponds to the JSON property `ackId` + # @return [String] + attr_accessor :ack_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @message = args[:message] if args.key?(:message) + @ack_id = args[:ack_id] if args.key?(:ack_id) + end + end + + # Configuration for a push delivery endpoint. + class PushConfig + include Google::Apis::Core::Hashable + + # A URL locating the endpoint to which messages should be pushed. + # For example, a Webhook endpoint might use "https://example.com/push". + # Corresponds to the JSON property `pushEndpoint` + # @return [String] + attr_accessor :push_endpoint + + # Endpoint configuration attributes. + # Every endpoint has a set of API supported attributes that can be used to + # control different aspects of the message delivery. + # The currently supported attribute is `x-goog-version`, which you can + # use to change the format of the push message. This attribute + # indicates the version of the data expected by the endpoint. This + # controls the shape of the envelope (i.e. its fields and metadata). + # The endpoint version is based on the version of the Pub/Sub + # API. + # If not present during the `CreateSubscription` call, it will default to + # the version of the API used to make such call. If not present during a + # `ModifyPushConfig` call, its value will not be changed. `GetSubscription` + # calls will always return a valid version, even if the subscription was + # created without this attribute. + # The possible values for this attribute are: + # * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. + # * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API. + # Corresponds to the JSON property `attributes` + # @return [Hash] + attr_accessor :attributes + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @push_endpoint = args[:push_endpoint] if args.key?(:push_endpoint) + @attributes = args[:attributes] if args.key?(:attributes) + end + end + + # Response message for `TestIamPermissions` method. + class TestIamPermissionsResponse + include Google::Apis::Core::Hashable + + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @permissions = args[:permissions] if args.key?(:permissions) + end + end + + # Request for the `Pull` method. + class PullRequest + include Google::Apis::Core::Hashable + + # If this field set to true, the system will respond immediately even if + # it there are no messages available to return in the `Pull` response. + # Otherwise, the system may wait (for a bounded amount of time) until at + # least one message is available, rather than returning no messages. The + # client may cancel the request if it does not wish to wait any longer for + # the response. + # Corresponds to the JSON property `returnImmediately` + # @return [Boolean] + attr_accessor :return_immediately + alias_method :return_immediately?, :return_immediately + + # The maximum number of messages returned for this request. The Pub/Sub + # system may return fewer than the number specified. + # Corresponds to the JSON property `maxMessages` + # @return [Fixnum] + attr_accessor :max_messages + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @return_immediately = args[:return_immediately] if args.key?(:return_immediately) + @max_messages = args[:max_messages] if args.key?(:max_messages) + end + end + + # Response for the `ListSubscriptions` method. + class ListSubscriptionsResponse + include Google::Apis::Core::Hashable + + # If not empty, indicates that there may be more subscriptions that match + # the request; this value should be passed in a new + # `ListSubscriptionsRequest` to get more subscriptions. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The subscriptions that match the request. + # Corresponds to the JSON property `subscriptions` + # @return [Array] + attr_accessor :subscriptions + + 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) + @subscriptions = args[:subscriptions] if args.key?(:subscriptions) + end + end + + # Request for the Publish method. + class PublishRequest + include Google::Apis::Core::Hashable + + # The messages to publish. + # Corresponds to the JSON property `messages` + # @return [Array] + attr_accessor :messages + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @messages = args[:messages] if args.key?(:messages) + end + end + + # Response for the `Publish` method. + class PublishResponse + include Google::Apis::Core::Hashable + + # The server-assigned ID of each published message, in the same order as + # the messages in the request. IDs are guaranteed to be unique within + # the topic. + # Corresponds to the JSON property `messageIds` + # @return [Array] + attr_accessor :message_ids + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @message_ids = args[:message_ids] if args.key?(:message_ids) + end + end + + # A subscription resource. + class Subscription + include Google::Apis::Core::Hashable + + # This value is the maximum time after a subscriber receives a message + # before the subscriber should acknowledge the message. After message + # delivery but before the ack deadline expires and before the message is + # acknowledged, it is an outstanding message and will not be delivered + # again during that time (on a best-effort basis). + # For pull subscriptions, this value is used as the initial value for the ack + # deadline. To override this value for a given message, call + # `ModifyAckDeadline` with the corresponding `ack_id` if using + # pull. + # The minimum custom deadline you can specify is 10 seconds. + # The maximum custom deadline you can specify is 600 seconds (10 minutes). + # If this parameter is 0, a default value of 10 seconds is used. + # For push delivery, this value is also used to set the request timeout for + # the call to the push endpoint. + # If the subscriber never acknowledges the message, the Pub/Sub + # system will eventually redeliver the message. + # Corresponds to the JSON property `ackDeadlineSeconds` + # @return [Fixnum] + attr_accessor :ack_deadline_seconds + + # The name of the subscription. It must have the format + # `"projects/`project`/subscriptions/`subscription`"`. ``subscription`` must + # start with a letter, and contain only letters (`[A-Za-z]`), numbers + # (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), + # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters + # in length, and it must not start with `"goog"`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The name of the topic from which this subscription is receiving messages. + # Format is `projects/`project`/topics/`topic``. + # The value of this field will be `_deleted-topic_` if the topic has been + # deleted. + # Corresponds to the JSON property `topic` + # @return [String] + attr_accessor :topic + + # Configuration for a push delivery endpoint. + # Corresponds to the JSON property `pushConfig` + # @return [Google::Apis::PubsubV1::PushConfig] + attr_accessor :push_config + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @ack_deadline_seconds = args[:ack_deadline_seconds] if args.key?(:ack_deadline_seconds) + @name = args[:name] if args.key?(:name) + @topic = args[:topic] if args.key?(:topic) + @push_config = args[:push_config] if args.key?(:push_config) + end + end + + # Request message for `TestIamPermissions` method. + class TestIamPermissionsRequest + include Google::Apis::Core::Hashable + + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @permissions = args[:permissions] if args.key?(:permissions) end end end diff --git a/generated/google/apis/pubsub_v1/representations.rb b/generated/google/apis/pubsub_v1/representations.rb index 39594605d..9e4f828ec 100644 --- a/generated/google/apis/pubsub_v1/representations.rb +++ b/generated/google/apis/pubsub_v1/representations.rb @@ -28,79 +28,25 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class SetIamPolicyRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ReceivedMessage - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PublishRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TestIamPermissionsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PublishResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListSubscriptionsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class Policy class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ListTopicSubscriptionsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Subscription - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class ModifyAckDeadlineRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class TestIamPermissionsRequest + class SetIamPolicyRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class PushConfig - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PullRequest + class Message class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -112,13 +58,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class PullResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Message + class Binding class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -142,7 +82,67 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Binding + class ListTopicSubscriptionsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PullResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ReceivedMessage + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PushConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TestIamPermissionsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PullRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListSubscriptionsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PublishRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PublishResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Subscription + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TestIamPermissionsRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -155,54 +155,6 @@ module Google end end - class SetIamPolicyRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :policy, as: 'policy', class: Google::Apis::PubsubV1::Policy, decorator: Google::Apis::PubsubV1::Policy::Representation - - end - end - - class ReceivedMessage - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :ack_id, as: 'ackId' - property :message, as: 'message', class: Google::Apis::PubsubV1::Message, decorator: Google::Apis::PubsubV1::Message::Representation - - end - end - - class PublishRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :messages, as: 'messages', class: Google::Apis::PubsubV1::Message, decorator: Google::Apis::PubsubV1::Message::Representation - - end - end - - class TestIamPermissionsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :permissions, as: 'permissions' - end - end - - class PublishResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :message_ids, as: 'messageIds' - end - end - - class ListSubscriptionsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :subscriptions, as: 'subscriptions', class: Google::Apis::PubsubV1::Subscription, decorator: Google::Apis::PubsubV1::Subscription::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - class Policy # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -213,25 +165,6 @@ module Google end end - class ListTopicSubscriptionsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :subscriptions, as: 'subscriptions' - property :next_page_token, as: 'nextPageToken' - end - end - - class Subscription - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :push_config, as: 'pushConfig', class: Google::Apis::PubsubV1::PushConfig, decorator: Google::Apis::PubsubV1::PushConfig::Representation - - property :topic, as: 'topic' - property :ack_deadline_seconds, as: 'ackDeadlineSeconds' - property :name, as: 'name' - end - end - class ModifyAckDeadlineRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -240,41 +173,10 @@ module Google end end - class TestIamPermissionsRequest + class SetIamPolicyRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :permissions, as: 'permissions' - end - end - - class PushConfig - # @private - class Representation < Google::Apis::Core::JsonRepresentation - hash :attributes, as: 'attributes' - property :push_endpoint, as: 'pushEndpoint' - end - end - - class PullRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :return_immediately, as: 'returnImmediately' - property :max_messages, as: 'maxMessages' - end - end - - class ModifyPushConfigRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :push_config, as: 'pushConfig', class: Google::Apis::PubsubV1::PushConfig, decorator: Google::Apis::PubsubV1::PushConfig::Representation - - end - end - - class PullResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :received_messages, as: 'receivedMessages', class: Google::Apis::PubsubV1::ReceivedMessage, decorator: Google::Apis::PubsubV1::ReceivedMessage::Representation + property :policy, as: 'policy', class: Google::Apis::PubsubV1::Policy, decorator: Google::Apis::PubsubV1::Policy::Representation end end @@ -289,6 +191,22 @@ module Google end end + class ModifyPushConfigRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :push_config, as: 'pushConfig', class: Google::Apis::PubsubV1::PushConfig, decorator: Google::Apis::PubsubV1::PushConfig::Representation + + end + end + + class Binding + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :members, as: 'members' + property :role, as: 'role' + end + end + class AcknowledgeRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -305,17 +223,99 @@ module Google class ListTopicsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' collection :topics, as: 'topics', class: Google::Apis::PubsubV1::Topic, decorator: Google::Apis::PubsubV1::Topic::Representation + property :next_page_token, as: 'nextPageToken' + end + end + + class ListTopicSubscriptionsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :subscriptions, as: 'subscriptions' + end + end + + class PullResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :received_messages, as: 'receivedMessages', class: Google::Apis::PubsubV1::ReceivedMessage, decorator: Google::Apis::PubsubV1::ReceivedMessage::Representation + end end - class Binding + class ReceivedMessage # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :members, as: 'members' - property :role, as: 'role' + property :message, as: 'message', class: Google::Apis::PubsubV1::Message, decorator: Google::Apis::PubsubV1::Message::Representation + + property :ack_id, as: 'ackId' + end + end + + class PushConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :push_endpoint, as: 'pushEndpoint' + hash :attributes, as: 'attributes' + end + end + + class TestIamPermissionsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' + end + end + + class PullRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :return_immediately, as: 'returnImmediately' + property :max_messages, as: 'maxMessages' + end + end + + class ListSubscriptionsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :subscriptions, as: 'subscriptions', class: Google::Apis::PubsubV1::Subscription, decorator: Google::Apis::PubsubV1::Subscription::Representation + + end + end + + class PublishRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :messages, as: 'messages', class: Google::Apis::PubsubV1::Message, decorator: Google::Apis::PubsubV1::Message::Representation + + end + end + + class PublishResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :message_ids, as: 'messageIds' + end + end + + class Subscription + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :ack_deadline_seconds, as: 'ackDeadlineSeconds' + property :name, as: 'name' + property :topic, as: 'topic' + property :push_config, as: 'pushConfig', class: Google::Apis::PubsubV1::PushConfig, decorator: Google::Apis::PubsubV1::PushConfig::Representation + + end + end + + class TestIamPermissionsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' end end end diff --git a/generated/google/apis/pubsub_v1/service.rb b/generated/google/apis/pubsub_v1/service.rb index 286ee1d9a..ef70f1450 100644 --- a/generated/google/apis/pubsub_v1/service.rb +++ b/generated/google/apis/pubsub_v1/service.rb @@ -46,6 +46,74 @@ module Google super('https://pubsub.googleapis.com/', '') end + # Gets the configuration details of a subscription. + # @param [String] subscription + # The name of the subscription to get. + # Format is `projects/`project`/subscriptions/`sub``. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::PubsubV1::Subscription] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::PubsubV1::Subscription] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_subscription(subscription, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+subscription}', options) + command.response_representation = Google::Apis::PubsubV1::Subscription::Representation + command.response_class = Google::Apis::PubsubV1::Subscription + command.params['subscription'] = subscription unless subscription.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Returns permissions that a caller has on the specified resource. + # If the resource does not exist, this will return an empty set of + # permissions, not a NOT_FOUND error. + # @param [String] resource + # REQUIRED: The resource for which the policy detail is being requested. + # `resource` is usually specified as a path. For example, a Project + # resource is specified as `projects/`project``. + # @param [Google::Apis::PubsubV1::TestIamPermissionsRequest] test_iam_permissions_request_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::PubsubV1::TestIamPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::PubsubV1::TestIamPermissionsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def test_subscription_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options) + command.request_representation = Google::Apis::PubsubV1::TestIamPermissionsRequest::Representation + command.request_object = test_iam_permissions_request_object + command.response_representation = Google::Apis::PubsubV1::TestIamPermissionsResponse::Representation + command.response_class = Google::Apis::PubsubV1::TestIamPermissionsResponse + command.params['resource'] = resource unless resource.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + # Modifies the `PushConfig` for a specified subscription. # This may be used to change a push subscription to a pull one (signified by # an empty `PushConfig`) or vice versa, or change the endpoint URL and other @@ -84,40 +152,6 @@ module Google execute_or_queue_command(command, &block) end - # Gets the access control policy for a resource. - # Returns an empty policy if the resource exists and does not have a policy - # set. - # @param [String] resource - # REQUIRED: The resource for which the policy is being requested. - # `resource` is usually specified as a path. For example, a Project - # resource is specified as `projects/`project``. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1::Policy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1::Policy] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_subscription_iam_policy(resource, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options) - command.response_representation = Google::Apis::PubsubV1::Policy::Representation - command.response_class = Google::Apis::PubsubV1::Policy - command.params['resource'] = resource unless resource.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - # Pulls messages from the server. Returns an empty list if there are no # messages available in the backlog. The server may return `UNAVAILABLE` if # there are too many concurrent pull requests pending for the given @@ -155,16 +189,51 @@ module Google execute_or_queue_command(command, &block) end + # Deletes an existing subscription. All messages retained in the subscription + # are immediately dropped. Calls to `Pull` after deletion will return + # `NOT_FOUND`. After a subscription is deleted, a new one may be created with + # the same name, but the new one has no association with the old + # subscription or its topic unless the same topic is specified. + # @param [String] subscription + # The subscription to delete. + # Format is `projects/`project`/subscriptions/`sub``. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::PubsubV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::PubsubV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_subscription(subscription, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/{+subscription}', options) + command.response_representation = Google::Apis::PubsubV1::Empty::Representation + command.response_class = Google::Apis::PubsubV1::Empty + command.params['subscription'] = subscription unless subscription.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + # Lists matching subscriptions. # @param [String] project # The name of the cloud project that subscriptions belong to. # Format is `projects/`project``. - # @param [Fixnum] page_size - # Maximum number of subscriptions to return. # @param [String] page_token # The value returned by the last `ListSubscriptionsResponse`; indicates that # this is a continuation of a prior `ListSubscriptions` call, and that the # system should return the next page of data. + # @param [Fixnum] page_size + # Maximum number of subscriptions to return. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. @@ -182,44 +251,13 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_subscriptions(project, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_subscriptions(project, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+project}/subscriptions', options) command.response_representation = Google::Apis::PubsubV1::ListSubscriptionsResponse::Representation command.response_class = Google::Apis::PubsubV1::ListSubscriptionsResponse command.params['project'] = project unless project.nil? - command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Gets the configuration details of a subscription. - # @param [String] subscription - # The name of the subscription to get. - # Format is `projects/`project`/subscriptions/`sub``. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1::Subscription] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1::Subscription] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_subscription(subscription, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+subscription}', options) - command.response_representation = Google::Apis::PubsubV1::Subscription::Representation - command.response_class = Google::Apis::PubsubV1::Subscription - command.params['subscription'] = subscription unless subscription.nil? + command.query['pageSize'] = page_size unless page_size.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) @@ -271,44 +309,6 @@ module Google execute_or_queue_command(command, &block) end - # Modifies the ack deadline for a specific message. This method is useful - # to indicate that more time is needed to process a message by the - # subscriber, or to make the message available for redelivery if the - # processing was interrupted. Note that this does not modify the - # subscription-level `ackDeadlineSeconds` used for subsequent messages. - # @param [String] subscription - # The name of the subscription. - # Format is `projects/`project`/subscriptions/`sub``. - # @param [Google::Apis::PubsubV1::ModifyAckDeadlineRequest] modify_ack_deadline_request_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def modify_subscription_ack_deadline(subscription, modify_ack_deadline_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+subscription}:modifyAckDeadline', options) - command.request_representation = Google::Apis::PubsubV1::ModifyAckDeadlineRequest::Representation - command.request_object = modify_ack_deadline_request_object - command.response_representation = Google::Apis::PubsubV1::Empty::Representation - command.response_class = Google::Apis::PubsubV1::Empty - command.params['subscription'] = subscription unless subscription.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - # Sets the access control policy on the specified resource. Replaces any # existing policy. # @param [String] resource @@ -345,14 +345,49 @@ module Google execute_or_queue_command(command, &block) end - # Deletes an existing subscription. All messages retained in the subscription - # are immediately dropped. Calls to `Pull` after deletion will return - # `NOT_FOUND`. After a subscription is deleted, a new one may be created with - # the same name, but the new one has no association with the old - # subscription or its topic unless the same topic is specified. + # Gets the access control policy for a resource. + # Returns an empty policy if the resource exists and does not have a policy + # set. + # @param [String] resource + # REQUIRED: The resource for which the policy is being requested. + # `resource` is usually specified as a path. For example, a Project + # resource is specified as `projects/`project``. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::PubsubV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::PubsubV1::Policy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_subscription_iam_policy(resource, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options) + command.response_representation = Google::Apis::PubsubV1::Policy::Representation + command.response_class = Google::Apis::PubsubV1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Modifies the ack deadline for a specific message. This method is useful + # to indicate that more time is needed to process a message by the + # subscriber, or to make the message available for redelivery if the + # processing was interrupted. Note that this does not modify the + # subscription-level `ackDeadlineSeconds` used for subsequent messages. # @param [String] subscription - # The subscription to delete. + # The name of the subscription. # Format is `projects/`project`/subscriptions/`sub``. + # @param [Google::Apis::PubsubV1::ModifyAckDeadlineRequest] modify_ack_deadline_request_object # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. @@ -370,8 +405,10 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_subscription(subscription, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/{+subscription}', options) + def modify_subscription_ack_deadline(subscription, modify_ack_deadline_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+subscription}:modifyAckDeadline', options) + command.request_representation = Google::Apis::PubsubV1::ModifyAckDeadlineRequest::Representation + command.request_object = modify_ack_deadline_request_object command.response_representation = Google::Apis::PubsubV1::Empty::Representation command.response_class = Google::Apis::PubsubV1::Empty command.params['subscription'] = subscription unless subscription.nil? @@ -380,43 +417,6 @@ module Google execute_or_queue_command(command, &block) end - # Returns permissions that a caller has on the specified resource. - # If the resource does not exist, this will return an empty set of - # permissions, not a NOT_FOUND error. - # @param [String] resource - # REQUIRED: The resource for which the policy detail is being requested. - # `resource` is usually specified as a path. For example, a Project - # resource is specified as `projects/`project``. - # @param [Google::Apis::PubsubV1::TestIamPermissionsRequest] test_iam_permissions_request_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1::TestIamPermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1::TestIamPermissionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def test_subscription_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options) - command.request_representation = Google::Apis::PubsubV1::TestIamPermissionsRequest::Representation - command.request_object = test_iam_permissions_request_object - command.response_representation = Google::Apis::PubsubV1::TestIamPermissionsResponse::Representation - command.response_class = Google::Apis::PubsubV1::TestIamPermissionsResponse - command.params['resource'] = resource unless resource.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - # Acknowledges the messages associated with the `ack_ids` in the # `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages # from the subscription. @@ -456,6 +456,43 @@ module Google execute_or_queue_command(command, &block) end + # Returns permissions that a caller has on the specified resource. + # If the resource does not exist, this will return an empty set of + # permissions, not a NOT_FOUND error. + # @param [String] resource + # REQUIRED: The resource for which the policy detail is being requested. + # `resource` is usually specified as a path. For example, a Project + # resource is specified as `projects/`project``. + # @param [Google::Apis::PubsubV1::TestIamPermissionsRequest] test_iam_permissions_request_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::PubsubV1::TestIamPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::PubsubV1::TestIamPermissionsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def test_snapshot_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options) + command.request_representation = Google::Apis::PubsubV1::TestIamPermissionsRequest::Representation + command.request_object = test_iam_permissions_request_object + command.response_representation = Google::Apis::PubsubV1::TestIamPermissionsResponse::Representation + command.response_class = Google::Apis::PubsubV1::TestIamPermissionsResponse + command.params['resource'] = resource unless resource.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + # Gets the access control policy for a resource. # Returns an empty policy if the resource exists and does not have a policy # set. @@ -480,7 +517,7 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_topic_iam_policy(resource, quota_user: nil, fields: nil, options: nil, &block) + def get_project_snapshot_iam_policy(resource, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options) command.response_representation = Google::Apis::PubsubV1::Policy::Representation command.response_class = Google::Apis::PubsubV1::Policy @@ -490,13 +527,13 @@ module Google execute_or_queue_command(command, &block) end - # Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic - # does not exist. The message payload must not be empty; it must contain - # either a non-empty data field, or at least one attribute. - # @param [String] topic - # The messages in the request will be published on this topic. - # Format is `projects/`project`/topics/`topic``. - # @param [Google::Apis::PubsubV1::PublishRequest] publish_request_object + # Sets the access control policy on the specified resource. Replaces any + # existing policy. + # @param [String] resource + # REQUIRED: The resource for which the policy is being specified. + # `resource` is usually specified as a path. For example, a Project + # resource is specified as `projects/`project``. + # @param [Google::Apis::PubsubV1::SetIamPolicyRequest] set_iam_policy_request_object # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. @@ -506,21 +543,21 @@ module Google # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1::PublishResponse] parsed result object + # @yieldparam result [Google::Apis::PubsubV1::Policy] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::PubsubV1::PublishResponse] + # @return [Google::Apis::PubsubV1::Policy] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def publish_topic(topic, publish_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+topic}:publish', options) - command.request_representation = Google::Apis::PubsubV1::PublishRequest::Representation - command.request_object = publish_request_object - command.response_representation = Google::Apis::PubsubV1::PublishResponse::Representation - command.response_class = Google::Apis::PubsubV1::PublishResponse - command.params['topic'] = topic unless topic.nil? + def set_snapshot_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options) + command.request_representation = Google::Apis::PubsubV1::SetIamPolicyRequest::Representation + command.request_object = set_iam_policy_request_object + command.response_representation = Google::Apis::PubsubV1::Policy::Representation + command.response_class = Google::Apis::PubsubV1::Policy + command.params['resource'] = resource unless resource.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) @@ -530,12 +567,12 @@ module Google # @param [String] project # The name of the cloud project that topics belong to. # Format is `projects/`project``. - # @param [Fixnum] page_size - # Maximum number of topics to return. # @param [String] page_token # The value returned by the last `ListTopicsResponse`; indicates that this is # a continuation of a prior `ListTopics` call, and that the system should # return the next page of data. + # @param [Fixnum] page_size + # Maximum number of topics to return. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. @@ -553,44 +590,13 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_topics(project, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_topics(project, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+project}/topics', options) command.response_representation = Google::Apis::PubsubV1::ListTopicsResponse::Representation command.response_class = Google::Apis::PubsubV1::ListTopicsResponse command.params['project'] = project unless project.nil? - command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Gets the configuration of a topic. - # @param [String] topic - # The name of the topic to get. - # Format is `projects/`project`/topics/`topic``. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1::Topic] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1::Topic] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_topic(topic, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+topic}', options) - command.response_representation = Google::Apis::PubsubV1::Topic::Representation - command.response_class = Google::Apis::PubsubV1::Topic - command.params['topic'] = topic unless topic.nil? + command.query['pageSize'] = page_size unless page_size.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) @@ -670,13 +676,43 @@ module Google execute_or_queue_command(command, &block) end - # Deletes the topic with the given name. Returns `NOT_FOUND` if the topic - # does not exist. After a topic is deleted, a new topic may be created with - # the same name; this is an entirely new topic with none of the old - # configuration or subscriptions. Existing subscriptions to this topic are - # not deleted, but their `topic` field is set to `_deleted-topic_`. + # Gets the access control policy for a resource. + # Returns an empty policy if the resource exists and does not have a policy + # set. + # @param [String] resource + # REQUIRED: The resource for which the policy is being requested. + # `resource` is usually specified as a path. For example, a Project + # resource is specified as `projects/`project``. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::PubsubV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::PubsubV1::Policy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_topic_iam_policy(resource, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options) + command.response_representation = Google::Apis::PubsubV1::Policy::Representation + command.response_class = Google::Apis::PubsubV1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets the configuration of a topic. # @param [String] topic - # Name of the topic to delete. + # The name of the topic to get. # Format is `projects/`project`/topics/`topic``. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any @@ -687,18 +723,54 @@ module Google # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1::Empty] parsed result object + # @yieldparam result [Google::Apis::PubsubV1::Topic] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::PubsubV1::Empty] + # @return [Google::Apis::PubsubV1::Topic] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_topic(topic, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/{+topic}', options) - command.response_representation = Google::Apis::PubsubV1::Empty::Representation - command.response_class = Google::Apis::PubsubV1::Empty + def get_topic(topic, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+topic}', options) + command.response_representation = Google::Apis::PubsubV1::Topic::Representation + command.response_class = Google::Apis::PubsubV1::Topic + command.params['topic'] = topic unless topic.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic + # does not exist. The message payload must not be empty; it must contain + # either a non-empty data field, or at least one attribute. + # @param [String] topic + # The messages in the request will be published on this topic. + # Format is `projects/`project`/topics/`topic``. + # @param [Google::Apis::PubsubV1::PublishRequest] publish_request_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::PubsubV1::PublishResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::PubsubV1::PublishResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def publish_topic(topic, publish_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+topic}:publish', options) + command.request_representation = Google::Apis::PubsubV1::PublishRequest::Representation + command.request_object = publish_request_object + command.response_representation = Google::Apis::PubsubV1::PublishResponse::Representation + command.response_class = Google::Apis::PubsubV1::PublishResponse command.params['topic'] = topic unless topic.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? @@ -742,6 +814,41 @@ module Google execute_or_queue_command(command, &block) end + # Deletes the topic with the given name. Returns `NOT_FOUND` if the topic + # does not exist. After a topic is deleted, a new topic may be created with + # the same name; this is an entirely new topic with none of the old + # configuration or subscriptions. Existing subscriptions to this topic are + # not deleted, but their `topic` field is set to `_deleted-topic_`. + # @param [String] topic + # Name of the topic to delete. + # Format is `projects/`project`/topics/`topic``. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::PubsubV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::PubsubV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_topic(topic, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/{+topic}', options) + command.response_representation = Google::Apis::PubsubV1::Empty::Representation + command.response_class = Google::Apis::PubsubV1::Empty + command.params['topic'] = topic unless topic.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + # Lists the name of the subscriptions for this topic. # @param [String] topic # The name of the topic that subscriptions are attached to. @@ -780,113 +887,6 @@ module Google command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end - - # Returns permissions that a caller has on the specified resource. - # If the resource does not exist, this will return an empty set of - # permissions, not a NOT_FOUND error. - # @param [String] resource - # REQUIRED: The resource for which the policy detail is being requested. - # `resource` is usually specified as a path. For example, a Project - # resource is specified as `projects/`project``. - # @param [Google::Apis::PubsubV1::TestIamPermissionsRequest] test_iam_permissions_request_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1::TestIamPermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1::TestIamPermissionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def test_snapshot_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options) - command.request_representation = Google::Apis::PubsubV1::TestIamPermissionsRequest::Representation - command.request_object = test_iam_permissions_request_object - command.response_representation = Google::Apis::PubsubV1::TestIamPermissionsResponse::Representation - command.response_class = Google::Apis::PubsubV1::TestIamPermissionsResponse - command.params['resource'] = resource unless resource.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Sets the access control policy on the specified resource. Replaces any - # existing policy. - # @param [String] resource - # REQUIRED: The resource for which the policy is being specified. - # `resource` is usually specified as a path. For example, a Project - # resource is specified as `projects/`project``. - # @param [Google::Apis::PubsubV1::SetIamPolicyRequest] set_iam_policy_request_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1::Policy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1::Policy] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_snapshot_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options) - command.request_representation = Google::Apis::PubsubV1::SetIamPolicyRequest::Representation - command.request_object = set_iam_policy_request_object - command.response_representation = Google::Apis::PubsubV1::Policy::Representation - command.response_class = Google::Apis::PubsubV1::Policy - command.params['resource'] = resource unless resource.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Gets the access control policy for a resource. - # Returns an empty policy if the resource exists and does not have a policy - # set. - # @param [String] resource - # REQUIRED: The resource for which the policy is being requested. - # `resource` is usually specified as a path. For example, a Project - # resource is specified as `projects/`project``. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1::Policy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1::Policy] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_snapshot_iam_policy(resource, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options) - command.response_representation = Google::Apis::PubsubV1::Policy::Representation - command.response_class = Google::Apis::PubsubV1::Policy - command.params['resource'] = resource unless resource.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end protected diff --git a/generated/google/apis/sheets_v4.rb b/generated/google/apis/sheets_v4.rb index 220a5b792..72ed02684 100644 --- a/generated/google/apis/sheets_v4.rb +++ b/generated/google/apis/sheets_v4.rb @@ -27,15 +27,15 @@ module Google VERSION = 'V4' REVISION = '20170117' + # View and manage the files in your Google Drive + AUTH_DRIVE = 'https://www.googleapis.com/auth/drive' + # View the files in your Google Drive AUTH_DRIVE_READONLY = 'https://www.googleapis.com/auth/drive.readonly' # View your Google Spreadsheets AUTH_SPREADSHEETS_READONLY = 'https://www.googleapis.com/auth/spreadsheets.readonly' - # View and manage the files in your Google Drive - AUTH_DRIVE = 'https://www.googleapis.com/auth/drive' - # View and manage your spreadsheets in Google Drive AUTH_SPREADSHEETS = 'https://www.googleapis.com/auth/spreadsheets' end diff --git a/generated/google/apis/sheets_v4/classes.rb b/generated/google/apis/sheets_v4/classes.rb index 5c2a0c09e..6f832abb8 100644 --- a/generated/google/apis/sheets_v4/classes.rb +++ b/generated/google/apis/sheets_v4/classes.rb @@ -22,1073 +22,6 @@ module Google module Apis module SheetsV4 - # The result of adding a named range. - class AddNamedRangeResponse - include Google::Apis::Core::Hashable - - # A named range. - # Corresponds to the JSON property `namedRange` - # @return [Google::Apis::SheetsV4::NamedRange] - attr_accessor :named_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @named_range = args[:named_range] if args.key?(:named_range) - end - end - - # Updates an existing protected range with the specified - # protectedRangeId. - class UpdateProtectedRangeRequest - include Google::Apis::Core::Hashable - - # A protected range. - # Corresponds to the JSON property `protectedRange` - # @return [Google::Apis::SheetsV4::ProtectedRange] - attr_accessor :protected_range - - # The fields that should be updated. At least one field must be specified. - # The root `protectedRange` is implied and should not be specified. - # A single `"*"` can be used as short-hand for listing every field. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @protected_range = args[:protected_range] if args.key?(:protected_range) - @fields = args[:fields] if args.key?(:fields) - end - end - - # The amount of padding around the cell, in pixels. - # When updating padding, every field must be specified. - class Padding - include Google::Apis::Core::Hashable - - # The right padding of the cell. - # Corresponds to the JSON property `right` - # @return [Fixnum] - attr_accessor :right - - # The left padding of the cell. - # Corresponds to the JSON property `left` - # @return [Fixnum] - attr_accessor :left - - # The top padding of the cell. - # Corresponds to the JSON property `top` - # @return [Fixnum] - attr_accessor :top - - # The bottom padding of the cell. - # Corresponds to the JSON property `bottom` - # @return [Fixnum] - attr_accessor :bottom - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @right = args[:right] if args.key?(:right) - @left = args[:left] if args.key?(:left) - @top = args[:top] if args.key?(:top) - @bottom = args[:bottom] if args.key?(:bottom) - end - end - - # Merges all cells in the range. - class MergeCellsRequest - include Google::Apis::Core::Hashable - - # How the cells should be merged. - # Corresponds to the JSON property `mergeType` - # @return [String] - attr_accessor :merge_type - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @merge_type = args[:merge_type] if args.key?(:merge_type) - @range = args[:range] if args.key?(:range) - end - end - - # The result of adding a sheet. - class AddSheetResponse - include Google::Apis::Core::Hashable - - # Properties of a sheet. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV4::SheetProperties] - attr_accessor :properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @properties = args[:properties] if args.key?(:properties) - end - end - - # Metadata about a value in a pivot grouping. - class PivotGroupValueMetadata - include Google::Apis::Core::Hashable - - # The kinds of value that a cell in a spreadsheet can have. - # Corresponds to the JSON property `value` - # @return [Google::Apis::SheetsV4::ExtendedValue] - attr_accessor :value - - # True if the data corresponding to the value is collapsed. - # Corresponds to the JSON property `collapsed` - # @return [Boolean] - attr_accessor :collapsed - alias_method :collapsed?, :collapsed - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @value = args[:value] if args.key?(:value) - @collapsed = args[:collapsed] if args.key?(:collapsed) - end - end - - # The result of updating an embedded object's position. - class UpdateEmbeddedObjectPositionResponse - include Google::Apis::Core::Hashable - - # The position of an embedded object such as a chart. - # Corresponds to the JSON property `position` - # @return [Google::Apis::SheetsV4::EmbeddedObjectPosition] - attr_accessor :position - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @position = args[:position] if args.key?(:position) - end - end - - # The response when clearing a range of values in a spreadsheet. - class ClearValuesResponse - include Google::Apis::Core::Hashable - - # The spreadsheet the updates were applied to. - # Corresponds to the JSON property `spreadsheetId` - # @return [String] - attr_accessor :spreadsheet_id - - # The range (in A1 notation) that was cleared. - # (If the request was for an unbounded range or a ranger larger - # than the bounds of the sheet, this will be the actual range - # that was cleared, bounded to the sheet's limits.) - # Corresponds to the JSON property `clearedRange` - # @return [String] - attr_accessor :cleared_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) - @cleared_range = args[:cleared_range] if args.key?(:cleared_range) - end - end - - # Updates a conditional format rule at the given index, - # or moves a conditional format rule to another index. - class UpdateConditionalFormatRuleRequest - include Google::Apis::Core::Hashable - - # The sheet of the rule to move. Required if new_index is set, - # unused otherwise. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - # A rule describing a conditional format. - # Corresponds to the JSON property `rule` - # @return [Google::Apis::SheetsV4::ConditionalFormatRule] - attr_accessor :rule - - # The zero-based index of the rule that should be replaced or moved. - # Corresponds to the JSON property `index` - # @return [Fixnum] - attr_accessor :index - - # The zero-based new index the rule should end up at. - # Corresponds to the JSON property `newIndex` - # @return [Fixnum] - attr_accessor :new_index - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @rule = args[:rule] if args.key?(:rule) - @index = args[:index] if args.key?(:index) - @new_index = args[:new_index] if args.key?(:new_index) - end - end - - # The format of a run of text in a cell. - # Absent values indicate that the field isn't specified. - class TextFormat - include Google::Apis::Core::Hashable - - # True if the text is bold. - # Corresponds to the JSON property `bold` - # @return [Boolean] - attr_accessor :bold - alias_method :bold?, :bold - - # True if the text is italicized. - # Corresponds to the JSON property `italic` - # @return [Boolean] - attr_accessor :italic - alias_method :italic?, :italic - - # Represents a color in the RGBA color space. This representation is designed - # for simplicity of conversion to/from color representations in various - # languages over compactness; for example, the fields of this representation - # can be trivially provided to the constructor of "java.awt.Color" in Java; it - # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" - # method in iOS; and, with just a little work, it can be easily formatted into - # a CSS "rgba()" string in JavaScript, as well. Here are some examples: - # Example (Java): - # import com.google.type.Color; - # // ... - # public static java.awt.Color fromProto(Color protocolor) ` - # float alpha = protocolor.hasAlpha() - # ? protocolor.getAlpha().getValue() - # : 1.0; - # return new java.awt.Color( - # protocolor.getRed(), - # protocolor.getGreen(), - # protocolor.getBlue(), - # alpha); - # ` - # public static Color toProto(java.awt.Color color) ` - # float red = (float) color.getRed(); - # float green = (float) color.getGreen(); - # float blue = (float) color.getBlue(); - # float denominator = 255.0; - # Color.Builder resultBuilder = - # Color - # .newBuilder() - # .setRed(red / denominator) - # .setGreen(green / denominator) - # .setBlue(blue / denominator); - # int alpha = color.getAlpha(); - # if (alpha != 255) ` - # result.setAlpha( - # FloatValue - # .newBuilder() - # .setValue(((float) alpha) / denominator) - # .build()); - # ` - # return resultBuilder.build(); - # ` - # // ... - # Example (iOS / Obj-C): - # // ... - # static UIColor* fromProto(Color* protocolor) ` - # float red = [protocolor red]; - # float green = [protocolor green]; - # float blue = [protocolor blue]; - # FloatValue* alpha_wrapper = [protocolor alpha]; - # float alpha = 1.0; - # if (alpha_wrapper != nil) ` - # alpha = [alpha_wrapper value]; - # ` - # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; - # ` - # static Color* toProto(UIColor* color) ` - # CGFloat red, green, blue, alpha; - # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` - # return nil; - # ` - # Color* result = [Color alloc] init]; - # [result setRed:red]; - # [result setGreen:green]; - # [result setBlue:blue]; - # if (alpha <= 0.9999) ` - # [result setAlpha:floatWrapperWithValue(alpha)]; - # ` - # [result autorelease]; - # return result; - # ` - # // ... - # Example (JavaScript): - # // ... - # var protoToCssColor = function(rgb_color) ` - # var redFrac = rgb_color.red || 0.0; - # var greenFrac = rgb_color.green || 0.0; - # var blueFrac = rgb_color.blue || 0.0; - # var red = Math.floor(redFrac * 255); - # var green = Math.floor(greenFrac * 255); - # var blue = Math.floor(blueFrac * 255); - # if (!('alpha' in rgb_color)) ` - # return rgbToCssColor_(red, green, blue); - # ` - # var alphaFrac = rgb_color.alpha.value || 0.0; - # var rgbParams = [red, green, blue].join(','); - # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); - # `; - # var rgbToCssColor_ = function(red, green, blue) ` - # var rgbNumber = new Number((red << 16) | (green << 8) | blue); - # var hexString = rgbNumber.toString(16); - # var missingZeros = 6 - hexString.length; - # var resultBuilder = ['#']; - # for (var i = 0; i < missingZeros; i++) ` - # resultBuilder.push('0'); - # ` - # resultBuilder.push(hexString); - # return resultBuilder.join(''); - # `; - # // ... - # Corresponds to the JSON property `foregroundColor` - # @return [Google::Apis::SheetsV4::Color] - attr_accessor :foreground_color - - # The font family. - # Corresponds to the JSON property `fontFamily` - # @return [String] - attr_accessor :font_family - - # True if the text has a strikethrough. - # Corresponds to the JSON property `strikethrough` - # @return [Boolean] - attr_accessor :strikethrough - alias_method :strikethrough?, :strikethrough - - # The size of the font. - # Corresponds to the JSON property `fontSize` - # @return [Fixnum] - attr_accessor :font_size - - # True if the text is underlined. - # Corresponds to the JSON property `underline` - # @return [Boolean] - attr_accessor :underline - alias_method :underline?, :underline - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bold = args[:bold] if args.key?(:bold) - @italic = args[:italic] if args.key?(:italic) - @foreground_color = args[:foreground_color] if args.key?(:foreground_color) - @font_family = args[:font_family] if args.key?(:font_family) - @strikethrough = args[:strikethrough] if args.key?(:strikethrough) - @font_size = args[:font_size] if args.key?(:font_size) - @underline = args[:underline] if args.key?(:underline) - end - end - - # Updates a chart's specifications. - # (This does not move or resize a chart. To move or resize a chart, use - # UpdateEmbeddedObjectPositionRequest.) - class UpdateChartSpecRequest - include Google::Apis::Core::Hashable - - # The ID of the chart to update. - # Corresponds to the JSON property `chartId` - # @return [Fixnum] - attr_accessor :chart_id - - # The specifications of a chart. - # Corresponds to the JSON property `spec` - # @return [Google::Apis::SheetsV4::ChartSpec] - attr_accessor :spec - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @chart_id = args[:chart_id] if args.key?(:chart_id) - @spec = args[:spec] if args.key?(:spec) - end - end - - # A coordinate in a sheet. - # All indexes are zero-based. - class GridCoordinate - include Google::Apis::Core::Hashable - - # The sheet this coordinate is on. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - # The row index of the coordinate. - # Corresponds to the JSON property `rowIndex` - # @return [Fixnum] - attr_accessor :row_index - - # The column index of the coordinate. - # Corresponds to the JSON property `columnIndex` - # @return [Fixnum] - attr_accessor :column_index - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @row_index = args[:row_index] if args.key?(:row_index) - @column_index = args[:column_index] if args.key?(:column_index) - end - end - - # Deletes a particular filter view. - class DeleteFilterViewRequest - include Google::Apis::Core::Hashable - - # The ID of the filter to delete. - # Corresponds to the JSON property `filterId` - # @return [Fixnum] - attr_accessor :filter_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @filter_id = args[:filter_id] if args.key?(:filter_id) - end - end - - # The response when updating a range of values in a spreadsheet. - class BatchUpdateValuesResponse - include Google::Apis::Core::Hashable - - # The total number of sheets where at least one cell in the sheet was - # updated. - # Corresponds to the JSON property `totalUpdatedSheets` - # @return [Fixnum] - attr_accessor :total_updated_sheets - - # The total number of columns where at least one cell in the column was - # updated. - # Corresponds to the JSON property `totalUpdatedColumns` - # @return [Fixnum] - attr_accessor :total_updated_columns - - # One UpdateValuesResponse per requested range, in the same order as - # the requests appeared. - # Corresponds to the JSON property `responses` - # @return [Array] - attr_accessor :responses - - # The total number of cells updated. - # Corresponds to the JSON property `totalUpdatedCells` - # @return [Fixnum] - attr_accessor :total_updated_cells - - # The spreadsheet the updates were applied to. - # Corresponds to the JSON property `spreadsheetId` - # @return [String] - attr_accessor :spreadsheet_id - - # The total number of rows where at least one cell in the row was updated. - # Corresponds to the JSON property `totalUpdatedRows` - # @return [Fixnum] - attr_accessor :total_updated_rows - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @total_updated_sheets = args[:total_updated_sheets] if args.key?(:total_updated_sheets) - @total_updated_columns = args[:total_updated_columns] if args.key?(:total_updated_columns) - @responses = args[:responses] if args.key?(:responses) - @total_updated_cells = args[:total_updated_cells] if args.key?(:total_updated_cells) - @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) - @total_updated_rows = args[:total_updated_rows] if args.key?(:total_updated_rows) - end - end - - # Updates properties of the named range with the specified - # namedRangeId. - class UpdateNamedRangeRequest - include Google::Apis::Core::Hashable - - # The fields that should be updated. At least one field must be specified. - # The root `namedRange` is implied and should not be specified. - # A single `"*"` can be used as short-hand for listing every field. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - # A named range. - # Corresponds to the JSON property `namedRange` - # @return [Google::Apis::SheetsV4::NamedRange] - attr_accessor :named_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @fields = args[:fields] if args.key?(:fields) - @named_range = args[:named_range] if args.key?(:named_range) - end - end - - # The response when updating a range of values in a spreadsheet. - class UpdateValuesResponse - include Google::Apis::Core::Hashable - - # The number of columns where at least one cell in the column was updated. - # Corresponds to the JSON property `updatedColumns` - # @return [Fixnum] - attr_accessor :updated_columns - - # The number of cells updated. - # Corresponds to the JSON property `updatedCells` - # @return [Fixnum] - attr_accessor :updated_cells - - # Data within a range of the spreadsheet. - # Corresponds to the JSON property `updatedData` - # @return [Google::Apis::SheetsV4::ValueRange] - attr_accessor :updated_data - - # The range (in A1 notation) that updates were applied to. - # Corresponds to the JSON property `updatedRange` - # @return [String] - attr_accessor :updated_range - - # The spreadsheet the updates were applied to. - # Corresponds to the JSON property `spreadsheetId` - # @return [String] - attr_accessor :spreadsheet_id - - # The number of rows where at least one cell in the row was updated. - # Corresponds to the JSON property `updatedRows` - # @return [Fixnum] - attr_accessor :updated_rows - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @updated_columns = args[:updated_columns] if args.key?(:updated_columns) - @updated_cells = args[:updated_cells] if args.key?(:updated_cells) - @updated_data = args[:updated_data] if args.key?(:updated_data) - @updated_range = args[:updated_range] if args.key?(:updated_range) - @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) - @updated_rows = args[:updated_rows] if args.key?(:updated_rows) - end - end - - # Properties of a spreadsheet. - class SpreadsheetProperties - include Google::Apis::Core::Hashable - - # The time zone of the spreadsheet, in CLDR format such as - # `America/New_York`. If the time zone isn't recognized, this may - # be a custom time zone such as `GMT-07:00`. - # Corresponds to the JSON property `timeZone` - # @return [String] - attr_accessor :time_zone - - # The amount of time to wait before volatile functions are recalculated. - # Corresponds to the JSON property `autoRecalc` - # @return [String] - attr_accessor :auto_recalc - - # The locale of the spreadsheet in one of the following formats: - # * an ISO 639-1 language code such as `en` - # * an ISO 639-2 language code such as `fil`, if no 639-1 code exists - # * a combination of the ISO language code and country code, such as `en_US` - # Note: when updating this field, not all locales/languages are supported. - # Corresponds to the JSON property `locale` - # @return [String] - attr_accessor :locale - - # The title of the spreadsheet. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The format of a cell. - # Corresponds to the JSON property `defaultFormat` - # @return [Google::Apis::SheetsV4::CellFormat] - attr_accessor :default_format - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @time_zone = args[:time_zone] if args.key?(:time_zone) - @auto_recalc = args[:auto_recalc] if args.key?(:auto_recalc) - @locale = args[:locale] if args.key?(:locale) - @title = args[:title] if args.key?(:title) - @default_format = args[:default_format] if args.key?(:default_format) - end - end - - # Data about a specific cell. - class CellData - include Google::Apis::Core::Hashable - - # A hyperlink this cell points to, if any. - # This field is read-only. (To set it, use a `=HYPERLINK` formula.) - # Corresponds to the JSON property `hyperlink` - # @return [String] - attr_accessor :hyperlink - - # The format of a cell. - # Corresponds to the JSON property `effectiveFormat` - # @return [Google::Apis::SheetsV4::CellFormat] - attr_accessor :effective_format - - # Any note on the cell. - # Corresponds to the JSON property `note` - # @return [String] - attr_accessor :note - - # The formatted value of the cell. - # This is the value as it's shown to the user. - # This field is read-only. - # Corresponds to the JSON property `formattedValue` - # @return [String] - attr_accessor :formatted_value - - # The kinds of value that a cell in a spreadsheet can have. - # Corresponds to the JSON property `userEnteredValue` - # @return [Google::Apis::SheetsV4::ExtendedValue] - attr_accessor :user_entered_value - - # A data validation rule. - # Corresponds to the JSON property `dataValidation` - # @return [Google::Apis::SheetsV4::DataValidationRule] - attr_accessor :data_validation - - # The format of a cell. - # Corresponds to the JSON property `userEnteredFormat` - # @return [Google::Apis::SheetsV4::CellFormat] - attr_accessor :user_entered_format - - # A pivot table. - # Corresponds to the JSON property `pivotTable` - # @return [Google::Apis::SheetsV4::PivotTable] - attr_accessor :pivot_table - - # Runs of rich text applied to subsections of the cell. Runs are only valid - # on user entered strings, not formulas, bools, or numbers. - # Runs start at specific indexes in the text and continue until the next - # run. Properties of a run will continue unless explicitly changed - # in a subsequent run (and properties of the first run will continue - # the properties of the cell unless explicitly changed). - # When writing, the new runs will overwrite any prior runs. When writing a - # new user_entered_value, previous runs will be erased. - # Corresponds to the JSON property `textFormatRuns` - # @return [Array] - attr_accessor :text_format_runs - - # The kinds of value that a cell in a spreadsheet can have. - # Corresponds to the JSON property `effectiveValue` - # @return [Google::Apis::SheetsV4::ExtendedValue] - attr_accessor :effective_value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @hyperlink = args[:hyperlink] if args.key?(:hyperlink) - @effective_format = args[:effective_format] if args.key?(:effective_format) - @note = args[:note] if args.key?(:note) - @formatted_value = args[:formatted_value] if args.key?(:formatted_value) - @user_entered_value = args[:user_entered_value] if args.key?(:user_entered_value) - @data_validation = args[:data_validation] if args.key?(:data_validation) - @user_entered_format = args[:user_entered_format] if args.key?(:user_entered_format) - @pivot_table = args[:pivot_table] if args.key?(:pivot_table) - @text_format_runs = args[:text_format_runs] if args.key?(:text_format_runs) - @effective_value = args[:effective_value] if args.key?(:effective_value) - end - end - - # Unmerges cells in the given range. - class UnmergeCellsRequest - include Google::Apis::Core::Hashable - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @range = args[:range] if args.key?(:range) - end - end - - # Splits a column of text into multiple columns, - # based on a delimiter in each cell. - class TextToColumnsRequest - include Google::Apis::Core::Hashable - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `source` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :source - - # The delimiter to use. Used only if delimiterType is - # CUSTOM. - # Corresponds to the JSON property `delimiter` - # @return [String] - attr_accessor :delimiter - - # The delimiter type to use. - # Corresponds to the JSON property `delimiterType` - # @return [String] - attr_accessor :delimiter_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @source = args[:source] if args.key?(:source) - @delimiter = args[:delimiter] if args.key?(:delimiter) - @delimiter_type = args[:delimiter_type] if args.key?(:delimiter_type) - end - end - - # The result of adding a new protected range. - class AddProtectedRangeResponse - include Google::Apis::Core::Hashable - - # A protected range. - # Corresponds to the JSON property `protectedRange` - # @return [Google::Apis::SheetsV4::ProtectedRange] - attr_accessor :protected_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @protected_range = args[:protected_range] if args.key?(:protected_range) - end - end - - # A condition that can evaluate to true or false. - # BooleanConditions are used by conditional formatting, - # data validation, and the criteria in filters. - class BooleanCondition - include Google::Apis::Core::Hashable - - # The values of the condition. The number of supported values depends - # on the condition type. Some support zero values, - # others one or two values, - # and ConditionType.ONE_OF_LIST supports an arbitrary number of values. - # Corresponds to the JSON property `values` - # @return [Array] - attr_accessor :values - - # The type of condition. - # 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) - @values = args[:values] if args.key?(:values) - @type = args[:type] if args.key?(:type) - end - end - - # Deletes the protected range with the given ID. - class DeleteProtectedRangeRequest - include Google::Apis::Core::Hashable - - # The ID of the protected range to delete. - # Corresponds to the JSON property `protectedRangeId` - # @return [Fixnum] - attr_accessor :protected_range_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @protected_range_id = args[:protected_range_id] if args.key?(:protected_range_id) - end - end - - # The domain of a chart. - # For example, if charting stock prices over time, this would be the date. - class BasicChartDomain - include Google::Apis::Core::Hashable - - # The data included in a domain or series. - # Corresponds to the JSON property `domain` - # @return [Google::Apis::SheetsV4::ChartData] - attr_accessor :domain - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @domain = args[:domain] if args.key?(:domain) - end - end - - # A range along a single dimension on a sheet. - # All indexes are zero-based. - # Indexes are half open: the start index is inclusive - # and the end index is exclusive. - # Missing indexes indicate the range is unbounded on that side. - class DimensionRange - include Google::Apis::Core::Hashable - - # The sheet this span is on. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - # The end (exclusive) of the span, or not set if unbounded. - # Corresponds to the JSON property `endIndex` - # @return [Fixnum] - attr_accessor :end_index - - # The start (inclusive) of the span, or not set if unbounded. - # Corresponds to the JSON property `startIndex` - # @return [Fixnum] - attr_accessor :start_index - - # The dimension of the span. - # Corresponds to the JSON property `dimension` - # @return [String] - attr_accessor :dimension - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @end_index = args[:end_index] if args.key?(:end_index) - @start_index = args[:start_index] if args.key?(:start_index) - @dimension = args[:dimension] if args.key?(:dimension) - end - end - - # A single response from an update. - class Response - include Google::Apis::Core::Hashable - - # The result of updating an embedded object's position. - # Corresponds to the JSON property `updateEmbeddedObjectPosition` - # @return [Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionResponse] - attr_accessor :update_embedded_object_position - - # The result of adding a filter view. - # Corresponds to the JSON property `addFilterView` - # @return [Google::Apis::SheetsV4::AddFilterViewResponse] - attr_accessor :add_filter_view - - # The result of adding a sheet. - # Corresponds to the JSON property `addSheet` - # @return [Google::Apis::SheetsV4::AddSheetResponse] - attr_accessor :add_sheet - - # The result of the find/replace. - # Corresponds to the JSON property `findReplace` - # @return [Google::Apis::SheetsV4::FindReplaceResponse] - attr_accessor :find_replace - - # The result of adding a new protected range. - # Corresponds to the JSON property `addProtectedRange` - # @return [Google::Apis::SheetsV4::AddProtectedRangeResponse] - attr_accessor :add_protected_range - - # The result of updating a conditional format rule. - # Corresponds to the JSON property `updateConditionalFormatRule` - # @return [Google::Apis::SheetsV4::UpdateConditionalFormatRuleResponse] - attr_accessor :update_conditional_format_rule - - # The result of adding a chart to a spreadsheet. - # Corresponds to the JSON property `addChart` - # @return [Google::Apis::SheetsV4::AddChartResponse] - attr_accessor :add_chart - - # The result of deleting a conditional format rule. - # Corresponds to the JSON property `deleteConditionalFormatRule` - # @return [Google::Apis::SheetsV4::DeleteConditionalFormatRuleResponse] - attr_accessor :delete_conditional_format_rule - - # The result of adding a banded range. - # Corresponds to the JSON property `addBanding` - # @return [Google::Apis::SheetsV4::AddBandingResponse] - attr_accessor :add_banding - - # The result of duplicating a sheet. - # Corresponds to the JSON property `duplicateSheet` - # @return [Google::Apis::SheetsV4::DuplicateSheetResponse] - attr_accessor :duplicate_sheet - - # The result of a filter view being duplicated. - # Corresponds to the JSON property `duplicateFilterView` - # @return [Google::Apis::SheetsV4::DuplicateFilterViewResponse] - attr_accessor :duplicate_filter_view - - # The result of adding a named range. - # Corresponds to the JSON property `addNamedRange` - # @return [Google::Apis::SheetsV4::AddNamedRangeResponse] - attr_accessor :add_named_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @update_embedded_object_position = args[:update_embedded_object_position] if args.key?(:update_embedded_object_position) - @add_filter_view = args[:add_filter_view] if args.key?(:add_filter_view) - @add_sheet = args[:add_sheet] if args.key?(:add_sheet) - @find_replace = args[:find_replace] if args.key?(:find_replace) - @add_protected_range = args[:add_protected_range] if args.key?(:add_protected_range) - @update_conditional_format_rule = args[:update_conditional_format_rule] if args.key?(:update_conditional_format_rule) - @add_chart = args[:add_chart] if args.key?(:add_chart) - @delete_conditional_format_rule = args[:delete_conditional_format_rule] if args.key?(:delete_conditional_format_rule) - @add_banding = args[:add_banding] if args.key?(:add_banding) - @duplicate_sheet = args[:duplicate_sheet] if args.key?(:duplicate_sheet) - @duplicate_filter_view = args[:duplicate_filter_view] if args.key?(:duplicate_filter_view) - @add_named_range = args[:add_named_range] if args.key?(:add_named_range) - end - end - # Adds a new conditional format rule at the given index. # All subsequent rules' indexes are incremented. class AddConditionalFormatRuleRequest @@ -1115,65 +48,30 @@ module Google end end - # A filter view. - class FilterView + # The specifications of a chart. + class ChartSpec include Google::Apis::Core::Hashable - # The name of the filter view. + # The specification for a basic chart. See BasicChartType for the list + # of charts this supports. + # Corresponds to the JSON property `basicChart` + # @return [Google::Apis::SheetsV4::BasicChartSpec] + attr_accessor :basic_chart + + # Determines how the charts will use hidden rows or columns. + # Corresponds to the JSON property `hiddenDimensionStrategy` + # @return [String] + attr_accessor :hidden_dimension_strategy + + # The title of the chart. # Corresponds to the JSON property `title` # @return [String] attr_accessor :title - # The named range this filter view is backed by, if any. - # When writing, only one of range or named_range_id - # may be set. - # Corresponds to the JSON property `namedRangeId` - # @return [String] - attr_accessor :named_range_id - - # The sort order per column. Later specifications are used when values - # are equal in the earlier specifications. - # Corresponds to the JSON property `sortSpecs` - # @return [Array] - attr_accessor :sort_specs - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :range - - # The criteria for showing/hiding values per column. - # The map's key is the column index, and the value is the criteria for - # that column. - # Corresponds to the JSON property `criteria` - # @return [Hash] - attr_accessor :criteria - - # The ID of the filter view. - # Corresponds to the JSON property `filterViewId` - # @return [Fixnum] - attr_accessor :filter_view_id + # A pie chart. + # Corresponds to the JSON property `pieChart` + # @return [Google::Apis::SheetsV4::PieChartSpec] + attr_accessor :pie_chart def initialize(**args) update!(**args) @@ -1181,1488 +79,27 @@ module Google # Update properties of this object def update!(**args) + @basic_chart = args[:basic_chart] if args.key?(:basic_chart) + @hidden_dimension_strategy = args[:hidden_dimension_strategy] if args.key?(:hidden_dimension_strategy) @title = args[:title] if args.key?(:title) - @named_range_id = args[:named_range_id] if args.key?(:named_range_id) - @sort_specs = args[:sort_specs] if args.key?(:sort_specs) - @range = args[:range] if args.key?(:range) - @criteria = args[:criteria] if args.key?(:criteria) - @filter_view_id = args[:filter_view_id] if args.key?(:filter_view_id) + @pie_chart = args[:pie_chart] if args.key?(:pie_chart) end end - # Sorts data in rows based on a sort order per column. - class SortRangeRequest + # The number format of a cell. + class NumberFormat include Google::Apis::Core::Hashable - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :range - - # The sort order per column. Later specifications are used when values - # are equal in the earlier specifications. - # Corresponds to the JSON property `sortSpecs` - # @return [Array] - attr_accessor :sort_specs - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @range = args[:range] if args.key?(:range) - @sort_specs = args[:sort_specs] if args.key?(:sort_specs) - end - end - - # The result of adding a banded range. - class AddBandingResponse - include Google::Apis::Core::Hashable - - # A banded (alternating colors) range in a sheet. - # Corresponds to the JSON property `bandedRange` - # @return [Google::Apis::SheetsV4::BandedRange] - attr_accessor :banded_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @banded_range = args[:banded_range] if args.key?(:banded_range) - end - end - - # A run of a text format. The format of this run continues until the start - # index of the next run. - # When updating, all fields must be set. - class TextFormatRun - include Google::Apis::Core::Hashable - - # The character index where this run starts. - # Corresponds to the JSON property `startIndex` - # @return [Fixnum] - attr_accessor :start_index - - # The format of a run of text in a cell. - # Absent values indicate that the field isn't specified. - # Corresponds to the JSON property `format` - # @return [Google::Apis::SheetsV4::TextFormat] - attr_accessor :format - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @start_index = args[:start_index] if args.key?(:start_index) - @format = args[:format] if args.key?(:format) - end - end - - # Updates properties of the filter view. - class UpdateFilterViewRequest - include Google::Apis::Core::Hashable - - # A filter view. - # Corresponds to the JSON property `filter` - # @return [Google::Apis::SheetsV4::FilterView] - attr_accessor :filter - - # The fields that should be updated. At least one field must be specified. - # The root `filter` is implied and should not be specified. - # A single `"*"` can be used as short-hand for listing every field. - # Corresponds to the JSON property `fields` + # Pattern string used for formatting. If not set, a default pattern based on + # the user's locale will be used if necessary for the given type. + # See the [Date and Number Formats guide](/sheets/guides/formats) for more + # information about the supported patterns. + # Corresponds to the JSON property `pattern` # @return [String] - attr_accessor :fields + attr_accessor :pattern - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @filter = args[:filter] if args.key?(:filter) - @fields = args[:fields] if args.key?(:fields) - end - end - - # The result of updating a conditional format rule. - class UpdateConditionalFormatRuleResponse - include Google::Apis::Core::Hashable - - # The old index of the rule. Not set if a rule was replaced - # (because it is the same as new_index). - # Corresponds to the JSON property `oldIndex` - # @return [Fixnum] - attr_accessor :old_index - - # A rule describing a conditional format. - # Corresponds to the JSON property `newRule` - # @return [Google::Apis::SheetsV4::ConditionalFormatRule] - attr_accessor :new_rule - - # A rule describing a conditional format. - # Corresponds to the JSON property `oldRule` - # @return [Google::Apis::SheetsV4::ConditionalFormatRule] - attr_accessor :old_rule - - # The index of the new rule. - # Corresponds to the JSON property `newIndex` - # @return [Fixnum] - attr_accessor :new_index - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @old_index = args[:old_index] if args.key?(:old_index) - @new_rule = args[:new_rule] if args.key?(:new_rule) - @old_rule = args[:old_rule] if args.key?(:old_rule) - @new_index = args[:new_index] if args.key?(:new_index) - end - end - - # Criteria for showing/hiding rows in a filter or filter view. - class FilterCriteria - include Google::Apis::Core::Hashable - - # A condition that can evaluate to true or false. - # BooleanConditions are used by conditional formatting, - # data validation, and the criteria in filters. - # Corresponds to the JSON property `condition` - # @return [Google::Apis::SheetsV4::BooleanCondition] - attr_accessor :condition - - # Values that should be hidden. - # Corresponds to the JSON property `hiddenValues` - # @return [Array] - attr_accessor :hidden_values - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @condition = args[:condition] if args.key?(:condition) - @hidden_values = args[:hidden_values] if args.key?(:hidden_values) - end - end - - # Deletes the dimensions from the sheet. - class DeleteDimensionRequest - include Google::Apis::Core::Hashable - - # A range along a single dimension on a sheet. - # All indexes are zero-based. - # Indexes are half open: the start index is inclusive - # and the end index is exclusive. - # Missing indexes indicate the range is unbounded on that side. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::DimensionRange] - attr_accessor :range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @range = args[:range] if args.key?(:range) - end - end - - # A pivot table. - class PivotTable - include Google::Apis::Core::Hashable - - # Whether values should be listed horizontally (as columns) - # or vertically (as rows). - # Corresponds to the JSON property `valueLayout` - # @return [String] - attr_accessor :value_layout - - # Each column grouping in the pivot table. - # Corresponds to the JSON property `columns` - # @return [Array] - attr_accessor :columns - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `source` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :source - - # Each row grouping in the pivot table. - # Corresponds to the JSON property `rows` - # @return [Array] - attr_accessor :rows - - # A list of values to include in the pivot table. - # Corresponds to the JSON property `values` - # @return [Array] - attr_accessor :values - - # An optional mapping of filters per source column offset. - # The filters will be applied before aggregating data into the pivot table. - # The map's key is the column offset of the source range that you want to - # filter, and the value is the criteria for that column. - # For example, if the source was `C10:E15`, a key of `0` will have the filter - # for column `C`, whereas the key `1` is for column `D`. - # Corresponds to the JSON property `criteria` - # @return [Hash] - attr_accessor :criteria - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @value_layout = args[:value_layout] if args.key?(:value_layout) - @columns = args[:columns] if args.key?(:columns) - @source = args[:source] if args.key?(:source) - @rows = args[:rows] if args.key?(:rows) - @values = args[:values] if args.key?(:values) - @criteria = args[:criteria] if args.key?(:criteria) - end - end - - # A data validation rule. - class DataValidationRule - include Google::Apis::Core::Hashable - - # A condition that can evaluate to true or false. - # BooleanConditions are used by conditional formatting, - # data validation, and the criteria in filters. - # Corresponds to the JSON property `condition` - # @return [Google::Apis::SheetsV4::BooleanCondition] - attr_accessor :condition - - # A message to show the user when adding data to the cell. - # Corresponds to the JSON property `inputMessage` - # @return [String] - attr_accessor :input_message - - # True if the UI should be customized based on the kind of condition. - # If true, "List" conditions will show a dropdown. - # Corresponds to the JSON property `showCustomUi` - # @return [Boolean] - attr_accessor :show_custom_ui - alias_method :show_custom_ui?, :show_custom_ui - - # True if invalid data should be rejected. - # Corresponds to the JSON property `strict` - # @return [Boolean] - attr_accessor :strict - alias_method :strict?, :strict - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @condition = args[:condition] if args.key?(:condition) - @input_message = args[:input_message] if args.key?(:input_message) - @show_custom_ui = args[:show_custom_ui] if args.key?(:show_custom_ui) - @strict = args[:strict] if args.key?(:strict) - end - end - - # Updates properties of a spreadsheet. - class UpdateSpreadsheetPropertiesRequest - include Google::Apis::Core::Hashable - - # The fields that should be updated. At least one field must be specified. - # The root 'properties' is implied and should not be specified. - # A single `"*"` can be used as short-hand for listing every field. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - # Properties of a spreadsheet. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV4::SpreadsheetProperties] - attr_accessor :properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @fields = args[:fields] if args.key?(:fields) - @properties = args[:properties] if args.key?(:properties) - end - end - - # Source ranges for a chart. - class ChartSourceRange - include Google::Apis::Core::Hashable - - # The ranges of data for a series or domain. - # Exactly one dimension must have a length of 1, - # and all sources in the list must have the same dimension - # with length 1. - # The domain (if it exists) & all series must have the same number - # of source ranges. If using more than one source range, then the source - # range at a given offset must be contiguous across the domain and series. - # For example, these are valid configurations: - # domain sources: A1:A5 - # series1 sources: B1:B5 - # series2 sources: D6:D10 - # domain sources: A1:A5, C10:C12 - # series1 sources: B1:B5, D10:D12 - # series2 sources: C1:C5, E10:E12 - # Corresponds to the JSON property `sources` - # @return [Array] - attr_accessor :sources - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sources = args[:sources] if args.key?(:sources) - end - end - - # The request for updating more than one range of values in a spreadsheet. - class BatchUpdateValuesRequest - include Google::Apis::Core::Hashable - - # How the input data should be interpreted. - # Corresponds to the JSON property `valueInputOption` - # @return [String] - attr_accessor :value_input_option - - # The new values to apply to the spreadsheet. - # Corresponds to the JSON property `data` - # @return [Array] - attr_accessor :data - - # Determines how values in the response should be rendered. - # The default render option is ValueRenderOption.FORMATTED_VALUE. - # Corresponds to the JSON property `responseValueRenderOption` - # @return [String] - attr_accessor :response_value_render_option - - # Determines how dates, times, and durations in the response should be - # rendered. This is ignored if response_value_render_option is - # FORMATTED_VALUE. - # The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER]. - # Corresponds to the JSON property `responseDateTimeRenderOption` - # @return [String] - attr_accessor :response_date_time_render_option - - # Determines if the update response should include the values - # of the cells that were updated. By default, responses - # do not include the updated values. The `updatedData` field within - # each of the BatchUpdateValuesResponse.responses will contain - # the updated values. If the range to write was larger than than the range - # actually written, the response will include all values in the requested - # range (excluding trailing empty rows and columns). - # Corresponds to the JSON property `includeValuesInResponse` - # @return [Boolean] - attr_accessor :include_values_in_response - alias_method :include_values_in_response?, :include_values_in_response - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @value_input_option = args[:value_input_option] if args.key?(:value_input_option) - @data = args[:data] if args.key?(:data) - @response_value_render_option = args[:response_value_render_option] if args.key?(:response_value_render_option) - @response_date_time_render_option = args[:response_date_time_render_option] if args.key?(:response_date_time_render_option) - @include_values_in_response = args[:include_values_in_response] if args.key?(:include_values_in_response) - end - end - - # Clears the basic filter, if any exists on the sheet. - class ClearBasicFilterRequest - include Google::Apis::Core::Hashable - - # The sheet ID on which the basic filter should be cleared. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - end - end - - # The response when updating a range of values in a spreadsheet. - class BatchClearValuesResponse - include Google::Apis::Core::Hashable - - # The spreadsheet the updates were applied to. - # Corresponds to the JSON property `spreadsheetId` - # @return [String] - attr_accessor :spreadsheet_id - - # The ranges that were cleared, in A1 notation. - # (If the requests were for an unbounded range or a ranger larger - # than the bounds of the sheet, this will be the actual ranges - # that were cleared, bounded to the sheet's limits.) - # Corresponds to the JSON property `clearedRanges` - # @return [Array] - attr_accessor :cleared_ranges - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) - @cleared_ranges = args[:cleared_ranges] if args.key?(:cleared_ranges) - end - end - - # A rule describing a conditional format. - class ConditionalFormatRule - include Google::Apis::Core::Hashable - - # A rule that applies a gradient color scale format, based on - # the interpolation points listed. The format of a cell will vary - # based on its contents as compared to the values of the interpolation - # points. - # Corresponds to the JSON property `gradientRule` - # @return [Google::Apis::SheetsV4::GradientRule] - attr_accessor :gradient_rule - - # A rule that may or may not match, depending on the condition. - # Corresponds to the JSON property `booleanRule` - # @return [Google::Apis::SheetsV4::BooleanRule] - attr_accessor :boolean_rule - - # The ranges that will be formatted if the condition is true. - # All the ranges must be on the same grid. - # Corresponds to the JSON property `ranges` - # @return [Array] - attr_accessor :ranges - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @gradient_rule = args[:gradient_rule] if args.key?(:gradient_rule) - @boolean_rule = args[:boolean_rule] if args.key?(:boolean_rule) - @ranges = args[:ranges] if args.key?(:ranges) - end - end - - # Updates the borders of a range. - # If a field is not set in the request, that means the border remains as-is. - # For example, with two subsequent UpdateBordersRequest: - # 1. range: A1:A5 `` top: RED, bottom: WHITE `` - # 2. range: A1:A5 `` left: BLUE `` - # That would result in A1:A5 having a borders of - # `` top: RED, bottom: WHITE, left: BLUE ``. - # If you want to clear a border, explicitly set the style to - # NONE. - class UpdateBordersRequest - include Google::Apis::Core::Hashable - - # A border along a cell. - # Corresponds to the JSON property `right` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :right - - # A border along a cell. - # Corresponds to the JSON property `innerVertical` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :inner_vertical - - # A border along a cell. - # Corresponds to the JSON property `top` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :top - - # A border along a cell. - # Corresponds to the JSON property `innerHorizontal` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :inner_horizontal - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :range - - # A border along a cell. - # Corresponds to the JSON property `bottom` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :bottom - - # A border along a cell. - # Corresponds to the JSON property `left` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :left - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @right = args[:right] if args.key?(:right) - @inner_vertical = args[:inner_vertical] if args.key?(:inner_vertical) - @top = args[:top] if args.key?(:top) - @inner_horizontal = args[:inner_horizontal] if args.key?(:inner_horizontal) - @range = args[:range] if args.key?(:range) - @bottom = args[:bottom] if args.key?(:bottom) - @left = args[:left] if args.key?(:left) - end - end - - # Criteria for showing/hiding rows in a pivot table. - class PivotFilterCriteria - include Google::Apis::Core::Hashable - - # Values that should be included. Values not listed here are excluded. - # Corresponds to the JSON property `visibleValues` - # @return [Array] - attr_accessor :visible_values - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @visible_values = args[:visible_values] if args.key?(:visible_values) - end - end - - # The borders of the cell. - class Borders - include Google::Apis::Core::Hashable - - # A border along a cell. - # Corresponds to the JSON property `left` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :left - - # A border along a cell. - # Corresponds to the JSON property `right` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :right - - # A border along a cell. - # Corresponds to the JSON property `top` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :top - - # A border along a cell. - # Corresponds to the JSON property `bottom` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :bottom - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @left = args[:left] if args.key?(:left) - @right = args[:right] if args.key?(:right) - @top = args[:top] if args.key?(:top) - @bottom = args[:bottom] if args.key?(:bottom) - end - end - - # A chart embedded in a sheet. - class EmbeddedChart - include Google::Apis::Core::Hashable - - # The ID of the chart. - # Corresponds to the JSON property `chartId` - # @return [Fixnum] - attr_accessor :chart_id - - # The position of an embedded object such as a chart. - # Corresponds to the JSON property `position` - # @return [Google::Apis::SheetsV4::EmbeddedObjectPosition] - attr_accessor :position - - # The specifications of a chart. - # Corresponds to the JSON property `spec` - # @return [Google::Apis::SheetsV4::ChartSpec] - attr_accessor :spec - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @chart_id = args[:chart_id] if args.key?(:chart_id) - @position = args[:position] if args.key?(:position) - @spec = args[:spec] if args.key?(:spec) - end - end - - # Represents a color in the RGBA color space. This representation is designed - # for simplicity of conversion to/from color representations in various - # languages over compactness; for example, the fields of this representation - # can be trivially provided to the constructor of "java.awt.Color" in Java; it - # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" - # method in iOS; and, with just a little work, it can be easily formatted into - # a CSS "rgba()" string in JavaScript, as well. Here are some examples: - # Example (Java): - # import com.google.type.Color; - # // ... - # public static java.awt.Color fromProto(Color protocolor) ` - # float alpha = protocolor.hasAlpha() - # ? protocolor.getAlpha().getValue() - # : 1.0; - # return new java.awt.Color( - # protocolor.getRed(), - # protocolor.getGreen(), - # protocolor.getBlue(), - # alpha); - # ` - # public static Color toProto(java.awt.Color color) ` - # float red = (float) color.getRed(); - # float green = (float) color.getGreen(); - # float blue = (float) color.getBlue(); - # float denominator = 255.0; - # Color.Builder resultBuilder = - # Color - # .newBuilder() - # .setRed(red / denominator) - # .setGreen(green / denominator) - # .setBlue(blue / denominator); - # int alpha = color.getAlpha(); - # if (alpha != 255) ` - # result.setAlpha( - # FloatValue - # .newBuilder() - # .setValue(((float) alpha) / denominator) - # .build()); - # ` - # return resultBuilder.build(); - # ` - # // ... - # Example (iOS / Obj-C): - # // ... - # static UIColor* fromProto(Color* protocolor) ` - # float red = [protocolor red]; - # float green = [protocolor green]; - # float blue = [protocolor blue]; - # FloatValue* alpha_wrapper = [protocolor alpha]; - # float alpha = 1.0; - # if (alpha_wrapper != nil) ` - # alpha = [alpha_wrapper value]; - # ` - # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; - # ` - # static Color* toProto(UIColor* color) ` - # CGFloat red, green, blue, alpha; - # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` - # return nil; - # ` - # Color* result = [Color alloc] init]; - # [result setRed:red]; - # [result setGreen:green]; - # [result setBlue:blue]; - # if (alpha <= 0.9999) ` - # [result setAlpha:floatWrapperWithValue(alpha)]; - # ` - # [result autorelease]; - # return result; - # ` - # // ... - # Example (JavaScript): - # // ... - # var protoToCssColor = function(rgb_color) ` - # var redFrac = rgb_color.red || 0.0; - # var greenFrac = rgb_color.green || 0.0; - # var blueFrac = rgb_color.blue || 0.0; - # var red = Math.floor(redFrac * 255); - # var green = Math.floor(greenFrac * 255); - # var blue = Math.floor(blueFrac * 255); - # if (!('alpha' in rgb_color)) ` - # return rgbToCssColor_(red, green, blue); - # ` - # var alphaFrac = rgb_color.alpha.value || 0.0; - # var rgbParams = [red, green, blue].join(','); - # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); - # `; - # var rgbToCssColor_ = function(red, green, blue) ` - # var rgbNumber = new Number((red << 16) | (green << 8) | blue); - # var hexString = rgbNumber.toString(16); - # var missingZeros = 6 - hexString.length; - # var resultBuilder = ['#']; - # for (var i = 0; i < missingZeros; i++) ` - # resultBuilder.push('0'); - # ` - # resultBuilder.push(hexString); - # return resultBuilder.join(''); - # `; - # // ... - class Color - include Google::Apis::Core::Hashable - - # The amount of green in the color as a value in the interval [0, 1]. - # Corresponds to the JSON property `green` - # @return [Float] - attr_accessor :green - - # The amount of blue in the color as a value in the interval [0, 1]. - # Corresponds to the JSON property `blue` - # @return [Float] - attr_accessor :blue - - # The amount of red in the color as a value in the interval [0, 1]. - # Corresponds to the JSON property `red` - # @return [Float] - attr_accessor :red - - # The fraction of this color that should be applied to the pixel. That is, - # the final pixel color is defined by the equation: - # pixel color = alpha * (this color) + (1.0 - alpha) * (background color) - # This means that a value of 1.0 corresponds to a solid color, whereas - # a value of 0.0 corresponds to a completely transparent color. This - # uses a wrapper message rather than a simple float scalar so that it is - # possible to distinguish between a default value and the value being unset. - # If omitted, this color object is to be rendered as a solid color - # (as if the alpha value had been explicitly given with a value of 1.0). - # Corresponds to the JSON property `alpha` - # @return [Float] - attr_accessor :alpha - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @green = args[:green] if args.key?(:green) - @blue = args[:blue] if args.key?(:blue) - @red = args[:red] if args.key?(:red) - @alpha = args[:alpha] if args.key?(:alpha) - end - end - - # Adds a new sheet. - # When a sheet is added at a given index, - # all subsequent sheets' indexes are incremented. - # To add an object sheet, use AddChartRequest instead and specify - # EmbeddedObjectPosition.sheetId or - # EmbeddedObjectPosition.newSheet. - class AddSheetRequest - include Google::Apis::Core::Hashable - - # Properties of a sheet. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV4::SheetProperties] - attr_accessor :properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @properties = args[:properties] if args.key?(:properties) - end - end - - # Adds a new protected range. - class AddProtectedRangeRequest - include Google::Apis::Core::Hashable - - # A protected range. - # Corresponds to the JSON property `protectedRange` - # @return [Google::Apis::SheetsV4::ProtectedRange] - attr_accessor :protected_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @protected_range = args[:protected_range] if args.key?(:protected_range) - end - end - - # Data within a range of the spreadsheet. - class ValueRange - include Google::Apis::Core::Hashable - - # The data that was read or to be written. This is an array of arrays, - # the outer array representing all the data and each inner array - # representing a major dimension. Each item in the inner array - # corresponds with one cell. - # For output, empty trailing rows and columns will not be included. - # For input, supported value types are: bool, string, and double. - # Null values will be skipped. - # To set a cell to an empty value, set the string value to an empty string. - # Corresponds to the JSON property `values` - # @return [Array>] - attr_accessor :values - - # The range the values cover, in A1 notation. - # For output, this range indicates the entire requested range, - # even though the values will exclude trailing rows and columns. - # When appending values, this field represents the range to search for a - # table, after which values will be appended. - # Corresponds to the JSON property `range` - # @return [String] - attr_accessor :range - - # The major dimension of the values. - # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, - # then requesting `range=A1:B2,majorDimension=ROWS` will return - # `[[1,2],[3,4]]`, - # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return - # `[[1,3],[2,4]]`. - # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]` - # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS` - # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`. - # When writing, if this field is not set, it defaults to ROWS. - # Corresponds to the JSON property `majorDimension` - # @return [String] - attr_accessor :major_dimension - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @values = args[:values] if args.key?(:values) - @range = args[:range] if args.key?(:range) - @major_dimension = args[:major_dimension] if args.key?(:major_dimension) - end - end - - # The result of the find/replace. - class FindReplaceResponse - include Google::Apis::Core::Hashable - - # The number of non-formula cells changed. - # Corresponds to the JSON property `valuesChanged` - # @return [Fixnum] - attr_accessor :values_changed - - # The number of rows changed. - # Corresponds to the JSON property `rowsChanged` - # @return [Fixnum] - attr_accessor :rows_changed - - # The number of occurrences (possibly multiple within a cell) changed. - # For example, if replacing `"e"` with `"o"` in `"Google Sheets"`, this would - # be `"3"` because `"Google Sheets"` -> `"Googlo Shoots"`. - # Corresponds to the JSON property `occurrencesChanged` - # @return [Fixnum] - attr_accessor :occurrences_changed - - # The number of formula cells changed. - # Corresponds to the JSON property `formulasChanged` - # @return [Fixnum] - attr_accessor :formulas_changed - - # The number of sheets changed. - # Corresponds to the JSON property `sheetsChanged` - # @return [Fixnum] - attr_accessor :sheets_changed - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @values_changed = args[:values_changed] if args.key?(:values_changed) - @rows_changed = args[:rows_changed] if args.key?(:rows_changed) - @occurrences_changed = args[:occurrences_changed] if args.key?(:occurrences_changed) - @formulas_changed = args[:formulas_changed] if args.key?(:formulas_changed) - @sheets_changed = args[:sheets_changed] if args.key?(:sheets_changed) - end - end - - # The response when updating a range of values in a spreadsheet. - class AppendValuesResponse - include Google::Apis::Core::Hashable - - # The spreadsheet the updates were applied to. - # Corresponds to the JSON property `spreadsheetId` - # @return [String] - attr_accessor :spreadsheet_id - - # The range (in A1 notation) of the table that values are being appended to - # (before the values were appended). - # Empty if no table was found. - # Corresponds to the JSON property `tableRange` - # @return [String] - attr_accessor :table_range - - # The response when updating a range of values in a spreadsheet. - # Corresponds to the JSON property `updates` - # @return [Google::Apis::SheetsV4::UpdateValuesResponse] - attr_accessor :updates - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) - @table_range = args[:table_range] if args.key?(:table_range) - @updates = args[:updates] if args.key?(:updates) - end - end - - # The format of a cell. - class CellFormat - include Google::Apis::Core::Hashable - - # The horizontal alignment of the value in the cell. - # Corresponds to the JSON property `horizontalAlignment` - # @return [String] - attr_accessor :horizontal_alignment - - # How a hyperlink, if it exists, should be displayed in the cell. - # Corresponds to the JSON property `hyperlinkDisplayType` - # @return [String] - attr_accessor :hyperlink_display_type - - # The borders of the cell. - # Corresponds to the JSON property `borders` - # @return [Google::Apis::SheetsV4::Borders] - attr_accessor :borders - - # The direction of the text in the cell. - # Corresponds to the JSON property `textDirection` - # @return [String] - attr_accessor :text_direction - - # The format of a run of text in a cell. - # Absent values indicate that the field isn't specified. - # Corresponds to the JSON property `textFormat` - # @return [Google::Apis::SheetsV4::TextFormat] - attr_accessor :text_format - - # The amount of padding around the cell, in pixels. - # When updating padding, every field must be specified. - # Corresponds to the JSON property `padding` - # @return [Google::Apis::SheetsV4::Padding] - attr_accessor :padding - - # The number format of a cell. - # Corresponds to the JSON property `numberFormat` - # @return [Google::Apis::SheetsV4::NumberFormat] - attr_accessor :number_format - - # The wrap strategy for the value in the cell. - # Corresponds to the JSON property `wrapStrategy` - # @return [String] - attr_accessor :wrap_strategy - - # Represents a color in the RGBA color space. This representation is designed - # for simplicity of conversion to/from color representations in various - # languages over compactness; for example, the fields of this representation - # can be trivially provided to the constructor of "java.awt.Color" in Java; it - # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" - # method in iOS; and, with just a little work, it can be easily formatted into - # a CSS "rgba()" string in JavaScript, as well. Here are some examples: - # Example (Java): - # import com.google.type.Color; - # // ... - # public static java.awt.Color fromProto(Color protocolor) ` - # float alpha = protocolor.hasAlpha() - # ? protocolor.getAlpha().getValue() - # : 1.0; - # return new java.awt.Color( - # protocolor.getRed(), - # protocolor.getGreen(), - # protocolor.getBlue(), - # alpha); - # ` - # public static Color toProto(java.awt.Color color) ` - # float red = (float) color.getRed(); - # float green = (float) color.getGreen(); - # float blue = (float) color.getBlue(); - # float denominator = 255.0; - # Color.Builder resultBuilder = - # Color - # .newBuilder() - # .setRed(red / denominator) - # .setGreen(green / denominator) - # .setBlue(blue / denominator); - # int alpha = color.getAlpha(); - # if (alpha != 255) ` - # result.setAlpha( - # FloatValue - # .newBuilder() - # .setValue(((float) alpha) / denominator) - # .build()); - # ` - # return resultBuilder.build(); - # ` - # // ... - # Example (iOS / Obj-C): - # // ... - # static UIColor* fromProto(Color* protocolor) ` - # float red = [protocolor red]; - # float green = [protocolor green]; - # float blue = [protocolor blue]; - # FloatValue* alpha_wrapper = [protocolor alpha]; - # float alpha = 1.0; - # if (alpha_wrapper != nil) ` - # alpha = [alpha_wrapper value]; - # ` - # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; - # ` - # static Color* toProto(UIColor* color) ` - # CGFloat red, green, blue, alpha; - # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` - # return nil; - # ` - # Color* result = [Color alloc] init]; - # [result setRed:red]; - # [result setGreen:green]; - # [result setBlue:blue]; - # if (alpha <= 0.9999) ` - # [result setAlpha:floatWrapperWithValue(alpha)]; - # ` - # [result autorelease]; - # return result; - # ` - # // ... - # Example (JavaScript): - # // ... - # var protoToCssColor = function(rgb_color) ` - # var redFrac = rgb_color.red || 0.0; - # var greenFrac = rgb_color.green || 0.0; - # var blueFrac = rgb_color.blue || 0.0; - # var red = Math.floor(redFrac * 255); - # var green = Math.floor(greenFrac * 255); - # var blue = Math.floor(blueFrac * 255); - # if (!('alpha' in rgb_color)) ` - # return rgbToCssColor_(red, green, blue); - # ` - # var alphaFrac = rgb_color.alpha.value || 0.0; - # var rgbParams = [red, green, blue].join(','); - # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); - # `; - # var rgbToCssColor_ = function(red, green, blue) ` - # var rgbNumber = new Number((red << 16) | (green << 8) | blue); - # var hexString = rgbNumber.toString(16); - # var missingZeros = 6 - hexString.length; - # var resultBuilder = ['#']; - # for (var i = 0; i < missingZeros; i++) ` - # resultBuilder.push('0'); - # ` - # resultBuilder.push(hexString); - # return resultBuilder.join(''); - # `; - # // ... - # Corresponds to the JSON property `backgroundColor` - # @return [Google::Apis::SheetsV4::Color] - attr_accessor :background_color - - # The vertical alignment of the value in the cell. - # Corresponds to the JSON property `verticalAlignment` - # @return [String] - attr_accessor :vertical_alignment - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @horizontal_alignment = args[:horizontal_alignment] if args.key?(:horizontal_alignment) - @hyperlink_display_type = args[:hyperlink_display_type] if args.key?(:hyperlink_display_type) - @borders = args[:borders] if args.key?(:borders) - @text_direction = args[:text_direction] if args.key?(:text_direction) - @text_format = args[:text_format] if args.key?(:text_format) - @padding = args[:padding] if args.key?(:padding) - @number_format = args[:number_format] if args.key?(:number_format) - @wrap_strategy = args[:wrap_strategy] if args.key?(:wrap_strategy) - @background_color = args[:background_color] if args.key?(:background_color) - @vertical_alignment = args[:vertical_alignment] if args.key?(:vertical_alignment) - end - end - - # Moves one or more rows or columns. - class MoveDimensionRequest - include Google::Apis::Core::Hashable - - # A range along a single dimension on a sheet. - # All indexes are zero-based. - # Indexes are half open: the start index is inclusive - # and the end index is exclusive. - # Missing indexes indicate the range is unbounded on that side. - # Corresponds to the JSON property `source` - # @return [Google::Apis::SheetsV4::DimensionRange] - attr_accessor :source - - # The zero-based start index of where to move the source data to, - # based on the coordinates *before* the source data is removed - # from the grid. Existing data will be shifted down or right - # (depending on the dimension) to make room for the moved dimensions. - # The source dimensions are removed from the grid, so the - # the data may end up in a different index than specified. - # For example, given `A1..A5` of `0, 1, 2, 3, 4` and wanting to move - # `"1"` and `"2"` to between `"3"` and `"4"`, the source would be - # `ROWS [1..3)`,and the destination index would be `"4"` - # (the zero-based index of row 5). - # The end result would be `A1..A5` of `0, 3, 1, 2, 4`. - # Corresponds to the JSON property `destinationIndex` - # @return [Fixnum] - attr_accessor :destination_index - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @source = args[:source] if args.key?(:source) - @destination_index = args[:destination_index] if args.key?(:destination_index) - end - end - - # An axis of the chart. - # A chart may not have more than one axis per - # axis position. - class BasicChartAxis - include Google::Apis::Core::Hashable - - # The position of this axis. - # Corresponds to the JSON property `position` - # @return [String] - attr_accessor :position - - # The title of this axis. If set, this overrides any title inferred - # from headers of the data. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The format of a run of text in a cell. - # Absent values indicate that the field isn't specified. - # Corresponds to the JSON property `format` - # @return [Google::Apis::SheetsV4::TextFormat] - attr_accessor :format - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @position = args[:position] if args.key?(:position) - @title = args[:title] if args.key?(:title) - @format = args[:format] if args.key?(:format) - end - end - - # Information about which values in a pivot group should be used for sorting. - class PivotGroupSortValueBucket - include Google::Apis::Core::Hashable - - # Determines the bucket from which values are chosen to sort. - # For example, in a pivot table with one row group & two column groups, - # the row group can list up to two values. The first value corresponds - # to a value within the first column group, and the second value - # corresponds to a value in the second column group. If no values - # are listed, this would indicate that the row should be sorted according - # to the "Grand Total" over the column groups. If a single value is listed, - # this would correspond to using the "Total" of that bucket. - # Corresponds to the JSON property `buckets` - # @return [Array] - attr_accessor :buckets - - # The offset in the PivotTable.values list which the values in this - # grouping should be sorted by. - # Corresponds to the JSON property `valuesIndex` - # @return [Fixnum] - attr_accessor :values_index - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @buckets = args[:buckets] if args.key?(:buckets) - @values_index = args[:values_index] if args.key?(:values_index) - end - end - - # Properties about a dimension. - class DimensionProperties - include Google::Apis::Core::Hashable - - # True if this dimension is explicitly hidden. - # Corresponds to the JSON property `hiddenByUser` - # @return [Boolean] - attr_accessor :hidden_by_user - alias_method :hidden_by_user?, :hidden_by_user - - # The height (if a row) or width (if a column) of the dimension in pixels. - # Corresponds to the JSON property `pixelSize` - # @return [Fixnum] - attr_accessor :pixel_size - - # True if this dimension is being filtered. - # This field is read-only. - # Corresponds to the JSON property `hiddenByFilter` - # @return [Boolean] - attr_accessor :hidden_by_filter - alias_method :hidden_by_filter?, :hidden_by_filter - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @hidden_by_user = args[:hidden_by_user] if args.key?(:hidden_by_user) - @pixel_size = args[:pixel_size] if args.key?(:pixel_size) - @hidden_by_filter = args[:hidden_by_filter] if args.key?(:hidden_by_filter) - end - end - - # The position of an embedded object such as a chart. - class EmbeddedObjectPosition - include Google::Apis::Core::Hashable - - # The sheet this is on. Set only if the embedded object - # is on its own sheet. Must be non-negative. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - # The location an object is overlaid on top of a grid. - # Corresponds to the JSON property `overlayPosition` - # @return [Google::Apis::SheetsV4::OverlayPosition] - attr_accessor :overlay_position - - # If true, the embedded object will be put on a new sheet whose ID - # is chosen for you. Used only when writing. - # Corresponds to the JSON property `newSheet` - # @return [Boolean] - attr_accessor :new_sheet - alias_method :new_sheet?, :new_sheet - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @overlay_position = args[:overlay_position] if args.key?(:overlay_position) - @new_sheet = args[:new_sheet] if args.key?(:new_sheet) - end - end - - # A single interpolation point on a gradient conditional format. - # These pin the gradient color scale according to the color, - # type and value chosen. - class InterpolationPoint - include Google::Apis::Core::Hashable - - # The value this interpolation point uses. May be a formula. - # Unused if type is MIN or - # MAX. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - # Represents a color in the RGBA color space. This representation is designed - # for simplicity of conversion to/from color representations in various - # languages over compactness; for example, the fields of this representation - # can be trivially provided to the constructor of "java.awt.Color" in Java; it - # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" - # method in iOS; and, with just a little work, it can be easily formatted into - # a CSS "rgba()" string in JavaScript, as well. Here are some examples: - # Example (Java): - # import com.google.type.Color; - # // ... - # public static java.awt.Color fromProto(Color protocolor) ` - # float alpha = protocolor.hasAlpha() - # ? protocolor.getAlpha().getValue() - # : 1.0; - # return new java.awt.Color( - # protocolor.getRed(), - # protocolor.getGreen(), - # protocolor.getBlue(), - # alpha); - # ` - # public static Color toProto(java.awt.Color color) ` - # float red = (float) color.getRed(); - # float green = (float) color.getGreen(); - # float blue = (float) color.getBlue(); - # float denominator = 255.0; - # Color.Builder resultBuilder = - # Color - # .newBuilder() - # .setRed(red / denominator) - # .setGreen(green / denominator) - # .setBlue(blue / denominator); - # int alpha = color.getAlpha(); - # if (alpha != 255) ` - # result.setAlpha( - # FloatValue - # .newBuilder() - # .setValue(((float) alpha) / denominator) - # .build()); - # ` - # return resultBuilder.build(); - # ` - # // ... - # Example (iOS / Obj-C): - # // ... - # static UIColor* fromProto(Color* protocolor) ` - # float red = [protocolor red]; - # float green = [protocolor green]; - # float blue = [protocolor blue]; - # FloatValue* alpha_wrapper = [protocolor alpha]; - # float alpha = 1.0; - # if (alpha_wrapper != nil) ` - # alpha = [alpha_wrapper value]; - # ` - # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; - # ` - # static Color* toProto(UIColor* color) ` - # CGFloat red, green, blue, alpha; - # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` - # return nil; - # ` - # Color* result = [Color alloc] init]; - # [result setRed:red]; - # [result setGreen:green]; - # [result setBlue:blue]; - # if (alpha <= 0.9999) ` - # [result setAlpha:floatWrapperWithValue(alpha)]; - # ` - # [result autorelease]; - # return result; - # ` - # // ... - # Example (JavaScript): - # // ... - # var protoToCssColor = function(rgb_color) ` - # var redFrac = rgb_color.red || 0.0; - # var greenFrac = rgb_color.green || 0.0; - # var blueFrac = rgb_color.blue || 0.0; - # var red = Math.floor(redFrac * 255); - # var green = Math.floor(greenFrac * 255); - # var blue = Math.floor(blueFrac * 255); - # if (!('alpha' in rgb_color)) ` - # return rgbToCssColor_(red, green, blue); - # ` - # var alphaFrac = rgb_color.alpha.value || 0.0; - # var rgbParams = [red, green, blue].join(','); - # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); - # `; - # var rgbToCssColor_ = function(red, green, blue) ` - # var rgbNumber = new Number((red << 16) | (green << 8) | blue); - # var hexString = rgbNumber.toString(16); - # var missingZeros = 6 - hexString.length; - # var resultBuilder = ['#']; - # for (var i = 0; i < missingZeros; i++) ` - # resultBuilder.push('0'); - # ` - # resultBuilder.push(hexString); - # return resultBuilder.join(''); - # `; - # // ... - # Corresponds to the JSON property `color` - # @return [Google::Apis::SheetsV4::Color] - attr_accessor :color - - # How the value should be interpreted. + # The type of the number format. + # When writing, this field must be set. # Corresponds to the JSON property `type` # @return [String] attr_accessor :type @@ -2673,100 +110,11 @@ module Google # Update properties of this object def update!(**args) - @value = args[:value] if args.key?(:value) - @color = args[:color] if args.key?(:color) + @pattern = args[:pattern] if args.key?(:pattern) @type = args[:type] if args.key?(:type) end end - # An error in a cell. - class ErrorValue - include Google::Apis::Core::Hashable - - # The type of error. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # A message with more information about the error - # (in the spreadsheet's locale). - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] if args.key?(:type) - @message = args[:message] if args.key?(:message) - end - end - - # Duplicates a particular filter view. - class DuplicateFilterViewRequest - include Google::Apis::Core::Hashable - - # The ID of the filter being duplicated. - # Corresponds to the JSON property `filterId` - # @return [Fixnum] - attr_accessor :filter_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @filter_id = args[:filter_id] if args.key?(:filter_id) - end - end - - # The request for updating any aspect of a spreadsheet. - class BatchUpdateSpreadsheetRequest - include Google::Apis::Core::Hashable - - # Determines if the update response should include the spreadsheet - # resource. - # Corresponds to the JSON property `includeSpreadsheetInResponse` - # @return [Boolean] - attr_accessor :include_spreadsheet_in_response - alias_method :include_spreadsheet_in_response?, :include_spreadsheet_in_response - - # A list of updates to apply to the spreadsheet. - # Corresponds to the JSON property `requests` - # @return [Array] - attr_accessor :requests - - # Limits the ranges included in the response spreadsheet. - # Meaningful only if include_spreadsheet_response is 'true'. - # Corresponds to the JSON property `responseRanges` - # @return [Array] - attr_accessor :response_ranges - - # True if grid data should be returned. Meaningful only if - # if include_spreadsheet_response is 'true'. - # This parameter is ignored if a field mask was set in the request. - # Corresponds to the JSON property `responseIncludeGridData` - # @return [Boolean] - attr_accessor :response_include_grid_data - alias_method :response_include_grid_data?, :response_include_grid_data - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @include_spreadsheet_in_response = args[:include_spreadsheet_in_response] if args.key?(:include_spreadsheet_in_response) - @requests = args[:requests] if args.key?(:requests) - @response_ranges = args[:response_ranges] if args.key?(:response_ranges) - @response_include_grid_data = args[:response_include_grid_data] if args.key?(:response_include_grid_data) - end - end - # Properties of a sheet. class SheetProperties include Google::Apis::Core::Hashable @@ -2776,43 +124,6 @@ module Google # @return [String] attr_accessor :title - # The index of the sheet within the spreadsheet. - # When adding or updating sheet properties, if this field - # is excluded then the sheet will be added or moved to the end - # of the sheet list. When updating sheet indices or inserting - # sheets, movement is considered in "before the move" indexes. - # For example, if there were 3 sheets (S1, S2, S3) in order to - # move S1 ahead of S2 the index would have to be set to 2. A sheet - # index update request will be ignored if the requested index is - # identical to the sheets current index or if the requested new - # index is equal to the current sheet index + 1. - # Corresponds to the JSON property `index` - # @return [Fixnum] - attr_accessor :index - - # True if the sheet is hidden in the UI, false if it's visible. - # Corresponds to the JSON property `hidden` - # @return [Boolean] - attr_accessor :hidden - alias_method :hidden?, :hidden - - # Properties of a grid. - # Corresponds to the JSON property `gridProperties` - # @return [Google::Apis::SheetsV4::GridProperties] - attr_accessor :grid_properties - - # The ID of the sheet. Must be non-negative. - # This field cannot be changed once set. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - # True if the sheet is an RTL sheet instead of an LTR sheet. - # Corresponds to the JSON property `rightToLeft` - # @return [Boolean] - attr_accessor :right_to_left - alias_method :right_to_left?, :right_to_left - # Represents a color in the RGBA color space. This representation is designed # for simplicity of conversion to/from color representations in various # languages over compactness; for example, the fields of this representation @@ -2916,6 +227,43 @@ module Google # @return [Google::Apis::SheetsV4::Color] attr_accessor :tab_color + # The index of the sheet within the spreadsheet. + # When adding or updating sheet properties, if this field + # is excluded then the sheet will be added or moved to the end + # of the sheet list. When updating sheet indices or inserting + # sheets, movement is considered in "before the move" indexes. + # For example, if there were 3 sheets (S1, S2, S3) in order to + # move S1 ahead of S2 the index would have to be set to 2. A sheet + # index update request will be ignored if the requested index is + # identical to the sheets current index or if the requested new + # index is equal to the current sheet index + 1. + # Corresponds to the JSON property `index` + # @return [Fixnum] + attr_accessor :index + + # The ID of the sheet. Must be non-negative. + # This field cannot be changed once set. + # Corresponds to the JSON property `sheetId` + # @return [Fixnum] + attr_accessor :sheet_id + + # True if the sheet is an RTL sheet instead of an LTR sheet. + # Corresponds to the JSON property `rightToLeft` + # @return [Boolean] + attr_accessor :right_to_left + alias_method :right_to_left?, :right_to_left + + # True if the sheet is hidden in the UI, false if it's visible. + # Corresponds to the JSON property `hidden` + # @return [Boolean] + attr_accessor :hidden + alias_method :hidden?, :hidden + + # Properties of a grid. + # Corresponds to the JSON property `gridProperties` + # @return [Google::Apis::SheetsV4::GridProperties] + attr_accessor :grid_properties + # The type of sheet. Defaults to GRID. # This field cannot be changed once set. # Corresponds to the JSON property `sheetType` @@ -2929,284 +277,50 @@ module Google # Update properties of this object def update!(**args) @title = args[:title] if args.key?(:title) + @tab_color = args[:tab_color] if args.key?(:tab_color) @index = args[:index] if args.key?(:index) - @hidden = args[:hidden] if args.key?(:hidden) - @grid_properties = args[:grid_properties] if args.key?(:grid_properties) @sheet_id = args[:sheet_id] if args.key?(:sheet_id) @right_to_left = args[:right_to_left] if args.key?(:right_to_left) - @tab_color = args[:tab_color] if args.key?(:tab_color) + @hidden = args[:hidden] if args.key?(:hidden) + @grid_properties = args[:grid_properties] if args.key?(:grid_properties) @sheet_type = args[:sheet_type] if args.key?(:sheet_type) end end - # The request for clearing a range of values in a spreadsheet. - class ClearValuesRequest + # Updates properties of dimensions within the specified range. + class UpdateDimensionPropertiesRequest include Google::Apis::Core::Hashable - def initialize(**args) - update!(**args) - end + # Properties about a dimension. + # Corresponds to the JSON property `properties` + # @return [Google::Apis::SheetsV4::DimensionProperties] + attr_accessor :properties - # Update properties of this object - def update!(**args) - end - end - - # A protected range. - class ProtectedRange - include Google::Apis::Core::Hashable - - # The list of unprotected ranges within a protected sheet. - # Unprotected ranges are only supported on protected sheets. - # Corresponds to the JSON property `unprotectedRanges` - # @return [Array] - attr_accessor :unprotected_ranges - - # The description of this protected range. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The named range this protected range is backed by, if any. - # When writing, only one of range or named_range_id - # may be set. - # Corresponds to the JSON property `namedRangeId` - # @return [String] - attr_accessor :named_range_id - - # True if the user who requested this protected range can edit the - # protected area. - # This field is read-only. - # Corresponds to the JSON property `requestingUserCanEdit` - # @return [Boolean] - attr_accessor :requesting_user_can_edit - alias_method :requesting_user_can_edit?, :requesting_user_can_edit - - # The editors of a protected range. - # Corresponds to the JSON property `editors` - # @return [Google::Apis::SheetsV4::Editors] - attr_accessor :editors - - # The ID of the protected range. - # This field is read-only. - # Corresponds to the JSON property `protectedRangeId` - # @return [Fixnum] - attr_accessor :protected_range_id - - # True if this protected range will show a warning when editing. - # Warning-based protection means that every user can edit data in the - # protected range, except editing will prompt a warning asking the user - # to confirm the edit. - # When writing: if this field is true, then editors is ignored. - # Additionally, if this field is changed from true to false and the - # `editors` field is not set (nor included in the field mask), then - # the editors will be set to all the editors in the document. - # Corresponds to the JSON property `warningOnly` - # @return [Boolean] - attr_accessor :warning_only - alias_method :warning_only?, :warning_only - - # A range on a sheet. + # A range along a single dimension on a sheet. # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). + # Indexes are half open: the start index is inclusive + # and the end index is exclusive. # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] + # @return [Google::Apis::SheetsV4::DimensionRange] attr_accessor :range + # The fields that should be updated. At least one field must be specified. + # The root `properties` is implied and should not be specified. + # A single `"*"` can be used as short-hand for listing every field. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @unprotected_ranges = args[:unprotected_ranges] if args.key?(:unprotected_ranges) - @description = args[:description] if args.key?(:description) - @named_range_id = args[:named_range_id] if args.key?(:named_range_id) - @requesting_user_can_edit = args[:requesting_user_can_edit] if args.key?(:requesting_user_can_edit) - @editors = args[:editors] if args.key?(:editors) - @protected_range_id = args[:protected_range_id] if args.key?(:protected_range_id) - @warning_only = args[:warning_only] if args.key?(:warning_only) + @properties = args[:properties] if args.key?(:properties) @range = args[:range] if args.key?(:range) - end - end - - # Deletes a conditional format rule at the given index. - # All subsequent rules' indexes are decremented. - class DeleteConditionalFormatRuleRequest - include Google::Apis::Core::Hashable - - # The sheet the rule is being deleted from. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - # The zero-based index of the rule to be deleted. - # Corresponds to the JSON property `index` - # @return [Fixnum] - attr_accessor :index - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @index = args[:index] if args.key?(:index) - end - end - - # Deletes a range of cells, shifting other cells into the deleted area. - class DeleteRangeRequest - include Google::Apis::Core::Hashable - - # The dimension from which deleted cells will be replaced with. - # If ROWS, existing cells will be shifted upward to - # replace the deleted cells. If COLUMNS, existing cells - # will be shifted left to replace the deleted cells. - # Corresponds to the JSON property `shiftDimension` - # @return [String] - attr_accessor :shift_dimension - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @shift_dimension = args[:shift_dimension] if args.key?(:shift_dimension) - @range = args[:range] if args.key?(:range) - end - end - - # Inserts cells into a range, shifting the existing cells over or down. - class InsertRangeRequest - include Google::Apis::Core::Hashable - - # The dimension which will be shifted when inserting cells. - # If ROWS, existing cells will be shifted down. - # If COLUMNS, existing cells will be shifted right. - # Corresponds to the JSON property `shiftDimension` - # @return [String] - attr_accessor :shift_dimension - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @shift_dimension = args[:shift_dimension] if args.key?(:shift_dimension) - @range = args[:range] if args.key?(:range) - end - end - - # The specifications of a chart. - class ChartSpec - include Google::Apis::Core::Hashable - - # Determines how the charts will use hidden rows or columns. - # Corresponds to the JSON property `hiddenDimensionStrategy` - # @return [String] - attr_accessor :hidden_dimension_strategy - - # The specification for a basic chart. See BasicChartType for the list - # of charts this supports. - # Corresponds to the JSON property `basicChart` - # @return [Google::Apis::SheetsV4::BasicChartSpec] - attr_accessor :basic_chart - - # The title of the chart. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # A pie chart. - # Corresponds to the JSON property `pieChart` - # @return [Google::Apis::SheetsV4::PieChartSpec] - attr_accessor :pie_chart - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @hidden_dimension_strategy = args[:hidden_dimension_strategy] if args.key?(:hidden_dimension_strategy) - @basic_chart = args[:basic_chart] if args.key?(:basic_chart) - @title = args[:title] if args.key?(:title) - @pie_chart = args[:pie_chart] if args.key?(:pie_chart) + @fields = args[:fields] if args.key?(:fields) end end @@ -3214,6 +328,14 @@ module Google class SourceAndDestination include Google::Apis::Core::Hashable + # The number of rows or columns that data should be filled into. + # Positive numbers expand beyond the last row or last column + # of the source. Negative numbers expand before the first row + # or first column of the source. + # Corresponds to the JSON property `fillLength` + # @return [Fixnum] + attr_accessor :fill_length + # A range on a sheet. # All indexes are zero-based. # Indexes are half open, e.g the start index is inclusive @@ -3240,14 +362,6 @@ module Google # @return [Google::Apis::SheetsV4::GridRange] attr_accessor :source - # The number of rows or columns that data should be filled into. - # Positive numbers expand beyond the last row or last column - # of the source. Negative numbers expand before the first row - # or first column of the source. - # Corresponds to the JSON property `fillLength` - # @return [Fixnum] - attr_accessor :fill_length - # The dimension that data should be filled into. # Corresponds to the JSON property `dimension` # @return [String] @@ -3259,517 +373,20 @@ module Google # Update properties of this object def update!(**args) - @source = args[:source] if args.key?(:source) @fill_length = args[:fill_length] if args.key?(:fill_length) + @source = args[:source] if args.key?(:source) @dimension = args[:dimension] if args.key?(:dimension) end end - # The value of the condition. - class ConditionValue + # A filter view. + class FilterView include Google::Apis::Core::Hashable - # A relative date (based on the current date). - # Valid only if the type is - # DATE_BEFORE, - # DATE_AFTER, - # DATE_ON_OR_BEFORE or - # DATE_ON_OR_AFTER. - # Relative dates are not supported in data validation. - # They are supported only in conditional formatting and - # conditional filters. - # Corresponds to the JSON property `relativeDate` - # @return [String] - attr_accessor :relative_date - - # A value the condition is based on. - # The value will be parsed as if the user typed into a cell. - # Formulas are supported (and must begin with an `=`). - # Corresponds to the JSON property `userEnteredValue` - # @return [String] - attr_accessor :user_entered_value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @relative_date = args[:relative_date] if args.key?(:relative_date) - @user_entered_value = args[:user_entered_value] if args.key?(:user_entered_value) - end - end - - # Inserts data into the spreadsheet starting at the specified coordinate. - class PasteDataRequest - include Google::Apis::Core::Hashable - - # The data to insert. - # Corresponds to the JSON property `data` - # @return [String] - attr_accessor :data - - # A coordinate in a sheet. - # All indexes are zero-based. - # Corresponds to the JSON property `coordinate` - # @return [Google::Apis::SheetsV4::GridCoordinate] - attr_accessor :coordinate - - # The delimiter in the data. - # Corresponds to the JSON property `delimiter` - # @return [String] - attr_accessor :delimiter - - # How the data should be pasted. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # True if the data is HTML. - # Corresponds to the JSON property `html` - # @return [Boolean] - attr_accessor :html - alias_method :html?, :html - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @data = args[:data] if args.key?(:data) - @coordinate = args[:coordinate] if args.key?(:coordinate) - @delimiter = args[:delimiter] if args.key?(:delimiter) - @type = args[:type] if args.key?(:type) - @html = args[:html] if args.key?(:html) - end - end - - # Finds and replaces data in cells over a range, sheet, or all sheets. - class FindReplaceRequest - include Google::Apis::Core::Hashable - - # The value to search. - # Corresponds to the JSON property `find` - # @return [String] - attr_accessor :find - - # The value to use as the replacement. - # Corresponds to the JSON property `replacement` - # @return [String] - attr_accessor :replacement - - # True if the find value is a regex. - # The regular expression and replacement should follow Java regex rules - # at https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html. - # The replacement string is allowed to refer to capturing groups. - # For example, if one cell has the contents `"Google Sheets"` and another - # has `"Google Docs"`, then searching for `"o.* (.*)"` with a replacement of - # `"$1 Rocks"` would change the contents of the cells to - # `"GSheets Rocks"` and `"GDocs Rocks"` respectively. - # Corresponds to the JSON property `searchByRegex` - # @return [Boolean] - attr_accessor :search_by_regex - alias_method :search_by_regex?, :search_by_regex - - # The sheet to find/replace over. - # Corresponds to the JSON property `sheetId` + # The ID of the filter view. + # Corresponds to the JSON property `filterViewId` # @return [Fixnum] - attr_accessor :sheet_id - - # True to find/replace over all sheets. - # Corresponds to the JSON property `allSheets` - # @return [Boolean] - attr_accessor :all_sheets - alias_method :all_sheets?, :all_sheets - - # True if the search is case sensitive. - # Corresponds to the JSON property `matchCase` - # @return [Boolean] - attr_accessor :match_case - alias_method :match_case?, :match_case - - # True if the search should include cells with formulas. - # False to skip cells with formulas. - # Corresponds to the JSON property `includeFormulas` - # @return [Boolean] - attr_accessor :include_formulas - alias_method :include_formulas?, :include_formulas - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :range - - # True if the find value should match the entire cell. - # Corresponds to the JSON property `matchEntireCell` - # @return [Boolean] - attr_accessor :match_entire_cell - alias_method :match_entire_cell?, :match_entire_cell - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @find = args[:find] if args.key?(:find) - @replacement = args[:replacement] if args.key?(:replacement) - @search_by_regex = args[:search_by_regex] if args.key?(:search_by_regex) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @all_sheets = args[:all_sheets] if args.key?(:all_sheets) - @match_case = args[:match_case] if args.key?(:match_case) - @include_formulas = args[:include_formulas] if args.key?(:include_formulas) - @range = args[:range] if args.key?(:range) - @match_entire_cell = args[:match_entire_cell] if args.key?(:match_entire_cell) - end - end - - # A sort order associated with a specific column or row. - class SortSpec - include Google::Apis::Core::Hashable - - # The order data should be sorted. - # Corresponds to the JSON property `sortOrder` - # @return [String] - attr_accessor :sort_order - - # The dimension the sort should be applied to. - # Corresponds to the JSON property `dimensionIndex` - # @return [Fixnum] - attr_accessor :dimension_index - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sort_order = args[:sort_order] if args.key?(:sort_order) - @dimension_index = args[:dimension_index] if args.key?(:dimension_index) - end - end - - # The request to copy a sheet across spreadsheets. - class CopySheetToAnotherSpreadsheetRequest - include Google::Apis::Core::Hashable - - # The ID of the spreadsheet to copy the sheet to. - # Corresponds to the JSON property `destinationSpreadsheetId` - # @return [String] - attr_accessor :destination_spreadsheet_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @destination_spreadsheet_id = args[:destination_spreadsheet_id] if args.key?(:destination_spreadsheet_id) - end - end - - # The number format of a cell. - class NumberFormat - include Google::Apis::Core::Hashable - - # Pattern string used for formatting. If not set, a default pattern based on - # the user's locale will be used if necessary for the given type. - # See the [Date and Number Formats guide](/sheets/guides/formats) for more - # information about the supported patterns. - # Corresponds to the JSON property `pattern` - # @return [String] - attr_accessor :pattern - - # The type of the number format. - # When writing, this field must be set. - # 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) - @pattern = args[:pattern] if args.key?(:pattern) - @type = args[:type] if args.key?(:type) - end - end - - # The request for clearing more than one range of values in a spreadsheet. - class BatchClearValuesRequest - include Google::Apis::Core::Hashable - - # The ranges to clear, in A1 notation. - # Corresponds to the JSON property `ranges` - # @return [Array] - attr_accessor :ranges - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ranges = args[:ranges] if args.key?(:ranges) - end - end - - # Updates properties of dimensions within the specified range. - class UpdateDimensionPropertiesRequest - include Google::Apis::Core::Hashable - - # The fields that should be updated. At least one field must be specified. - # The root `properties` is implied and should not be specified. - # A single `"*"` can be used as short-hand for listing every field. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - # A range along a single dimension on a sheet. - # All indexes are zero-based. - # Indexes are half open: the start index is inclusive - # and the end index is exclusive. - # Missing indexes indicate the range is unbounded on that side. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::DimensionRange] - attr_accessor :range - - # Properties about a dimension. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV4::DimensionProperties] - attr_accessor :properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @fields = args[:fields] if args.key?(:fields) - @range = args[:range] if args.key?(:range) - @properties = args[:properties] if args.key?(:properties) - end - end - - # The editors of a protected range. - class Editors - include Google::Apis::Core::Hashable - - # The email addresses of users with edit access to the protected range. - # Corresponds to the JSON property `users` - # @return [Array] - attr_accessor :users - - # The email addresses of groups with edit access to the protected range. - # Corresponds to the JSON property `groups` - # @return [Array] - attr_accessor :groups - - # True if anyone in the document's domain has edit access to the protected - # range. Domain protection is only supported on documents within a domain. - # Corresponds to the JSON property `domainUsersCanEdit` - # @return [Boolean] - attr_accessor :domain_users_can_edit - alias_method :domain_users_can_edit?, :domain_users_can_edit - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @users = args[:users] if args.key?(:users) - @groups = args[:groups] if args.key?(:groups) - @domain_users_can_edit = args[:domain_users_can_edit] if args.key?(:domain_users_can_edit) - end - end - - # Resource that represents a spreadsheet. - class Spreadsheet - include Google::Apis::Core::Hashable - - # The ID of the spreadsheet. - # This field is read-only. - # Corresponds to the JSON property `spreadsheetId` - # @return [String] - attr_accessor :spreadsheet_id - - # Properties of a spreadsheet. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV4::SpreadsheetProperties] - attr_accessor :properties - - # The url of the spreadsheet. - # This field is read-only. - # Corresponds to the JSON property `spreadsheetUrl` - # @return [String] - attr_accessor :spreadsheet_url - - # The sheets that are part of a spreadsheet. - # Corresponds to the JSON property `sheets` - # @return [Array] - attr_accessor :sheets - - # The named ranges defined in a spreadsheet. - # Corresponds to the JSON property `namedRanges` - # @return [Array] - attr_accessor :named_ranges - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) - @properties = args[:properties] if args.key?(:properties) - @spreadsheet_url = args[:spreadsheet_url] if args.key?(:spreadsheet_url) - @sheets = args[:sheets] if args.key?(:sheets) - @named_ranges = args[:named_ranges] if args.key?(:named_ranges) - end - end - - # Data in the grid, as well as metadata about the dimensions. - class GridData - include Google::Apis::Core::Hashable - - # Metadata about the requested columns in the grid, starting with the column - # in start_column. - # Corresponds to the JSON property `columnMetadata` - # @return [Array] - attr_accessor :column_metadata - - # The data in the grid, one entry per row, - # starting with the row in startRow. - # The values in RowData will correspond to columns starting - # at start_column. - # Corresponds to the JSON property `rowData` - # @return [Array] - attr_accessor :row_data - - # The first row this GridData refers to, zero-based. - # Corresponds to the JSON property `startRow` - # @return [Fixnum] - attr_accessor :start_row - - # Metadata about the requested rows in the grid, starting with the row - # in start_row. - # Corresponds to the JSON property `rowMetadata` - # @return [Array] - attr_accessor :row_metadata - - # The first column this GridData refers to, zero-based. - # Corresponds to the JSON property `startColumn` - # @return [Fixnum] - attr_accessor :start_column - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @column_metadata = args[:column_metadata] if args.key?(:column_metadata) - @row_data = args[:row_data] if args.key?(:row_data) - @start_row = args[:start_row] if args.key?(:start_row) - @row_metadata = args[:row_metadata] if args.key?(:row_metadata) - @start_column = args[:start_column] if args.key?(:start_column) - end - end - - # The definition of how a value in a pivot table should be calculated. - class PivotValue - include Google::Apis::Core::Hashable - - # A custom formula to calculate the value. The formula must start - # with an `=` character. - # Corresponds to the JSON property `formula` - # @return [String] - attr_accessor :formula - - # The column offset of the source range that this value reads from. - # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0` - # means this value refers to column `C`, whereas the offset `1` would - # refer to column `D`. - # Corresponds to the JSON property `sourceColumnOffset` - # @return [Fixnum] - attr_accessor :source_column_offset - - # A function to summarize the value. - # If formula is set, the only supported values are - # SUM and - # CUSTOM. - # If sourceColumnOffset is set, then `CUSTOM` - # is not supported. - # Corresponds to the JSON property `summarizeFunction` - # @return [String] - attr_accessor :summarize_function - - # A name to use for the value. This is only used if formula was set. - # Otherwise, the column name is used. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @formula = args[:formula] if args.key?(:formula) - @source_column_offset = args[:source_column_offset] if args.key?(:source_column_offset) - @summarize_function = args[:summarize_function] if args.key?(:summarize_function) - @name = args[:name] if args.key?(:name) - end - end - - # Removes the banded range with the given ID from the spreadsheet. - class DeleteBandingRequest - include Google::Apis::Core::Hashable - - # The ID of the banded range to delete. - # Corresponds to the JSON property `bandedRangeId` - # @return [Fixnum] - attr_accessor :banded_range_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @banded_range_id = args[:banded_range_id] if args.key?(:banded_range_id) - end - end - - # The default filter associated with a sheet. - class BasicFilter - include Google::Apis::Core::Hashable + attr_accessor :filter_view_id # The criteria for showing/hiding values per column. # The map's key is the column index, and the value is the criteria for @@ -3778,6 +395,11 @@ module Google # @return [Hash] attr_accessor :criteria + # The name of the filter view. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + # A range on a sheet. # All indexes are zero-based. # Indexes are half open, e.g the start index is inclusive @@ -3810,649 +432,25 @@ module Google # @return [Array] attr_accessor :sort_specs - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @criteria = args[:criteria] if args.key?(:criteria) - @range = args[:range] if args.key?(:range) - @sort_specs = args[:sort_specs] if args.key?(:sort_specs) - end - end - - # Duplicates the contents of a sheet. - class DuplicateSheetRequest - include Google::Apis::Core::Hashable - - # The sheet to duplicate. - # Corresponds to the JSON property `sourceSheetId` - # @return [Fixnum] - attr_accessor :source_sheet_id - - # If set, the ID of the new sheet. If not set, an ID is chosen. - # If set, the ID must not conflict with any existing sheet ID. - # If set, it must be non-negative. - # Corresponds to the JSON property `newSheetId` - # @return [Fixnum] - attr_accessor :new_sheet_id - - # The zero-based index where the new sheet should be inserted. - # The index of all sheets after this are incremented. - # Corresponds to the JSON property `insertSheetIndex` - # @return [Fixnum] - attr_accessor :insert_sheet_index - - # The name of the new sheet. If empty, a new name is chosen for you. - # Corresponds to the JSON property `newSheetName` - # @return [String] - attr_accessor :new_sheet_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @source_sheet_id = args[:source_sheet_id] if args.key?(:source_sheet_id) - @new_sheet_id = args[:new_sheet_id] if args.key?(:new_sheet_id) - @insert_sheet_index = args[:insert_sheet_index] if args.key?(:insert_sheet_index) - @new_sheet_name = args[:new_sheet_name] if args.key?(:new_sheet_name) - end - end - - # The result of adding a filter view. - class AddFilterViewResponse - include Google::Apis::Core::Hashable - - # A filter view. - # Corresponds to the JSON property `filter` - # @return [Google::Apis::SheetsV4::FilterView] - attr_accessor :filter - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @filter = args[:filter] if args.key?(:filter) - end - end - - # The result of duplicating a sheet. - class DuplicateSheetResponse - include Google::Apis::Core::Hashable - - # Properties of a sheet. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV4::SheetProperties] - attr_accessor :properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @properties = args[:properties] if args.key?(:properties) - end - end - - # A border along a cell. - class Border - include Google::Apis::Core::Hashable - - # The style of the border. - # Corresponds to the JSON property `style` - # @return [String] - attr_accessor :style - - # The width of the border, in pixels. - # Deprecated; the width is determined by the "style" field. - # Corresponds to the JSON property `width` - # @return [Fixnum] - attr_accessor :width - - # Represents a color in the RGBA color space. This representation is designed - # for simplicity of conversion to/from color representations in various - # languages over compactness; for example, the fields of this representation - # can be trivially provided to the constructor of "java.awt.Color" in Java; it - # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" - # method in iOS; and, with just a little work, it can be easily formatted into - # a CSS "rgba()" string in JavaScript, as well. Here are some examples: - # Example (Java): - # import com.google.type.Color; - # // ... - # public static java.awt.Color fromProto(Color protocolor) ` - # float alpha = protocolor.hasAlpha() - # ? protocolor.getAlpha().getValue() - # : 1.0; - # return new java.awt.Color( - # protocolor.getRed(), - # protocolor.getGreen(), - # protocolor.getBlue(), - # alpha); - # ` - # public static Color toProto(java.awt.Color color) ` - # float red = (float) color.getRed(); - # float green = (float) color.getGreen(); - # float blue = (float) color.getBlue(); - # float denominator = 255.0; - # Color.Builder resultBuilder = - # Color - # .newBuilder() - # .setRed(red / denominator) - # .setGreen(green / denominator) - # .setBlue(blue / denominator); - # int alpha = color.getAlpha(); - # if (alpha != 255) ` - # result.setAlpha( - # FloatValue - # .newBuilder() - # .setValue(((float) alpha) / denominator) - # .build()); - # ` - # return resultBuilder.build(); - # ` - # // ... - # Example (iOS / Obj-C): - # // ... - # static UIColor* fromProto(Color* protocolor) ` - # float red = [protocolor red]; - # float green = [protocolor green]; - # float blue = [protocolor blue]; - # FloatValue* alpha_wrapper = [protocolor alpha]; - # float alpha = 1.0; - # if (alpha_wrapper != nil) ` - # alpha = [alpha_wrapper value]; - # ` - # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; - # ` - # static Color* toProto(UIColor* color) ` - # CGFloat red, green, blue, alpha; - # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` - # return nil; - # ` - # Color* result = [Color alloc] init]; - # [result setRed:red]; - # [result setGreen:green]; - # [result setBlue:blue]; - # if (alpha <= 0.9999) ` - # [result setAlpha:floatWrapperWithValue(alpha)]; - # ` - # [result autorelease]; - # return result; - # ` - # // ... - # Example (JavaScript): - # // ... - # var protoToCssColor = function(rgb_color) ` - # var redFrac = rgb_color.red || 0.0; - # var greenFrac = rgb_color.green || 0.0; - # var blueFrac = rgb_color.blue || 0.0; - # var red = Math.floor(redFrac * 255); - # var green = Math.floor(greenFrac * 255); - # var blue = Math.floor(blueFrac * 255); - # if (!('alpha' in rgb_color)) ` - # return rgbToCssColor_(red, green, blue); - # ` - # var alphaFrac = rgb_color.alpha.value || 0.0; - # var rgbParams = [red, green, blue].join(','); - # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); - # `; - # var rgbToCssColor_ = function(red, green, blue) ` - # var rgbNumber = new Number((red << 16) | (green << 8) | blue); - # var hexString = rgbNumber.toString(16); - # var missingZeros = 6 - hexString.length; - # var resultBuilder = ['#']; - # for (var i = 0; i < missingZeros; i++) ` - # resultBuilder.push('0'); - # ` - # resultBuilder.push(hexString); - # return resultBuilder.join(''); - # `; - # // ... - # Corresponds to the JSON property `color` - # @return [Google::Apis::SheetsV4::Color] - attr_accessor :color - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @style = args[:style] if args.key?(:style) - @width = args[:width] if args.key?(:width) - @color = args[:color] if args.key?(:color) - end - end - - # Adds a named range to the spreadsheet. - class AddNamedRangeRequest - include Google::Apis::Core::Hashable - - # A named range. - # Corresponds to the JSON property `namedRange` - # @return [Google::Apis::SheetsV4::NamedRange] - attr_accessor :named_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @named_range = args[:named_range] if args.key?(:named_range) - end - end - - # The result of adding a chart to a spreadsheet. - class AddChartResponse - include Google::Apis::Core::Hashable - - # A chart embedded in a sheet. - # Corresponds to the JSON property `chart` - # @return [Google::Apis::SheetsV4::EmbeddedChart] - attr_accessor :chart - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @chart = args[:chart] if args.key?(:chart) - end - end - - # Adds a new banded range to the spreadsheet. - class AddBandingRequest - include Google::Apis::Core::Hashable - - # A banded (alternating colors) range in a sheet. - # Corresponds to the JSON property `bandedRange` - # @return [Google::Apis::SheetsV4::BandedRange] - attr_accessor :banded_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @banded_range = args[:banded_range] if args.key?(:banded_range) - end - end - - # Adds new cells after the last row with data in a sheet, - # inserting new rows into the sheet if necessary. - class AppendCellsRequest - include Google::Apis::Core::Hashable - - # The sheet ID to append the data to. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - # The data to append. - # Corresponds to the JSON property `rows` - # @return [Array] - attr_accessor :rows - - # The fields of CellData that should be updated. - # At least one field must be specified. - # The root is the CellData; 'row.values.' should not be specified. - # A single `"*"` can be used as short-hand for listing every field. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @rows = args[:rows] if args.key?(:rows) - @fields = args[:fields] if args.key?(:fields) - end - end - - # Data about each cell in a row. - class RowData - include Google::Apis::Core::Hashable - - # The values in the row, one per column. - # Corresponds to the JSON property `values` - # @return [Array] - attr_accessor :values - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @values = args[:values] if args.key?(:values) - end - end - - # A single series of data in a chart. - # For example, if charting stock prices over time, multiple series may exist, - # one for the "Open Price", "High Price", "Low Price" and "Close Price". - class BasicChartSeries - include Google::Apis::Core::Hashable - - # The data included in a domain or series. - # Corresponds to the JSON property `series` - # @return [Google::Apis::SheetsV4::ChartData] - attr_accessor :series - - # The minor axis that will specify the range of values for this series. - # For example, if charting stocks over time, the "Volume" series - # may want to be pinned to the right with the prices pinned to the left, - # because the scale of trading volume is different than the scale of - # prices. - # It is an error to specify an axis that isn't a valid minor axis - # for the chart's type. - # Corresponds to the JSON property `targetAxis` - # @return [String] - attr_accessor :target_axis - - # The type of this series. Valid only if the - # chartType is - # COMBO. - # Different types will change the way the series is visualized. - # Only LINE, AREA, - # and COLUMN are supported. - # 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) - @series = args[:series] if args.key?(:series) - @target_axis = args[:target_axis] if args.key?(:target_axis) - @type = args[:type] if args.key?(:type) - end - end - - # A named range. - class NamedRange - include Google::Apis::Core::Hashable - - # The ID of the named range. + # The named range this filter view is backed by, if any. + # When writing, only one of range or named_range_id + # may be set. # Corresponds to the JSON property `namedRangeId` # @return [String] attr_accessor :named_range_id - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :range - - # The name of the named range. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @filter_view_id = args[:filter_view_id] if args.key?(:filter_view_id) + @criteria = args[:criteria] if args.key?(:criteria) + @title = args[:title] if args.key?(:title) + @range = args[:range] if args.key?(:range) + @sort_specs = args[:sort_specs] if args.key?(:sort_specs) @named_range_id = args[:named_range_id] if args.key?(:named_range_id) - @range = args[:range] if args.key?(:range) - @name = args[:name] if args.key?(:name) - end - end - - # Updates all cells in the range to the values in the given Cell object. - # Only the fields listed in the fields field are updated; others are - # unchanged. - # If writing a cell with a formula, the formula's ranges will automatically - # increment for each field in the range. - # For example, if writing a cell with formula `=A1` into range B2:C4, - # B2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`, - # C2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`. - # To keep the formula's ranges static, use the `$` indicator. - # For example, use the formula `=$A$1` to prevent both the row and the - # column from incrementing. - class RepeatCellRequest - include Google::Apis::Core::Hashable - - # Data about a specific cell. - # Corresponds to the JSON property `cell` - # @return [Google::Apis::SheetsV4::CellData] - attr_accessor :cell - - # The fields that should be updated. At least one field must be specified. - # The root `cell` is implied and should not be specified. - # A single `"*"` can be used as short-hand for listing every field. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cell = args[:cell] if args.key?(:cell) - @fields = args[:fields] if args.key?(:fields) - @range = args[:range] if args.key?(:range) - end - end - - # The specification for a basic chart. See BasicChartType for the list - # of charts this supports. - class BasicChartSpec - include Google::Apis::Core::Hashable - - # The type of the chart. - # Corresponds to the JSON property `chartType` - # @return [String] - attr_accessor :chart_type - - # The domain of data this is charting. - # Only a single domain is currently supported. - # Corresponds to the JSON property `domains` - # @return [Array] - attr_accessor :domains - - # The number of rows or columns in the data that are "headers". - # If not set, Google Sheets will guess how many rows are headers based - # on the data. - # (Note that BasicChartAxis.title may override the axis title - # inferred from the header values.) - # Corresponds to the JSON property `headerCount` - # @return [Fixnum] - attr_accessor :header_count - - # The data this chart is visualizing. - # Corresponds to the JSON property `series` - # @return [Array] - attr_accessor :series - - # The position of the chart legend. - # Corresponds to the JSON property `legendPosition` - # @return [String] - attr_accessor :legend_position - - # The axis on the chart. - # Corresponds to the JSON property `axis` - # @return [Array] - attr_accessor :axis - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @chart_type = args[:chart_type] if args.key?(:chart_type) - @domains = args[:domains] if args.key?(:domains) - @header_count = args[:header_count] if args.key?(:header_count) - @series = args[:series] if args.key?(:series) - @legend_position = args[:legend_position] if args.key?(:legend_position) - @axis = args[:axis] if args.key?(:axis) - end - end - - # Update an embedded object's position (such as a moving or resizing a - # chart or image). - class UpdateEmbeddedObjectPositionRequest - include Google::Apis::Core::Hashable - - # The position of an embedded object such as a chart. - # Corresponds to the JSON property `newPosition` - # @return [Google::Apis::SheetsV4::EmbeddedObjectPosition] - attr_accessor :new_position - - # The ID of the object to moved. - # Corresponds to the JSON property `objectId` - # @return [Fixnum] - attr_accessor :object_id_prop - - # The fields of OverlayPosition - # that should be updated when setting a new position. Used only if - # newPosition.overlayPosition - # is set, in which case at least one field must - # be specified. The root `newPosition.overlayPosition` is implied and - # should not be specified. - # A single `"*"` can be used as short-hand for listing every field. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @new_position = args[:new_position] if args.key?(:new_position) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - @fields = args[:fields] if args.key?(:fields) - end - end - - # Sets the basic filter associated with a sheet. - class SetBasicFilterRequest - include Google::Apis::Core::Hashable - - # The default filter associated with a sheet. - # Corresponds to the JSON property `filter` - # @return [Google::Apis::SheetsV4::BasicFilter] - attr_accessor :filter - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @filter = args[:filter] if args.key?(:filter) - end - end - - # Automatically resizes one or more dimensions based on the contents - # of the cells in that dimension. - class AutoResizeDimensionsRequest - include Google::Apis::Core::Hashable - - # A range along a single dimension on a sheet. - # All indexes are zero-based. - # Indexes are half open: the start index is inclusive - # and the end index is exclusive. - # Missing indexes indicate the range is unbounded on that side. - # Corresponds to the JSON property `dimensions` - # @return [Google::Apis::SheetsV4::DimensionRange] - attr_accessor :dimensions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dimensions = args[:dimensions] if args.key?(:dimensions) - end - end - - # The result of a filter view being duplicated. - class DuplicateFilterViewResponse - include Google::Apis::Core::Hashable - - # A filter view. - # Corresponds to the JSON property `filter` - # @return [Google::Apis::SheetsV4::FilterView] - attr_accessor :filter - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @filter = args[:filter] if args.key?(:filter) end end @@ -4775,9 +773,9 @@ module Google # return resultBuilder.join(''); # `; # // ... - # Corresponds to the JSON property `secondBandColor` + # Corresponds to the JSON property `firstBandColor` # @return [Google::Apis::SheetsV4::Color] - attr_accessor :second_band_color + attr_accessor :first_band_color # Represents a color in the RGBA color space. This representation is designed # for simplicity of conversion to/from color representations in various @@ -4878,9 +876,9 @@ module Google # return resultBuilder.join(''); # `; # // ... - # Corresponds to the JSON property `firstBandColor` + # Corresponds to the JSON property `secondBandColor` # @return [Google::Apis::SheetsV4::Color] - attr_accessor :first_band_color + attr_accessor :second_band_color def initialize(**args) update!(**args) @@ -4890,43 +888,193 @@ module Google def update!(**args) @footer_color = args[:footer_color] if args.key?(:footer_color) @header_color = args[:header_color] if args.key?(:header_color) - @second_band_color = args[:second_band_color] if args.key?(:second_band_color) @first_band_color = args[:first_band_color] if args.key?(:first_band_color) + @second_band_color = args[:second_band_color] if args.key?(:second_band_color) end end - # A single grouping (either row or column) in a pivot table. - class PivotGroup + # The default filter associated with a sheet. + class BasicFilter include Google::Apis::Core::Hashable - # The order the values in this group should be sorted. - # Corresponds to the JSON property `sortOrder` - # @return [String] - attr_accessor :sort_order + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :range - # The column offset of the source range that this grouping is based on. + # The criteria for showing/hiding values per column. + # The map's key is the column index, and the value is the criteria for + # that column. + # Corresponds to the JSON property `criteria` + # @return [Hash] + attr_accessor :criteria + + # The sort order per column. Later specifications are used when values + # are equal in the earlier specifications. + # Corresponds to the JSON property `sortSpecs` + # @return [Array] + attr_accessor :sort_specs + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @range = args[:range] if args.key?(:range) + @criteria = args[:criteria] if args.key?(:criteria) + @sort_specs = args[:sort_specs] if args.key?(:sort_specs) + end + end + + # The result of adding a new protected range. + class AddProtectedRangeResponse + include Google::Apis::Core::Hashable + + # A protected range. + # Corresponds to the JSON property `protectedRange` + # @return [Google::Apis::SheetsV4::ProtectedRange] + attr_accessor :protected_range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @protected_range = args[:protected_range] if args.key?(:protected_range) + end + end + + # The response when updating a range of values in a spreadsheet. + class UpdateValuesResponse + include Google::Apis::Core::Hashable + + # The number of rows where at least one cell in the row was updated. + # Corresponds to the JSON property `updatedRows` + # @return [Fixnum] + attr_accessor :updated_rows + + # Data within a range of the spreadsheet. + # Corresponds to the JSON property `updatedData` + # @return [Google::Apis::SheetsV4::ValueRange] + attr_accessor :updated_data + + # The number of columns where at least one cell in the column was updated. + # Corresponds to the JSON property `updatedColumns` + # @return [Fixnum] + attr_accessor :updated_columns + + # The spreadsheet the updates were applied to. + # Corresponds to the JSON property `spreadsheetId` + # @return [String] + attr_accessor :spreadsheet_id + + # The range (in A1 notation) that updates were applied to. + # Corresponds to the JSON property `updatedRange` + # @return [String] + attr_accessor :updated_range + + # The number of cells updated. + # Corresponds to the JSON property `updatedCells` + # @return [Fixnum] + attr_accessor :updated_cells + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @updated_rows = args[:updated_rows] if args.key?(:updated_rows) + @updated_data = args[:updated_data] if args.key?(:updated_data) + @updated_columns = args[:updated_columns] if args.key?(:updated_columns) + @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) + @updated_range = args[:updated_range] if args.key?(:updated_range) + @updated_cells = args[:updated_cells] if args.key?(:updated_cells) + end + end + + # An error in a cell. + class ErrorValue + include Google::Apis::Core::Hashable + + # The type of error. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # A message with more information about the error + # (in the spreadsheet's locale). + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type = args[:type] if args.key?(:type) + @message = args[:message] if args.key?(:message) + end + end + + # The definition of how a value in a pivot table should be calculated. + class PivotValue + include Google::Apis::Core::Hashable + + # A custom formula to calculate the value. The formula must start + # with an `=` character. + # Corresponds to the JSON property `formula` + # @return [String] + attr_accessor :formula + + # A function to summarize the value. + # If formula is set, the only supported values are + # SUM and + # CUSTOM. + # If sourceColumnOffset is set, then `CUSTOM` + # is not supported. + # Corresponds to the JSON property `summarizeFunction` + # @return [String] + attr_accessor :summarize_function + + # The column offset of the source range that this value reads from. # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0` - # means this group refers to column `C`, whereas the offset `1` would refer - # to column `D`. + # means this value refers to column `C`, whereas the offset `1` would + # refer to column `D`. # Corresponds to the JSON property `sourceColumnOffset` # @return [Fixnum] attr_accessor :source_column_offset - # True if the pivot table should include the totals for this grouping. - # Corresponds to the JSON property `showTotals` - # @return [Boolean] - attr_accessor :show_totals - alias_method :show_totals?, :show_totals - - # Information about which values in a pivot group should be used for sorting. - # Corresponds to the JSON property `valueBucket` - # @return [Google::Apis::SheetsV4::PivotGroupSortValueBucket] - attr_accessor :value_bucket - - # Metadata about values in the grouping. - # Corresponds to the JSON property `valueMetadata` - # @return [Array] - attr_accessor :value_metadata + # A name to use for the value. This is only used if formula was set. + # Otherwise, the column name is used. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name def initialize(**args) update!(**args) @@ -4934,63 +1082,86 @@ module Google # Update properties of this object def update!(**args) - @sort_order = args[:sort_order] if args.key?(:sort_order) + @formula = args[:formula] if args.key?(:formula) + @summarize_function = args[:summarize_function] if args.key?(:summarize_function) @source_column_offset = args[:source_column_offset] if args.key?(:source_column_offset) - @show_totals = args[:show_totals] if args.key?(:show_totals) - @value_bucket = args[:value_bucket] if args.key?(:value_bucket) - @value_metadata = args[:value_metadata] if args.key?(:value_metadata) + @name = args[:name] if args.key?(:name) end end - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - class GridRange + # The request to copy a sheet across spreadsheets. + class CopySheetToAnotherSpreadsheetRequest include Google::Apis::Core::Hashable - # The sheet this range is on. + # The ID of the spreadsheet to copy the sheet to. + # Corresponds to the JSON property `destinationSpreadsheetId` + # @return [String] + attr_accessor :destination_spreadsheet_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @destination_spreadsheet_id = args[:destination_spreadsheet_id] if args.key?(:destination_spreadsheet_id) + end + end + + # Information about which values in a pivot group should be used for sorting. + class PivotGroupSortValueBucket + include Google::Apis::Core::Hashable + + # The offset in the PivotTable.values list which the values in this + # grouping should be sorted by. + # Corresponds to the JSON property `valuesIndex` + # @return [Fixnum] + attr_accessor :values_index + + # Determines the bucket from which values are chosen to sort. + # For example, in a pivot table with one row group & two column groups, + # the row group can list up to two values. The first value corresponds + # to a value within the first column group, and the second value + # corresponds to a value in the second column group. If no values + # are listed, this would indicate that the row should be sorted according + # to the "Grand Total" over the column groups. If a single value is listed, + # this would correspond to using the "Total" of that bucket. + # Corresponds to the JSON property `buckets` + # @return [Array] + attr_accessor :buckets + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @values_index = args[:values_index] if args.key?(:values_index) + @buckets = args[:buckets] if args.key?(:buckets) + end + end + + # The position of an embedded object such as a chart. + class EmbeddedObjectPosition + include Google::Apis::Core::Hashable + + # If true, the embedded object will be put on a new sheet whose ID + # is chosen for you. Used only when writing. + # Corresponds to the JSON property `newSheet` + # @return [Boolean] + attr_accessor :new_sheet + alias_method :new_sheet?, :new_sheet + + # The sheet this is on. Set only if the embedded object + # is on its own sheet. Must be non-negative. # Corresponds to the JSON property `sheetId` # @return [Fixnum] attr_accessor :sheet_id - # The start column (inclusive) of the range, or not set if unbounded. - # Corresponds to the JSON property `startColumnIndex` - # @return [Fixnum] - attr_accessor :start_column_index - - # The start row (inclusive) of the range, or not set if unbounded. - # Corresponds to the JSON property `startRowIndex` - # @return [Fixnum] - attr_accessor :start_row_index - - # The end row (exclusive) of the range, or not set if unbounded. - # Corresponds to the JSON property `endRowIndex` - # @return [Fixnum] - attr_accessor :end_row_index - - # The end column (exclusive) of the range, or not set if unbounded. - # Corresponds to the JSON property `endColumnIndex` - # @return [Fixnum] - attr_accessor :end_column_index + # The location an object is overlaid on top of a grid. + # Corresponds to the JSON property `overlayPosition` + # @return [Google::Apis::SheetsV4::OverlayPosition] + attr_accessor :overlay_position def initialize(**args) update!(**args) @@ -4998,11 +1169,370 @@ module Google # Update properties of this object def update!(**args) + @new_sheet = args[:new_sheet] if args.key?(:new_sheet) @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @start_column_index = args[:start_column_index] if args.key?(:start_column_index) - @start_row_index = args[:start_row_index] if args.key?(:start_row_index) - @end_row_index = args[:end_row_index] if args.key?(:end_row_index) - @end_column_index = args[:end_column_index] if args.key?(:end_column_index) + @overlay_position = args[:overlay_position] if args.key?(:overlay_position) + end + end + + # Deletes the protected range with the given ID. + class DeleteProtectedRangeRequest + include Google::Apis::Core::Hashable + + # The ID of the protected range to delete. + # Corresponds to the JSON property `protectedRangeId` + # @return [Fixnum] + attr_accessor :protected_range_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @protected_range_id = args[:protected_range_id] if args.key?(:protected_range_id) + end + end + + # Fills in more data based on existing data. + class AutoFillRequest + include Google::Apis::Core::Hashable + + # A combination of a source range and how to extend that source. + # Corresponds to the JSON property `sourceAndDestination` + # @return [Google::Apis::SheetsV4::SourceAndDestination] + attr_accessor :source_and_destination + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :range + + # True if we should generate data with the "alternate" series. + # This differs based on the type and amount of source data. + # Corresponds to the JSON property `useAlternateSeries` + # @return [Boolean] + attr_accessor :use_alternate_series + alias_method :use_alternate_series?, :use_alternate_series + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @source_and_destination = args[:source_and_destination] if args.key?(:source_and_destination) + @range = args[:range] if args.key?(:range) + @use_alternate_series = args[:use_alternate_series] if args.key?(:use_alternate_series) + end + end + + # A rule that applies a gradient color scale format, based on + # the interpolation points listed. The format of a cell will vary + # based on its contents as compared to the values of the interpolation + # points. + class GradientRule + include Google::Apis::Core::Hashable + + # A single interpolation point on a gradient conditional format. + # These pin the gradient color scale according to the color, + # type and value chosen. + # Corresponds to the JSON property `minpoint` + # @return [Google::Apis::SheetsV4::InterpolationPoint] + attr_accessor :minpoint + + # A single interpolation point on a gradient conditional format. + # These pin the gradient color scale according to the color, + # type and value chosen. + # Corresponds to the JSON property `maxpoint` + # @return [Google::Apis::SheetsV4::InterpolationPoint] + attr_accessor :maxpoint + + # A single interpolation point on a gradient conditional format. + # These pin the gradient color scale according to the color, + # type and value chosen. + # Corresponds to the JSON property `midpoint` + # @return [Google::Apis::SheetsV4::InterpolationPoint] + attr_accessor :midpoint + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @minpoint = args[:minpoint] if args.key?(:minpoint) + @maxpoint = args[:maxpoint] if args.key?(:maxpoint) + @midpoint = args[:midpoint] if args.key?(:midpoint) + end + end + + # The request for clearing a range of values in a spreadsheet. + class ClearValuesRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Sets the basic filter associated with a sheet. + class SetBasicFilterRequest + include Google::Apis::Core::Hashable + + # The default filter associated with a sheet. + # Corresponds to the JSON property `filter` + # @return [Google::Apis::SheetsV4::BasicFilter] + attr_accessor :filter + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @filter = args[:filter] if args.key?(:filter) + end + end + + # A single interpolation point on a gradient conditional format. + # These pin the gradient color scale according to the color, + # type and value chosen. + class InterpolationPoint + include Google::Apis::Core::Hashable + + # The value this interpolation point uses. May be a formula. + # Unused if type is MIN or + # MAX. + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + + # Represents a color in the RGBA color space. This representation is designed + # for simplicity of conversion to/from color representations in various + # languages over compactness; for example, the fields of this representation + # can be trivially provided to the constructor of "java.awt.Color" in Java; it + # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" + # method in iOS; and, with just a little work, it can be easily formatted into + # a CSS "rgba()" string in JavaScript, as well. Here are some examples: + # Example (Java): + # import com.google.type.Color; + # // ... + # public static java.awt.Color fromProto(Color protocolor) ` + # float alpha = protocolor.hasAlpha() + # ? protocolor.getAlpha().getValue() + # : 1.0; + # return new java.awt.Color( + # protocolor.getRed(), + # protocolor.getGreen(), + # protocolor.getBlue(), + # alpha); + # ` + # public static Color toProto(java.awt.Color color) ` + # float red = (float) color.getRed(); + # float green = (float) color.getGreen(); + # float blue = (float) color.getBlue(); + # float denominator = 255.0; + # Color.Builder resultBuilder = + # Color + # .newBuilder() + # .setRed(red / denominator) + # .setGreen(green / denominator) + # .setBlue(blue / denominator); + # int alpha = color.getAlpha(); + # if (alpha != 255) ` + # result.setAlpha( + # FloatValue + # .newBuilder() + # .setValue(((float) alpha) / denominator) + # .build()); + # ` + # return resultBuilder.build(); + # ` + # // ... + # Example (iOS / Obj-C): + # // ... + # static UIColor* fromProto(Color* protocolor) ` + # float red = [protocolor red]; + # float green = [protocolor green]; + # float blue = [protocolor blue]; + # FloatValue* alpha_wrapper = [protocolor alpha]; + # float alpha = 1.0; + # if (alpha_wrapper != nil) ` + # alpha = [alpha_wrapper value]; + # ` + # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; + # ` + # static Color* toProto(UIColor* color) ` + # CGFloat red, green, blue, alpha; + # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` + # return nil; + # ` + # Color* result = [Color alloc] init]; + # [result setRed:red]; + # [result setGreen:green]; + # [result setBlue:blue]; + # if (alpha <= 0.9999) ` + # [result setAlpha:floatWrapperWithValue(alpha)]; + # ` + # [result autorelease]; + # return result; + # ` + # // ... + # Example (JavaScript): + # // ... + # var protoToCssColor = function(rgb_color) ` + # var redFrac = rgb_color.red || 0.0; + # var greenFrac = rgb_color.green || 0.0; + # var blueFrac = rgb_color.blue || 0.0; + # var red = Math.floor(redFrac * 255); + # var green = Math.floor(greenFrac * 255); + # var blue = Math.floor(blueFrac * 255); + # if (!('alpha' in rgb_color)) ` + # return rgbToCssColor_(red, green, blue); + # ` + # var alphaFrac = rgb_color.alpha.value || 0.0; + # var rgbParams = [red, green, blue].join(','); + # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); + # `; + # var rgbToCssColor_ = function(red, green, blue) ` + # var rgbNumber = new Number((red << 16) | (green << 8) | blue); + # var hexString = rgbNumber.toString(16); + # var missingZeros = 6 - hexString.length; + # var resultBuilder = ['#']; + # for (var i = 0; i < missingZeros; i++) ` + # resultBuilder.push('0'); + # ` + # resultBuilder.push(hexString); + # return resultBuilder.join(''); + # `; + # // ... + # Corresponds to the JSON property `color` + # @return [Google::Apis::SheetsV4::Color] + attr_accessor :color + + # How the value should be interpreted. + # 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) + @value = args[:value] if args.key?(:value) + @color = args[:color] if args.key?(:color) + @type = args[:type] if args.key?(:type) + end + end + + # Deletes the embedded object with the given ID. + class DeleteEmbeddedObjectRequest + include Google::Apis::Core::Hashable + + # The ID of the embedded object to delete. + # Corresponds to the JSON property `objectId` + # @return [Fixnum] + attr_accessor :object_id_prop + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + end + end + + # The result of the find/replace. + class FindReplaceResponse + include Google::Apis::Core::Hashable + + # The number of non-formula cells changed. + # Corresponds to the JSON property `valuesChanged` + # @return [Fixnum] + attr_accessor :values_changed + + # The number of occurrences (possibly multiple within a cell) changed. + # For example, if replacing `"e"` with `"o"` in `"Google Sheets"`, this would + # be `"3"` because `"Google Sheets"` -> `"Googlo Shoots"`. + # Corresponds to the JSON property `occurrencesChanged` + # @return [Fixnum] + attr_accessor :occurrences_changed + + # The number of rows changed. + # Corresponds to the JSON property `rowsChanged` + # @return [Fixnum] + attr_accessor :rows_changed + + # The number of sheets changed. + # Corresponds to the JSON property `sheetsChanged` + # @return [Fixnum] + attr_accessor :sheets_changed + + # The number of formula cells changed. + # Corresponds to the JSON property `formulasChanged` + # @return [Fixnum] + attr_accessor :formulas_changed + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @values_changed = args[:values_changed] if args.key?(:values_changed) + @occurrences_changed = args[:occurrences_changed] if args.key?(:occurrences_changed) + @rows_changed = args[:rows_changed] if args.key?(:rows_changed) + @sheets_changed = args[:sheets_changed] if args.key?(:sheets_changed) + @formulas_changed = args[:formulas_changed] if args.key?(:formulas_changed) + end + end + + # Duplicates a particular filter view. + class DuplicateFilterViewRequest + include Google::Apis::Core::Hashable + + # The ID of the filter being duplicated. + # Corresponds to the JSON property `filterId` + # @return [Fixnum] + attr_accessor :filter_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @filter_id = args[:filter_id] if args.key?(:filter_id) end end @@ -5025,17 +1555,350 @@ module Google end end - # Updates properties of the supplied banded range. - class UpdateBandingRequest + # The result of updating a conditional format rule. + class UpdateConditionalFormatRuleResponse include Google::Apis::Core::Hashable - # A banded (alternating colors) range in a sheet. - # Corresponds to the JSON property `bandedRange` - # @return [Google::Apis::SheetsV4::BandedRange] - attr_accessor :banded_range + # The old index of the rule. Not set if a rule was replaced + # (because it is the same as new_index). + # Corresponds to the JSON property `oldIndex` + # @return [Fixnum] + attr_accessor :old_index + + # A rule describing a conditional format. + # Corresponds to the JSON property `newRule` + # @return [Google::Apis::SheetsV4::ConditionalFormatRule] + attr_accessor :new_rule + + # A rule describing a conditional format. + # Corresponds to the JSON property `oldRule` + # @return [Google::Apis::SheetsV4::ConditionalFormatRule] + attr_accessor :old_rule + + # The index of the new rule. + # Corresponds to the JSON property `newIndex` + # @return [Fixnum] + attr_accessor :new_index + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @old_index = args[:old_index] if args.key?(:old_index) + @new_rule = args[:new_rule] if args.key?(:new_rule) + @old_rule = args[:old_rule] if args.key?(:old_rule) + @new_index = args[:new_index] if args.key?(:new_index) + end + end + + # The value of the condition. + class ConditionValue + include Google::Apis::Core::Hashable + + # A relative date (based on the current date). + # Valid only if the type is + # DATE_BEFORE, + # DATE_AFTER, + # DATE_ON_OR_BEFORE or + # DATE_ON_OR_AFTER. + # Relative dates are not supported in data validation. + # They are supported only in conditional formatting and + # conditional filters. + # Corresponds to the JSON property `relativeDate` + # @return [String] + attr_accessor :relative_date + + # A value the condition is based on. + # The value will be parsed as if the user typed into a cell. + # Formulas are supported (and must begin with an `=`). + # Corresponds to the JSON property `userEnteredValue` + # @return [String] + attr_accessor :user_entered_value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @relative_date = args[:relative_date] if args.key?(:relative_date) + @user_entered_value = args[:user_entered_value] if args.key?(:user_entered_value) + end + end + + # Duplicates the contents of a sheet. + class DuplicateSheetRequest + include Google::Apis::Core::Hashable + + # The name of the new sheet. If empty, a new name is chosen for you. + # Corresponds to the JSON property `newSheetName` + # @return [String] + attr_accessor :new_sheet_name + + # The sheet to duplicate. + # Corresponds to the JSON property `sourceSheetId` + # @return [Fixnum] + attr_accessor :source_sheet_id + + # If set, the ID of the new sheet. If not set, an ID is chosen. + # If set, the ID must not conflict with any existing sheet ID. + # If set, it must be non-negative. + # Corresponds to the JSON property `newSheetId` + # @return [Fixnum] + attr_accessor :new_sheet_id + + # The zero-based index where the new sheet should be inserted. + # The index of all sheets after this are incremented. + # Corresponds to the JSON property `insertSheetIndex` + # @return [Fixnum] + attr_accessor :insert_sheet_index + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @new_sheet_name = args[:new_sheet_name] if args.key?(:new_sheet_name) + @source_sheet_id = args[:source_sheet_id] if args.key?(:source_sheet_id) + @new_sheet_id = args[:new_sheet_id] if args.key?(:new_sheet_id) + @insert_sheet_index = args[:insert_sheet_index] if args.key?(:insert_sheet_index) + end + end + + # The kinds of value that a cell in a spreadsheet can have. + class ExtendedValue + include Google::Apis::Core::Hashable + + # An error in a cell. + # Corresponds to the JSON property `errorValue` + # @return [Google::Apis::SheetsV4::ErrorValue] + attr_accessor :error_value + + # Represents a string value. + # Leading single quotes are not included. For example, if the user typed + # `'123` into the UI, this would be represented as a `stringValue` of + # `"123"`. + # Corresponds to the JSON property `stringValue` + # @return [String] + attr_accessor :string_value + + # Represents a boolean value. + # Corresponds to the JSON property `boolValue` + # @return [Boolean] + attr_accessor :bool_value + alias_method :bool_value?, :bool_value + + # Represents a formula. + # Corresponds to the JSON property `formulaValue` + # @return [String] + attr_accessor :formula_value + + # Represents a double value. + # Note: Dates, Times and DateTimes are represented as doubles in + # "serial number" format. + # Corresponds to the JSON property `numberValue` + # @return [Float] + attr_accessor :number_value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @error_value = args[:error_value] if args.key?(:error_value) + @string_value = args[:string_value] if args.key?(:string_value) + @bool_value = args[:bool_value] if args.key?(:bool_value) + @formula_value = args[:formula_value] if args.key?(:formula_value) + @number_value = args[:number_value] if args.key?(:number_value) + end + end + + # Adds a chart to a sheet in the spreadsheet. + class AddChartRequest + include Google::Apis::Core::Hashable + + # A chart embedded in a sheet. + # Corresponds to the JSON property `chart` + # @return [Google::Apis::SheetsV4::EmbeddedChart] + attr_accessor :chart + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @chart = args[:chart] if args.key?(:chart) + end + end + + # Resource that represents a spreadsheet. + class Spreadsheet + include Google::Apis::Core::Hashable + + # Properties of a spreadsheet. + # Corresponds to the JSON property `properties` + # @return [Google::Apis::SheetsV4::SpreadsheetProperties] + attr_accessor :properties + + # The ID of the spreadsheet. + # This field is read-only. + # Corresponds to the JSON property `spreadsheetId` + # @return [String] + attr_accessor :spreadsheet_id + + # The sheets that are part of a spreadsheet. + # Corresponds to the JSON property `sheets` + # @return [Array] + attr_accessor :sheets + + # The named ranges defined in a spreadsheet. + # Corresponds to the JSON property `namedRanges` + # @return [Array] + attr_accessor :named_ranges + + # The url of the spreadsheet. + # This field is read-only. + # Corresponds to the JSON property `spreadsheetUrl` + # @return [String] + attr_accessor :spreadsheet_url + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @properties = args[:properties] if args.key?(:properties) + @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) + @sheets = args[:sheets] if args.key?(:sheets) + @named_ranges = args[:named_ranges] if args.key?(:named_ranges) + @spreadsheet_url = args[:spreadsheet_url] if args.key?(:spreadsheet_url) + end + end + + # The response when updating a range of values in a spreadsheet. + class BatchClearValuesResponse + include Google::Apis::Core::Hashable + + # The ranges that were cleared, in A1 notation. + # (If the requests were for an unbounded range or a ranger larger + # than the bounds of the sheet, this will be the actual ranges + # that were cleared, bounded to the sheet's limits.) + # Corresponds to the JSON property `clearedRanges` + # @return [Array] + attr_accessor :cleared_ranges + + # The spreadsheet the updates were applied to. + # Corresponds to the JSON property `spreadsheetId` + # @return [String] + attr_accessor :spreadsheet_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @cleared_ranges = args[:cleared_ranges] if args.key?(:cleared_ranges) + @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) + end + end + + # A banded (alternating colors) range in a sheet. + class BandedRange + include Google::Apis::Core::Hashable + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :range + + # The id of the banded range. + # Corresponds to the JSON property `bandedRangeId` + # @return [Fixnum] + attr_accessor :banded_range_id + + # Properties referring a single dimension (either row or column). If both + # BandedRange.row_properties and BandedRange.column_properties are + # set, the fill colors are applied to cells according to the following rules: + # * header_color and footer_color take priority over band colors. + # * first_band_color takes priority over second_band_color. + # * row_properties takes priority over column_properties. + # For example, the first row color takes priority over the first column + # color, but the first column color takes priority over the second row color. + # Similarly, the row header takes priority over the column header in the + # top left cell, but the column header takes priority over the first row + # color if the row header is not set. + # Corresponds to the JSON property `rowProperties` + # @return [Google::Apis::SheetsV4::BandingProperties] + attr_accessor :row_properties + + # Properties referring a single dimension (either row or column). If both + # BandedRange.row_properties and BandedRange.column_properties are + # set, the fill colors are applied to cells according to the following rules: + # * header_color and footer_color take priority over band colors. + # * first_band_color takes priority over second_band_color. + # * row_properties takes priority over column_properties. + # For example, the first row color takes priority over the first column + # color, but the first column color takes priority over the second row color. + # Similarly, the row header takes priority over the column header in the + # top left cell, but the column header takes priority over the first row + # color if the row header is not set. + # Corresponds to the JSON property `columnProperties` + # @return [Google::Apis::SheetsV4::BandingProperties] + attr_accessor :column_properties + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @range = args[:range] if args.key?(:range) + @banded_range_id = args[:banded_range_id] if args.key?(:banded_range_id) + @row_properties = args[:row_properties] if args.key?(:row_properties) + @column_properties = args[:column_properties] if args.key?(:column_properties) + end + end + + # Updates an existing protected range with the specified + # protectedRangeId. + class UpdateProtectedRangeRequest + include Google::Apis::Core::Hashable + + # A protected range. + # Corresponds to the JSON property `protectedRange` + # @return [Google::Apis::SheetsV4::ProtectedRange] + attr_accessor :protected_range # The fields that should be updated. At least one field must be specified. - # The root `bandedRange` is implied and should not be specified. + # The root `protectedRange` is implied and should not be specified. # A single `"*"` can be used as short-hand for listing every field. # Corresponds to the JSON property `fields` # @return [String] @@ -5047,19 +1910,152 @@ module Google # Update properties of this object def update!(**args) - @banded_range = args[:banded_range] if args.key?(:banded_range) + @protected_range = args[:protected_range] if args.key?(:protected_range) @fields = args[:fields] if args.key?(:fields) end end - # The data included in a domain or series. - class ChartData + # The format of a run of text in a cell. + # Absent values indicate that the field isn't specified. + class TextFormat include Google::Apis::Core::Hashable - # Source ranges for a chart. - # Corresponds to the JSON property `sourceRange` - # @return [Google::Apis::SheetsV4::ChartSourceRange] - attr_accessor :source_range + # True if the text is underlined. + # Corresponds to the JSON property `underline` + # @return [Boolean] + attr_accessor :underline + alias_method :underline?, :underline + + # Represents a color in the RGBA color space. This representation is designed + # for simplicity of conversion to/from color representations in various + # languages over compactness; for example, the fields of this representation + # can be trivially provided to the constructor of "java.awt.Color" in Java; it + # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" + # method in iOS; and, with just a little work, it can be easily formatted into + # a CSS "rgba()" string in JavaScript, as well. Here are some examples: + # Example (Java): + # import com.google.type.Color; + # // ... + # public static java.awt.Color fromProto(Color protocolor) ` + # float alpha = protocolor.hasAlpha() + # ? protocolor.getAlpha().getValue() + # : 1.0; + # return new java.awt.Color( + # protocolor.getRed(), + # protocolor.getGreen(), + # protocolor.getBlue(), + # alpha); + # ` + # public static Color toProto(java.awt.Color color) ` + # float red = (float) color.getRed(); + # float green = (float) color.getGreen(); + # float blue = (float) color.getBlue(); + # float denominator = 255.0; + # Color.Builder resultBuilder = + # Color + # .newBuilder() + # .setRed(red / denominator) + # .setGreen(green / denominator) + # .setBlue(blue / denominator); + # int alpha = color.getAlpha(); + # if (alpha != 255) ` + # result.setAlpha( + # FloatValue + # .newBuilder() + # .setValue(((float) alpha) / denominator) + # .build()); + # ` + # return resultBuilder.build(); + # ` + # // ... + # Example (iOS / Obj-C): + # // ... + # static UIColor* fromProto(Color* protocolor) ` + # float red = [protocolor red]; + # float green = [protocolor green]; + # float blue = [protocolor blue]; + # FloatValue* alpha_wrapper = [protocolor alpha]; + # float alpha = 1.0; + # if (alpha_wrapper != nil) ` + # alpha = [alpha_wrapper value]; + # ` + # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; + # ` + # static Color* toProto(UIColor* color) ` + # CGFloat red, green, blue, alpha; + # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` + # return nil; + # ` + # Color* result = [Color alloc] init]; + # [result setRed:red]; + # [result setGreen:green]; + # [result setBlue:blue]; + # if (alpha <= 0.9999) ` + # [result setAlpha:floatWrapperWithValue(alpha)]; + # ` + # [result autorelease]; + # return result; + # ` + # // ... + # Example (JavaScript): + # // ... + # var protoToCssColor = function(rgb_color) ` + # var redFrac = rgb_color.red || 0.0; + # var greenFrac = rgb_color.green || 0.0; + # var blueFrac = rgb_color.blue || 0.0; + # var red = Math.floor(redFrac * 255); + # var green = Math.floor(greenFrac * 255); + # var blue = Math.floor(blueFrac * 255); + # if (!('alpha' in rgb_color)) ` + # return rgbToCssColor_(red, green, blue); + # ` + # var alphaFrac = rgb_color.alpha.value || 0.0; + # var rgbParams = [red, green, blue].join(','); + # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); + # `; + # var rgbToCssColor_ = function(red, green, blue) ` + # var rgbNumber = new Number((red << 16) | (green << 8) | blue); + # var hexString = rgbNumber.toString(16); + # var missingZeros = 6 - hexString.length; + # var resultBuilder = ['#']; + # for (var i = 0; i < missingZeros; i++) ` + # resultBuilder.push('0'); + # ` + # resultBuilder.push(hexString); + # return resultBuilder.join(''); + # `; + # // ... + # Corresponds to the JSON property `foregroundColor` + # @return [Google::Apis::SheetsV4::Color] + attr_accessor :foreground_color + + # True if the text is bold. + # Corresponds to the JSON property `bold` + # @return [Boolean] + attr_accessor :bold + alias_method :bold?, :bold + + # The font family. + # Corresponds to the JSON property `fontFamily` + # @return [String] + attr_accessor :font_family + + # True if the text is italicized. + # Corresponds to the JSON property `italic` + # @return [Boolean] + attr_accessor :italic + alias_method :italic?, :italic + + # True if the text has a strikethrough. + # Corresponds to the JSON property `strikethrough` + # @return [Boolean] + attr_accessor :strikethrough + alias_method :strikethrough?, :strikethrough + + # The size of the font. + # Corresponds to the JSON property `fontSize` + # @return [Fixnum] + attr_accessor :font_size def initialize(**args) update!(**args) @@ -5067,12 +2063,18 @@ module Google # Update properties of this object def update!(**args) - @source_range = args[:source_range] if args.key?(:source_range) + @underline = args[:underline] if args.key?(:underline) + @foreground_color = args[:foreground_color] if args.key?(:foreground_color) + @bold = args[:bold] if args.key?(:bold) + @font_family = args[:font_family] if args.key?(:font_family) + @italic = args[:italic] if args.key?(:italic) + @strikethrough = args[:strikethrough] if args.key?(:strikethrough) + @font_size = args[:font_size] if args.key?(:font_size) end end - # A sheet in a spreadsheet. - class Sheet + # The result of adding a sheet. + class AddSheetResponse include Google::Apis::Core::Hashable # Properties of a sheet. @@ -5080,53 +2082,6 @@ module Google # @return [Google::Apis::SheetsV4::SheetProperties] attr_accessor :properties - # The specifications of every chart on this sheet. - # Corresponds to the JSON property `charts` - # @return [Array] - attr_accessor :charts - - # The filter views in this sheet. - # Corresponds to the JSON property `filterViews` - # @return [Array] - attr_accessor :filter_views - - # The conditional format rules in this sheet. - # Corresponds to the JSON property `conditionalFormats` - # @return [Array] - attr_accessor :conditional_formats - - # The protected ranges in this sheet. - # Corresponds to the JSON property `protectedRanges` - # @return [Array] - attr_accessor :protected_ranges - - # The default filter associated with a sheet. - # Corresponds to the JSON property `basicFilter` - # @return [Google::Apis::SheetsV4::BasicFilter] - attr_accessor :basic_filter - - # The ranges that are merged together. - # Corresponds to the JSON property `merges` - # @return [Array] - attr_accessor :merges - - # Data in the grid, if this is a grid sheet. - # The number of GridData objects returned is dependent on the number of - # ranges requested on this sheet. For example, if this is representing - # `Sheet1`, and the spreadsheet was requested with ranges - # `Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will have a - # startRow/startColumn of `0`, - # while the second one will have `startRow 14` (zero-based row 15), - # and `startColumn 3` (zero-based column D). - # Corresponds to the JSON property `data` - # @return [Array] - attr_accessor :data - - # The banded (i.e. alternating colors) ranges on this sheet. - # Corresponds to the JSON property `bandedRanges` - # @return [Array] - attr_accessor :banded_ranges - def initialize(**args) update!(**args) end @@ -5134,30 +2089,554 @@ module Google # Update properties of this object def update!(**args) @properties = args[:properties] if args.key?(:properties) - @charts = args[:charts] if args.key?(:charts) - @filter_views = args[:filter_views] if args.key?(:filter_views) - @conditional_formats = args[:conditional_formats] if args.key?(:conditional_formats) - @protected_ranges = args[:protected_ranges] if args.key?(:protected_ranges) - @basic_filter = args[:basic_filter] if args.key?(:basic_filter) - @merges = args[:merges] if args.key?(:merges) - @data = args[:data] if args.key?(:data) - @banded_ranges = args[:banded_ranges] if args.key?(:banded_ranges) end end - # Copies data from the source to the destination. - class CopyPasteRequest + # The result of adding a filter view. + class AddFilterViewResponse include Google::Apis::Core::Hashable - # What kind of data to paste. - # Corresponds to the JSON property `pasteType` - # @return [String] - attr_accessor :paste_type + # A filter view. + # Corresponds to the JSON property `filter` + # @return [Google::Apis::SheetsV4::FilterView] + attr_accessor :filter - # How that data should be oriented when pasting. - # Corresponds to the JSON property `pasteOrientation` + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @filter = args[:filter] if args.key?(:filter) + end + end + + # The location an object is overlaid on top of a grid. + class OverlayPosition + include Google::Apis::Core::Hashable + + # The width of the object, in pixels. Defaults to 600. + # Corresponds to the JSON property `widthPixels` + # @return [Fixnum] + attr_accessor :width_pixels + + # The horizontal offset, in pixels, that the object is offset + # from the anchor cell. + # Corresponds to the JSON property `offsetXPixels` + # @return [Fixnum] + attr_accessor :offset_x_pixels + + # A coordinate in a sheet. + # All indexes are zero-based. + # Corresponds to the JSON property `anchorCell` + # @return [Google::Apis::SheetsV4::GridCoordinate] + attr_accessor :anchor_cell + + # The vertical offset, in pixels, that the object is offset + # from the anchor cell. + # Corresponds to the JSON property `offsetYPixels` + # @return [Fixnum] + attr_accessor :offset_y_pixels + + # The height of the object, in pixels. Defaults to 371. + # Corresponds to the JSON property `heightPixels` + # @return [Fixnum] + attr_accessor :height_pixels + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @width_pixels = args[:width_pixels] if args.key?(:width_pixels) + @offset_x_pixels = args[:offset_x_pixels] if args.key?(:offset_x_pixels) + @anchor_cell = args[:anchor_cell] if args.key?(:anchor_cell) + @offset_y_pixels = args[:offset_y_pixels] if args.key?(:offset_y_pixels) + @height_pixels = args[:height_pixels] if args.key?(:height_pixels) + end + end + + # Properties of a spreadsheet. + class SpreadsheetProperties + include Google::Apis::Core::Hashable + + # The locale of the spreadsheet in one of the following formats: + # * an ISO 639-1 language code such as `en` + # * an ISO 639-2 language code such as `fil`, if no 639-1 code exists + # * a combination of the ISO language code and country code, such as `en_US` + # Note: when updating this field, not all locales/languages are supported. + # Corresponds to the JSON property `locale` # @return [String] - attr_accessor :paste_orientation + attr_accessor :locale + + # The amount of time to wait before volatile functions are recalculated. + # Corresponds to the JSON property `autoRecalc` + # @return [String] + attr_accessor :auto_recalc + + # The format of a cell. + # Corresponds to the JSON property `defaultFormat` + # @return [Google::Apis::SheetsV4::CellFormat] + attr_accessor :default_format + + # The title of the spreadsheet. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # The time zone of the spreadsheet, in CLDR format such as + # `America/New_York`. If the time zone isn't recognized, this may + # be a custom time zone such as `GMT-07:00`. + # Corresponds to the JSON property `timeZone` + # @return [String] + attr_accessor :time_zone + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @locale = args[:locale] if args.key?(:locale) + @auto_recalc = args[:auto_recalc] if args.key?(:auto_recalc) + @default_format = args[:default_format] if args.key?(:default_format) + @title = args[:title] if args.key?(:title) + @time_zone = args[:time_zone] if args.key?(:time_zone) + end + end + + # Updates all cells in the range to the values in the given Cell object. + # Only the fields listed in the fields field are updated; others are + # unchanged. + # If writing a cell with a formula, the formula's ranges will automatically + # increment for each field in the range. + # For example, if writing a cell with formula `=A1` into range B2:C4, + # B2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`, + # C2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`. + # To keep the formula's ranges static, use the `$` indicator. + # For example, use the formula `=$A$1` to prevent both the row and the + # column from incrementing. + class RepeatCellRequest + include Google::Apis::Core::Hashable + + # The fields that should be updated. At least one field must be specified. + # The root `cell` is implied and should not be specified. + # A single `"*"` can be used as short-hand for listing every field. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + # Data about a specific cell. + # Corresponds to the JSON property `cell` + # @return [Google::Apis::SheetsV4::CellData] + attr_accessor :cell + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @fields = args[:fields] if args.key?(:fields) + @cell = args[:cell] if args.key?(:cell) + @range = args[:range] if args.key?(:range) + end + end + + # The result of adding a chart to a spreadsheet. + class AddChartResponse + include Google::Apis::Core::Hashable + + # A chart embedded in a sheet. + # Corresponds to the JSON property `chart` + # @return [Google::Apis::SheetsV4::EmbeddedChart] + attr_accessor :chart + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @chart = args[:chart] if args.key?(:chart) + end + end + + # Inserts rows or columns in a sheet at a particular index. + class InsertDimensionRequest + include Google::Apis::Core::Hashable + + # Whether dimension properties should be extended from the dimensions + # before or after the newly inserted dimensions. + # True to inherit from the dimensions before (in which case the start + # index must be greater than 0), and false to inherit from the dimensions + # after. + # For example, if row index 0 has red background and row index 1 + # has a green background, then inserting 2 rows at index 1 can inherit + # either the green or red background. If `inheritFromBefore` is true, + # the two new rows will be red (because the row before the insertion point + # was red), whereas if `inheritFromBefore` is false, the two new rows will + # be green (because the row after the insertion point was green). + # Corresponds to the JSON property `inheritFromBefore` + # @return [Boolean] + attr_accessor :inherit_from_before + alias_method :inherit_from_before?, :inherit_from_before + + # A range along a single dimension on a sheet. + # All indexes are zero-based. + # Indexes are half open: the start index is inclusive + # and the end index is exclusive. + # Missing indexes indicate the range is unbounded on that side. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::DimensionRange] + attr_accessor :range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @inherit_from_before = args[:inherit_from_before] if args.key?(:inherit_from_before) + @range = args[:range] if args.key?(:range) + end + end + + # Updates properties of a spreadsheet. + class UpdateSpreadsheetPropertiesRequest + include Google::Apis::Core::Hashable + + # Properties of a spreadsheet. + # Corresponds to the JSON property `properties` + # @return [Google::Apis::SheetsV4::SpreadsheetProperties] + attr_accessor :properties + + # The fields that should be updated. At least one field must be specified. + # The root 'properties' is implied and should not be specified. + # A single `"*"` can be used as short-hand for listing every field. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @properties = args[:properties] if args.key?(:properties) + @fields = args[:fields] if args.key?(:fields) + end + end + + # A protected range. + class ProtectedRange + include Google::Apis::Core::Hashable + + # The description of this protected range. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The list of unprotected ranges within a protected sheet. + # Unprotected ranges are only supported on protected sheets. + # Corresponds to the JSON property `unprotectedRanges` + # @return [Array] + attr_accessor :unprotected_ranges + + # The named range this protected range is backed by, if any. + # When writing, only one of range or named_range_id + # may be set. + # Corresponds to the JSON property `namedRangeId` + # @return [String] + attr_accessor :named_range_id + + # The ID of the protected range. + # This field is read-only. + # Corresponds to the JSON property `protectedRangeId` + # @return [Fixnum] + attr_accessor :protected_range_id + + # True if this protected range will show a warning when editing. + # Warning-based protection means that every user can edit data in the + # protected range, except editing will prompt a warning asking the user + # to confirm the edit. + # When writing: if this field is true, then editors is ignored. + # Additionally, if this field is changed from true to false and the + # `editors` field is not set (nor included in the field mask), then + # the editors will be set to all the editors in the document. + # Corresponds to the JSON property `warningOnly` + # @return [Boolean] + attr_accessor :warning_only + alias_method :warning_only?, :warning_only + + # True if the user who requested this protected range can edit the + # protected area. + # This field is read-only. + # Corresponds to the JSON property `requestingUserCanEdit` + # @return [Boolean] + attr_accessor :requesting_user_can_edit + alias_method :requesting_user_can_edit?, :requesting_user_can_edit + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :range + + # The editors of a protected range. + # Corresponds to the JSON property `editors` + # @return [Google::Apis::SheetsV4::Editors] + attr_accessor :editors + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @description = args[:description] if args.key?(:description) + @unprotected_ranges = args[:unprotected_ranges] if args.key?(:unprotected_ranges) + @named_range_id = args[:named_range_id] if args.key?(:named_range_id) + @protected_range_id = args[:protected_range_id] if args.key?(:protected_range_id) + @warning_only = args[:warning_only] if args.key?(:warning_only) + @requesting_user_can_edit = args[:requesting_user_can_edit] if args.key?(:requesting_user_can_edit) + @range = args[:range] if args.key?(:range) + @editors = args[:editors] if args.key?(:editors) + end + end + + # The request for updating more than one range of values in a spreadsheet. + class BatchUpdateValuesRequest + include Google::Apis::Core::Hashable + + # How the input data should be interpreted. + # Corresponds to the JSON property `valueInputOption` + # @return [String] + attr_accessor :value_input_option + + # The new values to apply to the spreadsheet. + # Corresponds to the JSON property `data` + # @return [Array] + attr_accessor :data + + # Determines how dates, times, and durations in the response should be + # rendered. This is ignored if response_value_render_option is + # FORMATTED_VALUE. + # The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER]. + # Corresponds to the JSON property `responseDateTimeRenderOption` + # @return [String] + attr_accessor :response_date_time_render_option + + # Determines how values in the response should be rendered. + # The default render option is ValueRenderOption.FORMATTED_VALUE. + # Corresponds to the JSON property `responseValueRenderOption` + # @return [String] + attr_accessor :response_value_render_option + + # Determines if the update response should include the values + # of the cells that were updated. By default, responses + # do not include the updated values. The `updatedData` field within + # each of the BatchUpdateValuesResponse.responses will contain + # the updated values. If the range to write was larger than than the range + # actually written, the response will include all values in the requested + # range (excluding trailing empty rows and columns). + # Corresponds to the JSON property `includeValuesInResponse` + # @return [Boolean] + attr_accessor :include_values_in_response + alias_method :include_values_in_response?, :include_values_in_response + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @value_input_option = args[:value_input_option] if args.key?(:value_input_option) + @data = args[:data] if args.key?(:data) + @response_date_time_render_option = args[:response_date_time_render_option] if args.key?(:response_date_time_render_option) + @response_value_render_option = args[:response_value_render_option] if args.key?(:response_value_render_option) + @include_values_in_response = args[:include_values_in_response] if args.key?(:include_values_in_response) + end + end + + # Properties about a dimension. + class DimensionProperties + include Google::Apis::Core::Hashable + + # The height (if a row) or width (if a column) of the dimension in pixels. + # Corresponds to the JSON property `pixelSize` + # @return [Fixnum] + attr_accessor :pixel_size + + # True if this dimension is being filtered. + # This field is read-only. + # Corresponds to the JSON property `hiddenByFilter` + # @return [Boolean] + attr_accessor :hidden_by_filter + alias_method :hidden_by_filter?, :hidden_by_filter + + # True if this dimension is explicitly hidden. + # Corresponds to the JSON property `hiddenByUser` + # @return [Boolean] + attr_accessor :hidden_by_user + alias_method :hidden_by_user?, :hidden_by_user + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @pixel_size = args[:pixel_size] if args.key?(:pixel_size) + @hidden_by_filter = args[:hidden_by_filter] if args.key?(:hidden_by_filter) + @hidden_by_user = args[:hidden_by_user] if args.key?(:hidden_by_user) + end + end + + # A named range. + class NamedRange + include Google::Apis::Core::Hashable + + # The name of the named range. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The ID of the named range. + # Corresponds to the JSON property `namedRangeId` + # @return [String] + attr_accessor :named_range_id + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + @named_range_id = args[:named_range_id] if args.key?(:named_range_id) + @range = args[:range] if args.key?(:range) + end + end + + # A range along a single dimension on a sheet. + # All indexes are zero-based. + # Indexes are half open: the start index is inclusive + # and the end index is exclusive. + # Missing indexes indicate the range is unbounded on that side. + class DimensionRange + include Google::Apis::Core::Hashable + + # The sheet this span is on. + # Corresponds to the JSON property `sheetId` + # @return [Fixnum] + attr_accessor :sheet_id + + # The dimension of the span. + # Corresponds to the JSON property `dimension` + # @return [String] + attr_accessor :dimension + + # The start (inclusive) of the span, or not set if unbounded. + # Corresponds to the JSON property `startIndex` + # @return [Fixnum] + attr_accessor :start_index + + # The end (exclusive) of the span, or not set if unbounded. + # Corresponds to the JSON property `endIndex` + # @return [Fixnum] + attr_accessor :end_index + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @sheet_id = args[:sheet_id] if args.key?(:sheet_id) + @dimension = args[:dimension] if args.key?(:dimension) + @start_index = args[:start_index] if args.key?(:start_index) + @end_index = args[:end_index] if args.key?(:end_index) + end + end + + # Moves data from the source to the destination. + class CutPasteRequest + include Google::Apis::Core::Hashable # A range on a sheet. # All indexes are zero-based. @@ -5185,6 +2664,177 @@ module Google # @return [Google::Apis::SheetsV4::GridRange] attr_accessor :source + # What kind of data to paste. All the source data will be cut, regardless + # of what is pasted. + # Corresponds to the JSON property `pasteType` + # @return [String] + attr_accessor :paste_type + + # A coordinate in a sheet. + # All indexes are zero-based. + # Corresponds to the JSON property `destination` + # @return [Google::Apis::SheetsV4::GridCoordinate] + attr_accessor :destination + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @source = args[:source] if args.key?(:source) + @paste_type = args[:paste_type] if args.key?(:paste_type) + @destination = args[:destination] if args.key?(:destination) + end + end + + # The borders of the cell. + class Borders + include Google::Apis::Core::Hashable + + # A border along a cell. + # Corresponds to the JSON property `bottom` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :bottom + + # A border along a cell. + # Corresponds to the JSON property `top` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :top + + # A border along a cell. + # Corresponds to the JSON property `left` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :left + + # A border along a cell. + # Corresponds to the JSON property `right` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :right + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @bottom = args[:bottom] if args.key?(:bottom) + @top = args[:top] if args.key?(:top) + @left = args[:left] if args.key?(:left) + @right = args[:right] if args.key?(:right) + end + end + + # A single series of data in a chart. + # For example, if charting stock prices over time, multiple series may exist, + # one for the "Open Price", "High Price", "Low Price" and "Close Price". + class BasicChartSeries + include Google::Apis::Core::Hashable + + # The data included in a domain or series. + # Corresponds to the JSON property `series` + # @return [Google::Apis::SheetsV4::ChartData] + attr_accessor :series + + # The type of this series. Valid only if the + # chartType is + # COMBO. + # Different types will change the way the series is visualized. + # Only LINE, AREA, + # and COLUMN are supported. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The minor axis that will specify the range of values for this series. + # For example, if charting stocks over time, the "Volume" series + # may want to be pinned to the right with the prices pinned to the left, + # because the scale of trading volume is different than the scale of + # prices. + # It is an error to specify an axis that isn't a valid minor axis + # for the chart's type. + # Corresponds to the JSON property `targetAxis` + # @return [String] + attr_accessor :target_axis + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @series = args[:series] if args.key?(:series) + @type = args[:type] if args.key?(:type) + @target_axis = args[:target_axis] if args.key?(:target_axis) + end + end + + # Automatically resizes one or more dimensions based on the contents + # of the cells in that dimension. + class AutoResizeDimensionsRequest + include Google::Apis::Core::Hashable + + # A range along a single dimension on a sheet. + # All indexes are zero-based. + # Indexes are half open: the start index is inclusive + # and the end index is exclusive. + # Missing indexes indicate the range is unbounded on that side. + # Corresponds to the JSON property `dimensions` + # @return [Google::Apis::SheetsV4::DimensionRange] + attr_accessor :dimensions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @dimensions = args[:dimensions] if args.key?(:dimensions) + end + end + + # Updates the borders of a range. + # If a field is not set in the request, that means the border remains as-is. + # For example, with two subsequent UpdateBordersRequest: + # 1. range: A1:A5 `` top: RED, bottom: WHITE `` + # 2. range: A1:A5 `` left: BLUE `` + # That would result in A1:A5 having a borders of + # `` top: RED, bottom: WHITE, left: BLUE ``. + # If you want to clear a border, explicitly set the style to + # NONE. + class UpdateBordersRequest + include Google::Apis::Core::Hashable + + # A border along a cell. + # Corresponds to the JSON property `innerHorizontal` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :inner_horizontal + + # A border along a cell. + # Corresponds to the JSON property `top` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :top + + # A border along a cell. + # Corresponds to the JSON property `left` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :left + + # A border along a cell. + # Corresponds to the JSON property `bottom` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :bottom + + # A border along a cell. + # Corresponds to the JSON property `innerVertical` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :inner_vertical + + # A border along a cell. + # Corresponds to the JSON property `right` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :right + # A range on a sheet. # All indexes are zero-based. # Indexes are half open, e.g the start index is inclusive @@ -5207,9 +2857,9 @@ module Google # If the start index equals the end index, then the range is empty. # Empty ranges are typically not meaningful and are usually rendered in the # UI as `#REF!`. - # Corresponds to the JSON property `destination` + # Corresponds to the JSON property `range` # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :destination + attr_accessor :range def initialize(**args) update!(**args) @@ -5217,10 +2867,1314 @@ module Google # Update properties of this object def update!(**args) - @paste_type = args[:paste_type] if args.key?(:paste_type) - @paste_orientation = args[:paste_orientation] if args.key?(:paste_orientation) + @inner_horizontal = args[:inner_horizontal] if args.key?(:inner_horizontal) + @top = args[:top] if args.key?(:top) + @left = args[:left] if args.key?(:left) + @bottom = args[:bottom] if args.key?(:bottom) + @inner_vertical = args[:inner_vertical] if args.key?(:inner_vertical) + @right = args[:right] if args.key?(:right) + @range = args[:range] if args.key?(:range) + end + end + + # The format of a cell. + class CellFormat + include Google::Apis::Core::Hashable + + # How a hyperlink, if it exists, should be displayed in the cell. + # Corresponds to the JSON property `hyperlinkDisplayType` + # @return [String] + attr_accessor :hyperlink_display_type + + # The horizontal alignment of the value in the cell. + # Corresponds to the JSON property `horizontalAlignment` + # @return [String] + attr_accessor :horizontal_alignment + + # The format of a run of text in a cell. + # Absent values indicate that the field isn't specified. + # Corresponds to the JSON property `textFormat` + # @return [Google::Apis::SheetsV4::TextFormat] + attr_accessor :text_format + + # Represents a color in the RGBA color space. This representation is designed + # for simplicity of conversion to/from color representations in various + # languages over compactness; for example, the fields of this representation + # can be trivially provided to the constructor of "java.awt.Color" in Java; it + # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" + # method in iOS; and, with just a little work, it can be easily formatted into + # a CSS "rgba()" string in JavaScript, as well. Here are some examples: + # Example (Java): + # import com.google.type.Color; + # // ... + # public static java.awt.Color fromProto(Color protocolor) ` + # float alpha = protocolor.hasAlpha() + # ? protocolor.getAlpha().getValue() + # : 1.0; + # return new java.awt.Color( + # protocolor.getRed(), + # protocolor.getGreen(), + # protocolor.getBlue(), + # alpha); + # ` + # public static Color toProto(java.awt.Color color) ` + # float red = (float) color.getRed(); + # float green = (float) color.getGreen(); + # float blue = (float) color.getBlue(); + # float denominator = 255.0; + # Color.Builder resultBuilder = + # Color + # .newBuilder() + # .setRed(red / denominator) + # .setGreen(green / denominator) + # .setBlue(blue / denominator); + # int alpha = color.getAlpha(); + # if (alpha != 255) ` + # result.setAlpha( + # FloatValue + # .newBuilder() + # .setValue(((float) alpha) / denominator) + # .build()); + # ` + # return resultBuilder.build(); + # ` + # // ... + # Example (iOS / Obj-C): + # // ... + # static UIColor* fromProto(Color* protocolor) ` + # float red = [protocolor red]; + # float green = [protocolor green]; + # float blue = [protocolor blue]; + # FloatValue* alpha_wrapper = [protocolor alpha]; + # float alpha = 1.0; + # if (alpha_wrapper != nil) ` + # alpha = [alpha_wrapper value]; + # ` + # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; + # ` + # static Color* toProto(UIColor* color) ` + # CGFloat red, green, blue, alpha; + # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` + # return nil; + # ` + # Color* result = [Color alloc] init]; + # [result setRed:red]; + # [result setGreen:green]; + # [result setBlue:blue]; + # if (alpha <= 0.9999) ` + # [result setAlpha:floatWrapperWithValue(alpha)]; + # ` + # [result autorelease]; + # return result; + # ` + # // ... + # Example (JavaScript): + # // ... + # var protoToCssColor = function(rgb_color) ` + # var redFrac = rgb_color.red || 0.0; + # var greenFrac = rgb_color.green || 0.0; + # var blueFrac = rgb_color.blue || 0.0; + # var red = Math.floor(redFrac * 255); + # var green = Math.floor(greenFrac * 255); + # var blue = Math.floor(blueFrac * 255); + # if (!('alpha' in rgb_color)) ` + # return rgbToCssColor_(red, green, blue); + # ` + # var alphaFrac = rgb_color.alpha.value || 0.0; + # var rgbParams = [red, green, blue].join(','); + # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); + # `; + # var rgbToCssColor_ = function(red, green, blue) ` + # var rgbNumber = new Number((red << 16) | (green << 8) | blue); + # var hexString = rgbNumber.toString(16); + # var missingZeros = 6 - hexString.length; + # var resultBuilder = ['#']; + # for (var i = 0; i < missingZeros; i++) ` + # resultBuilder.push('0'); + # ` + # resultBuilder.push(hexString); + # return resultBuilder.join(''); + # `; + # // ... + # Corresponds to the JSON property `backgroundColor` + # @return [Google::Apis::SheetsV4::Color] + attr_accessor :background_color + + # The amount of padding around the cell, in pixels. + # When updating padding, every field must be specified. + # Corresponds to the JSON property `padding` + # @return [Google::Apis::SheetsV4::Padding] + attr_accessor :padding + + # The vertical alignment of the value in the cell. + # Corresponds to the JSON property `verticalAlignment` + # @return [String] + attr_accessor :vertical_alignment + + # The borders of the cell. + # Corresponds to the JSON property `borders` + # @return [Google::Apis::SheetsV4::Borders] + attr_accessor :borders + + # The direction of the text in the cell. + # Corresponds to the JSON property `textDirection` + # @return [String] + attr_accessor :text_direction + + # The wrap strategy for the value in the cell. + # Corresponds to the JSON property `wrapStrategy` + # @return [String] + attr_accessor :wrap_strategy + + # The number format of a cell. + # Corresponds to the JSON property `numberFormat` + # @return [Google::Apis::SheetsV4::NumberFormat] + attr_accessor :number_format + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @hyperlink_display_type = args[:hyperlink_display_type] if args.key?(:hyperlink_display_type) + @horizontal_alignment = args[:horizontal_alignment] if args.key?(:horizontal_alignment) + @text_format = args[:text_format] if args.key?(:text_format) + @background_color = args[:background_color] if args.key?(:background_color) + @padding = args[:padding] if args.key?(:padding) + @vertical_alignment = args[:vertical_alignment] if args.key?(:vertical_alignment) + @borders = args[:borders] if args.key?(:borders) + @text_direction = args[:text_direction] if args.key?(:text_direction) + @wrap_strategy = args[:wrap_strategy] if args.key?(:wrap_strategy) + @number_format = args[:number_format] if args.key?(:number_format) + end + end + + # The response when clearing a range of values in a spreadsheet. + class ClearValuesResponse + include Google::Apis::Core::Hashable + + # The spreadsheet the updates were applied to. + # Corresponds to the JSON property `spreadsheetId` + # @return [String] + attr_accessor :spreadsheet_id + + # The range (in A1 notation) that was cleared. + # (If the request was for an unbounded range or a ranger larger + # than the bounds of the sheet, this will be the actual range + # that was cleared, bounded to the sheet's limits.) + # Corresponds to the JSON property `clearedRange` + # @return [String] + attr_accessor :cleared_range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) + @cleared_range = args[:cleared_range] if args.key?(:cleared_range) + end + end + + # Deletes a conditional format rule at the given index. + # All subsequent rules' indexes are decremented. + class DeleteConditionalFormatRuleRequest + include Google::Apis::Core::Hashable + + # The zero-based index of the rule to be deleted. + # Corresponds to the JSON property `index` + # @return [Fixnum] + attr_accessor :index + + # The sheet the rule is being deleted from. + # Corresponds to the JSON property `sheetId` + # @return [Fixnum] + attr_accessor :sheet_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @index = args[:index] if args.key?(:index) + @sheet_id = args[:sheet_id] if args.key?(:sheet_id) + end + end + + # The result of adding a banded range. + class AddBandingResponse + include Google::Apis::Core::Hashable + + # A banded (alternating colors) range in a sheet. + # Corresponds to the JSON property `bandedRange` + # @return [Google::Apis::SheetsV4::BandedRange] + attr_accessor :banded_range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @banded_range = args[:banded_range] if args.key?(:banded_range) + end + end + + # Removes the named range with the given ID from the spreadsheet. + class DeleteNamedRangeRequest + include Google::Apis::Core::Hashable + + # The ID of the named range to delete. + # Corresponds to the JSON property `namedRangeId` + # @return [String] + attr_accessor :named_range_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @named_range_id = args[:named_range_id] if args.key?(:named_range_id) + end + end + + # The data included in a domain or series. + class ChartData + include Google::Apis::Core::Hashable + + # Source ranges for a chart. + # Corresponds to the JSON property `sourceRange` + # @return [Google::Apis::SheetsV4::ChartSourceRange] + attr_accessor :source_range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @source_range = args[:source_range] if args.key?(:source_range) + end + end + + # The response when retrieving more than one range of values in a spreadsheet. + class BatchGetValuesResponse + include Google::Apis::Core::Hashable + + # The ID of the spreadsheet the data was retrieved from. + # Corresponds to the JSON property `spreadsheetId` + # @return [String] + attr_accessor :spreadsheet_id + + # The requested values. The order of the ValueRanges is the same as the + # order of the requested ranges. + # Corresponds to the JSON property `valueRanges` + # @return [Array] + attr_accessor :value_ranges + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) + @value_ranges = args[:value_ranges] if args.key?(:value_ranges) + end + end + + # Updates properties of the supplied banded range. + class UpdateBandingRequest + include Google::Apis::Core::Hashable + + # The fields that should be updated. At least one field must be specified. + # The root `bandedRange` is implied and should not be specified. + # A single `"*"` can be used as short-hand for listing every field. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + # A banded (alternating colors) range in a sheet. + # Corresponds to the JSON property `bandedRange` + # @return [Google::Apis::SheetsV4::BandedRange] + attr_accessor :banded_range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @fields = args[:fields] if args.key?(:fields) + @banded_range = args[:banded_range] if args.key?(:banded_range) + end + end + + # Represents a color in the RGBA color space. This representation is designed + # for simplicity of conversion to/from color representations in various + # languages over compactness; for example, the fields of this representation + # can be trivially provided to the constructor of "java.awt.Color" in Java; it + # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" + # method in iOS; and, with just a little work, it can be easily formatted into + # a CSS "rgba()" string in JavaScript, as well. Here are some examples: + # Example (Java): + # import com.google.type.Color; + # // ... + # public static java.awt.Color fromProto(Color protocolor) ` + # float alpha = protocolor.hasAlpha() + # ? protocolor.getAlpha().getValue() + # : 1.0; + # return new java.awt.Color( + # protocolor.getRed(), + # protocolor.getGreen(), + # protocolor.getBlue(), + # alpha); + # ` + # public static Color toProto(java.awt.Color color) ` + # float red = (float) color.getRed(); + # float green = (float) color.getGreen(); + # float blue = (float) color.getBlue(); + # float denominator = 255.0; + # Color.Builder resultBuilder = + # Color + # .newBuilder() + # .setRed(red / denominator) + # .setGreen(green / denominator) + # .setBlue(blue / denominator); + # int alpha = color.getAlpha(); + # if (alpha != 255) ` + # result.setAlpha( + # FloatValue + # .newBuilder() + # .setValue(((float) alpha) / denominator) + # .build()); + # ` + # return resultBuilder.build(); + # ` + # // ... + # Example (iOS / Obj-C): + # // ... + # static UIColor* fromProto(Color* protocolor) ` + # float red = [protocolor red]; + # float green = [protocolor green]; + # float blue = [protocolor blue]; + # FloatValue* alpha_wrapper = [protocolor alpha]; + # float alpha = 1.0; + # if (alpha_wrapper != nil) ` + # alpha = [alpha_wrapper value]; + # ` + # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; + # ` + # static Color* toProto(UIColor* color) ` + # CGFloat red, green, blue, alpha; + # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` + # return nil; + # ` + # Color* result = [Color alloc] init]; + # [result setRed:red]; + # [result setGreen:green]; + # [result setBlue:blue]; + # if (alpha <= 0.9999) ` + # [result setAlpha:floatWrapperWithValue(alpha)]; + # ` + # [result autorelease]; + # return result; + # ` + # // ... + # Example (JavaScript): + # // ... + # var protoToCssColor = function(rgb_color) ` + # var redFrac = rgb_color.red || 0.0; + # var greenFrac = rgb_color.green || 0.0; + # var blueFrac = rgb_color.blue || 0.0; + # var red = Math.floor(redFrac * 255); + # var green = Math.floor(greenFrac * 255); + # var blue = Math.floor(blueFrac * 255); + # if (!('alpha' in rgb_color)) ` + # return rgbToCssColor_(red, green, blue); + # ` + # var alphaFrac = rgb_color.alpha.value || 0.0; + # var rgbParams = [red, green, blue].join(','); + # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); + # `; + # var rgbToCssColor_ = function(red, green, blue) ` + # var rgbNumber = new Number((red << 16) | (green << 8) | blue); + # var hexString = rgbNumber.toString(16); + # var missingZeros = 6 - hexString.length; + # var resultBuilder = ['#']; + # for (var i = 0; i < missingZeros; i++) ` + # resultBuilder.push('0'); + # ` + # resultBuilder.push(hexString); + # return resultBuilder.join(''); + # `; + # // ... + class Color + include Google::Apis::Core::Hashable + + # The amount of red in the color as a value in the interval [0, 1]. + # Corresponds to the JSON property `red` + # @return [Float] + attr_accessor :red + + # The amount of green in the color as a value in the interval [0, 1]. + # Corresponds to the JSON property `green` + # @return [Float] + attr_accessor :green + + # The amount of blue in the color as a value in the interval [0, 1]. + # Corresponds to the JSON property `blue` + # @return [Float] + attr_accessor :blue + + # The fraction of this color that should be applied to the pixel. That is, + # the final pixel color is defined by the equation: + # pixel color = alpha * (this color) + (1.0 - alpha) * (background color) + # This means that a value of 1.0 corresponds to a solid color, whereas + # a value of 0.0 corresponds to a completely transparent color. This + # uses a wrapper message rather than a simple float scalar so that it is + # possible to distinguish between a default value and the value being unset. + # If omitted, this color object is to be rendered as a solid color + # (as if the alpha value had been explicitly given with a value of 1.0). + # Corresponds to the JSON property `alpha` + # @return [Float] + attr_accessor :alpha + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @red = args[:red] if args.key?(:red) + @green = args[:green] if args.key?(:green) + @blue = args[:blue] if args.key?(:blue) + @alpha = args[:alpha] if args.key?(:alpha) + end + end + + # A single grouping (either row or column) in a pivot table. + class PivotGroup + include Google::Apis::Core::Hashable + + # The column offset of the source range that this grouping is based on. + # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0` + # means this group refers to column `C`, whereas the offset `1` would refer + # to column `D`. + # Corresponds to the JSON property `sourceColumnOffset` + # @return [Fixnum] + attr_accessor :source_column_offset + + # True if the pivot table should include the totals for this grouping. + # Corresponds to the JSON property `showTotals` + # @return [Boolean] + attr_accessor :show_totals + alias_method :show_totals?, :show_totals + + # Metadata about values in the grouping. + # Corresponds to the JSON property `valueMetadata` + # @return [Array] + attr_accessor :value_metadata + + # The order the values in this group should be sorted. + # Corresponds to the JSON property `sortOrder` + # @return [String] + attr_accessor :sort_order + + # Information about which values in a pivot group should be used for sorting. + # Corresponds to the JSON property `valueBucket` + # @return [Google::Apis::SheetsV4::PivotGroupSortValueBucket] + attr_accessor :value_bucket + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @source_column_offset = args[:source_column_offset] if args.key?(:source_column_offset) + @show_totals = args[:show_totals] if args.key?(:show_totals) + @value_metadata = args[:value_metadata] if args.key?(:value_metadata) + @sort_order = args[:sort_order] if args.key?(:sort_order) + @value_bucket = args[:value_bucket] if args.key?(:value_bucket) + end + end + + # A pivot table. + class PivotTable + include Google::Apis::Core::Hashable + + # An optional mapping of filters per source column offset. + # The filters will be applied before aggregating data into the pivot table. + # The map's key is the column offset of the source range that you want to + # filter, and the value is the criteria for that column. + # For example, if the source was `C10:E15`, a key of `0` will have the filter + # for column `C`, whereas the key `1` is for column `D`. + # Corresponds to the JSON property `criteria` + # @return [Hash] + attr_accessor :criteria + + # Each row grouping in the pivot table. + # Corresponds to the JSON property `rows` + # @return [Array] + attr_accessor :rows + + # Whether values should be listed horizontally (as columns) + # or vertically (as rows). + # Corresponds to the JSON property `valueLayout` + # @return [String] + attr_accessor :value_layout + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `source` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :source + + # Each column grouping in the pivot table. + # Corresponds to the JSON property `columns` + # @return [Array] + attr_accessor :columns + + # A list of values to include in the pivot table. + # Corresponds to the JSON property `values` + # @return [Array] + attr_accessor :values + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @criteria = args[:criteria] if args.key?(:criteria) + @rows = args[:rows] if args.key?(:rows) + @value_layout = args[:value_layout] if args.key?(:value_layout) @source = args[:source] if args.key?(:source) - @destination = args[:destination] if args.key?(:destination) + @columns = args[:columns] if args.key?(:columns) + @values = args[:values] if args.key?(:values) + end + end + + # Source ranges for a chart. + class ChartSourceRange + include Google::Apis::Core::Hashable + + # The ranges of data for a series or domain. + # Exactly one dimension must have a length of 1, + # and all sources in the list must have the same dimension + # with length 1. + # The domain (if it exists) & all series must have the same number + # of source ranges. If using more than one source range, then the source + # range at a given offset must be contiguous across the domain and series. + # For example, these are valid configurations: + # domain sources: A1:A5 + # series1 sources: B1:B5 + # series2 sources: D6:D10 + # domain sources: A1:A5, C10:C12 + # series1 sources: B1:B5, D10:D12 + # series2 sources: C1:C5, E10:E12 + # Corresponds to the JSON property `sources` + # @return [Array] + attr_accessor :sources + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @sources = args[:sources] if args.key?(:sources) + end + end + + # Data within a range of the spreadsheet. + class ValueRange + include Google::Apis::Core::Hashable + + # The range the values cover, in A1 notation. + # For output, this range indicates the entire requested range, + # even though the values will exclude trailing rows and columns. + # When appending values, this field represents the range to search for a + # table, after which values will be appended. + # Corresponds to the JSON property `range` + # @return [String] + attr_accessor :range + + # The major dimension of the values. + # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, + # then requesting `range=A1:B2,majorDimension=ROWS` will return + # `[[1,2],[3,4]]`, + # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return + # `[[1,3],[2,4]]`. + # For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]` + # will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS` + # then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`. + # When writing, if this field is not set, it defaults to ROWS. + # Corresponds to the JSON property `majorDimension` + # @return [String] + attr_accessor :major_dimension + + # The data that was read or to be written. This is an array of arrays, + # the outer array representing all the data and each inner array + # representing a major dimension. Each item in the inner array + # corresponds with one cell. + # For output, empty trailing rows and columns will not be included. + # For input, supported value types are: bool, string, and double. + # Null values will be skipped. + # To set a cell to an empty value, set the string value to an empty string. + # Corresponds to the JSON property `values` + # @return [Array>] + attr_accessor :values + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @range = args[:range] if args.key?(:range) + @major_dimension = args[:major_dimension] if args.key?(:major_dimension) + @values = args[:values] if args.key?(:values) + end + end + + # Adds new cells after the last row with data in a sheet, + # inserting new rows into the sheet if necessary. + class AppendCellsRequest + include Google::Apis::Core::Hashable + + # The data to append. + # Corresponds to the JSON property `rows` + # @return [Array] + attr_accessor :rows + + # The fields of CellData that should be updated. + # At least one field must be specified. + # The root is the CellData; 'row.values.' should not be specified. + # A single `"*"` can be used as short-hand for listing every field. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + # The sheet ID to append the data to. + # Corresponds to the JSON property `sheetId` + # @return [Fixnum] + attr_accessor :sheet_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @rows = args[:rows] if args.key?(:rows) + @fields = args[:fields] if args.key?(:fields) + @sheet_id = args[:sheet_id] if args.key?(:sheet_id) + end + end + + # Adds a new banded range to the spreadsheet. + class AddBandingRequest + include Google::Apis::Core::Hashable + + # A banded (alternating colors) range in a sheet. + # Corresponds to the JSON property `bandedRange` + # @return [Google::Apis::SheetsV4::BandedRange] + attr_accessor :banded_range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @banded_range = args[:banded_range] if args.key?(:banded_range) + end + end + + # A single response from an update. + class Response + include Google::Apis::Core::Hashable + + # The result of the find/replace. + # Corresponds to the JSON property `findReplace` + # @return [Google::Apis::SheetsV4::FindReplaceResponse] + attr_accessor :find_replace + + # The result of adding a sheet. + # Corresponds to the JSON property `addSheet` + # @return [Google::Apis::SheetsV4::AddSheetResponse] + attr_accessor :add_sheet + + # The result of updating a conditional format rule. + # Corresponds to the JSON property `updateConditionalFormatRule` + # @return [Google::Apis::SheetsV4::UpdateConditionalFormatRuleResponse] + attr_accessor :update_conditional_format_rule + + # The result of adding a named range. + # Corresponds to the JSON property `addNamedRange` + # @return [Google::Apis::SheetsV4::AddNamedRangeResponse] + attr_accessor :add_named_range + + # The result of adding a filter view. + # Corresponds to the JSON property `addFilterView` + # @return [Google::Apis::SheetsV4::AddFilterViewResponse] + attr_accessor :add_filter_view + + # The result of adding a banded range. + # Corresponds to the JSON property `addBanding` + # @return [Google::Apis::SheetsV4::AddBandingResponse] + attr_accessor :add_banding + + # The result of adding a new protected range. + # Corresponds to the JSON property `addProtectedRange` + # @return [Google::Apis::SheetsV4::AddProtectedRangeResponse] + attr_accessor :add_protected_range + + # The result of duplicating a sheet. + # Corresponds to the JSON property `duplicateSheet` + # @return [Google::Apis::SheetsV4::DuplicateSheetResponse] + attr_accessor :duplicate_sheet + + # The result of deleting a conditional format rule. + # Corresponds to the JSON property `deleteConditionalFormatRule` + # @return [Google::Apis::SheetsV4::DeleteConditionalFormatRuleResponse] + attr_accessor :delete_conditional_format_rule + + # The result of updating an embedded object's position. + # Corresponds to the JSON property `updateEmbeddedObjectPosition` + # @return [Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionResponse] + attr_accessor :update_embedded_object_position + + # The result of a filter view being duplicated. + # Corresponds to the JSON property `duplicateFilterView` + # @return [Google::Apis::SheetsV4::DuplicateFilterViewResponse] + attr_accessor :duplicate_filter_view + + # The result of adding a chart to a spreadsheet. + # Corresponds to the JSON property `addChart` + # @return [Google::Apis::SheetsV4::AddChartResponse] + attr_accessor :add_chart + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @find_replace = args[:find_replace] if args.key?(:find_replace) + @add_sheet = args[:add_sheet] if args.key?(:add_sheet) + @update_conditional_format_rule = args[:update_conditional_format_rule] if args.key?(:update_conditional_format_rule) + @add_named_range = args[:add_named_range] if args.key?(:add_named_range) + @add_filter_view = args[:add_filter_view] if args.key?(:add_filter_view) + @add_banding = args[:add_banding] if args.key?(:add_banding) + @add_protected_range = args[:add_protected_range] if args.key?(:add_protected_range) + @duplicate_sheet = args[:duplicate_sheet] if args.key?(:duplicate_sheet) + @delete_conditional_format_rule = args[:delete_conditional_format_rule] if args.key?(:delete_conditional_format_rule) + @update_embedded_object_position = args[:update_embedded_object_position] if args.key?(:update_embedded_object_position) + @duplicate_filter_view = args[:duplicate_filter_view] if args.key?(:duplicate_filter_view) + @add_chart = args[:add_chart] if args.key?(:add_chart) + end + end + + # A run of a text format. The format of this run continues until the start + # index of the next run. + # When updating, all fields must be set. + class TextFormatRun + include Google::Apis::Core::Hashable + + # The format of a run of text in a cell. + # Absent values indicate that the field isn't specified. + # Corresponds to the JSON property `format` + # @return [Google::Apis::SheetsV4::TextFormat] + attr_accessor :format + + # The character index where this run starts. + # Corresponds to the JSON property `startIndex` + # @return [Fixnum] + attr_accessor :start_index + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @format = args[:format] if args.key?(:format) + @start_index = args[:start_index] if args.key?(:start_index) + end + end + + # A chart embedded in a sheet. + class EmbeddedChart + include Google::Apis::Core::Hashable + + # The ID of the chart. + # Corresponds to the JSON property `chartId` + # @return [Fixnum] + attr_accessor :chart_id + + # The position of an embedded object such as a chart. + # Corresponds to the JSON property `position` + # @return [Google::Apis::SheetsV4::EmbeddedObjectPosition] + attr_accessor :position + + # The specifications of a chart. + # Corresponds to the JSON property `spec` + # @return [Google::Apis::SheetsV4::ChartSpec] + attr_accessor :spec + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @chart_id = args[:chart_id] if args.key?(:chart_id) + @position = args[:position] if args.key?(:position) + @spec = args[:spec] if args.key?(:spec) + end + end + + # Inserts cells into a range, shifting the existing cells over or down. + class InsertRangeRequest + include Google::Apis::Core::Hashable + + # The dimension which will be shifted when inserting cells. + # If ROWS, existing cells will be shifted down. + # If COLUMNS, existing cells will be shifted right. + # Corresponds to the JSON property `shiftDimension` + # @return [String] + attr_accessor :shift_dimension + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @shift_dimension = args[:shift_dimension] if args.key?(:shift_dimension) + @range = args[:range] if args.key?(:range) + end + end + + # The result of adding a named range. + class AddNamedRangeResponse + include Google::Apis::Core::Hashable + + # A named range. + # Corresponds to the JSON property `namedRange` + # @return [Google::Apis::SheetsV4::NamedRange] + attr_accessor :named_range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @named_range = args[:named_range] if args.key?(:named_range) + end + end + + # Data about each cell in a row. + class RowData + include Google::Apis::Core::Hashable + + # The values in the row, one per column. + # Corresponds to the JSON property `values` + # @return [Array] + attr_accessor :values + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @values = args[:values] if args.key?(:values) + end + end + + # A border along a cell. + class Border + include Google::Apis::Core::Hashable + + # The width of the border, in pixels. + # Deprecated; the width is determined by the "style" field. + # Corresponds to the JSON property `width` + # @return [Fixnum] + attr_accessor :width + + # The style of the border. + # Corresponds to the JSON property `style` + # @return [String] + attr_accessor :style + + # Represents a color in the RGBA color space. This representation is designed + # for simplicity of conversion to/from color representations in various + # languages over compactness; for example, the fields of this representation + # can be trivially provided to the constructor of "java.awt.Color" in Java; it + # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" + # method in iOS; and, with just a little work, it can be easily formatted into + # a CSS "rgba()" string in JavaScript, as well. Here are some examples: + # Example (Java): + # import com.google.type.Color; + # // ... + # public static java.awt.Color fromProto(Color protocolor) ` + # float alpha = protocolor.hasAlpha() + # ? protocolor.getAlpha().getValue() + # : 1.0; + # return new java.awt.Color( + # protocolor.getRed(), + # protocolor.getGreen(), + # protocolor.getBlue(), + # alpha); + # ` + # public static Color toProto(java.awt.Color color) ` + # float red = (float) color.getRed(); + # float green = (float) color.getGreen(); + # float blue = (float) color.getBlue(); + # float denominator = 255.0; + # Color.Builder resultBuilder = + # Color + # .newBuilder() + # .setRed(red / denominator) + # .setGreen(green / denominator) + # .setBlue(blue / denominator); + # int alpha = color.getAlpha(); + # if (alpha != 255) ` + # result.setAlpha( + # FloatValue + # .newBuilder() + # .setValue(((float) alpha) / denominator) + # .build()); + # ` + # return resultBuilder.build(); + # ` + # // ... + # Example (iOS / Obj-C): + # // ... + # static UIColor* fromProto(Color* protocolor) ` + # float red = [protocolor red]; + # float green = [protocolor green]; + # float blue = [protocolor blue]; + # FloatValue* alpha_wrapper = [protocolor alpha]; + # float alpha = 1.0; + # if (alpha_wrapper != nil) ` + # alpha = [alpha_wrapper value]; + # ` + # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; + # ` + # static Color* toProto(UIColor* color) ` + # CGFloat red, green, blue, alpha; + # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` + # return nil; + # ` + # Color* result = [Color alloc] init]; + # [result setRed:red]; + # [result setGreen:green]; + # [result setBlue:blue]; + # if (alpha <= 0.9999) ` + # [result setAlpha:floatWrapperWithValue(alpha)]; + # ` + # [result autorelease]; + # return result; + # ` + # // ... + # Example (JavaScript): + # // ... + # var protoToCssColor = function(rgb_color) ` + # var redFrac = rgb_color.red || 0.0; + # var greenFrac = rgb_color.green || 0.0; + # var blueFrac = rgb_color.blue || 0.0; + # var red = Math.floor(redFrac * 255); + # var green = Math.floor(greenFrac * 255); + # var blue = Math.floor(blueFrac * 255); + # if (!('alpha' in rgb_color)) ` + # return rgbToCssColor_(red, green, blue); + # ` + # var alphaFrac = rgb_color.alpha.value || 0.0; + # var rgbParams = [red, green, blue].join(','); + # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); + # `; + # var rgbToCssColor_ = function(red, green, blue) ` + # var rgbNumber = new Number((red << 16) | (green << 8) | blue); + # var hexString = rgbNumber.toString(16); + # var missingZeros = 6 - hexString.length; + # var resultBuilder = ['#']; + # for (var i = 0; i < missingZeros; i++) ` + # resultBuilder.push('0'); + # ` + # resultBuilder.push(hexString); + # return resultBuilder.join(''); + # `; + # // ... + # Corresponds to the JSON property `color` + # @return [Google::Apis::SheetsV4::Color] + attr_accessor :color + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @width = args[:width] if args.key?(:width) + @style = args[:style] if args.key?(:style) + @color = args[:color] if args.key?(:color) + end + end + + # Data in the grid, as well as metadata about the dimensions. + class GridData + include Google::Apis::Core::Hashable + + # Metadata about the requested columns in the grid, starting with the column + # in start_column. + # Corresponds to the JSON property `columnMetadata` + # @return [Array] + attr_accessor :column_metadata + + # The first column this GridData refers to, zero-based. + # Corresponds to the JSON property `startColumn` + # @return [Fixnum] + attr_accessor :start_column + + # Metadata about the requested rows in the grid, starting with the row + # in start_row. + # Corresponds to the JSON property `rowMetadata` + # @return [Array] + attr_accessor :row_metadata + + # The data in the grid, one entry per row, + # starting with the row in startRow. + # The values in RowData will correspond to columns starting + # at start_column. + # Corresponds to the JSON property `rowData` + # @return [Array] + attr_accessor :row_data + + # The first row this GridData refers to, zero-based. + # Corresponds to the JSON property `startRow` + # @return [Fixnum] + attr_accessor :start_row + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @column_metadata = args[:column_metadata] if args.key?(:column_metadata) + @start_column = args[:start_column] if args.key?(:start_column) + @row_metadata = args[:row_metadata] if args.key?(:row_metadata) + @row_data = args[:row_data] if args.key?(:row_data) + @start_row = args[:start_row] if args.key?(:start_row) + end + end + + # Updates properties of the named range with the specified + # namedRangeId. + class UpdateNamedRangeRequest + include Google::Apis::Core::Hashable + + # A named range. + # Corresponds to the JSON property `namedRange` + # @return [Google::Apis::SheetsV4::NamedRange] + attr_accessor :named_range + + # The fields that should be updated. At least one field must be specified. + # The root `namedRange` is implied and should not be specified. + # A single `"*"` can be used as short-hand for listing every field. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @named_range = args[:named_range] if args.key?(:named_range) + @fields = args[:fields] if args.key?(:fields) + end + end + + # Finds and replaces data in cells over a range, sheet, or all sheets. + class FindReplaceRequest + include Google::Apis::Core::Hashable + + # The value to use as the replacement. + # Corresponds to the JSON property `replacement` + # @return [String] + attr_accessor :replacement + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :range + + # The sheet to find/replace over. + # Corresponds to the JSON property `sheetId` + # @return [Fixnum] + attr_accessor :sheet_id + + # True if the search is case sensitive. + # Corresponds to the JSON property `matchCase` + # @return [Boolean] + attr_accessor :match_case + alias_method :match_case?, :match_case + + # True to find/replace over all sheets. + # Corresponds to the JSON property `allSheets` + # @return [Boolean] + attr_accessor :all_sheets + alias_method :all_sheets?, :all_sheets + + # True if the search should include cells with formulas. + # False to skip cells with formulas. + # Corresponds to the JSON property `includeFormulas` + # @return [Boolean] + attr_accessor :include_formulas + alias_method :include_formulas?, :include_formulas + + # True if the find value should match the entire cell. + # Corresponds to the JSON property `matchEntireCell` + # @return [Boolean] + attr_accessor :match_entire_cell + alias_method :match_entire_cell?, :match_entire_cell + + # The value to search. + # Corresponds to the JSON property `find` + # @return [String] + attr_accessor :find + + # True if the find value is a regex. + # The regular expression and replacement should follow Java regex rules + # at https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html. + # The replacement string is allowed to refer to capturing groups. + # For example, if one cell has the contents `"Google Sheets"` and another + # has `"Google Docs"`, then searching for `"o.* (.*)"` with a replacement of + # `"$1 Rocks"` would change the contents of the cells to + # `"GSheets Rocks"` and `"GDocs Rocks"` respectively. + # Corresponds to the JSON property `searchByRegex` + # @return [Boolean] + attr_accessor :search_by_regex + alias_method :search_by_regex?, :search_by_regex + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @replacement = args[:replacement] if args.key?(:replacement) + @range = args[:range] if args.key?(:range) + @sheet_id = args[:sheet_id] if args.key?(:sheet_id) + @match_case = args[:match_case] if args.key?(:match_case) + @all_sheets = args[:all_sheets] if args.key?(:all_sheets) + @include_formulas = args[:include_formulas] if args.key?(:include_formulas) + @match_entire_cell = args[:match_entire_cell] if args.key?(:match_entire_cell) + @find = args[:find] if args.key?(:find) + @search_by_regex = args[:search_by_regex] if args.key?(:search_by_regex) + end + end + + # Adds a new sheet. + # When a sheet is added at a given index, + # all subsequent sheets' indexes are incremented. + # To add an object sheet, use AddChartRequest instead and specify + # EmbeddedObjectPosition.sheetId or + # EmbeddedObjectPosition.newSheet. + class AddSheetRequest + include Google::Apis::Core::Hashable + + # Properties of a sheet. + # Corresponds to the JSON property `properties` + # @return [Google::Apis::SheetsV4::SheetProperties] + attr_accessor :properties + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @properties = args[:properties] if args.key?(:properties) end end @@ -5286,237 +4240,36 @@ module Google end end - # The kinds of value that a cell in a spreadsheet can have. - class ExtendedValue + # The result of deleting a conditional format rule. + class DeleteConditionalFormatRuleResponse include Google::Apis::Core::Hashable - # Represents a formula. - # Corresponds to the JSON property `formulaValue` + # A rule describing a conditional format. + # Corresponds to the JSON property `rule` + # @return [Google::Apis::SheetsV4::ConditionalFormatRule] + attr_accessor :rule + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @rule = args[:rule] if args.key?(:rule) + end + end + + # Deletes a range of cells, shifting other cells into the deleted area. + class DeleteRangeRequest + include Google::Apis::Core::Hashable + + # The dimension from which deleted cells will be replaced with. + # If ROWS, existing cells will be shifted upward to + # replace the deleted cells. If COLUMNS, existing cells + # will be shifted left to replace the deleted cells. + # Corresponds to the JSON property `shiftDimension` # @return [String] - attr_accessor :formula_value - - # An error in a cell. - # Corresponds to the JSON property `errorValue` - # @return [Google::Apis::SheetsV4::ErrorValue] - attr_accessor :error_value - - # Represents a boolean value. - # Corresponds to the JSON property `boolValue` - # @return [Boolean] - attr_accessor :bool_value - alias_method :bool_value?, :bool_value - - # Represents a double value. - # Note: Dates, Times and DateTimes are represented as doubles in - # "serial number" format. - # Corresponds to the JSON property `numberValue` - # @return [Float] - attr_accessor :number_value - - # Represents a string value. - # Leading single quotes are not included. For example, if the user typed - # `'123` into the UI, this would be represented as a `stringValue` of - # `"123"`. - # Corresponds to the JSON property `stringValue` - # @return [String] - attr_accessor :string_value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @formula_value = args[:formula_value] if args.key?(:formula_value) - @error_value = args[:error_value] if args.key?(:error_value) - @bool_value = args[:bool_value] if args.key?(:bool_value) - @number_value = args[:number_value] if args.key?(:number_value) - @string_value = args[:string_value] if args.key?(:string_value) - end - end - - # The reply for batch updating a spreadsheet. - class BatchUpdateSpreadsheetResponse - include Google::Apis::Core::Hashable - - # The spreadsheet the updates were applied to. - # Corresponds to the JSON property `spreadsheetId` - # @return [String] - attr_accessor :spreadsheet_id - - # Resource that represents a spreadsheet. - # Corresponds to the JSON property `updatedSpreadsheet` - # @return [Google::Apis::SheetsV4::Spreadsheet] - attr_accessor :updated_spreadsheet - - # The reply of the updates. This maps 1:1 with the updates, although - # replies to some requests may be empty. - # Corresponds to the JSON property `replies` - # @return [Array] - attr_accessor :replies - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) - @updated_spreadsheet = args[:updated_spreadsheet] if args.key?(:updated_spreadsheet) - @replies = args[:replies] if args.key?(:replies) - end - end - - # A rule that applies a gradient color scale format, based on - # the interpolation points listed. The format of a cell will vary - # based on its contents as compared to the values of the interpolation - # points. - class GradientRule - include Google::Apis::Core::Hashable - - # A single interpolation point on a gradient conditional format. - # These pin the gradient color scale according to the color, - # type and value chosen. - # Corresponds to the JSON property `maxpoint` - # @return [Google::Apis::SheetsV4::InterpolationPoint] - attr_accessor :maxpoint - - # A single interpolation point on a gradient conditional format. - # These pin the gradient color scale according to the color, - # type and value chosen. - # Corresponds to the JSON property `midpoint` - # @return [Google::Apis::SheetsV4::InterpolationPoint] - attr_accessor :midpoint - - # A single interpolation point on a gradient conditional format. - # These pin the gradient color scale according to the color, - # type and value chosen. - # Corresponds to the JSON property `minpoint` - # @return [Google::Apis::SheetsV4::InterpolationPoint] - attr_accessor :minpoint - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @maxpoint = args[:maxpoint] if args.key?(:maxpoint) - @midpoint = args[:midpoint] if args.key?(:midpoint) - @minpoint = args[:minpoint] if args.key?(:minpoint) - end - end - - # Moves data from the source to the destination. - class CutPasteRequest - include Google::Apis::Core::Hashable - - # What kind of data to paste. All the source data will be cut, regardless - # of what is pasted. - # Corresponds to the JSON property `pasteType` - # @return [String] - attr_accessor :paste_type - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `source` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :source - - # A coordinate in a sheet. - # All indexes are zero-based. - # Corresponds to the JSON property `destination` - # @return [Google::Apis::SheetsV4::GridCoordinate] - attr_accessor :destination - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @paste_type = args[:paste_type] if args.key?(:paste_type) - @source = args[:source] if args.key?(:source) - @destination = args[:destination] if args.key?(:destination) - end - end - - # The location an object is overlaid on top of a grid. - class OverlayPosition - include Google::Apis::Core::Hashable - - # The width of the object, in pixels. Defaults to 600. - # Corresponds to the JSON property `widthPixels` - # @return [Fixnum] - attr_accessor :width_pixels - - # A coordinate in a sheet. - # All indexes are zero-based. - # Corresponds to the JSON property `anchorCell` - # @return [Google::Apis::SheetsV4::GridCoordinate] - attr_accessor :anchor_cell - - # The horizontal offset, in pixels, that the object is offset - # from the anchor cell. - # Corresponds to the JSON property `offsetXPixels` - # @return [Fixnum] - attr_accessor :offset_x_pixels - - # The height of the object, in pixels. Defaults to 371. - # Corresponds to the JSON property `heightPixels` - # @return [Fixnum] - attr_accessor :height_pixels - - # The vertical offset, in pixels, that the object is offset - # from the anchor cell. - # Corresponds to the JSON property `offsetYPixels` - # @return [Fixnum] - attr_accessor :offset_y_pixels - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @width_pixels = args[:width_pixels] if args.key?(:width_pixels) - @anchor_cell = args[:anchor_cell] if args.key?(:anchor_cell) - @offset_x_pixels = args[:offset_x_pixels] if args.key?(:offset_x_pixels) - @height_pixels = args[:height_pixels] if args.key?(:height_pixels) - @offset_y_pixels = args[:offset_y_pixels] if args.key?(:offset_y_pixels) - end - end - - # Fills in more data based on existing data. - class AutoFillRequest - include Google::Apis::Core::Hashable - - # True if we should generate data with the "alternate" series. - # This differs based on the type and amount of source data. - # Corresponds to the JSON property `useAlternateSeries` - # @return [Boolean] - attr_accessor :use_alternate_series - alias_method :use_alternate_series?, :use_alternate_series + attr_accessor :shift_dimension # A range on a sheet. # All indexes are zero-based. @@ -5544,52 +4297,36 @@ module Google # @return [Google::Apis::SheetsV4::GridRange] attr_accessor :range - # A combination of a source range and how to extend that source. - # Corresponds to the JSON property `sourceAndDestination` - # @return [Google::Apis::SheetsV4::SourceAndDestination] - attr_accessor :source_and_destination - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @use_alternate_series = args[:use_alternate_series] if args.key?(:use_alternate_series) + @shift_dimension = args[:shift_dimension] if args.key?(:shift_dimension) @range = args[:range] if args.key?(:range) - @source_and_destination = args[:source_and_destination] if args.key?(:source_and_destination) end end - # A pie chart. - class PieChartSpec + # A coordinate in a sheet. + # All indexes are zero-based. + class GridCoordinate include Google::Apis::Core::Hashable - # Where the legend of the pie chart should be drawn. - # Corresponds to the JSON property `legendPosition` - # @return [String] - attr_accessor :legend_position + # The row index of the coordinate. + # Corresponds to the JSON property `rowIndex` + # @return [Fixnum] + attr_accessor :row_index - # The data included in a domain or series. - # Corresponds to the JSON property `series` - # @return [Google::Apis::SheetsV4::ChartData] - attr_accessor :series + # The column index of the coordinate. + # Corresponds to the JSON property `columnIndex` + # @return [Fixnum] + attr_accessor :column_index - # The size of the hole in the pie chart. - # Corresponds to the JSON property `pieHole` - # @return [Float] - attr_accessor :pie_hole - - # True if the pie is three dimensional. - # Corresponds to the JSON property `threeDimensional` - # @return [Boolean] - attr_accessor :three_dimensional - alias_method :three_dimensional?, :three_dimensional - - # The data included in a domain or series. - # Corresponds to the JSON property `domain` - # @return [Google::Apis::SheetsV4::ChartData] - attr_accessor :domain + # The sheet this coordinate is on. + # Corresponds to the JSON property `sheetId` + # @return [Fixnum] + attr_accessor :sheet_id def initialize(**args) update!(**args) @@ -5597,11 +4334,9 @@ module Google # Update properties of this object def update!(**args) - @legend_position = args[:legend_position] if args.key?(:legend_position) - @series = args[:series] if args.key?(:series) - @pie_hole = args[:pie_hole] if args.key?(:pie_hole) - @three_dimensional = args[:three_dimensional] if args.key?(:three_dimensional) - @domain = args[:domain] if args.key?(:domain) + @row_index = args[:row_index] if args.key?(:row_index) + @column_index = args[:column_index] if args.key?(:column_index) + @sheet_id = args[:sheet_id] if args.key?(:sheet_id) end end @@ -5610,6 +4345,11 @@ module Google class UpdateSheetPropertiesRequest include Google::Apis::Core::Hashable + # Properties of a sheet. + # Corresponds to the JSON property `properties` + # @return [Google::Apis::SheetsV4::SheetProperties] + attr_accessor :properties + # The fields that should be updated. At least one field must be specified. # The root `properties` is implied and should not be specified. # A single `"*"` can be used as short-hand for listing every field. @@ -5617,37 +4357,46 @@ module Google # @return [String] attr_accessor :fields - # Properties of a sheet. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV4::SheetProperties] - attr_accessor :properties - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @fields = args[:fields] if args.key?(:fields) @properties = args[:properties] if args.key?(:properties) + @fields = args[:fields] if args.key?(:fields) end end - # A rule that may or may not match, depending on the condition. - class BooleanRule + # Unmerges cells in the given range. + class UnmergeCellsRequest include Google::Apis::Core::Hashable - # A condition that can evaluate to true or false. - # BooleanConditions are used by conditional formatting, - # data validation, and the criteria in filters. - # Corresponds to the JSON property `condition` - # @return [Google::Apis::SheetsV4::BooleanCondition] - attr_accessor :condition - - # The format of a cell. - # Corresponds to the JSON property `format` - # @return [Google::Apis::SheetsV4::CellFormat] - attr_accessor :format + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :range def initialize(**args) update!(**args) @@ -5655,58 +4404,7 @@ module Google # Update properties of this object def update!(**args) - @condition = args[:condition] if args.key?(:condition) - @format = args[:format] if args.key?(:format) - end - end - - # Appends rows or columns to the end of a sheet. - class AppendDimensionRequest - include Google::Apis::Core::Hashable - - # The sheet to append rows or columns to. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - # The number of rows or columns to append. - # Corresponds to the JSON property `length` - # @return [Fixnum] - attr_accessor :length - - # Whether rows or columns should be appended. - # Corresponds to the JSON property `dimension` - # @return [String] - attr_accessor :dimension - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @length = args[:length] if args.key?(:length) - @dimension = args[:dimension] if args.key?(:dimension) - end - end - - # Adds a filter view. - class AddFilterViewRequest - include Google::Apis::Core::Hashable - - # A filter view. - # Corresponds to the JSON property `filter` - # @return [Google::Apis::SheetsV4::FilterView] - attr_accessor :filter - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @filter = args[:filter] if args.key?(:filter) + @range = args[:range] if args.key?(:range) end end @@ -5719,27 +4417,27 @@ module Google # @return [Fixnum] attr_accessor :row_count - # The number of columns in the grid. - # Corresponds to the JSON property `columnCount` - # @return [Fixnum] - attr_accessor :column_count - # The number of rows that are frozen in the grid. # Corresponds to the JSON property `frozenRowCount` # @return [Fixnum] attr_accessor :frozen_row_count - # The number of columns that are frozen in the grid. - # Corresponds to the JSON property `frozenColumnCount` - # @return [Fixnum] - attr_accessor :frozen_column_count - # True if the grid isn't showing gridlines in the UI. # Corresponds to the JSON property `hideGridlines` # @return [Boolean] attr_accessor :hide_gridlines alias_method :hide_gridlines?, :hide_gridlines + # The number of columns in the grid. + # Corresponds to the JSON property `columnCount` + # @return [Fixnum] + attr_accessor :column_count + + # The number of columns that are frozen in the grid. + # Corresponds to the JSON property `frozenColumnCount` + # @return [Fixnum] + attr_accessor :frozen_column_count + def initialize(**args) update!(**args) end @@ -5747,21 +4445,45 @@ module Google # Update properties of this object def update!(**args) @row_count = args[:row_count] if args.key?(:row_count) - @column_count = args[:column_count] if args.key?(:column_count) @frozen_row_count = args[:frozen_row_count] if args.key?(:frozen_row_count) - @frozen_column_count = args[:frozen_column_count] if args.key?(:frozen_column_count) @hide_gridlines = args[:hide_gridlines] if args.key?(:hide_gridlines) + @column_count = args[:column_count] if args.key?(:column_count) + @frozen_column_count = args[:frozen_column_count] if args.key?(:frozen_column_count) end end - # Removes the named range with the given ID from the spreadsheet. - class DeleteNamedRangeRequest + # The result of updating an embedded object's position. + class UpdateEmbeddedObjectPositionResponse include Google::Apis::Core::Hashable - # The ID of the named range to delete. - # Corresponds to the JSON property `namedRangeId` + # The position of an embedded object such as a chart. + # Corresponds to the JSON property `position` + # @return [Google::Apis::SheetsV4::EmbeddedObjectPosition] + attr_accessor :position + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @position = args[:position] if args.key?(:position) + end + end + + # A sort order associated with a specific column or row. + class SortSpec + include Google::Apis::Core::Hashable + + # The dimension the sort should be applied to. + # Corresponds to the JSON property `dimensionIndex` + # @return [Fixnum] + attr_accessor :dimension_index + + # The order data should be sorted. + # Corresponds to the JSON property `sortOrder` # @return [String] - attr_accessor :named_range_id + attr_accessor :sort_order def initialize(**args) update!(**args) @@ -5769,18 +4491,66 @@ module Google # Update properties of this object def update!(**args) - @named_range_id = args[:named_range_id] if args.key?(:named_range_id) + @dimension_index = args[:dimension_index] if args.key?(:dimension_index) + @sort_order = args[:sort_order] if args.key?(:sort_order) end end - # Adds a chart to a sheet in the spreadsheet. - class AddChartRequest + # A sheet in a spreadsheet. + class Sheet include Google::Apis::Core::Hashable - # A chart embedded in a sheet. - # Corresponds to the JSON property `chart` - # @return [Google::Apis::SheetsV4::EmbeddedChart] - attr_accessor :chart + # The default filter associated with a sheet. + # Corresponds to the JSON property `basicFilter` + # @return [Google::Apis::SheetsV4::BasicFilter] + attr_accessor :basic_filter + + # The ranges that are merged together. + # Corresponds to the JSON property `merges` + # @return [Array] + attr_accessor :merges + + # Data in the grid, if this is a grid sheet. + # The number of GridData objects returned is dependent on the number of + # ranges requested on this sheet. For example, if this is representing + # `Sheet1`, and the spreadsheet was requested with ranges + # `Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will have a + # startRow/startColumn of `0`, + # while the second one will have `startRow 14` (zero-based row 15), + # and `startColumn 3` (zero-based column D). + # Corresponds to the JSON property `data` + # @return [Array] + attr_accessor :data + + # The banded (i.e. alternating colors) ranges on this sheet. + # Corresponds to the JSON property `bandedRanges` + # @return [Array] + attr_accessor :banded_ranges + + # The specifications of every chart on this sheet. + # Corresponds to the JSON property `charts` + # @return [Array] + attr_accessor :charts + + # Properties of a sheet. + # Corresponds to the JSON property `properties` + # @return [Google::Apis::SheetsV4::SheetProperties] + attr_accessor :properties + + # The filter views in this sheet. + # Corresponds to the JSON property `filterViews` + # @return [Array] + attr_accessor :filter_views + + # The protected ranges in this sheet. + # Corresponds to the JSON property `protectedRanges` + # @return [Array] + attr_accessor :protected_ranges + + # The conditional format rules in this sheet. + # Corresponds to the JSON property `conditionalFormats` + # @return [Array] + attr_accessor :conditional_formats def initialize(**args) update!(**args) @@ -5788,7 +4558,1039 @@ module Google # Update properties of this object def update!(**args) - @chart = args[:chart] if args.key?(:chart) + @basic_filter = args[:basic_filter] if args.key?(:basic_filter) + @merges = args[:merges] if args.key?(:merges) + @data = args[:data] if args.key?(:data) + @banded_ranges = args[:banded_ranges] if args.key?(:banded_ranges) + @charts = args[:charts] if args.key?(:charts) + @properties = args[:properties] if args.key?(:properties) + @filter_views = args[:filter_views] if args.key?(:filter_views) + @protected_ranges = args[:protected_ranges] if args.key?(:protected_ranges) + @conditional_formats = args[:conditional_formats] if args.key?(:conditional_formats) + end + end + + # A rule that may or may not match, depending on the condition. + class BooleanRule + include Google::Apis::Core::Hashable + + # The format of a cell. + # Corresponds to the JSON property `format` + # @return [Google::Apis::SheetsV4::CellFormat] + attr_accessor :format + + # A condition that can evaluate to true or false. + # BooleanConditions are used by conditional formatting, + # data validation, and the criteria in filters. + # Corresponds to the JSON property `condition` + # @return [Google::Apis::SheetsV4::BooleanCondition] + attr_accessor :condition + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @format = args[:format] if args.key?(:format) + @condition = args[:condition] if args.key?(:condition) + end + end + + # Criteria for showing/hiding rows in a filter or filter view. + class FilterCriteria + include Google::Apis::Core::Hashable + + # Values that should be hidden. + # Corresponds to the JSON property `hiddenValues` + # @return [Array] + attr_accessor :hidden_values + + # A condition that can evaluate to true or false. + # BooleanConditions are used by conditional formatting, + # data validation, and the criteria in filters. + # Corresponds to the JSON property `condition` + # @return [Google::Apis::SheetsV4::BooleanCondition] + attr_accessor :condition + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @hidden_values = args[:hidden_values] if args.key?(:hidden_values) + @condition = args[:condition] if args.key?(:condition) + end + end + + # Metadata about a value in a pivot grouping. + class PivotGroupValueMetadata + include Google::Apis::Core::Hashable + + # The kinds of value that a cell in a spreadsheet can have. + # Corresponds to the JSON property `value` + # @return [Google::Apis::SheetsV4::ExtendedValue] + attr_accessor :value + + # True if the data corresponding to the value is collapsed. + # Corresponds to the JSON property `collapsed` + # @return [Boolean] + attr_accessor :collapsed + alias_method :collapsed?, :collapsed + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @value = args[:value] if args.key?(:value) + @collapsed = args[:collapsed] if args.key?(:collapsed) + end + end + + # The editors of a protected range. + class Editors + include Google::Apis::Core::Hashable + + # The email addresses of users with edit access to the protected range. + # Corresponds to the JSON property `users` + # @return [Array] + attr_accessor :users + + # The email addresses of groups with edit access to the protected range. + # Corresponds to the JSON property `groups` + # @return [Array] + attr_accessor :groups + + # True if anyone in the document's domain has edit access to the protected + # range. Domain protection is only supported on documents within a domain. + # Corresponds to the JSON property `domainUsersCanEdit` + # @return [Boolean] + attr_accessor :domain_users_can_edit + alias_method :domain_users_can_edit?, :domain_users_can_edit + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @users = args[:users] if args.key?(:users) + @groups = args[:groups] if args.key?(:groups) + @domain_users_can_edit = args[:domain_users_can_edit] if args.key?(:domain_users_can_edit) + end + end + + # Updates a conditional format rule at the given index, + # or moves a conditional format rule to another index. + class UpdateConditionalFormatRuleRequest + include Google::Apis::Core::Hashable + + # The zero-based index of the rule that should be replaced or moved. + # Corresponds to the JSON property `index` + # @return [Fixnum] + attr_accessor :index + + # The sheet of the rule to move. Required if new_index is set, + # unused otherwise. + # Corresponds to the JSON property `sheetId` + # @return [Fixnum] + attr_accessor :sheet_id + + # The zero-based new index the rule should end up at. + # Corresponds to the JSON property `newIndex` + # @return [Fixnum] + attr_accessor :new_index + + # A rule describing a conditional format. + # Corresponds to the JSON property `rule` + # @return [Google::Apis::SheetsV4::ConditionalFormatRule] + attr_accessor :rule + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @index = args[:index] if args.key?(:index) + @sheet_id = args[:sheet_id] if args.key?(:sheet_id) + @new_index = args[:new_index] if args.key?(:new_index) + @rule = args[:rule] if args.key?(:rule) + end + end + + # The domain of a chart. + # For example, if charting stock prices over time, this would be the date. + class BasicChartDomain + include Google::Apis::Core::Hashable + + # The data included in a domain or series. + # Corresponds to the JSON property `domain` + # @return [Google::Apis::SheetsV4::ChartData] + attr_accessor :domain + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @domain = args[:domain] if args.key?(:domain) + end + end + + # A data validation rule. + class DataValidationRule + include Google::Apis::Core::Hashable + + # True if invalid data should be rejected. + # Corresponds to the JSON property `strict` + # @return [Boolean] + attr_accessor :strict + alias_method :strict?, :strict + + # A message to show the user when adding data to the cell. + # Corresponds to the JSON property `inputMessage` + # @return [String] + attr_accessor :input_message + + # A condition that can evaluate to true or false. + # BooleanConditions are used by conditional formatting, + # data validation, and the criteria in filters. + # Corresponds to the JSON property `condition` + # @return [Google::Apis::SheetsV4::BooleanCondition] + attr_accessor :condition + + # True if the UI should be customized based on the kind of condition. + # If true, "List" conditions will show a dropdown. + # Corresponds to the JSON property `showCustomUi` + # @return [Boolean] + attr_accessor :show_custom_ui + alias_method :show_custom_ui?, :show_custom_ui + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @strict = args[:strict] if args.key?(:strict) + @input_message = args[:input_message] if args.key?(:input_message) + @condition = args[:condition] if args.key?(:condition) + @show_custom_ui = args[:show_custom_ui] if args.key?(:show_custom_ui) + end + end + + # Inserts data into the spreadsheet starting at the specified coordinate. + class PasteDataRequest + include Google::Apis::Core::Hashable + + # True if the data is HTML. + # Corresponds to the JSON property `html` + # @return [Boolean] + attr_accessor :html + alias_method :html?, :html + + # A coordinate in a sheet. + # All indexes are zero-based. + # Corresponds to the JSON property `coordinate` + # @return [Google::Apis::SheetsV4::GridCoordinate] + attr_accessor :coordinate + + # The data to insert. + # Corresponds to the JSON property `data` + # @return [String] + attr_accessor :data + + # The delimiter in the data. + # Corresponds to the JSON property `delimiter` + # @return [String] + attr_accessor :delimiter + + # How the data should be pasted. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @html = args[:html] if args.key?(:html) + @coordinate = args[:coordinate] if args.key?(:coordinate) + @data = args[:data] if args.key?(:data) + @delimiter = args[:delimiter] if args.key?(:delimiter) + @type = args[:type] if args.key?(:type) + end + end + + # Appends rows or columns to the end of a sheet. + class AppendDimensionRequest + include Google::Apis::Core::Hashable + + # Whether rows or columns should be appended. + # Corresponds to the JSON property `dimension` + # @return [String] + attr_accessor :dimension + + # The number of rows or columns to append. + # Corresponds to the JSON property `length` + # @return [Fixnum] + attr_accessor :length + + # The sheet to append rows or columns to. + # Corresponds to the JSON property `sheetId` + # @return [Fixnum] + attr_accessor :sheet_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @dimension = args[:dimension] if args.key?(:dimension) + @length = args[:length] if args.key?(:length) + @sheet_id = args[:sheet_id] if args.key?(:sheet_id) + end + end + + # Adds a named range to the spreadsheet. + class AddNamedRangeRequest + include Google::Apis::Core::Hashable + + # A named range. + # Corresponds to the JSON property `namedRange` + # @return [Google::Apis::SheetsV4::NamedRange] + attr_accessor :named_range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @named_range = args[:named_range] if args.key?(:named_range) + end + end + + # Update an embedded object's position (such as a moving or resizing a + # chart or image). + class UpdateEmbeddedObjectPositionRequest + include Google::Apis::Core::Hashable + + # The position of an embedded object such as a chart. + # Corresponds to the JSON property `newPosition` + # @return [Google::Apis::SheetsV4::EmbeddedObjectPosition] + attr_accessor :new_position + + # The fields of OverlayPosition + # that should be updated when setting a new position. Used only if + # newPosition.overlayPosition + # is set, in which case at least one field must + # be specified. The root `newPosition.overlayPosition` is implied and + # should not be specified. + # A single `"*"` can be used as short-hand for listing every field. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + # The ID of the object to moved. + # Corresponds to the JSON property `objectId` + # @return [Fixnum] + attr_accessor :object_id_prop + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @new_position = args[:new_position] if args.key?(:new_position) + @fields = args[:fields] if args.key?(:fields) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + end + end + + # A pie chart. + class PieChartSpec + include Google::Apis::Core::Hashable + + # The data included in a domain or series. + # Corresponds to the JSON property `domain` + # @return [Google::Apis::SheetsV4::ChartData] + attr_accessor :domain + + # True if the pie is three dimensional. + # Corresponds to the JSON property `threeDimensional` + # @return [Boolean] + attr_accessor :three_dimensional + alias_method :three_dimensional?, :three_dimensional + + # The data included in a domain or series. + # Corresponds to the JSON property `series` + # @return [Google::Apis::SheetsV4::ChartData] + attr_accessor :series + + # Where the legend of the pie chart should be drawn. + # Corresponds to the JSON property `legendPosition` + # @return [String] + attr_accessor :legend_position + + # The size of the hole in the pie chart. + # Corresponds to the JSON property `pieHole` + # @return [Float] + attr_accessor :pie_hole + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @domain = args[:domain] if args.key?(:domain) + @three_dimensional = args[:three_dimensional] if args.key?(:three_dimensional) + @series = args[:series] if args.key?(:series) + @legend_position = args[:legend_position] if args.key?(:legend_position) + @pie_hole = args[:pie_hole] if args.key?(:pie_hole) + end + end + + # Updates properties of the filter view. + class UpdateFilterViewRequest + include Google::Apis::Core::Hashable + + # The fields that should be updated. At least one field must be specified. + # The root `filter` is implied and should not be specified. + # A single `"*"` can be used as short-hand for listing every field. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + # A filter view. + # Corresponds to the JSON property `filter` + # @return [Google::Apis::SheetsV4::FilterView] + attr_accessor :filter + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @fields = args[:fields] if args.key?(:fields) + @filter = args[:filter] if args.key?(:filter) + end + end + + # A rule describing a conditional format. + class ConditionalFormatRule + include Google::Apis::Core::Hashable + + # A rule that applies a gradient color scale format, based on + # the interpolation points listed. The format of a cell will vary + # based on its contents as compared to the values of the interpolation + # points. + # Corresponds to the JSON property `gradientRule` + # @return [Google::Apis::SheetsV4::GradientRule] + attr_accessor :gradient_rule + + # A rule that may or may not match, depending on the condition. + # Corresponds to the JSON property `booleanRule` + # @return [Google::Apis::SheetsV4::BooleanRule] + attr_accessor :boolean_rule + + # The ranges that will be formatted if the condition is true. + # All the ranges must be on the same grid. + # Corresponds to the JSON property `ranges` + # @return [Array] + attr_accessor :ranges + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @gradient_rule = args[:gradient_rule] if args.key?(:gradient_rule) + @boolean_rule = args[:boolean_rule] if args.key?(:boolean_rule) + @ranges = args[:ranges] if args.key?(:ranges) + end + end + + # Copies data from the source to the destination. + class CopyPasteRequest + include Google::Apis::Core::Hashable + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `source` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :source + + # What kind of data to paste. + # Corresponds to the JSON property `pasteType` + # @return [String] + attr_accessor :paste_type + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `destination` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :destination + + # How that data should be oriented when pasting. + # Corresponds to the JSON property `pasteOrientation` + # @return [String] + attr_accessor :paste_orientation + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @source = args[:source] if args.key?(:source) + @paste_type = args[:paste_type] if args.key?(:paste_type) + @destination = args[:destination] if args.key?(:destination) + @paste_orientation = args[:paste_orientation] if args.key?(:paste_orientation) + end + end + + # A single kind of update to apply to a spreadsheet. + class Request + include Google::Apis::Core::Hashable + + # Updates properties of dimensions within the specified range. + # Corresponds to the JSON property `updateDimensionProperties` + # @return [Google::Apis::SheetsV4::UpdateDimensionPropertiesRequest] + attr_accessor :update_dimension_properties + + # Inserts data into the spreadsheet starting at the specified coordinate. + # Corresponds to the JSON property `pasteData` + # @return [Google::Apis::SheetsV4::PasteDataRequest] + attr_accessor :paste_data + + # Sets the basic filter associated with a sheet. + # Corresponds to the JSON property `setBasicFilter` + # @return [Google::Apis::SheetsV4::SetBasicFilterRequest] + attr_accessor :set_basic_filter + + # Adds a new conditional format rule at the given index. + # All subsequent rules' indexes are incremented. + # Corresponds to the JSON property `addConditionalFormatRule` + # @return [Google::Apis::SheetsV4::AddConditionalFormatRuleRequest] + attr_accessor :add_conditional_format_rule + + # Updates all cells in a range with new data. + # Corresponds to the JSON property `updateCells` + # @return [Google::Apis::SheetsV4::UpdateCellsRequest] + attr_accessor :update_cells + + # Adds a named range to the spreadsheet. + # Corresponds to the JSON property `addNamedRange` + # @return [Google::Apis::SheetsV4::AddNamedRangeRequest] + attr_accessor :add_named_range + + # Updates properties of a spreadsheet. + # Corresponds to the JSON property `updateSpreadsheetProperties` + # @return [Google::Apis::SheetsV4::UpdateSpreadsheetPropertiesRequest] + attr_accessor :update_spreadsheet_properties + + # Deletes the embedded object with the given ID. + # Corresponds to the JSON property `deleteEmbeddedObject` + # @return [Google::Apis::SheetsV4::DeleteEmbeddedObjectRequest] + attr_accessor :delete_embedded_object + + # Updates properties of the filter view. + # Corresponds to the JSON property `updateFilterView` + # @return [Google::Apis::SheetsV4::UpdateFilterViewRequest] + attr_accessor :update_filter_view + + # Adds a new banded range to the spreadsheet. + # Corresponds to the JSON property `addBanding` + # @return [Google::Apis::SheetsV4::AddBandingRequest] + attr_accessor :add_banding + + # Automatically resizes one or more dimensions based on the contents + # of the cells in that dimension. + # Corresponds to the JSON property `autoResizeDimensions` + # @return [Google::Apis::SheetsV4::AutoResizeDimensionsRequest] + attr_accessor :auto_resize_dimensions + + # Adds new cells after the last row with data in a sheet, + # inserting new rows into the sheet if necessary. + # Corresponds to the JSON property `appendCells` + # @return [Google::Apis::SheetsV4::AppendCellsRequest] + attr_accessor :append_cells + + # Moves data from the source to the destination. + # Corresponds to the JSON property `cutPaste` + # @return [Google::Apis::SheetsV4::CutPasteRequest] + attr_accessor :cut_paste + + # Merges all cells in the range. + # Corresponds to the JSON property `mergeCells` + # @return [Google::Apis::SheetsV4::MergeCellsRequest] + attr_accessor :merge_cells + + # Updates properties of the named range with the specified + # namedRangeId. + # Corresponds to the JSON property `updateNamedRange` + # @return [Google::Apis::SheetsV4::UpdateNamedRangeRequest] + attr_accessor :update_named_range + + # Updates properties of the sheet with the specified + # sheetId. + # Corresponds to the JSON property `updateSheetProperties` + # @return [Google::Apis::SheetsV4::UpdateSheetPropertiesRequest] + attr_accessor :update_sheet_properties + + # Deletes the dimensions from the sheet. + # Corresponds to the JSON property `deleteDimension` + # @return [Google::Apis::SheetsV4::DeleteDimensionRequest] + attr_accessor :delete_dimension + + # Fills in more data based on existing data. + # Corresponds to the JSON property `autoFill` + # @return [Google::Apis::SheetsV4::AutoFillRequest] + attr_accessor :auto_fill + + # Sorts data in rows based on a sort order per column. + # Corresponds to the JSON property `sortRange` + # @return [Google::Apis::SheetsV4::SortRangeRequest] + attr_accessor :sort_range + + # Deletes the protected range with the given ID. + # Corresponds to the JSON property `deleteProtectedRange` + # @return [Google::Apis::SheetsV4::DeleteProtectedRangeRequest] + attr_accessor :delete_protected_range + + # Duplicates a particular filter view. + # Corresponds to the JSON property `duplicateFilterView` + # @return [Google::Apis::SheetsV4::DuplicateFilterViewRequest] + attr_accessor :duplicate_filter_view + + # Adds a chart to a sheet in the spreadsheet. + # Corresponds to the JSON property `addChart` + # @return [Google::Apis::SheetsV4::AddChartRequest] + attr_accessor :add_chart + + # Finds and replaces data in cells over a range, sheet, or all sheets. + # Corresponds to the JSON property `findReplace` + # @return [Google::Apis::SheetsV4::FindReplaceRequest] + attr_accessor :find_replace + + # Updates a chart's specifications. + # (This does not move or resize a chart. To move or resize a chart, use + # UpdateEmbeddedObjectPositionRequest.) + # Corresponds to the JSON property `updateChartSpec` + # @return [Google::Apis::SheetsV4::UpdateChartSpecRequest] + attr_accessor :update_chart_spec + + # Splits a column of text into multiple columns, + # based on a delimiter in each cell. + # Corresponds to the JSON property `textToColumns` + # @return [Google::Apis::SheetsV4::TextToColumnsRequest] + attr_accessor :text_to_columns + + # Adds a new sheet. + # When a sheet is added at a given index, + # all subsequent sheets' indexes are incremented. + # To add an object sheet, use AddChartRequest instead and specify + # EmbeddedObjectPosition.sheetId or + # EmbeddedObjectPosition.newSheet. + # Corresponds to the JSON property `addSheet` + # @return [Google::Apis::SheetsV4::AddSheetRequest] + attr_accessor :add_sheet + + # Updates an existing protected range with the specified + # protectedRangeId. + # Corresponds to the JSON property `updateProtectedRange` + # @return [Google::Apis::SheetsV4::UpdateProtectedRangeRequest] + attr_accessor :update_protected_range + + # Deletes a particular filter view. + # Corresponds to the JSON property `deleteFilterView` + # @return [Google::Apis::SheetsV4::DeleteFilterViewRequest] + attr_accessor :delete_filter_view + + # Copies data from the source to the destination. + # Corresponds to the JSON property `copyPaste` + # @return [Google::Apis::SheetsV4::CopyPasteRequest] + attr_accessor :copy_paste + + # Inserts rows or columns in a sheet at a particular index. + # Corresponds to the JSON property `insertDimension` + # @return [Google::Apis::SheetsV4::InsertDimensionRequest] + attr_accessor :insert_dimension + + # Deletes a range of cells, shifting other cells into the deleted area. + # Corresponds to the JSON property `deleteRange` + # @return [Google::Apis::SheetsV4::DeleteRangeRequest] + attr_accessor :delete_range + + # Removes the banded range with the given ID from the spreadsheet. + # Corresponds to the JSON property `deleteBanding` + # @return [Google::Apis::SheetsV4::DeleteBandingRequest] + attr_accessor :delete_banding + + # Adds a filter view. + # Corresponds to the JSON property `addFilterView` + # @return [Google::Apis::SheetsV4::AddFilterViewRequest] + attr_accessor :add_filter_view + + # Sets a data validation rule to every cell in the range. + # To clear validation in a range, call this with no rule specified. + # Corresponds to the JSON property `setDataValidation` + # @return [Google::Apis::SheetsV4::SetDataValidationRequest] + attr_accessor :set_data_validation + + # Updates the borders of a range. + # If a field is not set in the request, that means the border remains as-is. + # For example, with two subsequent UpdateBordersRequest: + # 1. range: A1:A5 `` top: RED, bottom: WHITE `` + # 2. range: A1:A5 `` left: BLUE `` + # That would result in A1:A5 having a borders of + # `` top: RED, bottom: WHITE, left: BLUE ``. + # If you want to clear a border, explicitly set the style to + # NONE. + # Corresponds to the JSON property `updateBorders` + # @return [Google::Apis::SheetsV4::UpdateBordersRequest] + attr_accessor :update_borders + + # Deletes a conditional format rule at the given index. + # All subsequent rules' indexes are decremented. + # Corresponds to the JSON property `deleteConditionalFormatRule` + # @return [Google::Apis::SheetsV4::DeleteConditionalFormatRuleRequest] + attr_accessor :delete_conditional_format_rule + + # Updates all cells in the range to the values in the given Cell object. + # Only the fields listed in the fields field are updated; others are + # unchanged. + # If writing a cell with a formula, the formula's ranges will automatically + # increment for each field in the range. + # For example, if writing a cell with formula `=A1` into range B2:C4, + # B2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`, + # C2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`. + # To keep the formula's ranges static, use the `$` indicator. + # For example, use the formula `=$A$1` to prevent both the row and the + # column from incrementing. + # Corresponds to the JSON property `repeatCell` + # @return [Google::Apis::SheetsV4::RepeatCellRequest] + attr_accessor :repeat_cell + + # Clears the basic filter, if any exists on the sheet. + # Corresponds to the JSON property `clearBasicFilter` + # @return [Google::Apis::SheetsV4::ClearBasicFilterRequest] + attr_accessor :clear_basic_filter + + # Appends rows or columns to the end of a sheet. + # Corresponds to the JSON property `appendDimension` + # @return [Google::Apis::SheetsV4::AppendDimensionRequest] + attr_accessor :append_dimension + + # Updates a conditional format rule at the given index, + # or moves a conditional format rule to another index. + # Corresponds to the JSON property `updateConditionalFormatRule` + # @return [Google::Apis::SheetsV4::UpdateConditionalFormatRuleRequest] + attr_accessor :update_conditional_format_rule + + # Inserts cells into a range, shifting the existing cells over or down. + # Corresponds to the JSON property `insertRange` + # @return [Google::Apis::SheetsV4::InsertRangeRequest] + attr_accessor :insert_range + + # Moves one or more rows or columns. + # Corresponds to the JSON property `moveDimension` + # @return [Google::Apis::SheetsV4::MoveDimensionRequest] + attr_accessor :move_dimension + + # Updates properties of the supplied banded range. + # Corresponds to the JSON property `updateBanding` + # @return [Google::Apis::SheetsV4::UpdateBandingRequest] + attr_accessor :update_banding + + # Adds a new protected range. + # Corresponds to the JSON property `addProtectedRange` + # @return [Google::Apis::SheetsV4::AddProtectedRangeRequest] + attr_accessor :add_protected_range + + # Removes the named range with the given ID from the spreadsheet. + # Corresponds to the JSON property `deleteNamedRange` + # @return [Google::Apis::SheetsV4::DeleteNamedRangeRequest] + attr_accessor :delete_named_range + + # Duplicates the contents of a sheet. + # Corresponds to the JSON property `duplicateSheet` + # @return [Google::Apis::SheetsV4::DuplicateSheetRequest] + attr_accessor :duplicate_sheet + + # Unmerges cells in the given range. + # Corresponds to the JSON property `unmergeCells` + # @return [Google::Apis::SheetsV4::UnmergeCellsRequest] + attr_accessor :unmerge_cells + + # Deletes the requested sheet. + # Corresponds to the JSON property `deleteSheet` + # @return [Google::Apis::SheetsV4::DeleteSheetRequest] + attr_accessor :delete_sheet + + # Update an embedded object's position (such as a moving or resizing a + # chart or image). + # Corresponds to the JSON property `updateEmbeddedObjectPosition` + # @return [Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionRequest] + attr_accessor :update_embedded_object_position + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @update_dimension_properties = args[:update_dimension_properties] if args.key?(:update_dimension_properties) + @paste_data = args[:paste_data] if args.key?(:paste_data) + @set_basic_filter = args[:set_basic_filter] if args.key?(:set_basic_filter) + @add_conditional_format_rule = args[:add_conditional_format_rule] if args.key?(:add_conditional_format_rule) + @update_cells = args[:update_cells] if args.key?(:update_cells) + @add_named_range = args[:add_named_range] if args.key?(:add_named_range) + @update_spreadsheet_properties = args[:update_spreadsheet_properties] if args.key?(:update_spreadsheet_properties) + @delete_embedded_object = args[:delete_embedded_object] if args.key?(:delete_embedded_object) + @update_filter_view = args[:update_filter_view] if args.key?(:update_filter_view) + @add_banding = args[:add_banding] if args.key?(:add_banding) + @auto_resize_dimensions = args[:auto_resize_dimensions] if args.key?(:auto_resize_dimensions) + @append_cells = args[:append_cells] if args.key?(:append_cells) + @cut_paste = args[:cut_paste] if args.key?(:cut_paste) + @merge_cells = args[:merge_cells] if args.key?(:merge_cells) + @update_named_range = args[:update_named_range] if args.key?(:update_named_range) + @update_sheet_properties = args[:update_sheet_properties] if args.key?(:update_sheet_properties) + @delete_dimension = args[:delete_dimension] if args.key?(:delete_dimension) + @auto_fill = args[:auto_fill] if args.key?(:auto_fill) + @sort_range = args[:sort_range] if args.key?(:sort_range) + @delete_protected_range = args[:delete_protected_range] if args.key?(:delete_protected_range) + @duplicate_filter_view = args[:duplicate_filter_view] if args.key?(:duplicate_filter_view) + @add_chart = args[:add_chart] if args.key?(:add_chart) + @find_replace = args[:find_replace] if args.key?(:find_replace) + @update_chart_spec = args[:update_chart_spec] if args.key?(:update_chart_spec) + @text_to_columns = args[:text_to_columns] if args.key?(:text_to_columns) + @add_sheet = args[:add_sheet] if args.key?(:add_sheet) + @update_protected_range = args[:update_protected_range] if args.key?(:update_protected_range) + @delete_filter_view = args[:delete_filter_view] if args.key?(:delete_filter_view) + @copy_paste = args[:copy_paste] if args.key?(:copy_paste) + @insert_dimension = args[:insert_dimension] if args.key?(:insert_dimension) + @delete_range = args[:delete_range] if args.key?(:delete_range) + @delete_banding = args[:delete_banding] if args.key?(:delete_banding) + @add_filter_view = args[:add_filter_view] if args.key?(:add_filter_view) + @set_data_validation = args[:set_data_validation] if args.key?(:set_data_validation) + @update_borders = args[:update_borders] if args.key?(:update_borders) + @delete_conditional_format_rule = args[:delete_conditional_format_rule] if args.key?(:delete_conditional_format_rule) + @repeat_cell = args[:repeat_cell] if args.key?(:repeat_cell) + @clear_basic_filter = args[:clear_basic_filter] if args.key?(:clear_basic_filter) + @append_dimension = args[:append_dimension] if args.key?(:append_dimension) + @update_conditional_format_rule = args[:update_conditional_format_rule] if args.key?(:update_conditional_format_rule) + @insert_range = args[:insert_range] if args.key?(:insert_range) + @move_dimension = args[:move_dimension] if args.key?(:move_dimension) + @update_banding = args[:update_banding] if args.key?(:update_banding) + @add_protected_range = args[:add_protected_range] if args.key?(:add_protected_range) + @delete_named_range = args[:delete_named_range] if args.key?(:delete_named_range) + @duplicate_sheet = args[:duplicate_sheet] if args.key?(:duplicate_sheet) + @unmerge_cells = args[:unmerge_cells] if args.key?(:unmerge_cells) + @delete_sheet = args[:delete_sheet] if args.key?(:delete_sheet) + @update_embedded_object_position = args[:update_embedded_object_position] if args.key?(:update_embedded_object_position) + end + end + + # A condition that can evaluate to true or false. + # BooleanConditions are used by conditional formatting, + # data validation, and the criteria in filters. + class BooleanCondition + include Google::Apis::Core::Hashable + + # The type of condition. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The values of the condition. The number of supported values depends + # on the condition type. Some support zero values, + # others one or two values, + # and ConditionType.ONE_OF_LIST supports an arbitrary number of values. + # Corresponds to the JSON property `values` + # @return [Array] + attr_accessor :values + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type = args[:type] if args.key?(:type) + @values = args[:values] if args.key?(:values) + end + end + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + class GridRange + include Google::Apis::Core::Hashable + + # The start column (inclusive) of the range, or not set if unbounded. + # Corresponds to the JSON property `startColumnIndex` + # @return [Fixnum] + attr_accessor :start_column_index + + # The sheet this range is on. + # Corresponds to the JSON property `sheetId` + # @return [Fixnum] + attr_accessor :sheet_id + + # The end row (exclusive) of the range, or not set if unbounded. + # Corresponds to the JSON property `endRowIndex` + # @return [Fixnum] + attr_accessor :end_row_index + + # The end column (exclusive) of the range, or not set if unbounded. + # Corresponds to the JSON property `endColumnIndex` + # @return [Fixnum] + attr_accessor :end_column_index + + # The start row (inclusive) of the range, or not set if unbounded. + # Corresponds to the JSON property `startRowIndex` + # @return [Fixnum] + attr_accessor :start_row_index + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @start_column_index = args[:start_column_index] if args.key?(:start_column_index) + @sheet_id = args[:sheet_id] if args.key?(:sheet_id) + @end_row_index = args[:end_row_index] if args.key?(:end_row_index) + @end_column_index = args[:end_column_index] if args.key?(:end_column_index) + @start_row_index = args[:start_row_index] if args.key?(:start_row_index) + end + end + + # The specification for a basic chart. See BasicChartType for the list + # of charts this supports. + class BasicChartSpec + include Google::Apis::Core::Hashable + + # The position of the chart legend. + # Corresponds to the JSON property `legendPosition` + # @return [String] + attr_accessor :legend_position + + # The domain of data this is charting. + # Only a single domain is currently supported. + # Corresponds to the JSON property `domains` + # @return [Array] + attr_accessor :domains + + # The number of rows or columns in the data that are "headers". + # If not set, Google Sheets will guess how many rows are headers based + # on the data. + # (Note that BasicChartAxis.title may override the axis title + # inferred from the header values.) + # Corresponds to the JSON property `headerCount` + # @return [Fixnum] + attr_accessor :header_count + + # The axis on the chart. + # Corresponds to the JSON property `axis` + # @return [Array] + attr_accessor :axis + + # The type of the chart. + # Corresponds to the JSON property `chartType` + # @return [String] + attr_accessor :chart_type + + # The data this chart is visualizing. + # Corresponds to the JSON property `series` + # @return [Array] + attr_accessor :series + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @legend_position = args[:legend_position] if args.key?(:legend_position) + @domains = args[:domains] if args.key?(:domains) + @header_count = args[:header_count] if args.key?(:header_count) + @axis = args[:axis] if args.key?(:axis) + @chart_type = args[:chart_type] if args.key?(:chart_type) + @series = args[:series] if args.key?(:series) end end @@ -5839,363 +5641,69 @@ module Google end end - # A single kind of update to apply to a spreadsheet. - class Request + # Data about a specific cell. + class CellData include Google::Apis::Core::Hashable - # Update an embedded object's position (such as a moving or resizing a - # chart or image). - # Corresponds to the JSON property `updateEmbeddedObjectPosition` - # @return [Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionRequest] - attr_accessor :update_embedded_object_position + # The kinds of value that a cell in a spreadsheet can have. + # Corresponds to the JSON property `effectiveValue` + # @return [Google::Apis::SheetsV4::ExtendedValue] + attr_accessor :effective_value - # Removes the named range with the given ID from the spreadsheet. - # Corresponds to the JSON property `deleteNamedRange` - # @return [Google::Apis::SheetsV4::DeleteNamedRangeRequest] - attr_accessor :delete_named_range - - # Updates properties of the named range with the specified - # namedRangeId. - # Corresponds to the JSON property `updateNamedRange` - # @return [Google::Apis::SheetsV4::UpdateNamedRangeRequest] - attr_accessor :update_named_range - - # Adds a filter view. - # Corresponds to the JSON property `addFilterView` - # @return [Google::Apis::SheetsV4::AddFilterViewRequest] - attr_accessor :add_filter_view - - # Updates properties of a spreadsheet. - # Corresponds to the JSON property `updateSpreadsheetProperties` - # @return [Google::Apis::SheetsV4::UpdateSpreadsheetPropertiesRequest] - attr_accessor :update_spreadsheet_properties - - # Appends rows or columns to the end of a sheet. - # Corresponds to the JSON property `appendDimension` - # @return [Google::Apis::SheetsV4::AppendDimensionRequest] - attr_accessor :append_dimension - - # Unmerges cells in the given range. - # Corresponds to the JSON property `unmergeCells` - # @return [Google::Apis::SheetsV4::UnmergeCellsRequest] - attr_accessor :unmerge_cells - - # Inserts cells into a range, shifting the existing cells over or down. - # Corresponds to the JSON property `insertRange` - # @return [Google::Apis::SheetsV4::InsertRangeRequest] - attr_accessor :insert_range - - # Updates an existing protected range with the specified - # protectedRangeId. - # Corresponds to the JSON property `updateProtectedRange` - # @return [Google::Apis::SheetsV4::UpdateProtectedRangeRequest] - attr_accessor :update_protected_range - - # Deletes a particular filter view. - # Corresponds to the JSON property `deleteFilterView` - # @return [Google::Apis::SheetsV4::DeleteFilterViewRequest] - attr_accessor :delete_filter_view - - # Clears the basic filter, if any exists on the sheet. - # Corresponds to the JSON property `clearBasicFilter` - # @return [Google::Apis::SheetsV4::ClearBasicFilterRequest] - attr_accessor :clear_basic_filter - - # Sorts data in rows based on a sort order per column. - # Corresponds to the JSON property `sortRange` - # @return [Google::Apis::SheetsV4::SortRangeRequest] - attr_accessor :sort_range - - # Updates all cells in the range to the values in the given Cell object. - # Only the fields listed in the fields field are updated; others are - # unchanged. - # If writing a cell with a formula, the formula's ranges will automatically - # increment for each field in the range. - # For example, if writing a cell with formula `=A1` into range B2:C4, - # B2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`, - # C2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`. - # To keep the formula's ranges static, use the `$` indicator. - # For example, use the formula `=$A$1` to prevent both the row and the - # column from incrementing. - # Corresponds to the JSON property `repeatCell` - # @return [Google::Apis::SheetsV4::RepeatCellRequest] - attr_accessor :repeat_cell - - # Sets a data validation rule to every cell in the range. - # To clear validation in a range, call this with no rule specified. - # Corresponds to the JSON property `setDataValidation` - # @return [Google::Apis::SheetsV4::SetDataValidationRequest] - attr_accessor :set_data_validation - - # Updates all cells in a range with new data. - # Corresponds to the JSON property `updateCells` - # @return [Google::Apis::SheetsV4::UpdateCellsRequest] - attr_accessor :update_cells - - # Adds a new sheet. - # When a sheet is added at a given index, - # all subsequent sheets' indexes are incremented. - # To add an object sheet, use AddChartRequest instead and specify - # EmbeddedObjectPosition.sheetId or - # EmbeddedObjectPosition.newSheet. - # Corresponds to the JSON property `addSheet` - # @return [Google::Apis::SheetsV4::AddSheetRequest] - attr_accessor :add_sheet - - # Updates properties of the filter view. - # Corresponds to the JSON property `updateFilterView` - # @return [Google::Apis::SheetsV4::UpdateFilterViewRequest] - attr_accessor :update_filter_view - - # Updates properties of the sheet with the specified - # sheetId. - # Corresponds to the JSON property `updateSheetProperties` - # @return [Google::Apis::SheetsV4::UpdateSheetPropertiesRequest] - attr_accessor :update_sheet_properties - - # Updates properties of dimensions within the specified range. - # Corresponds to the JSON property `updateDimensionProperties` - # @return [Google::Apis::SheetsV4::UpdateDimensionPropertiesRequest] - attr_accessor :update_dimension_properties - - # Deletes the requested sheet. - # Corresponds to the JSON property `deleteSheet` - # @return [Google::Apis::SheetsV4::DeleteSheetRequest] - attr_accessor :delete_sheet - - # Finds and replaces data in cells over a range, sheet, or all sheets. - # Corresponds to the JSON property `findReplace` - # @return [Google::Apis::SheetsV4::FindReplaceRequest] - attr_accessor :find_replace - - # Adds a new protected range. - # Corresponds to the JSON property `addProtectedRange` - # @return [Google::Apis::SheetsV4::AddProtectedRangeRequest] - attr_accessor :add_protected_range - - # Deletes the protected range with the given ID. - # Corresponds to the JSON property `deleteProtectedRange` - # @return [Google::Apis::SheetsV4::DeleteProtectedRangeRequest] - attr_accessor :delete_protected_range - - # Updates a conditional format rule at the given index, - # or moves a conditional format rule to another index. - # Corresponds to the JSON property `updateConditionalFormatRule` - # @return [Google::Apis::SheetsV4::UpdateConditionalFormatRuleRequest] - attr_accessor :update_conditional_format_rule - - # Sets the basic filter associated with a sheet. - # Corresponds to the JSON property `setBasicFilter` - # @return [Google::Apis::SheetsV4::SetBasicFilterRequest] - attr_accessor :set_basic_filter - - # Merges all cells in the range. - # Corresponds to the JSON property `mergeCells` - # @return [Google::Apis::SheetsV4::MergeCellsRequest] - attr_accessor :merge_cells - - # Updates properties of the supplied banded range. - # Corresponds to the JSON property `updateBanding` - # @return [Google::Apis::SheetsV4::UpdateBandingRequest] - attr_accessor :update_banding - - # Adds a chart to a sheet in the spreadsheet. - # Corresponds to the JSON property `addChart` - # @return [Google::Apis::SheetsV4::AddChartRequest] - attr_accessor :add_chart - - # Deletes a conditional format rule at the given index. - # All subsequent rules' indexes are decremented. - # Corresponds to the JSON property `deleteConditionalFormatRule` - # @return [Google::Apis::SheetsV4::DeleteConditionalFormatRuleRequest] - attr_accessor :delete_conditional_format_rule - - # Adds a new banded range to the spreadsheet. - # Corresponds to the JSON property `addBanding` - # @return [Google::Apis::SheetsV4::AddBandingRequest] - attr_accessor :add_banding - - # Removes the banded range with the given ID from the spreadsheet. - # Corresponds to the JSON property `deleteBanding` - # @return [Google::Apis::SheetsV4::DeleteBandingRequest] - attr_accessor :delete_banding - - # Updates a chart's specifications. - # (This does not move or resize a chart. To move or resize a chart, use - # UpdateEmbeddedObjectPositionRequest.) - # Corresponds to the JSON property `updateChartSpec` - # @return [Google::Apis::SheetsV4::UpdateChartSpecRequest] - attr_accessor :update_chart_spec - - # Deletes a range of cells, shifting other cells into the deleted area. - # Corresponds to the JSON property `deleteRange` - # @return [Google::Apis::SheetsV4::DeleteRangeRequest] - attr_accessor :delete_range - - # Deletes the dimensions from the sheet. - # Corresponds to the JSON property `deleteDimension` - # @return [Google::Apis::SheetsV4::DeleteDimensionRequest] - attr_accessor :delete_dimension - - # Deletes the embedded object with the given ID. - # Corresponds to the JSON property `deleteEmbeddedObject` - # @return [Google::Apis::SheetsV4::DeleteEmbeddedObjectRequest] - attr_accessor :delete_embedded_object - - # Inserts data into the spreadsheet starting at the specified coordinate. - # Corresponds to the JSON property `pasteData` - # @return [Google::Apis::SheetsV4::PasteDataRequest] - attr_accessor :paste_data - - # Adds a new conditional format rule at the given index. - # All subsequent rules' indexes are incremented. - # Corresponds to the JSON property `addConditionalFormatRule` - # @return [Google::Apis::SheetsV4::AddConditionalFormatRuleRequest] - attr_accessor :add_conditional_format_rule - - # Updates the borders of a range. - # If a field is not set in the request, that means the border remains as-is. - # For example, with two subsequent UpdateBordersRequest: - # 1. range: A1:A5 `` top: RED, bottom: WHITE `` - # 2. range: A1:A5 `` left: BLUE `` - # That would result in A1:A5 having a borders of - # `` top: RED, bottom: WHITE, left: BLUE ``. - # If you want to clear a border, explicitly set the style to - # NONE. - # Corresponds to the JSON property `updateBorders` - # @return [Google::Apis::SheetsV4::UpdateBordersRequest] - attr_accessor :update_borders - - # Automatically resizes one or more dimensions based on the contents - # of the cells in that dimension. - # Corresponds to the JSON property `autoResizeDimensions` - # @return [Google::Apis::SheetsV4::AutoResizeDimensionsRequest] - attr_accessor :auto_resize_dimensions - - # Duplicates the contents of a sheet. - # Corresponds to the JSON property `duplicateSheet` - # @return [Google::Apis::SheetsV4::DuplicateSheetRequest] - attr_accessor :duplicate_sheet - - # Duplicates a particular filter view. - # Corresponds to the JSON property `duplicateFilterView` - # @return [Google::Apis::SheetsV4::DuplicateFilterViewRequest] - attr_accessor :duplicate_filter_view - - # Moves data from the source to the destination. - # Corresponds to the JSON property `cutPaste` - # @return [Google::Apis::SheetsV4::CutPasteRequest] - attr_accessor :cut_paste - - # Adds new cells after the last row with data in a sheet, - # inserting new rows into the sheet if necessary. - # Corresponds to the JSON property `appendCells` - # @return [Google::Apis::SheetsV4::AppendCellsRequest] - attr_accessor :append_cells - - # Adds a named range to the spreadsheet. - # Corresponds to the JSON property `addNamedRange` - # @return [Google::Apis::SheetsV4::AddNamedRangeRequest] - attr_accessor :add_named_range - - # Fills in more data based on existing data. - # Corresponds to the JSON property `autoFill` - # @return [Google::Apis::SheetsV4::AutoFillRequest] - attr_accessor :auto_fill - - # Moves one or more rows or columns. - # Corresponds to the JSON property `moveDimension` - # @return [Google::Apis::SheetsV4::MoveDimensionRequest] - attr_accessor :move_dimension - - # Splits a column of text into multiple columns, - # based on a delimiter in each cell. - # Corresponds to the JSON property `textToColumns` - # @return [Google::Apis::SheetsV4::TextToColumnsRequest] - attr_accessor :text_to_columns - - # Inserts rows or columns in a sheet at a particular index. - # Corresponds to the JSON property `insertDimension` - # @return [Google::Apis::SheetsV4::InsertDimensionRequest] - attr_accessor :insert_dimension - - # Copies data from the source to the destination. - # Corresponds to the JSON property `copyPaste` - # @return [Google::Apis::SheetsV4::CopyPasteRequest] - attr_accessor :copy_paste - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @update_embedded_object_position = args[:update_embedded_object_position] if args.key?(:update_embedded_object_position) - @delete_named_range = args[:delete_named_range] if args.key?(:delete_named_range) - @update_named_range = args[:update_named_range] if args.key?(:update_named_range) - @add_filter_view = args[:add_filter_view] if args.key?(:add_filter_view) - @update_spreadsheet_properties = args[:update_spreadsheet_properties] if args.key?(:update_spreadsheet_properties) - @append_dimension = args[:append_dimension] if args.key?(:append_dimension) - @unmerge_cells = args[:unmerge_cells] if args.key?(:unmerge_cells) - @insert_range = args[:insert_range] if args.key?(:insert_range) - @update_protected_range = args[:update_protected_range] if args.key?(:update_protected_range) - @delete_filter_view = args[:delete_filter_view] if args.key?(:delete_filter_view) - @clear_basic_filter = args[:clear_basic_filter] if args.key?(:clear_basic_filter) - @sort_range = args[:sort_range] if args.key?(:sort_range) - @repeat_cell = args[:repeat_cell] if args.key?(:repeat_cell) - @set_data_validation = args[:set_data_validation] if args.key?(:set_data_validation) - @update_cells = args[:update_cells] if args.key?(:update_cells) - @add_sheet = args[:add_sheet] if args.key?(:add_sheet) - @update_filter_view = args[:update_filter_view] if args.key?(:update_filter_view) - @update_sheet_properties = args[:update_sheet_properties] if args.key?(:update_sheet_properties) - @update_dimension_properties = args[:update_dimension_properties] if args.key?(:update_dimension_properties) - @delete_sheet = args[:delete_sheet] if args.key?(:delete_sheet) - @find_replace = args[:find_replace] if args.key?(:find_replace) - @add_protected_range = args[:add_protected_range] if args.key?(:add_protected_range) - @delete_protected_range = args[:delete_protected_range] if args.key?(:delete_protected_range) - @update_conditional_format_rule = args[:update_conditional_format_rule] if args.key?(:update_conditional_format_rule) - @set_basic_filter = args[:set_basic_filter] if args.key?(:set_basic_filter) - @merge_cells = args[:merge_cells] if args.key?(:merge_cells) - @update_banding = args[:update_banding] if args.key?(:update_banding) - @add_chart = args[:add_chart] if args.key?(:add_chart) - @delete_conditional_format_rule = args[:delete_conditional_format_rule] if args.key?(:delete_conditional_format_rule) - @add_banding = args[:add_banding] if args.key?(:add_banding) - @delete_banding = args[:delete_banding] if args.key?(:delete_banding) - @update_chart_spec = args[:update_chart_spec] if args.key?(:update_chart_spec) - @delete_range = args[:delete_range] if args.key?(:delete_range) - @delete_dimension = args[:delete_dimension] if args.key?(:delete_dimension) - @delete_embedded_object = args[:delete_embedded_object] if args.key?(:delete_embedded_object) - @paste_data = args[:paste_data] if args.key?(:paste_data) - @add_conditional_format_rule = args[:add_conditional_format_rule] if args.key?(:add_conditional_format_rule) - @update_borders = args[:update_borders] if args.key?(:update_borders) - @auto_resize_dimensions = args[:auto_resize_dimensions] if args.key?(:auto_resize_dimensions) - @duplicate_sheet = args[:duplicate_sheet] if args.key?(:duplicate_sheet) - @duplicate_filter_view = args[:duplicate_filter_view] if args.key?(:duplicate_filter_view) - @cut_paste = args[:cut_paste] if args.key?(:cut_paste) - @append_cells = args[:append_cells] if args.key?(:append_cells) - @add_named_range = args[:add_named_range] if args.key?(:add_named_range) - @auto_fill = args[:auto_fill] if args.key?(:auto_fill) - @move_dimension = args[:move_dimension] if args.key?(:move_dimension) - @text_to_columns = args[:text_to_columns] if args.key?(:text_to_columns) - @insert_dimension = args[:insert_dimension] if args.key?(:insert_dimension) - @copy_paste = args[:copy_paste] if args.key?(:copy_paste) - end - end - - # The response when retrieving more than one range of values in a spreadsheet. - class BatchGetValuesResponse - include Google::Apis::Core::Hashable - - # The requested values. The order of the ValueRanges is the same as the - # order of the requested ranges. - # Corresponds to the JSON property `valueRanges` - # @return [Array] - attr_accessor :value_ranges - - # The ID of the spreadsheet the data was retrieved from. - # Corresponds to the JSON property `spreadsheetId` + # The formatted value of the cell. + # This is the value as it's shown to the user. + # This field is read-only. + # Corresponds to the JSON property `formattedValue` # @return [String] - attr_accessor :spreadsheet_id + attr_accessor :formatted_value + + # Runs of rich text applied to subsections of the cell. Runs are only valid + # on user entered strings, not formulas, bools, or numbers. + # Runs start at specific indexes in the text and continue until the next + # run. Properties of a run will continue unless explicitly changed + # in a subsequent run (and properties of the first run will continue + # the properties of the cell unless explicitly changed). + # When writing, the new runs will overwrite any prior runs. When writing a + # new user_entered_value, previous runs will be erased. + # Corresponds to the JSON property `textFormatRuns` + # @return [Array] + attr_accessor :text_format_runs + + # A hyperlink this cell points to, if any. + # This field is read-only. (To set it, use a `=HYPERLINK` formula.) + # Corresponds to the JSON property `hyperlink` + # @return [String] + attr_accessor :hyperlink + + # A pivot table. + # Corresponds to the JSON property `pivotTable` + # @return [Google::Apis::SheetsV4::PivotTable] + attr_accessor :pivot_table + + # The format of a cell. + # Corresponds to the JSON property `userEnteredFormat` + # @return [Google::Apis::SheetsV4::CellFormat] + attr_accessor :user_entered_format + + # Any note on the cell. + # Corresponds to the JSON property `note` + # @return [String] + attr_accessor :note + + # The format of a cell. + # Corresponds to the JSON property `effectiveFormat` + # @return [Google::Apis::SheetsV4::CellFormat] + attr_accessor :effective_format + + # The kinds of value that a cell in a spreadsheet can have. + # Corresponds to the JSON property `userEnteredValue` + # @return [Google::Apis::SheetsV4::ExtendedValue] + attr_accessor :user_entered_value + + # A data validation rule. + # Corresponds to the JSON property `dataValidation` + # @return [Google::Apis::SheetsV4::DataValidationRule] + attr_accessor :data_validation def initialize(**args) update!(**args) @@ -6203,30 +5711,138 @@ module Google # Update properties of this object def update!(**args) - @value_ranges = args[:value_ranges] if args.key?(:value_ranges) - @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) + @effective_value = args[:effective_value] if args.key?(:effective_value) + @formatted_value = args[:formatted_value] if args.key?(:formatted_value) + @text_format_runs = args[:text_format_runs] if args.key?(:text_format_runs) + @hyperlink = args[:hyperlink] if args.key?(:hyperlink) + @pivot_table = args[:pivot_table] if args.key?(:pivot_table) + @user_entered_format = args[:user_entered_format] if args.key?(:user_entered_format) + @note = args[:note] if args.key?(:note) + @effective_format = args[:effective_format] if args.key?(:effective_format) + @user_entered_value = args[:user_entered_value] if args.key?(:user_entered_value) + @data_validation = args[:data_validation] if args.key?(:data_validation) end end - # Inserts rows or columns in a sheet at a particular index. - class InsertDimensionRequest + # The request for updating any aspect of a spreadsheet. + class BatchUpdateSpreadsheetRequest include Google::Apis::Core::Hashable - # Whether dimension properties should be extended from the dimensions - # before or after the newly inserted dimensions. - # True to inherit from the dimensions before (in which case the start - # index must be greater than 0), and false to inherit from the dimensions - # after. - # For example, if row index 0 has red background and row index 1 - # has a green background, then inserting 2 rows at index 1 can inherit - # either the green or red background. If `inheritFromBefore` is true, - # the two new rows will be red (because the row before the insertion point - # was red), whereas if `inheritFromBefore` is false, the two new rows will - # be green (because the row after the insertion point was green). - # Corresponds to the JSON property `inheritFromBefore` + # Determines if the update response should include the spreadsheet + # resource. + # Corresponds to the JSON property `includeSpreadsheetInResponse` # @return [Boolean] - attr_accessor :inherit_from_before - alias_method :inherit_from_before?, :inherit_from_before + attr_accessor :include_spreadsheet_in_response + alias_method :include_spreadsheet_in_response?, :include_spreadsheet_in_response + + # Limits the ranges included in the response spreadsheet. + # Meaningful only if include_spreadsheet_response is 'true'. + # Corresponds to the JSON property `responseRanges` + # @return [Array] + attr_accessor :response_ranges + + # True if grid data should be returned. Meaningful only if + # if include_spreadsheet_response is 'true'. + # This parameter is ignored if a field mask was set in the request. + # Corresponds to the JSON property `responseIncludeGridData` + # @return [Boolean] + attr_accessor :response_include_grid_data + alias_method :response_include_grid_data?, :response_include_grid_data + + # A list of updates to apply to the spreadsheet. + # Corresponds to the JSON property `requests` + # @return [Array] + attr_accessor :requests + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @include_spreadsheet_in_response = args[:include_spreadsheet_in_response] if args.key?(:include_spreadsheet_in_response) + @response_ranges = args[:response_ranges] if args.key?(:response_ranges) + @response_include_grid_data = args[:response_include_grid_data] if args.key?(:response_include_grid_data) + @requests = args[:requests] if args.key?(:requests) + end + end + + # The amount of padding around the cell, in pixels. + # When updating padding, every field must be specified. + class Padding + include Google::Apis::Core::Hashable + + # The bottom padding of the cell. + # Corresponds to the JSON property `bottom` + # @return [Fixnum] + attr_accessor :bottom + + # The top padding of the cell. + # Corresponds to the JSON property `top` + # @return [Fixnum] + attr_accessor :top + + # The left padding of the cell. + # Corresponds to the JSON property `left` + # @return [Fixnum] + attr_accessor :left + + # The right padding of the cell. + # Corresponds to the JSON property `right` + # @return [Fixnum] + attr_accessor :right + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @bottom = args[:bottom] if args.key?(:bottom) + @top = args[:top] if args.key?(:top) + @left = args[:left] if args.key?(:left) + @right = args[:right] if args.key?(:right) + end + end + + # An axis of the chart. + # A chart may not have more than one axis per + # axis position. + class BasicChartAxis + include Google::Apis::Core::Hashable + + # The format of a run of text in a cell. + # Absent values indicate that the field isn't specified. + # Corresponds to the JSON property `format` + # @return [Google::Apis::SheetsV4::TextFormat] + attr_accessor :format + + # The position of this axis. + # Corresponds to the JSON property `position` + # @return [String] + attr_accessor :position + + # The title of this axis. If set, this overrides any title inferred + # from headers of the data. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @format = args[:format] if args.key?(:format) + @position = args[:position] if args.key?(:position) + @title = args[:title] if args.key?(:title) + end + end + + # Deletes the dimensions from the sheet. + class DeleteDimensionRequest + include Google::Apis::Core::Hashable # A range along a single dimension on a sheet. # All indexes are zero-based. @@ -6243,19 +5859,25 @@ module Google # Update properties of this object def update!(**args) - @inherit_from_before = args[:inherit_from_before] if args.key?(:inherit_from_before) @range = args[:range] if args.key?(:range) end end - # Deletes the embedded object with the given ID. - class DeleteEmbeddedObjectRequest + # Updates a chart's specifications. + # (This does not move or resize a chart. To move or resize a chart, use + # UpdateEmbeddedObjectPositionRequest.) + class UpdateChartSpecRequest include Google::Apis::Core::Hashable - # The ID of the embedded object to delete. - # Corresponds to the JSON property `objectId` + # The specifications of a chart. + # Corresponds to the JSON property `spec` + # @return [Google::Apis::SheetsV4::ChartSpec] + attr_accessor :spec + + # The ID of the chart to update. + # Corresponds to the JSON property `chartId` # @return [Fixnum] - attr_accessor :object_id_prop + attr_accessor :chart_id def initialize(**args) update!(**args) @@ -6263,48 +5885,91 @@ module Google # Update properties of this object def update!(**args) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + @spec = args[:spec] if args.key?(:spec) + @chart_id = args[:chart_id] if args.key?(:chart_id) end end - # A banded (alternating colors) range in a sheet. - class BandedRange + # Deletes a particular filter view. + class DeleteFilterViewRequest include Google::Apis::Core::Hashable - # The id of the banded range. - # Corresponds to the JSON property `bandedRangeId` + # The ID of the filter to delete. + # Corresponds to the JSON property `filterId` # @return [Fixnum] - attr_accessor :banded_range_id + attr_accessor :filter_id - # Properties referring a single dimension (either row or column). If both - # BandedRange.row_properties and BandedRange.column_properties are - # set, the fill colors are applied to cells according to the following rules: - # * header_color and footer_color take priority over band colors. - # * first_band_color takes priority over second_band_color. - # * row_properties takes priority over column_properties. - # For example, the first row color takes priority over the first column - # color, but the first column color takes priority over the second row color. - # Similarly, the row header takes priority over the column header in the - # top left cell, but the column header takes priority over the first row - # color if the row header is not set. - # Corresponds to the JSON property `rowProperties` - # @return [Google::Apis::SheetsV4::BandingProperties] - attr_accessor :row_properties + def initialize(**args) + update!(**args) + end - # Properties referring a single dimension (either row or column). If both - # BandedRange.row_properties and BandedRange.column_properties are - # set, the fill colors are applied to cells according to the following rules: - # * header_color and footer_color take priority over band colors. - # * first_band_color takes priority over second_band_color. - # * row_properties takes priority over column_properties. - # For example, the first row color takes priority over the first column - # color, but the first column color takes priority over the second row color. - # Similarly, the row header takes priority over the column header in the - # top left cell, but the column header takes priority over the first row - # color if the row header is not set. - # Corresponds to the JSON property `columnProperties` - # @return [Google::Apis::SheetsV4::BandingProperties] - attr_accessor :column_properties + # Update properties of this object + def update!(**args) + @filter_id = args[:filter_id] if args.key?(:filter_id) + end + end + + # The response when updating a range of values in a spreadsheet. + class BatchUpdateValuesResponse + include Google::Apis::Core::Hashable + + # One UpdateValuesResponse per requested range, in the same order as + # the requests appeared. + # Corresponds to the JSON property `responses` + # @return [Array] + attr_accessor :responses + + # The total number of sheets where at least one cell in the sheet was + # updated. + # Corresponds to the JSON property `totalUpdatedSheets` + # @return [Fixnum] + attr_accessor :total_updated_sheets + + # The total number of cells updated. + # Corresponds to the JSON property `totalUpdatedCells` + # @return [Fixnum] + attr_accessor :total_updated_cells + + # The total number of columns where at least one cell in the column was + # updated. + # Corresponds to the JSON property `totalUpdatedColumns` + # @return [Fixnum] + attr_accessor :total_updated_columns + + # The spreadsheet the updates were applied to. + # Corresponds to the JSON property `spreadsheetId` + # @return [String] + attr_accessor :spreadsheet_id + + # The total number of rows where at least one cell in the row was updated. + # Corresponds to the JSON property `totalUpdatedRows` + # @return [Fixnum] + attr_accessor :total_updated_rows + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @responses = args[:responses] if args.key?(:responses) + @total_updated_sheets = args[:total_updated_sheets] if args.key?(:total_updated_sheets) + @total_updated_cells = args[:total_updated_cells] if args.key?(:total_updated_cells) + @total_updated_columns = args[:total_updated_columns] if args.key?(:total_updated_columns) + @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) + @total_updated_rows = args[:total_updated_rows] if args.key?(:total_updated_rows) + end + end + + # Sorts data in rows based on a sort order per column. + class SortRangeRequest + include Google::Apis::Core::Hashable + + # The sort order per column. Later specifications are used when values + # are equal in the earlier specifications. + # Corresponds to the JSON property `sortSpecs` + # @return [Array] + attr_accessor :sort_specs # A range on a sheet. # All indexes are zero-based. @@ -6338,21 +6003,45 @@ module Google # Update properties of this object def update!(**args) - @banded_range_id = args[:banded_range_id] if args.key?(:banded_range_id) - @row_properties = args[:row_properties] if args.key?(:row_properties) - @column_properties = args[:column_properties] if args.key?(:column_properties) + @sort_specs = args[:sort_specs] if args.key?(:sort_specs) @range = args[:range] if args.key?(:range) end end - # The result of deleting a conditional format rule. - class DeleteConditionalFormatRuleResponse + # Merges all cells in the range. + class MergeCellsRequest include Google::Apis::Core::Hashable - # A rule describing a conditional format. - # Corresponds to the JSON property `rule` - # @return [Google::Apis::SheetsV4::ConditionalFormatRule] - attr_accessor :rule + # How the cells should be merged. + # Corresponds to the JSON property `mergeType` + # @return [String] + attr_accessor :merge_type + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :range def initialize(**args) update!(**args) @@ -6360,7 +6049,318 @@ module Google # Update properties of this object def update!(**args) - @rule = args[:rule] if args.key?(:rule) + @merge_type = args[:merge_type] if args.key?(:merge_type) + @range = args[:range] if args.key?(:range) + end + end + + # Adds a new protected range. + class AddProtectedRangeRequest + include Google::Apis::Core::Hashable + + # A protected range. + # Corresponds to the JSON property `protectedRange` + # @return [Google::Apis::SheetsV4::ProtectedRange] + attr_accessor :protected_range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @protected_range = args[:protected_range] if args.key?(:protected_range) + end + end + + # The request for clearing more than one range of values in a spreadsheet. + class BatchClearValuesRequest + include Google::Apis::Core::Hashable + + # The ranges to clear, in A1 notation. + # Corresponds to the JSON property `ranges` + # @return [Array] + attr_accessor :ranges + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @ranges = args[:ranges] if args.key?(:ranges) + end + end + + # The result of a filter view being duplicated. + class DuplicateFilterViewResponse + include Google::Apis::Core::Hashable + + # A filter view. + # Corresponds to the JSON property `filter` + # @return [Google::Apis::SheetsV4::FilterView] + attr_accessor :filter + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @filter = args[:filter] if args.key?(:filter) + end + end + + # The result of duplicating a sheet. + class DuplicateSheetResponse + include Google::Apis::Core::Hashable + + # Properties of a sheet. + # Corresponds to the JSON property `properties` + # @return [Google::Apis::SheetsV4::SheetProperties] + attr_accessor :properties + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @properties = args[:properties] if args.key?(:properties) + end + end + + # Clears the basic filter, if any exists on the sheet. + class ClearBasicFilterRequest + include Google::Apis::Core::Hashable + + # The sheet ID on which the basic filter should be cleared. + # Corresponds to the JSON property `sheetId` + # @return [Fixnum] + attr_accessor :sheet_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @sheet_id = args[:sheet_id] if args.key?(:sheet_id) + end + end + + # Splits a column of text into multiple columns, + # based on a delimiter in each cell. + class TextToColumnsRequest + include Google::Apis::Core::Hashable + + # The delimiter to use. Used only if delimiterType is + # CUSTOM. + # Corresponds to the JSON property `delimiter` + # @return [String] + attr_accessor :delimiter + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `source` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :source + + # The delimiter type to use. + # Corresponds to the JSON property `delimiterType` + # @return [String] + attr_accessor :delimiter_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @delimiter = args[:delimiter] if args.key?(:delimiter) + @source = args[:source] if args.key?(:source) + @delimiter_type = args[:delimiter_type] if args.key?(:delimiter_type) + end + end + + # Removes the banded range with the given ID from the spreadsheet. + class DeleteBandingRequest + include Google::Apis::Core::Hashable + + # The ID of the banded range to delete. + # Corresponds to the JSON property `bandedRangeId` + # @return [Fixnum] + attr_accessor :banded_range_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @banded_range_id = args[:banded_range_id] if args.key?(:banded_range_id) + end + end + + # The reply for batch updating a spreadsheet. + class BatchUpdateSpreadsheetResponse + include Google::Apis::Core::Hashable + + # The reply of the updates. This maps 1:1 with the updates, although + # replies to some requests may be empty. + # Corresponds to the JSON property `replies` + # @return [Array] + attr_accessor :replies + + # Resource that represents a spreadsheet. + # Corresponds to the JSON property `updatedSpreadsheet` + # @return [Google::Apis::SheetsV4::Spreadsheet] + attr_accessor :updated_spreadsheet + + # The spreadsheet the updates were applied to. + # Corresponds to the JSON property `spreadsheetId` + # @return [String] + attr_accessor :spreadsheet_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @replies = args[:replies] if args.key?(:replies) + @updated_spreadsheet = args[:updated_spreadsheet] if args.key?(:updated_spreadsheet) + @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) + end + end + + # The response when updating a range of values in a spreadsheet. + class AppendValuesResponse + include Google::Apis::Core::Hashable + + # The spreadsheet the updates were applied to. + # Corresponds to the JSON property `spreadsheetId` + # @return [String] + attr_accessor :spreadsheet_id + + # The response when updating a range of values in a spreadsheet. + # Corresponds to the JSON property `updates` + # @return [Google::Apis::SheetsV4::UpdateValuesResponse] + attr_accessor :updates + + # The range (in A1 notation) of the table that values are being appended to + # (before the values were appended). + # Empty if no table was found. + # Corresponds to the JSON property `tableRange` + # @return [String] + attr_accessor :table_range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) + @updates = args[:updates] if args.key?(:updates) + @table_range = args[:table_range] if args.key?(:table_range) + end + end + + # Moves one or more rows or columns. + class MoveDimensionRequest + include Google::Apis::Core::Hashable + + # The zero-based start index of where to move the source data to, + # based on the coordinates *before* the source data is removed + # from the grid. Existing data will be shifted down or right + # (depending on the dimension) to make room for the moved dimensions. + # The source dimensions are removed from the grid, so the + # the data may end up in a different index than specified. + # For example, given `A1..A5` of `0, 1, 2, 3, 4` and wanting to move + # `"1"` and `"2"` to between `"3"` and `"4"`, the source would be + # `ROWS [1..3)`,and the destination index would be `"4"` + # (the zero-based index of row 5). + # The end result would be `A1..A5` of `0, 3, 1, 2, 4`. + # Corresponds to the JSON property `destinationIndex` + # @return [Fixnum] + attr_accessor :destination_index + + # A range along a single dimension on a sheet. + # All indexes are zero-based. + # Indexes are half open: the start index is inclusive + # and the end index is exclusive. + # Missing indexes indicate the range is unbounded on that side. + # Corresponds to the JSON property `source` + # @return [Google::Apis::SheetsV4::DimensionRange] + attr_accessor :source + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @destination_index = args[:destination_index] if args.key?(:destination_index) + @source = args[:source] if args.key?(:source) + end + end + + # Criteria for showing/hiding rows in a pivot table. + class PivotFilterCriteria + include Google::Apis::Core::Hashable + + # Values that should be included. Values not listed here are excluded. + # Corresponds to the JSON property `visibleValues` + # @return [Array] + attr_accessor :visible_values + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @visible_values = args[:visible_values] if args.key?(:visible_values) + end + end + + # Adds a filter view. + class AddFilterViewRequest + include Google::Apis::Core::Hashable + + # A filter view. + # Corresponds to the JSON property `filter` + # @return [Google::Apis::SheetsV4::FilterView] + attr_accessor :filter + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @filter = args[:filter] if args.key?(:filter) end end end diff --git a/generated/google/apis/sheets_v4/representations.rb b/generated/google/apis/sheets_v4/representations.rb index 5f39c7580..2ffd98563 100644 --- a/generated/google/apis/sheets_v4/representations.rb +++ b/generated/google/apis/sheets_v4/representations.rb @@ -22,469 +22,25 @@ module Google module Apis module SheetsV4 - class AddNamedRangeResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateProtectedRangeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Padding - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MergeCellsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddSheetResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PivotGroupValueMetadata - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateEmbeddedObjectPositionResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ClearValuesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateConditionalFormatRuleRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TextFormat - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateChartSpecRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GridCoordinate - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DeleteFilterViewRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BatchUpdateValuesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateNamedRangeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateValuesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SpreadsheetProperties - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CellData - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UnmergeCellsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TextToColumnsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddProtectedRangeResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BooleanCondition - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DeleteProtectedRangeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BasicChartDomain - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DimensionRange - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Response - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class AddConditionalFormatRuleRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class FilterView - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SortRangeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddBandingResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TextFormatRun - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateFilterViewRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateConditionalFormatRuleResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class FilterCriteria - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DeleteDimensionRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PivotTable - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DataValidationRule - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateSpreadsheetPropertiesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ChartSourceRange - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BatchUpdateValuesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ClearBasicFilterRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BatchClearValuesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ConditionalFormatRule - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateBordersRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PivotFilterCriteria - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Borders - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class EmbeddedChart - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Color - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddSheetRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddProtectedRangeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ValueRange - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class FindReplaceResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AppendValuesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CellFormat - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MoveDimensionRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BasicChartAxis - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PivotGroupSortValueBucket - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DimensionProperties - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class EmbeddedObjectPosition - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class InterpolationPoint - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ErrorValue - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DuplicateFilterViewRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BatchUpdateSpreadsheetRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SheetProperties - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ClearValuesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ProtectedRange - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DeleteConditionalFormatRuleRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DeleteRangeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class InsertRangeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class ChartSpec class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class SourceAndDestination - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ConditionValue - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PasteDataRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class FindReplaceRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SortSpec - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CopySheetToAnotherSpreadsheetRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class NumberFormat class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class BatchClearValuesRequest + class SheetProperties class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -496,139 +52,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Editors + class SourceAndDestination class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Spreadsheet - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GridData - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PivotValue - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DeleteBandingRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BasicFilter - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DuplicateSheetRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddFilterViewResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DuplicateSheetResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Border - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddNamedRangeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddChartResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddBandingRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AppendCellsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class RowData - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BasicChartSeries - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class NamedRange - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class RepeatCellRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BasicChartSpec - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateEmbeddedObjectPositionRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SetBasicFilterRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AutoResizeDimensionsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DuplicateFilterViewResponse + class FilterView class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -640,79 +70,55 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class PivotGroup + class BasicFilter class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class GridRange + class AddProtectedRangeResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class DeleteSheetRequest + class UpdateValuesResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class UpdateBandingRequest + class ErrorValue class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ChartData + class PivotValue class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Sheet + class CopySheetToAnotherSpreadsheetRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class CopyPasteRequest + class PivotGroupSortValueBucket class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class UpdateCellsRequest + class EmbeddedObjectPosition class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ExtendedValue - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BatchUpdateSpreadsheetResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GradientRule - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CutPasteRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class OverlayPosition + class DeleteProtectedRangeRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -724,73 +130,25 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class PieChartSpec + class GradientRule class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class UpdateSheetPropertiesRequest + class ClearValuesRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class BooleanRule + class SetBasicFilterRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class AppendDimensionRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddFilterViewRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GridProperties - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DeleteNamedRangeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddChartRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SetDataValidationRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Request - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BatchGetValuesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class InsertDimensionRequest + class InterpolationPoint class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -802,295 +160,658 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class FindReplaceResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DuplicateFilterViewRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DeleteSheetRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpdateConditionalFormatRuleResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ConditionValue + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DuplicateSheetRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ExtendedValue + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AddChartRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Spreadsheet + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BatchClearValuesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class BandedRange class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class UpdateProtectedRangeRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TextFormat + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AddSheetResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AddFilterViewResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class OverlayPosition + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SpreadsheetProperties + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RepeatCellRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AddChartResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class InsertDimensionRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpdateSpreadsheetPropertiesRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ProtectedRange + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BatchUpdateValuesRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DimensionProperties + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class NamedRange + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DimensionRange + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CutPasteRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Borders + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BasicChartSeries + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AutoResizeDimensionsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpdateBordersRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CellFormat + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ClearValuesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DeleteConditionalFormatRuleRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AddBandingResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DeleteNamedRangeRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ChartData + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BatchGetValuesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpdateBandingRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Color + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PivotGroup + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PivotTable + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ChartSourceRange + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ValueRange + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AppendCellsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AddBandingRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Response + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TextFormatRun + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class EmbeddedChart + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class InsertRangeRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AddNamedRangeResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RowData + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Border + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GridData + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpdateNamedRangeRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class FindReplaceRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AddSheetRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpdateCellsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class DeleteConditionalFormatRuleResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class AddNamedRangeResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :named_range, as: 'namedRange', class: Google::Apis::SheetsV4::NamedRange, decorator: Google::Apis::SheetsV4::NamedRange::Representation + class DeleteRangeRequest + class Representation < Google::Apis::Core::JsonRepresentation; end - end - end - - class UpdateProtectedRangeRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :protected_range, as: 'protectedRange', class: Google::Apis::SheetsV4::ProtectedRange, decorator: Google::Apis::SheetsV4::ProtectedRange::Representation - - property :fields, as: 'fields' - end - end - - class Padding - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :right, as: 'right' - property :left, as: 'left' - property :top, as: 'top' - property :bottom, as: 'bottom' - end - end - - class MergeCellsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :merge_type, as: 'mergeType' - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - end - end - - class AddSheetResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :properties, as: 'properties', class: Google::Apis::SheetsV4::SheetProperties, decorator: Google::Apis::SheetsV4::SheetProperties::Representation - - end - end - - class PivotGroupValueMetadata - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :value, as: 'value', class: Google::Apis::SheetsV4::ExtendedValue, decorator: Google::Apis::SheetsV4::ExtendedValue::Representation - - property :collapsed, as: 'collapsed' - end - end - - class UpdateEmbeddedObjectPositionResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :position, as: 'position', class: Google::Apis::SheetsV4::EmbeddedObjectPosition, decorator: Google::Apis::SheetsV4::EmbeddedObjectPosition::Representation - - end - end - - class ClearValuesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :spreadsheet_id, as: 'spreadsheetId' - property :cleared_range, as: 'clearedRange' - end - end - - class UpdateConditionalFormatRuleRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :sheet_id, as: 'sheetId' - property :rule, as: 'rule', class: Google::Apis::SheetsV4::ConditionalFormatRule, decorator: Google::Apis::SheetsV4::ConditionalFormatRule::Representation - - property :index, as: 'index' - property :new_index, as: 'newIndex' - end - end - - class TextFormat - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :bold, as: 'bold' - property :italic, as: 'italic' - property :foreground_color, as: 'foregroundColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation - - property :font_family, as: 'fontFamily' - property :strikethrough, as: 'strikethrough' - property :font_size, as: 'fontSize' - property :underline, as: 'underline' - end - end - - class UpdateChartSpecRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :chart_id, as: 'chartId' - property :spec, as: 'spec', class: Google::Apis::SheetsV4::ChartSpec, decorator: Google::Apis::SheetsV4::ChartSpec::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class GridCoordinate - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :sheet_id, as: 'sheetId' - property :row_index, as: 'rowIndex' - property :column_index, as: 'columnIndex' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end - class DeleteFilterViewRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :filter_id, as: 'filterId' - end - end + class UpdateSheetPropertiesRequest + class Representation < Google::Apis::Core::JsonRepresentation; end - class BatchUpdateValuesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :total_updated_sheets, as: 'totalUpdatedSheets' - property :total_updated_columns, as: 'totalUpdatedColumns' - collection :responses, as: 'responses', class: Google::Apis::SheetsV4::UpdateValuesResponse, decorator: Google::Apis::SheetsV4::UpdateValuesResponse::Representation - - property :total_updated_cells, as: 'totalUpdatedCells' - property :spreadsheet_id, as: 'spreadsheetId' - property :total_updated_rows, as: 'totalUpdatedRows' - end - end - - class UpdateNamedRangeRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :fields, as: 'fields' - property :named_range, as: 'namedRange', class: Google::Apis::SheetsV4::NamedRange, decorator: Google::Apis::SheetsV4::NamedRange::Representation - - end - end - - class UpdateValuesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :updated_columns, as: 'updatedColumns' - property :updated_cells, as: 'updatedCells' - property :updated_data, as: 'updatedData', class: Google::Apis::SheetsV4::ValueRange, decorator: Google::Apis::SheetsV4::ValueRange::Representation - - property :updated_range, as: 'updatedRange' - property :spreadsheet_id, as: 'spreadsheetId' - property :updated_rows, as: 'updatedRows' - end - end - - class SpreadsheetProperties - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :time_zone, as: 'timeZone' - property :auto_recalc, as: 'autoRecalc' - property :locale, as: 'locale' - property :title, as: 'title' - property :default_format, as: 'defaultFormat', class: Google::Apis::SheetsV4::CellFormat, decorator: Google::Apis::SheetsV4::CellFormat::Representation - - end - end - - class CellData - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :hyperlink, as: 'hyperlink' - property :effective_format, as: 'effectiveFormat', class: Google::Apis::SheetsV4::CellFormat, decorator: Google::Apis::SheetsV4::CellFormat::Representation - - property :note, as: 'note' - property :formatted_value, as: 'formattedValue' - property :user_entered_value, as: 'userEnteredValue', class: Google::Apis::SheetsV4::ExtendedValue, decorator: Google::Apis::SheetsV4::ExtendedValue::Representation - - property :data_validation, as: 'dataValidation', class: Google::Apis::SheetsV4::DataValidationRule, decorator: Google::Apis::SheetsV4::DataValidationRule::Representation - - property :user_entered_format, as: 'userEnteredFormat', class: Google::Apis::SheetsV4::CellFormat, decorator: Google::Apis::SheetsV4::CellFormat::Representation - - property :pivot_table, as: 'pivotTable', class: Google::Apis::SheetsV4::PivotTable, decorator: Google::Apis::SheetsV4::PivotTable::Representation - - collection :text_format_runs, as: 'textFormatRuns', class: Google::Apis::SheetsV4::TextFormatRun, decorator: Google::Apis::SheetsV4::TextFormatRun::Representation - - property :effective_value, as: 'effectiveValue', class: Google::Apis::SheetsV4::ExtendedValue, decorator: Google::Apis::SheetsV4::ExtendedValue::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class UnmergeCellsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end - class TextToColumnsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + class GridProperties + class Representation < Google::Apis::Core::JsonRepresentation; end - property :delimiter, as: 'delimiter' - property :delimiter_type, as: 'delimiterType' - end + include Google::Apis::Core::JsonObjectSupport end - class AddProtectedRangeResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :protected_range, as: 'protectedRange', class: Google::Apis::SheetsV4::ProtectedRange, decorator: Google::Apis::SheetsV4::ProtectedRange::Representation + class UpdateEmbeddedObjectPositionResponse + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end - class BooleanCondition - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :values, as: 'values', class: Google::Apis::SheetsV4::ConditionValue, decorator: Google::Apis::SheetsV4::ConditionValue::Representation + class SortSpec + class Representation < Google::Apis::Core::JsonRepresentation; end - property :type, as: 'type' - end + include Google::Apis::Core::JsonObjectSupport end - class DeleteProtectedRangeRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :protected_range_id, as: 'protectedRangeId' - end + class Sheet + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BooleanRule + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class FilterCriteria + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PivotGroupValueMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Editors + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpdateConditionalFormatRuleRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class BasicChartDomain - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :domain, as: 'domain', class: Google::Apis::SheetsV4::ChartData, decorator: Google::Apis::SheetsV4::ChartData::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end - class DimensionRange - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :sheet_id, as: 'sheetId' - property :end_index, as: 'endIndex' - property :start_index, as: 'startIndex' - property :dimension, as: 'dimension' - end + class DataValidationRule + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end - class Response - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :update_embedded_object_position, as: 'updateEmbeddedObjectPosition', class: Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionResponse, decorator: Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionResponse::Representation + class PasteDataRequest + class Representation < Google::Apis::Core::JsonRepresentation; end - property :add_filter_view, as: 'addFilterView', class: Google::Apis::SheetsV4::AddFilterViewResponse, decorator: Google::Apis::SheetsV4::AddFilterViewResponse::Representation + include Google::Apis::Core::JsonObjectSupport + end - property :add_sheet, as: 'addSheet', class: Google::Apis::SheetsV4::AddSheetResponse, decorator: Google::Apis::SheetsV4::AddSheetResponse::Representation + class AppendDimensionRequest + class Representation < Google::Apis::Core::JsonRepresentation; end - property :find_replace, as: 'findReplace', class: Google::Apis::SheetsV4::FindReplaceResponse, decorator: Google::Apis::SheetsV4::FindReplaceResponse::Representation + include Google::Apis::Core::JsonObjectSupport + end - property :add_protected_range, as: 'addProtectedRange', class: Google::Apis::SheetsV4::AddProtectedRangeResponse, decorator: Google::Apis::SheetsV4::AddProtectedRangeResponse::Representation + class AddNamedRangeRequest + class Representation < Google::Apis::Core::JsonRepresentation; end - property :update_conditional_format_rule, as: 'updateConditionalFormatRule', class: Google::Apis::SheetsV4::UpdateConditionalFormatRuleResponse, decorator: Google::Apis::SheetsV4::UpdateConditionalFormatRuleResponse::Representation + include Google::Apis::Core::JsonObjectSupport + end - property :add_chart, as: 'addChart', class: Google::Apis::SheetsV4::AddChartResponse, decorator: Google::Apis::SheetsV4::AddChartResponse::Representation + class UpdateEmbeddedObjectPositionRequest + class Representation < Google::Apis::Core::JsonRepresentation; end - property :delete_conditional_format_rule, as: 'deleteConditionalFormatRule', class: Google::Apis::SheetsV4::DeleteConditionalFormatRuleResponse, decorator: Google::Apis::SheetsV4::DeleteConditionalFormatRuleResponse::Representation + include Google::Apis::Core::JsonObjectSupport + end - property :add_banding, as: 'addBanding', class: Google::Apis::SheetsV4::AddBandingResponse, decorator: Google::Apis::SheetsV4::AddBandingResponse::Representation + class PieChartSpec + class Representation < Google::Apis::Core::JsonRepresentation; end - property :duplicate_sheet, as: 'duplicateSheet', class: Google::Apis::SheetsV4::DuplicateSheetResponse, decorator: Google::Apis::SheetsV4::DuplicateSheetResponse::Representation + include Google::Apis::Core::JsonObjectSupport + end - property :duplicate_filter_view, as: 'duplicateFilterView', class: Google::Apis::SheetsV4::DuplicateFilterViewResponse, decorator: Google::Apis::SheetsV4::DuplicateFilterViewResponse::Representation + class UpdateFilterViewRequest + class Representation < Google::Apis::Core::JsonRepresentation; end - property :add_named_range, as: 'addNamedRange', class: Google::Apis::SheetsV4::AddNamedRangeResponse, decorator: Google::Apis::SheetsV4::AddNamedRangeResponse::Representation + include Google::Apis::Core::JsonObjectSupport + end - end + class ConditionalFormatRule + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CopyPasteRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Request + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BooleanCondition + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GridRange + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BasicChartSpec + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SetDataValidationRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CellData + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BatchUpdateSpreadsheetRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Padding + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BasicChartAxis + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DeleteDimensionRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpdateChartSpecRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DeleteFilterViewRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BatchUpdateValuesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SortRangeRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class MergeCellsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AddProtectedRangeRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BatchClearValuesRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DuplicateFilterViewResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DuplicateSheetResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ClearBasicFilterRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TextToColumnsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DeleteBandingRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BatchUpdateSpreadsheetResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AppendValuesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class MoveDimensionRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PivotFilterCriteria + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AddFilterViewRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class AddConditionalFormatRuleRequest @@ -1102,54 +823,252 @@ module Google end end - class FilterView + class ChartSpec + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :basic_chart, as: 'basicChart', class: Google::Apis::SheetsV4::BasicChartSpec, decorator: Google::Apis::SheetsV4::BasicChartSpec::Representation + + property :hidden_dimension_strategy, as: 'hiddenDimensionStrategy' + property :title, as: 'title' + property :pie_chart, as: 'pieChart', class: Google::Apis::SheetsV4::PieChartSpec, decorator: Google::Apis::SheetsV4::PieChartSpec::Representation + + end + end + + class NumberFormat + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :pattern, as: 'pattern' + property :type, as: 'type' + end + end + + class SheetProperties # @private class Representation < Google::Apis::Core::JsonRepresentation property :title, as: 'title' - property :named_range_id, as: 'namedRangeId' + property :tab_color, as: 'tabColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + + property :index, as: 'index' + property :sheet_id, as: 'sheetId' + property :right_to_left, as: 'rightToLeft' + property :hidden, as: 'hidden' + property :grid_properties, as: 'gridProperties', class: Google::Apis::SheetsV4::GridProperties, decorator: Google::Apis::SheetsV4::GridProperties::Representation + + property :sheet_type, as: 'sheetType' + end + end + + class UpdateDimensionPropertiesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :properties, as: 'properties', class: Google::Apis::SheetsV4::DimensionProperties, decorator: Google::Apis::SheetsV4::DimensionProperties::Representation + + property :range, as: 'range', class: Google::Apis::SheetsV4::DimensionRange, decorator: Google::Apis::SheetsV4::DimensionRange::Representation + + property :fields, as: 'fields' + end + end + + class SourceAndDestination + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :fill_length, as: 'fillLength' + property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :dimension, as: 'dimension' + end + end + + class FilterView + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :filter_view_id, as: 'filterViewId' + hash :criteria, as: 'criteria', class: Google::Apis::SheetsV4::FilterCriteria, decorator: Google::Apis::SheetsV4::FilterCriteria::Representation + + property :title, as: 'title' + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + collection :sort_specs, as: 'sortSpecs', class: Google::Apis::SheetsV4::SortSpec, decorator: Google::Apis::SheetsV4::SortSpec::Representation + property :named_range_id, as: 'namedRangeId' + end + end + + class BandingProperties + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :footer_color, as: 'footerColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + + property :header_color, as: 'headerColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + + property :first_band_color, as: 'firstBandColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + + property :second_band_color, as: 'secondBandColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + + end + end + + class BasicFilter + # @private + class Representation < Google::Apis::Core::JsonRepresentation property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation hash :criteria, as: 'criteria', class: Google::Apis::SheetsV4::FilterCriteria, decorator: Google::Apis::SheetsV4::FilterCriteria::Representation - property :filter_view_id, as: 'filterViewId' - end - end - - class SortRangeRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - collection :sort_specs, as: 'sortSpecs', class: Google::Apis::SheetsV4::SortSpec, decorator: Google::Apis::SheetsV4::SortSpec::Representation end end - class AddBandingResponse + class AddProtectedRangeResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :banded_range, as: 'bandedRange', class: Google::Apis::SheetsV4::BandedRange, decorator: Google::Apis::SheetsV4::BandedRange::Representation + property :protected_range, as: 'protectedRange', class: Google::Apis::SheetsV4::ProtectedRange, decorator: Google::Apis::SheetsV4::ProtectedRange::Representation end end - class TextFormatRun + class UpdateValuesResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :start_index, as: 'startIndex' - property :format, as: 'format', class: Google::Apis::SheetsV4::TextFormat, decorator: Google::Apis::SheetsV4::TextFormat::Representation + property :updated_rows, as: 'updatedRows' + property :updated_data, as: 'updatedData', class: Google::Apis::SheetsV4::ValueRange, decorator: Google::Apis::SheetsV4::ValueRange::Representation + + property :updated_columns, as: 'updatedColumns' + property :spreadsheet_id, as: 'spreadsheetId' + property :updated_range, as: 'updatedRange' + property :updated_cells, as: 'updatedCells' + end + end + + class ErrorValue + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' + property :message, as: 'message' + end + end + + class PivotValue + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :formula, as: 'formula' + property :summarize_function, as: 'summarizeFunction' + property :source_column_offset, as: 'sourceColumnOffset' + property :name, as: 'name' + end + end + + class CopySheetToAnotherSpreadsheetRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :destination_spreadsheet_id, as: 'destinationSpreadsheetId' + end + end + + class PivotGroupSortValueBucket + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :values_index, as: 'valuesIndex' + collection :buckets, as: 'buckets', class: Google::Apis::SheetsV4::ExtendedValue, decorator: Google::Apis::SheetsV4::ExtendedValue::Representation end end - class UpdateFilterViewRequest + class EmbeddedObjectPosition # @private class Representation < Google::Apis::Core::JsonRepresentation - property :filter, as: 'filter', class: Google::Apis::SheetsV4::FilterView, decorator: Google::Apis::SheetsV4::FilterView::Representation + property :new_sheet, as: 'newSheet' + property :sheet_id, as: 'sheetId' + property :overlay_position, as: 'overlayPosition', class: Google::Apis::SheetsV4::OverlayPosition, decorator: Google::Apis::SheetsV4::OverlayPosition::Representation - property :fields, as: 'fields' + end + end + + class DeleteProtectedRangeRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :protected_range_id, as: 'protectedRangeId' + end + end + + class AutoFillRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :source_and_destination, as: 'sourceAndDestination', class: Google::Apis::SheetsV4::SourceAndDestination, decorator: Google::Apis::SheetsV4::SourceAndDestination::Representation + + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :use_alternate_series, as: 'useAlternateSeries' + end + end + + class GradientRule + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :minpoint, as: 'minpoint', class: Google::Apis::SheetsV4::InterpolationPoint, decorator: Google::Apis::SheetsV4::InterpolationPoint::Representation + + property :maxpoint, as: 'maxpoint', class: Google::Apis::SheetsV4::InterpolationPoint, decorator: Google::Apis::SheetsV4::InterpolationPoint::Representation + + property :midpoint, as: 'midpoint', class: Google::Apis::SheetsV4::InterpolationPoint, decorator: Google::Apis::SheetsV4::InterpolationPoint::Representation + + end + end + + class ClearValuesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class SetBasicFilterRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :filter, as: 'filter', class: Google::Apis::SheetsV4::BasicFilter, decorator: Google::Apis::SheetsV4::BasicFilter::Representation + + end + end + + class InterpolationPoint + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :value, as: 'value' + property :color, as: 'color', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + + property :type, as: 'type' + end + end + + class DeleteEmbeddedObjectRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :object_id_prop, as: 'objectId' + end + end + + class FindReplaceResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :values_changed, as: 'valuesChanged' + property :occurrences_changed, as: 'occurrencesChanged' + property :rows_changed, as: 'rowsChanged' + property :sheets_changed, as: 'sheetsChanged' + property :formulas_changed, as: 'formulasChanged' + end + end + + class DuplicateFilterViewRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :filter_id, as: 'filterId' + end + end + + class DeleteSheetRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :sheet_id, as: 'sheetId' end end @@ -1165,57 +1084,415 @@ module Google end end - class FilterCriteria + class ConditionValue # @private class Representation < Google::Apis::Core::JsonRepresentation - property :condition, as: 'condition', class: Google::Apis::SheetsV4::BooleanCondition, decorator: Google::Apis::SheetsV4::BooleanCondition::Representation - - collection :hidden_values, as: 'hiddenValues' + property :relative_date, as: 'relativeDate' + property :user_entered_value, as: 'userEnteredValue' end end - class DeleteDimensionRequest + class DuplicateSheetRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + property :new_sheet_name, as: 'newSheetName' + property :source_sheet_id, as: 'sourceSheetId' + property :new_sheet_id, as: 'newSheetId' + property :insert_sheet_index, as: 'insertSheetIndex' + end + end + + class ExtendedValue + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :error_value, as: 'errorValue', class: Google::Apis::SheetsV4::ErrorValue, decorator: Google::Apis::SheetsV4::ErrorValue::Representation + + property :string_value, as: 'stringValue' + property :bool_value, as: 'boolValue' + property :formula_value, as: 'formulaValue' + property :number_value, as: 'numberValue' + end + end + + class AddChartRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :chart, as: 'chart', class: Google::Apis::SheetsV4::EmbeddedChart, decorator: Google::Apis::SheetsV4::EmbeddedChart::Representation + + end + end + + class Spreadsheet + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :properties, as: 'properties', class: Google::Apis::SheetsV4::SpreadsheetProperties, decorator: Google::Apis::SheetsV4::SpreadsheetProperties::Representation + + property :spreadsheet_id, as: 'spreadsheetId' + collection :sheets, as: 'sheets', class: Google::Apis::SheetsV4::Sheet, decorator: Google::Apis::SheetsV4::Sheet::Representation + + collection :named_ranges, as: 'namedRanges', class: Google::Apis::SheetsV4::NamedRange, decorator: Google::Apis::SheetsV4::NamedRange::Representation + + property :spreadsheet_url, as: 'spreadsheetUrl' + end + end + + class BatchClearValuesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :cleared_ranges, as: 'clearedRanges' + property :spreadsheet_id, as: 'spreadsheetId' + end + end + + class BandedRange + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :banded_range_id, as: 'bandedRangeId' + property :row_properties, as: 'rowProperties', class: Google::Apis::SheetsV4::BandingProperties, decorator: Google::Apis::SheetsV4::BandingProperties::Representation + + property :column_properties, as: 'columnProperties', class: Google::Apis::SheetsV4::BandingProperties, decorator: Google::Apis::SheetsV4::BandingProperties::Representation + + end + end + + class UpdateProtectedRangeRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :protected_range, as: 'protectedRange', class: Google::Apis::SheetsV4::ProtectedRange, decorator: Google::Apis::SheetsV4::ProtectedRange::Representation + + property :fields, as: 'fields' + end + end + + class TextFormat + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :underline, as: 'underline' + property :foreground_color, as: 'foregroundColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + + property :bold, as: 'bold' + property :font_family, as: 'fontFamily' + property :italic, as: 'italic' + property :strikethrough, as: 'strikethrough' + property :font_size, as: 'fontSize' + end + end + + class AddSheetResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :properties, as: 'properties', class: Google::Apis::SheetsV4::SheetProperties, decorator: Google::Apis::SheetsV4::SheetProperties::Representation + + end + end + + class AddFilterViewResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :filter, as: 'filter', class: Google::Apis::SheetsV4::FilterView, decorator: Google::Apis::SheetsV4::FilterView::Representation + + end + end + + class OverlayPosition + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :width_pixels, as: 'widthPixels' + property :offset_x_pixels, as: 'offsetXPixels' + property :anchor_cell, as: 'anchorCell', class: Google::Apis::SheetsV4::GridCoordinate, decorator: Google::Apis::SheetsV4::GridCoordinate::Representation + + property :offset_y_pixels, as: 'offsetYPixels' + property :height_pixels, as: 'heightPixels' + end + end + + class SpreadsheetProperties + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :locale, as: 'locale' + property :auto_recalc, as: 'autoRecalc' + property :default_format, as: 'defaultFormat', class: Google::Apis::SheetsV4::CellFormat, decorator: Google::Apis::SheetsV4::CellFormat::Representation + + property :title, as: 'title' + property :time_zone, as: 'timeZone' + end + end + + class RepeatCellRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :fields, as: 'fields' + property :cell, as: 'cell', class: Google::Apis::SheetsV4::CellData, decorator: Google::Apis::SheetsV4::CellData::Representation + + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + end + end + + class AddChartResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :chart, as: 'chart', class: Google::Apis::SheetsV4::EmbeddedChart, decorator: Google::Apis::SheetsV4::EmbeddedChart::Representation + + end + end + + class InsertDimensionRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :inherit_from_before, as: 'inheritFromBefore' property :range, as: 'range', class: Google::Apis::SheetsV4::DimensionRange, decorator: Google::Apis::SheetsV4::DimensionRange::Representation end end + class UpdateSpreadsheetPropertiesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :properties, as: 'properties', class: Google::Apis::SheetsV4::SpreadsheetProperties, decorator: Google::Apis::SheetsV4::SpreadsheetProperties::Representation + + property :fields, as: 'fields' + end + end + + class ProtectedRange + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :description, as: 'description' + collection :unprotected_ranges, as: 'unprotectedRanges', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :named_range_id, as: 'namedRangeId' + property :protected_range_id, as: 'protectedRangeId' + property :warning_only, as: 'warningOnly' + property :requesting_user_can_edit, as: 'requestingUserCanEdit' + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :editors, as: 'editors', class: Google::Apis::SheetsV4::Editors, decorator: Google::Apis::SheetsV4::Editors::Representation + + end + end + + class BatchUpdateValuesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :value_input_option, as: 'valueInputOption' + collection :data, as: 'data', class: Google::Apis::SheetsV4::ValueRange, decorator: Google::Apis::SheetsV4::ValueRange::Representation + + property :response_date_time_render_option, as: 'responseDateTimeRenderOption' + property :response_value_render_option, as: 'responseValueRenderOption' + property :include_values_in_response, as: 'includeValuesInResponse' + end + end + + class DimensionProperties + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :pixel_size, as: 'pixelSize' + property :hidden_by_filter, as: 'hiddenByFilter' + property :hidden_by_user, as: 'hiddenByUser' + end + end + + class NamedRange + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + property :named_range_id, as: 'namedRangeId' + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + end + end + + class DimensionRange + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :sheet_id, as: 'sheetId' + property :dimension, as: 'dimension' + property :start_index, as: 'startIndex' + property :end_index, as: 'endIndex' + end + end + + class CutPasteRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :paste_type, as: 'pasteType' + property :destination, as: 'destination', class: Google::Apis::SheetsV4::GridCoordinate, decorator: Google::Apis::SheetsV4::GridCoordinate::Representation + + end + end + + class Borders + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :bottom, as: 'bottom', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + property :top, as: 'top', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + property :left, as: 'left', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + property :right, as: 'right', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + end + end + + class BasicChartSeries + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :series, as: 'series', class: Google::Apis::SheetsV4::ChartData, decorator: Google::Apis::SheetsV4::ChartData::Representation + + property :type, as: 'type' + property :target_axis, as: 'targetAxis' + end + end + + class AutoResizeDimensionsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :dimensions, as: 'dimensions', class: Google::Apis::SheetsV4::DimensionRange, decorator: Google::Apis::SheetsV4::DimensionRange::Representation + + end + end + + class UpdateBordersRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :inner_horizontal, as: 'innerHorizontal', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + property :top, as: 'top', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + property :left, as: 'left', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + property :bottom, as: 'bottom', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + property :inner_vertical, as: 'innerVertical', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + property :right, as: 'right', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + end + end + + class CellFormat + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :hyperlink_display_type, as: 'hyperlinkDisplayType' + property :horizontal_alignment, as: 'horizontalAlignment' + property :text_format, as: 'textFormat', class: Google::Apis::SheetsV4::TextFormat, decorator: Google::Apis::SheetsV4::TextFormat::Representation + + property :background_color, as: 'backgroundColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + + property :padding, as: 'padding', class: Google::Apis::SheetsV4::Padding, decorator: Google::Apis::SheetsV4::Padding::Representation + + property :vertical_alignment, as: 'verticalAlignment' + property :borders, as: 'borders', class: Google::Apis::SheetsV4::Borders, decorator: Google::Apis::SheetsV4::Borders::Representation + + property :text_direction, as: 'textDirection' + property :wrap_strategy, as: 'wrapStrategy' + property :number_format, as: 'numberFormat', class: Google::Apis::SheetsV4::NumberFormat, decorator: Google::Apis::SheetsV4::NumberFormat::Representation + + end + end + + class ClearValuesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :spreadsheet_id, as: 'spreadsheetId' + property :cleared_range, as: 'clearedRange' + end + end + + class DeleteConditionalFormatRuleRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :index, as: 'index' + property :sheet_id, as: 'sheetId' + end + end + + class AddBandingResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :banded_range, as: 'bandedRange', class: Google::Apis::SheetsV4::BandedRange, decorator: Google::Apis::SheetsV4::BandedRange::Representation + + end + end + + class DeleteNamedRangeRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :named_range_id, as: 'namedRangeId' + end + end + + class ChartData + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :source_range, as: 'sourceRange', class: Google::Apis::SheetsV4::ChartSourceRange, decorator: Google::Apis::SheetsV4::ChartSourceRange::Representation + + end + end + + class BatchGetValuesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :spreadsheet_id, as: 'spreadsheetId' + collection :value_ranges, as: 'valueRanges', class: Google::Apis::SheetsV4::ValueRange, decorator: Google::Apis::SheetsV4::ValueRange::Representation + + end + end + + class UpdateBandingRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :fields, as: 'fields' + property :banded_range, as: 'bandedRange', class: Google::Apis::SheetsV4::BandedRange, decorator: Google::Apis::SheetsV4::BandedRange::Representation + + end + end + + class Color + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :red, as: 'red' + property :green, as: 'green' + property :blue, as: 'blue' + property :alpha, as: 'alpha' + end + end + + class PivotGroup + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :source_column_offset, as: 'sourceColumnOffset' + property :show_totals, as: 'showTotals' + collection :value_metadata, as: 'valueMetadata', class: Google::Apis::SheetsV4::PivotGroupValueMetadata, decorator: Google::Apis::SheetsV4::PivotGroupValueMetadata::Representation + + property :sort_order, as: 'sortOrder' + property :value_bucket, as: 'valueBucket', class: Google::Apis::SheetsV4::PivotGroupSortValueBucket, decorator: Google::Apis::SheetsV4::PivotGroupSortValueBucket::Representation + + end + end + class PivotTable # @private class Representation < Google::Apis::Core::JsonRepresentation - property :value_layout, as: 'valueLayout' - collection :columns, as: 'columns', class: Google::Apis::SheetsV4::PivotGroup, decorator: Google::Apis::SheetsV4::PivotGroup::Representation - - property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + hash :criteria, as: 'criteria', class: Google::Apis::SheetsV4::PivotFilterCriteria, decorator: Google::Apis::SheetsV4::PivotFilterCriteria::Representation collection :rows, as: 'rows', class: Google::Apis::SheetsV4::PivotGroup, decorator: Google::Apis::SheetsV4::PivotGroup::Representation + property :value_layout, as: 'valueLayout' + property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + collection :columns, as: 'columns', class: Google::Apis::SheetsV4::PivotGroup, decorator: Google::Apis::SheetsV4::PivotGroup::Representation + collection :values, as: 'values', class: Google::Apis::SheetsV4::PivotValue, decorator: Google::Apis::SheetsV4::PivotValue::Representation - hash :criteria, as: 'criteria', class: Google::Apis::SheetsV4::PivotFilterCriteria, decorator: Google::Apis::SheetsV4::PivotFilterCriteria::Representation - - end - end - - class DataValidationRule - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :condition, as: 'condition', class: Google::Apis::SheetsV4::BooleanCondition, decorator: Google::Apis::SheetsV4::BooleanCondition::Representation - - property :input_message, as: 'inputMessage' - property :show_custom_ui, as: 'showCustomUi' - property :strict, as: 'strict' - end - end - - class UpdateSpreadsheetPropertiesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :fields, as: 'fields' - property :properties, as: 'properties', class: Google::Apis::SheetsV4::SpreadsheetProperties, decorator: Google::Apis::SheetsV4::SpreadsheetProperties::Representation - end end @@ -1227,83 +1504,73 @@ module Google end end - class BatchUpdateValuesRequest + class ValueRange # @private class Representation < Google::Apis::Core::JsonRepresentation - property :value_input_option, as: 'valueInputOption' - collection :data, as: 'data', class: Google::Apis::SheetsV4::ValueRange, decorator: Google::Apis::SheetsV4::ValueRange::Representation + property :range, as: 'range' + property :major_dimension, as: 'majorDimension' + collection :values, as: 'values', :class => Array do + include Representable::JSON::Collection + items + end - property :response_value_render_option, as: 'responseValueRenderOption' - property :response_date_time_render_option, as: 'responseDateTimeRenderOption' - property :include_values_in_response, as: 'includeValuesInResponse' end end - class ClearBasicFilterRequest + class AppendCellsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :rows, as: 'rows', class: Google::Apis::SheetsV4::RowData, decorator: Google::Apis::SheetsV4::RowData::Representation + + property :fields, as: 'fields' property :sheet_id, as: 'sheetId' end end - class BatchClearValuesResponse + class AddBandingRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :spreadsheet_id, as: 'spreadsheetId' - collection :cleared_ranges, as: 'clearedRanges' - end - end - - class ConditionalFormatRule - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :gradient_rule, as: 'gradientRule', class: Google::Apis::SheetsV4::GradientRule, decorator: Google::Apis::SheetsV4::GradientRule::Representation - - property :boolean_rule, as: 'booleanRule', class: Google::Apis::SheetsV4::BooleanRule, decorator: Google::Apis::SheetsV4::BooleanRule::Representation - - collection :ranges, as: 'ranges', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + property :banded_range, as: 'bandedRange', class: Google::Apis::SheetsV4::BandedRange, decorator: Google::Apis::SheetsV4::BandedRange::Representation end end - class UpdateBordersRequest + class Response # @private class Representation < Google::Apis::Core::JsonRepresentation - property :right, as: 'right', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + property :find_replace, as: 'findReplace', class: Google::Apis::SheetsV4::FindReplaceResponse, decorator: Google::Apis::SheetsV4::FindReplaceResponse::Representation - property :inner_vertical, as: 'innerVertical', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + property :add_sheet, as: 'addSheet', class: Google::Apis::SheetsV4::AddSheetResponse, decorator: Google::Apis::SheetsV4::AddSheetResponse::Representation - property :top, as: 'top', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + property :update_conditional_format_rule, as: 'updateConditionalFormatRule', class: Google::Apis::SheetsV4::UpdateConditionalFormatRuleResponse, decorator: Google::Apis::SheetsV4::UpdateConditionalFormatRuleResponse::Representation - property :inner_horizontal, as: 'innerHorizontal', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + property :add_named_range, as: 'addNamedRange', class: Google::Apis::SheetsV4::AddNamedRangeResponse, decorator: Google::Apis::SheetsV4::AddNamedRangeResponse::Representation - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + property :add_filter_view, as: 'addFilterView', class: Google::Apis::SheetsV4::AddFilterViewResponse, decorator: Google::Apis::SheetsV4::AddFilterViewResponse::Representation - property :bottom, as: 'bottom', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + property :add_banding, as: 'addBanding', class: Google::Apis::SheetsV4::AddBandingResponse, decorator: Google::Apis::SheetsV4::AddBandingResponse::Representation - property :left, as: 'left', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + property :add_protected_range, as: 'addProtectedRange', class: Google::Apis::SheetsV4::AddProtectedRangeResponse, decorator: Google::Apis::SheetsV4::AddProtectedRangeResponse::Representation + + property :duplicate_sheet, as: 'duplicateSheet', class: Google::Apis::SheetsV4::DuplicateSheetResponse, decorator: Google::Apis::SheetsV4::DuplicateSheetResponse::Representation + + property :delete_conditional_format_rule, as: 'deleteConditionalFormatRule', class: Google::Apis::SheetsV4::DeleteConditionalFormatRuleResponse, decorator: Google::Apis::SheetsV4::DeleteConditionalFormatRuleResponse::Representation + + property :update_embedded_object_position, as: 'updateEmbeddedObjectPosition', class: Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionResponse, decorator: Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionResponse::Representation + + property :duplicate_filter_view, as: 'duplicateFilterView', class: Google::Apis::SheetsV4::DuplicateFilterViewResponse, decorator: Google::Apis::SheetsV4::DuplicateFilterViewResponse::Representation + + property :add_chart, as: 'addChart', class: Google::Apis::SheetsV4::AddChartResponse, decorator: Google::Apis::SheetsV4::AddChartResponse::Representation end end - class PivotFilterCriteria + class TextFormatRun # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :visible_values, as: 'visibleValues' - end - end - - class Borders - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :left, as: 'left', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation - - property :right, as: 'right', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation - - property :top, as: 'top', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation - - property :bottom, as: 'bottom', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + property :format, as: 'format', class: Google::Apis::SheetsV4::TextFormat, decorator: Google::Apis::SheetsV4::TextFormat::Representation + property :start_index, as: 'startIndex' end end @@ -1318,226 +1585,6 @@ module Google end end - class Color - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :green, as: 'green' - property :blue, as: 'blue' - property :red, as: 'red' - property :alpha, as: 'alpha' - end - end - - class AddSheetRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :properties, as: 'properties', class: Google::Apis::SheetsV4::SheetProperties, decorator: Google::Apis::SheetsV4::SheetProperties::Representation - - end - end - - class AddProtectedRangeRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :protected_range, as: 'protectedRange', class: Google::Apis::SheetsV4::ProtectedRange, decorator: Google::Apis::SheetsV4::ProtectedRange::Representation - - end - end - - class ValueRange - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :values, as: 'values', :class => Array do - include Representable::JSON::Collection - items - end - - property :range, as: 'range' - property :major_dimension, as: 'majorDimension' - end - end - - class FindReplaceResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :values_changed, as: 'valuesChanged' - property :rows_changed, as: 'rowsChanged' - property :occurrences_changed, as: 'occurrencesChanged' - property :formulas_changed, as: 'formulasChanged' - property :sheets_changed, as: 'sheetsChanged' - end - end - - class AppendValuesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :spreadsheet_id, as: 'spreadsheetId' - property :table_range, as: 'tableRange' - property :updates, as: 'updates', class: Google::Apis::SheetsV4::UpdateValuesResponse, decorator: Google::Apis::SheetsV4::UpdateValuesResponse::Representation - - end - end - - class CellFormat - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :horizontal_alignment, as: 'horizontalAlignment' - property :hyperlink_display_type, as: 'hyperlinkDisplayType' - property :borders, as: 'borders', class: Google::Apis::SheetsV4::Borders, decorator: Google::Apis::SheetsV4::Borders::Representation - - property :text_direction, as: 'textDirection' - property :text_format, as: 'textFormat', class: Google::Apis::SheetsV4::TextFormat, decorator: Google::Apis::SheetsV4::TextFormat::Representation - - property :padding, as: 'padding', class: Google::Apis::SheetsV4::Padding, decorator: Google::Apis::SheetsV4::Padding::Representation - - property :number_format, as: 'numberFormat', class: Google::Apis::SheetsV4::NumberFormat, decorator: Google::Apis::SheetsV4::NumberFormat::Representation - - property :wrap_strategy, as: 'wrapStrategy' - property :background_color, as: 'backgroundColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation - - property :vertical_alignment, as: 'verticalAlignment' - end - end - - class MoveDimensionRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :source, as: 'source', class: Google::Apis::SheetsV4::DimensionRange, decorator: Google::Apis::SheetsV4::DimensionRange::Representation - - property :destination_index, as: 'destinationIndex' - end - end - - class BasicChartAxis - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :position, as: 'position' - property :title, as: 'title' - property :format, as: 'format', class: Google::Apis::SheetsV4::TextFormat, decorator: Google::Apis::SheetsV4::TextFormat::Representation - - end - end - - class PivotGroupSortValueBucket - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :buckets, as: 'buckets', class: Google::Apis::SheetsV4::ExtendedValue, decorator: Google::Apis::SheetsV4::ExtendedValue::Representation - - property :values_index, as: 'valuesIndex' - end - end - - class DimensionProperties - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :hidden_by_user, as: 'hiddenByUser' - property :pixel_size, as: 'pixelSize' - property :hidden_by_filter, as: 'hiddenByFilter' - end - end - - class EmbeddedObjectPosition - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :sheet_id, as: 'sheetId' - property :overlay_position, as: 'overlayPosition', class: Google::Apis::SheetsV4::OverlayPosition, decorator: Google::Apis::SheetsV4::OverlayPosition::Representation - - property :new_sheet, as: 'newSheet' - end - end - - class InterpolationPoint - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :value, as: 'value' - property :color, as: 'color', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation - - property :type, as: 'type' - end - end - - class ErrorValue - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - property :message, as: 'message' - end - end - - class DuplicateFilterViewRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :filter_id, as: 'filterId' - end - end - - class BatchUpdateSpreadsheetRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :include_spreadsheet_in_response, as: 'includeSpreadsheetInResponse' - collection :requests, as: 'requests', class: Google::Apis::SheetsV4::Request, decorator: Google::Apis::SheetsV4::Request::Representation - - collection :response_ranges, as: 'responseRanges' - property :response_include_grid_data, as: 'responseIncludeGridData' - end - end - - class SheetProperties - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :title, as: 'title' - property :index, as: 'index' - property :hidden, as: 'hidden' - property :grid_properties, as: 'gridProperties', class: Google::Apis::SheetsV4::GridProperties, decorator: Google::Apis::SheetsV4::GridProperties::Representation - - property :sheet_id, as: 'sheetId' - property :right_to_left, as: 'rightToLeft' - property :tab_color, as: 'tabColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation - - property :sheet_type, as: 'sheetType' - end - end - - class ClearValuesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - class ProtectedRange - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :unprotected_ranges, as: 'unprotectedRanges', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - property :description, as: 'description' - property :named_range_id, as: 'namedRangeId' - property :requesting_user_can_edit, as: 'requestingUserCanEdit' - property :editors, as: 'editors', class: Google::Apis::SheetsV4::Editors, decorator: Google::Apis::SheetsV4::Editors::Representation - - property :protected_range_id, as: 'protectedRangeId' - property :warning_only, as: 'warningOnly' - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - end - end - - class DeleteConditionalFormatRuleRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :sheet_id, as: 'sheetId' - property :index, as: 'index' - end - end - - class DeleteRangeRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :shift_dimension, as: 'shiftDimension' - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - end - end - class InsertRangeRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1547,208 +1594,7 @@ module Google end end - class ChartSpec - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :hidden_dimension_strategy, as: 'hiddenDimensionStrategy' - property :basic_chart, as: 'basicChart', class: Google::Apis::SheetsV4::BasicChartSpec, decorator: Google::Apis::SheetsV4::BasicChartSpec::Representation - - property :title, as: 'title' - property :pie_chart, as: 'pieChart', class: Google::Apis::SheetsV4::PieChartSpec, decorator: Google::Apis::SheetsV4::PieChartSpec::Representation - - end - end - - class SourceAndDestination - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - property :fill_length, as: 'fillLength' - property :dimension, as: 'dimension' - end - end - - class ConditionValue - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :relative_date, as: 'relativeDate' - property :user_entered_value, as: 'userEnteredValue' - end - end - - class PasteDataRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :data, as: 'data' - property :coordinate, as: 'coordinate', class: Google::Apis::SheetsV4::GridCoordinate, decorator: Google::Apis::SheetsV4::GridCoordinate::Representation - - property :delimiter, as: 'delimiter' - property :type, as: 'type' - property :html, as: 'html' - end - end - - class FindReplaceRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :find, as: 'find' - property :replacement, as: 'replacement' - property :search_by_regex, as: 'searchByRegex' - property :sheet_id, as: 'sheetId' - property :all_sheets, as: 'allSheets' - property :match_case, as: 'matchCase' - property :include_formulas, as: 'includeFormulas' - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - property :match_entire_cell, as: 'matchEntireCell' - end - end - - class SortSpec - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :sort_order, as: 'sortOrder' - property :dimension_index, as: 'dimensionIndex' - end - end - - class CopySheetToAnotherSpreadsheetRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :destination_spreadsheet_id, as: 'destinationSpreadsheetId' - end - end - - class NumberFormat - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :pattern, as: 'pattern' - property :type, as: 'type' - end - end - - class BatchClearValuesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :ranges, as: 'ranges' - end - end - - class UpdateDimensionPropertiesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :fields, as: 'fields' - property :range, as: 'range', class: Google::Apis::SheetsV4::DimensionRange, decorator: Google::Apis::SheetsV4::DimensionRange::Representation - - property :properties, as: 'properties', class: Google::Apis::SheetsV4::DimensionProperties, decorator: Google::Apis::SheetsV4::DimensionProperties::Representation - - end - end - - class Editors - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :users, as: 'users' - collection :groups, as: 'groups' - property :domain_users_can_edit, as: 'domainUsersCanEdit' - end - end - - class Spreadsheet - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :spreadsheet_id, as: 'spreadsheetId' - property :properties, as: 'properties', class: Google::Apis::SheetsV4::SpreadsheetProperties, decorator: Google::Apis::SheetsV4::SpreadsheetProperties::Representation - - property :spreadsheet_url, as: 'spreadsheetUrl' - collection :sheets, as: 'sheets', class: Google::Apis::SheetsV4::Sheet, decorator: Google::Apis::SheetsV4::Sheet::Representation - - collection :named_ranges, as: 'namedRanges', class: Google::Apis::SheetsV4::NamedRange, decorator: Google::Apis::SheetsV4::NamedRange::Representation - - end - end - - class GridData - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :column_metadata, as: 'columnMetadata', class: Google::Apis::SheetsV4::DimensionProperties, decorator: Google::Apis::SheetsV4::DimensionProperties::Representation - - collection :row_data, as: 'rowData', class: Google::Apis::SheetsV4::RowData, decorator: Google::Apis::SheetsV4::RowData::Representation - - property :start_row, as: 'startRow' - collection :row_metadata, as: 'rowMetadata', class: Google::Apis::SheetsV4::DimensionProperties, decorator: Google::Apis::SheetsV4::DimensionProperties::Representation - - property :start_column, as: 'startColumn' - end - end - - class PivotValue - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :formula, as: 'formula' - property :source_column_offset, as: 'sourceColumnOffset' - property :summarize_function, as: 'summarizeFunction' - property :name, as: 'name' - end - end - - class DeleteBandingRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :banded_range_id, as: 'bandedRangeId' - end - end - - class BasicFilter - # @private - class Representation < Google::Apis::Core::JsonRepresentation - hash :criteria, as: 'criteria', class: Google::Apis::SheetsV4::FilterCriteria, decorator: Google::Apis::SheetsV4::FilterCriteria::Representation - - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - collection :sort_specs, as: 'sortSpecs', class: Google::Apis::SheetsV4::SortSpec, decorator: Google::Apis::SheetsV4::SortSpec::Representation - - end - end - - class DuplicateSheetRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :source_sheet_id, as: 'sourceSheetId' - property :new_sheet_id, as: 'newSheetId' - property :insert_sheet_index, as: 'insertSheetIndex' - property :new_sheet_name, as: 'newSheetName' - end - end - - class AddFilterViewResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :filter, as: 'filter', class: Google::Apis::SheetsV4::FilterView, decorator: Google::Apis::SheetsV4::FilterView::Representation - - end - end - - class DuplicateSheetResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :properties, as: 'properties', class: Google::Apis::SheetsV4::SheetProperties, decorator: Google::Apis::SheetsV4::SheetProperties::Representation - - end - end - - class Border - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :style, as: 'style' - property :width, as: 'width' - property :color, as: 'color', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation - - end - end - - class AddNamedRangeRequest + class AddNamedRangeResponse # @private class Representation < Google::Apis::Core::JsonRepresentation property :named_range, as: 'namedRange', class: Google::Apis::SheetsV4::NamedRange, decorator: Google::Apis::SheetsV4::NamedRange::Representation @@ -1756,32 +1602,6 @@ module Google end end - class AddChartResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :chart, as: 'chart', class: Google::Apis::SheetsV4::EmbeddedChart, decorator: Google::Apis::SheetsV4::EmbeddedChart::Representation - - end - end - - class AddBandingRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :banded_range, as: 'bandedRange', class: Google::Apis::SheetsV4::BandedRange, decorator: Google::Apis::SheetsV4::BandedRange::Representation - - end - end - - class AppendCellsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :sheet_id, as: 'sheetId' - collection :rows, as: 'rows', class: Google::Apis::SheetsV4::RowData, decorator: Google::Apis::SheetsV4::RowData::Representation - - property :fields, as: 'fields' - end - end - class RowData # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1790,181 +1610,60 @@ module Google end end - class BasicChartSeries + class Border # @private class Representation < Google::Apis::Core::JsonRepresentation - property :series, as: 'series', class: Google::Apis::SheetsV4::ChartData, decorator: Google::Apis::SheetsV4::ChartData::Representation + property :width, as: 'width' + property :style, as: 'style' + property :color, as: 'color', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation - property :target_axis, as: 'targetAxis' - property :type, as: 'type' end end - class NamedRange + class GridData # @private class Representation < Google::Apis::Core::JsonRepresentation - property :named_range_id, as: 'namedRangeId' + collection :column_metadata, as: 'columnMetadata', class: Google::Apis::SheetsV4::DimensionProperties, decorator: Google::Apis::SheetsV4::DimensionProperties::Representation + + property :start_column, as: 'startColumn' + collection :row_metadata, as: 'rowMetadata', class: Google::Apis::SheetsV4::DimensionProperties, decorator: Google::Apis::SheetsV4::DimensionProperties::Representation + + collection :row_data, as: 'rowData', class: Google::Apis::SheetsV4::RowData, decorator: Google::Apis::SheetsV4::RowData::Representation + + property :start_row, as: 'startRow' + end + end + + class UpdateNamedRangeRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :named_range, as: 'namedRange', class: Google::Apis::SheetsV4::NamedRange, decorator: Google::Apis::SheetsV4::NamedRange::Representation + + property :fields, as: 'fields' + end + end + + class FindReplaceRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :replacement, as: 'replacement' property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - property :name, as: 'name' - end - end - - class RepeatCellRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :cell, as: 'cell', class: Google::Apis::SheetsV4::CellData, decorator: Google::Apis::SheetsV4::CellData::Representation - - property :fields, as: 'fields' - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - end - end - - class BasicChartSpec - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :chart_type, as: 'chartType' - collection :domains, as: 'domains', class: Google::Apis::SheetsV4::BasicChartDomain, decorator: Google::Apis::SheetsV4::BasicChartDomain::Representation - - property :header_count, as: 'headerCount' - collection :series, as: 'series', class: Google::Apis::SheetsV4::BasicChartSeries, decorator: Google::Apis::SheetsV4::BasicChartSeries::Representation - - property :legend_position, as: 'legendPosition' - collection :axis, as: 'axis', class: Google::Apis::SheetsV4::BasicChartAxis, decorator: Google::Apis::SheetsV4::BasicChartAxis::Representation - - end - end - - class UpdateEmbeddedObjectPositionRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :new_position, as: 'newPosition', class: Google::Apis::SheetsV4::EmbeddedObjectPosition, decorator: Google::Apis::SheetsV4::EmbeddedObjectPosition::Representation - - property :object_id_prop, as: 'objectId' - property :fields, as: 'fields' - end - end - - class SetBasicFilterRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :filter, as: 'filter', class: Google::Apis::SheetsV4::BasicFilter, decorator: Google::Apis::SheetsV4::BasicFilter::Representation - - end - end - - class AutoResizeDimensionsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :dimensions, as: 'dimensions', class: Google::Apis::SheetsV4::DimensionRange, decorator: Google::Apis::SheetsV4::DimensionRange::Representation - - end - end - - class DuplicateFilterViewResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :filter, as: 'filter', class: Google::Apis::SheetsV4::FilterView, decorator: Google::Apis::SheetsV4::FilterView::Representation - - end - end - - class BandingProperties - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :footer_color, as: 'footerColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation - - property :header_color, as: 'headerColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation - - property :second_band_color, as: 'secondBandColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation - - property :first_band_color, as: 'firstBandColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation - - end - end - - class PivotGroup - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :sort_order, as: 'sortOrder' - property :source_column_offset, as: 'sourceColumnOffset' - property :show_totals, as: 'showTotals' - property :value_bucket, as: 'valueBucket', class: Google::Apis::SheetsV4::PivotGroupSortValueBucket, decorator: Google::Apis::SheetsV4::PivotGroupSortValueBucket::Representation - - collection :value_metadata, as: 'valueMetadata', class: Google::Apis::SheetsV4::PivotGroupValueMetadata, decorator: Google::Apis::SheetsV4::PivotGroupValueMetadata::Representation - - end - end - - class GridRange - # @private - class Representation < Google::Apis::Core::JsonRepresentation property :sheet_id, as: 'sheetId' - property :start_column_index, as: 'startColumnIndex' - property :start_row_index, as: 'startRowIndex' - property :end_row_index, as: 'endRowIndex' - property :end_column_index, as: 'endColumnIndex' + property :match_case, as: 'matchCase' + property :all_sheets, as: 'allSheets' + property :include_formulas, as: 'includeFormulas' + property :match_entire_cell, as: 'matchEntireCell' + property :find, as: 'find' + property :search_by_regex, as: 'searchByRegex' end end - class DeleteSheetRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :sheet_id, as: 'sheetId' - end - end - - class UpdateBandingRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :banded_range, as: 'bandedRange', class: Google::Apis::SheetsV4::BandedRange, decorator: Google::Apis::SheetsV4::BandedRange::Representation - - property :fields, as: 'fields' - end - end - - class ChartData - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :source_range, as: 'sourceRange', class: Google::Apis::SheetsV4::ChartSourceRange, decorator: Google::Apis::SheetsV4::ChartSourceRange::Representation - - end - end - - class Sheet + class AddSheetRequest # @private class Representation < Google::Apis::Core::JsonRepresentation property :properties, as: 'properties', class: Google::Apis::SheetsV4::SheetProperties, decorator: Google::Apis::SheetsV4::SheetProperties::Representation - collection :charts, as: 'charts', class: Google::Apis::SheetsV4::EmbeddedChart, decorator: Google::Apis::SheetsV4::EmbeddedChart::Representation - - collection :filter_views, as: 'filterViews', class: Google::Apis::SheetsV4::FilterView, decorator: Google::Apis::SheetsV4::FilterView::Representation - - collection :conditional_formats, as: 'conditionalFormats', class: Google::Apis::SheetsV4::ConditionalFormatRule, decorator: Google::Apis::SheetsV4::ConditionalFormatRule::Representation - - collection :protected_ranges, as: 'protectedRanges', class: Google::Apis::SheetsV4::ProtectedRange, decorator: Google::Apis::SheetsV4::ProtectedRange::Representation - - property :basic_filter, as: 'basicFilter', class: Google::Apis::SheetsV4::BasicFilter, decorator: Google::Apis::SheetsV4::BasicFilter::Representation - - collection :merges, as: 'merges', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - collection :data, as: 'data', class: Google::Apis::SheetsV4::GridData, decorator: Google::Apis::SheetsV4::GridData::Representation - - collection :banded_ranges, as: 'bandedRanges', class: Google::Apis::SheetsV4::BandedRange, decorator: Google::Apis::SheetsV4::BandedRange::Representation - - end - end - - class CopyPasteRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :paste_type, as: 'pasteType' - property :paste_orientation, as: 'pasteOrientation' - property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - property :destination, as: 'destination', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - end end @@ -1981,120 +1680,45 @@ module Google end end - class ExtendedValue + class DeleteConditionalFormatRuleResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :formula_value, as: 'formulaValue' - property :error_value, as: 'errorValue', class: Google::Apis::SheetsV4::ErrorValue, decorator: Google::Apis::SheetsV4::ErrorValue::Representation - - property :bool_value, as: 'boolValue' - property :number_value, as: 'numberValue' - property :string_value, as: 'stringValue' - end - end - - class BatchUpdateSpreadsheetResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :spreadsheet_id, as: 'spreadsheetId' - property :updated_spreadsheet, as: 'updatedSpreadsheet', class: Google::Apis::SheetsV4::Spreadsheet, decorator: Google::Apis::SheetsV4::Spreadsheet::Representation - - collection :replies, as: 'replies', class: Google::Apis::SheetsV4::Response, decorator: Google::Apis::SheetsV4::Response::Representation + property :rule, as: 'rule', class: Google::Apis::SheetsV4::ConditionalFormatRule, decorator: Google::Apis::SheetsV4::ConditionalFormatRule::Representation end end - class GradientRule + class DeleteRangeRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :maxpoint, as: 'maxpoint', class: Google::Apis::SheetsV4::InterpolationPoint, decorator: Google::Apis::SheetsV4::InterpolationPoint::Representation - - property :midpoint, as: 'midpoint', class: Google::Apis::SheetsV4::InterpolationPoint, decorator: Google::Apis::SheetsV4::InterpolationPoint::Representation - - property :minpoint, as: 'minpoint', class: Google::Apis::SheetsV4::InterpolationPoint, decorator: Google::Apis::SheetsV4::InterpolationPoint::Representation - - end - end - - class CutPasteRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :paste_type, as: 'pasteType' - property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - property :destination, as: 'destination', class: Google::Apis::SheetsV4::GridCoordinate, decorator: Google::Apis::SheetsV4::GridCoordinate::Representation - - end - end - - class OverlayPosition - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :width_pixels, as: 'widthPixels' - property :anchor_cell, as: 'anchorCell', class: Google::Apis::SheetsV4::GridCoordinate, decorator: Google::Apis::SheetsV4::GridCoordinate::Representation - - property :offset_x_pixels, as: 'offsetXPixels' - property :height_pixels, as: 'heightPixels' - property :offset_y_pixels, as: 'offsetYPixels' - end - end - - class AutoFillRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :use_alternate_series, as: 'useAlternateSeries' + property :shift_dimension, as: 'shiftDimension' property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - property :source_and_destination, as: 'sourceAndDestination', class: Google::Apis::SheetsV4::SourceAndDestination, decorator: Google::Apis::SheetsV4::SourceAndDestination::Representation - end end - class PieChartSpec + class GridCoordinate # @private class Representation < Google::Apis::Core::JsonRepresentation - property :legend_position, as: 'legendPosition' - property :series, as: 'series', class: Google::Apis::SheetsV4::ChartData, decorator: Google::Apis::SheetsV4::ChartData::Representation - - property :pie_hole, as: 'pieHole' - property :three_dimensional, as: 'threeDimensional' - property :domain, as: 'domain', class: Google::Apis::SheetsV4::ChartData, decorator: Google::Apis::SheetsV4::ChartData::Representation - + property :row_index, as: 'rowIndex' + property :column_index, as: 'columnIndex' + property :sheet_id, as: 'sheetId' end end class UpdateSheetPropertiesRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :fields, as: 'fields' property :properties, as: 'properties', class: Google::Apis::SheetsV4::SheetProperties, decorator: Google::Apis::SheetsV4::SheetProperties::Representation + property :fields, as: 'fields' end end - class BooleanRule + class UnmergeCellsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :condition, as: 'condition', class: Google::Apis::SheetsV4::BooleanCondition, decorator: Google::Apis::SheetsV4::BooleanCondition::Representation - - property :format, as: 'format', class: Google::Apis::SheetsV4::CellFormat, decorator: Google::Apis::SheetsV4::CellFormat::Representation - - end - end - - class AppendDimensionRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :sheet_id, as: 'sheetId' - property :length, as: 'length' - property :dimension, as: 'dimension' - end - end - - class AddFilterViewRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :filter, as: 'filter', class: Google::Apis::SheetsV4::FilterView, decorator: Google::Apis::SheetsV4::FilterView::Representation + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation end end @@ -2103,24 +1727,340 @@ module Google # @private class Representation < Google::Apis::Core::JsonRepresentation property :row_count, as: 'rowCount' - property :column_count, as: 'columnCount' property :frozen_row_count, as: 'frozenRowCount' - property :frozen_column_count, as: 'frozenColumnCount' property :hide_gridlines, as: 'hideGridlines' + property :column_count, as: 'columnCount' + property :frozen_column_count, as: 'frozenColumnCount' end end - class DeleteNamedRangeRequest + class UpdateEmbeddedObjectPositionResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :named_range_id, as: 'namedRangeId' + property :position, as: 'position', class: Google::Apis::SheetsV4::EmbeddedObjectPosition, decorator: Google::Apis::SheetsV4::EmbeddedObjectPosition::Representation + end end - class AddChartRequest + class SortSpec # @private class Representation < Google::Apis::Core::JsonRepresentation - property :chart, as: 'chart', class: Google::Apis::SheetsV4::EmbeddedChart, decorator: Google::Apis::SheetsV4::EmbeddedChart::Representation + property :dimension_index, as: 'dimensionIndex' + property :sort_order, as: 'sortOrder' + end + end + + class Sheet + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :basic_filter, as: 'basicFilter', class: Google::Apis::SheetsV4::BasicFilter, decorator: Google::Apis::SheetsV4::BasicFilter::Representation + + collection :merges, as: 'merges', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + collection :data, as: 'data', class: Google::Apis::SheetsV4::GridData, decorator: Google::Apis::SheetsV4::GridData::Representation + + collection :banded_ranges, as: 'bandedRanges', class: Google::Apis::SheetsV4::BandedRange, decorator: Google::Apis::SheetsV4::BandedRange::Representation + + collection :charts, as: 'charts', class: Google::Apis::SheetsV4::EmbeddedChart, decorator: Google::Apis::SheetsV4::EmbeddedChart::Representation + + property :properties, as: 'properties', class: Google::Apis::SheetsV4::SheetProperties, decorator: Google::Apis::SheetsV4::SheetProperties::Representation + + collection :filter_views, as: 'filterViews', class: Google::Apis::SheetsV4::FilterView, decorator: Google::Apis::SheetsV4::FilterView::Representation + + collection :protected_ranges, as: 'protectedRanges', class: Google::Apis::SheetsV4::ProtectedRange, decorator: Google::Apis::SheetsV4::ProtectedRange::Representation + + collection :conditional_formats, as: 'conditionalFormats', class: Google::Apis::SheetsV4::ConditionalFormatRule, decorator: Google::Apis::SheetsV4::ConditionalFormatRule::Representation + + end + end + + class BooleanRule + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :format, as: 'format', class: Google::Apis::SheetsV4::CellFormat, decorator: Google::Apis::SheetsV4::CellFormat::Representation + + property :condition, as: 'condition', class: Google::Apis::SheetsV4::BooleanCondition, decorator: Google::Apis::SheetsV4::BooleanCondition::Representation + + end + end + + class FilterCriteria + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :hidden_values, as: 'hiddenValues' + property :condition, as: 'condition', class: Google::Apis::SheetsV4::BooleanCondition, decorator: Google::Apis::SheetsV4::BooleanCondition::Representation + + end + end + + class PivotGroupValueMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :value, as: 'value', class: Google::Apis::SheetsV4::ExtendedValue, decorator: Google::Apis::SheetsV4::ExtendedValue::Representation + + property :collapsed, as: 'collapsed' + end + end + + class Editors + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :users, as: 'users' + collection :groups, as: 'groups' + property :domain_users_can_edit, as: 'domainUsersCanEdit' + end + end + + class UpdateConditionalFormatRuleRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :index, as: 'index' + property :sheet_id, as: 'sheetId' + property :new_index, as: 'newIndex' + property :rule, as: 'rule', class: Google::Apis::SheetsV4::ConditionalFormatRule, decorator: Google::Apis::SheetsV4::ConditionalFormatRule::Representation + + end + end + + class BasicChartDomain + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :domain, as: 'domain', class: Google::Apis::SheetsV4::ChartData, decorator: Google::Apis::SheetsV4::ChartData::Representation + + end + end + + class DataValidationRule + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :strict, as: 'strict' + property :input_message, as: 'inputMessage' + property :condition, as: 'condition', class: Google::Apis::SheetsV4::BooleanCondition, decorator: Google::Apis::SheetsV4::BooleanCondition::Representation + + property :show_custom_ui, as: 'showCustomUi' + end + end + + class PasteDataRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :html, as: 'html' + property :coordinate, as: 'coordinate', class: Google::Apis::SheetsV4::GridCoordinate, decorator: Google::Apis::SheetsV4::GridCoordinate::Representation + + property :data, as: 'data' + property :delimiter, as: 'delimiter' + property :type, as: 'type' + end + end + + class AppendDimensionRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :dimension, as: 'dimension' + property :length, as: 'length' + property :sheet_id, as: 'sheetId' + end + end + + class AddNamedRangeRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :named_range, as: 'namedRange', class: Google::Apis::SheetsV4::NamedRange, decorator: Google::Apis::SheetsV4::NamedRange::Representation + + end + end + + class UpdateEmbeddedObjectPositionRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :new_position, as: 'newPosition', class: Google::Apis::SheetsV4::EmbeddedObjectPosition, decorator: Google::Apis::SheetsV4::EmbeddedObjectPosition::Representation + + property :fields, as: 'fields' + property :object_id_prop, as: 'objectId' + end + end + + class PieChartSpec + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :domain, as: 'domain', class: Google::Apis::SheetsV4::ChartData, decorator: Google::Apis::SheetsV4::ChartData::Representation + + property :three_dimensional, as: 'threeDimensional' + property :series, as: 'series', class: Google::Apis::SheetsV4::ChartData, decorator: Google::Apis::SheetsV4::ChartData::Representation + + property :legend_position, as: 'legendPosition' + property :pie_hole, as: 'pieHole' + end + end + + class UpdateFilterViewRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :fields, as: 'fields' + property :filter, as: 'filter', class: Google::Apis::SheetsV4::FilterView, decorator: Google::Apis::SheetsV4::FilterView::Representation + + end + end + + class ConditionalFormatRule + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :gradient_rule, as: 'gradientRule', class: Google::Apis::SheetsV4::GradientRule, decorator: Google::Apis::SheetsV4::GradientRule::Representation + + property :boolean_rule, as: 'booleanRule', class: Google::Apis::SheetsV4::BooleanRule, decorator: Google::Apis::SheetsV4::BooleanRule::Representation + + collection :ranges, as: 'ranges', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + end + end + + class CopyPasteRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :paste_type, as: 'pasteType' + property :destination, as: 'destination', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :paste_orientation, as: 'pasteOrientation' + end + end + + class Request + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :update_dimension_properties, as: 'updateDimensionProperties', class: Google::Apis::SheetsV4::UpdateDimensionPropertiesRequest, decorator: Google::Apis::SheetsV4::UpdateDimensionPropertiesRequest::Representation + + property :paste_data, as: 'pasteData', class: Google::Apis::SheetsV4::PasteDataRequest, decorator: Google::Apis::SheetsV4::PasteDataRequest::Representation + + property :set_basic_filter, as: 'setBasicFilter', class: Google::Apis::SheetsV4::SetBasicFilterRequest, decorator: Google::Apis::SheetsV4::SetBasicFilterRequest::Representation + + property :add_conditional_format_rule, as: 'addConditionalFormatRule', class: Google::Apis::SheetsV4::AddConditionalFormatRuleRequest, decorator: Google::Apis::SheetsV4::AddConditionalFormatRuleRequest::Representation + + property :update_cells, as: 'updateCells', class: Google::Apis::SheetsV4::UpdateCellsRequest, decorator: Google::Apis::SheetsV4::UpdateCellsRequest::Representation + + property :add_named_range, as: 'addNamedRange', class: Google::Apis::SheetsV4::AddNamedRangeRequest, decorator: Google::Apis::SheetsV4::AddNamedRangeRequest::Representation + + property :update_spreadsheet_properties, as: 'updateSpreadsheetProperties', class: Google::Apis::SheetsV4::UpdateSpreadsheetPropertiesRequest, decorator: Google::Apis::SheetsV4::UpdateSpreadsheetPropertiesRequest::Representation + + property :delete_embedded_object, as: 'deleteEmbeddedObject', class: Google::Apis::SheetsV4::DeleteEmbeddedObjectRequest, decorator: Google::Apis::SheetsV4::DeleteEmbeddedObjectRequest::Representation + + property :update_filter_view, as: 'updateFilterView', class: Google::Apis::SheetsV4::UpdateFilterViewRequest, decorator: Google::Apis::SheetsV4::UpdateFilterViewRequest::Representation + + property :add_banding, as: 'addBanding', class: Google::Apis::SheetsV4::AddBandingRequest, decorator: Google::Apis::SheetsV4::AddBandingRequest::Representation + + property :auto_resize_dimensions, as: 'autoResizeDimensions', class: Google::Apis::SheetsV4::AutoResizeDimensionsRequest, decorator: Google::Apis::SheetsV4::AutoResizeDimensionsRequest::Representation + + property :append_cells, as: 'appendCells', class: Google::Apis::SheetsV4::AppendCellsRequest, decorator: Google::Apis::SheetsV4::AppendCellsRequest::Representation + + property :cut_paste, as: 'cutPaste', class: Google::Apis::SheetsV4::CutPasteRequest, decorator: Google::Apis::SheetsV4::CutPasteRequest::Representation + + property :merge_cells, as: 'mergeCells', class: Google::Apis::SheetsV4::MergeCellsRequest, decorator: Google::Apis::SheetsV4::MergeCellsRequest::Representation + + property :update_named_range, as: 'updateNamedRange', class: Google::Apis::SheetsV4::UpdateNamedRangeRequest, decorator: Google::Apis::SheetsV4::UpdateNamedRangeRequest::Representation + + property :update_sheet_properties, as: 'updateSheetProperties', class: Google::Apis::SheetsV4::UpdateSheetPropertiesRequest, decorator: Google::Apis::SheetsV4::UpdateSheetPropertiesRequest::Representation + + property :delete_dimension, as: 'deleteDimension', class: Google::Apis::SheetsV4::DeleteDimensionRequest, decorator: Google::Apis::SheetsV4::DeleteDimensionRequest::Representation + + property :auto_fill, as: 'autoFill', class: Google::Apis::SheetsV4::AutoFillRequest, decorator: Google::Apis::SheetsV4::AutoFillRequest::Representation + + property :sort_range, as: 'sortRange', class: Google::Apis::SheetsV4::SortRangeRequest, decorator: Google::Apis::SheetsV4::SortRangeRequest::Representation + + property :delete_protected_range, as: 'deleteProtectedRange', class: Google::Apis::SheetsV4::DeleteProtectedRangeRequest, decorator: Google::Apis::SheetsV4::DeleteProtectedRangeRequest::Representation + + property :duplicate_filter_view, as: 'duplicateFilterView', class: Google::Apis::SheetsV4::DuplicateFilterViewRequest, decorator: Google::Apis::SheetsV4::DuplicateFilterViewRequest::Representation + + property :add_chart, as: 'addChart', class: Google::Apis::SheetsV4::AddChartRequest, decorator: Google::Apis::SheetsV4::AddChartRequest::Representation + + property :find_replace, as: 'findReplace', class: Google::Apis::SheetsV4::FindReplaceRequest, decorator: Google::Apis::SheetsV4::FindReplaceRequest::Representation + + property :update_chart_spec, as: 'updateChartSpec', class: Google::Apis::SheetsV4::UpdateChartSpecRequest, decorator: Google::Apis::SheetsV4::UpdateChartSpecRequest::Representation + + property :text_to_columns, as: 'textToColumns', class: Google::Apis::SheetsV4::TextToColumnsRequest, decorator: Google::Apis::SheetsV4::TextToColumnsRequest::Representation + + property :add_sheet, as: 'addSheet', class: Google::Apis::SheetsV4::AddSheetRequest, decorator: Google::Apis::SheetsV4::AddSheetRequest::Representation + + property :update_protected_range, as: 'updateProtectedRange', class: Google::Apis::SheetsV4::UpdateProtectedRangeRequest, decorator: Google::Apis::SheetsV4::UpdateProtectedRangeRequest::Representation + + property :delete_filter_view, as: 'deleteFilterView', class: Google::Apis::SheetsV4::DeleteFilterViewRequest, decorator: Google::Apis::SheetsV4::DeleteFilterViewRequest::Representation + + property :copy_paste, as: 'copyPaste', class: Google::Apis::SheetsV4::CopyPasteRequest, decorator: Google::Apis::SheetsV4::CopyPasteRequest::Representation + + property :insert_dimension, as: 'insertDimension', class: Google::Apis::SheetsV4::InsertDimensionRequest, decorator: Google::Apis::SheetsV4::InsertDimensionRequest::Representation + + property :delete_range, as: 'deleteRange', class: Google::Apis::SheetsV4::DeleteRangeRequest, decorator: Google::Apis::SheetsV4::DeleteRangeRequest::Representation + + property :delete_banding, as: 'deleteBanding', class: Google::Apis::SheetsV4::DeleteBandingRequest, decorator: Google::Apis::SheetsV4::DeleteBandingRequest::Representation + + property :add_filter_view, as: 'addFilterView', class: Google::Apis::SheetsV4::AddFilterViewRequest, decorator: Google::Apis::SheetsV4::AddFilterViewRequest::Representation + + property :set_data_validation, as: 'setDataValidation', class: Google::Apis::SheetsV4::SetDataValidationRequest, decorator: Google::Apis::SheetsV4::SetDataValidationRequest::Representation + + property :update_borders, as: 'updateBorders', class: Google::Apis::SheetsV4::UpdateBordersRequest, decorator: Google::Apis::SheetsV4::UpdateBordersRequest::Representation + + property :delete_conditional_format_rule, as: 'deleteConditionalFormatRule', class: Google::Apis::SheetsV4::DeleteConditionalFormatRuleRequest, decorator: Google::Apis::SheetsV4::DeleteConditionalFormatRuleRequest::Representation + + property :repeat_cell, as: 'repeatCell', class: Google::Apis::SheetsV4::RepeatCellRequest, decorator: Google::Apis::SheetsV4::RepeatCellRequest::Representation + + property :clear_basic_filter, as: 'clearBasicFilter', class: Google::Apis::SheetsV4::ClearBasicFilterRequest, decorator: Google::Apis::SheetsV4::ClearBasicFilterRequest::Representation + + property :append_dimension, as: 'appendDimension', class: Google::Apis::SheetsV4::AppendDimensionRequest, decorator: Google::Apis::SheetsV4::AppendDimensionRequest::Representation + + property :update_conditional_format_rule, as: 'updateConditionalFormatRule', class: Google::Apis::SheetsV4::UpdateConditionalFormatRuleRequest, decorator: Google::Apis::SheetsV4::UpdateConditionalFormatRuleRequest::Representation + + property :insert_range, as: 'insertRange', class: Google::Apis::SheetsV4::InsertRangeRequest, decorator: Google::Apis::SheetsV4::InsertRangeRequest::Representation + + property :move_dimension, as: 'moveDimension', class: Google::Apis::SheetsV4::MoveDimensionRequest, decorator: Google::Apis::SheetsV4::MoveDimensionRequest::Representation + + property :update_banding, as: 'updateBanding', class: Google::Apis::SheetsV4::UpdateBandingRequest, decorator: Google::Apis::SheetsV4::UpdateBandingRequest::Representation + + property :add_protected_range, as: 'addProtectedRange', class: Google::Apis::SheetsV4::AddProtectedRangeRequest, decorator: Google::Apis::SheetsV4::AddProtectedRangeRequest::Representation + + property :delete_named_range, as: 'deleteNamedRange', class: Google::Apis::SheetsV4::DeleteNamedRangeRequest, decorator: Google::Apis::SheetsV4::DeleteNamedRangeRequest::Representation + + property :duplicate_sheet, as: 'duplicateSheet', class: Google::Apis::SheetsV4::DuplicateSheetRequest, decorator: Google::Apis::SheetsV4::DuplicateSheetRequest::Representation + + property :unmerge_cells, as: 'unmergeCells', class: Google::Apis::SheetsV4::UnmergeCellsRequest, decorator: Google::Apis::SheetsV4::UnmergeCellsRequest::Representation + + property :delete_sheet, as: 'deleteSheet', class: Google::Apis::SheetsV4::DeleteSheetRequest, decorator: Google::Apis::SheetsV4::DeleteSheetRequest::Representation + + property :update_embedded_object_position, as: 'updateEmbeddedObjectPosition', class: Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionRequest, decorator: Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionRequest::Representation + + end + end + + class BooleanCondition + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' + collection :values, as: 'values', class: Google::Apis::SheetsV4::ConditionValue, decorator: Google::Apis::SheetsV4::ConditionValue::Representation + + end + end + + class GridRange + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :start_column_index, as: 'startColumnIndex' + property :sheet_id, as: 'sheetId' + property :end_row_index, as: 'endRowIndex' + property :end_column_index, as: 'endColumnIndex' + property :start_row_index, as: 'startRowIndex' + end + end + + class BasicChartSpec + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :legend_position, as: 'legendPosition' + collection :domains, as: 'domains', class: Google::Apis::SheetsV4::BasicChartDomain, decorator: Google::Apis::SheetsV4::BasicChartDomain::Representation + + property :header_count, as: 'headerCount' + collection :axis, as: 'axis', class: Google::Apis::SheetsV4::BasicChartAxis, decorator: Google::Apis::SheetsV4::BasicChartAxis::Representation + + property :chart_type, as: 'chartType' + collection :series, as: 'series', class: Google::Apis::SheetsV4::BasicChartSeries, decorator: Google::Apis::SheetsV4::BasicChartSeries::Representation end end @@ -2135,152 +2075,212 @@ module Google end end - class Request + class CellData # @private class Representation < Google::Apis::Core::JsonRepresentation - property :update_embedded_object_position, as: 'updateEmbeddedObjectPosition', class: Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionRequest, decorator: Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionRequest::Representation + property :effective_value, as: 'effectiveValue', class: Google::Apis::SheetsV4::ExtendedValue, decorator: Google::Apis::SheetsV4::ExtendedValue::Representation - property :delete_named_range, as: 'deleteNamedRange', class: Google::Apis::SheetsV4::DeleteNamedRangeRequest, decorator: Google::Apis::SheetsV4::DeleteNamedRangeRequest::Representation + property :formatted_value, as: 'formattedValue' + collection :text_format_runs, as: 'textFormatRuns', class: Google::Apis::SheetsV4::TextFormatRun, decorator: Google::Apis::SheetsV4::TextFormatRun::Representation - property :update_named_range, as: 'updateNamedRange', class: Google::Apis::SheetsV4::UpdateNamedRangeRequest, decorator: Google::Apis::SheetsV4::UpdateNamedRangeRequest::Representation + property :hyperlink, as: 'hyperlink' + property :pivot_table, as: 'pivotTable', class: Google::Apis::SheetsV4::PivotTable, decorator: Google::Apis::SheetsV4::PivotTable::Representation - property :add_filter_view, as: 'addFilterView', class: Google::Apis::SheetsV4::AddFilterViewRequest, decorator: Google::Apis::SheetsV4::AddFilterViewRequest::Representation + property :user_entered_format, as: 'userEnteredFormat', class: Google::Apis::SheetsV4::CellFormat, decorator: Google::Apis::SheetsV4::CellFormat::Representation - property :update_spreadsheet_properties, as: 'updateSpreadsheetProperties', class: Google::Apis::SheetsV4::UpdateSpreadsheetPropertiesRequest, decorator: Google::Apis::SheetsV4::UpdateSpreadsheetPropertiesRequest::Representation + property :note, as: 'note' + property :effective_format, as: 'effectiveFormat', class: Google::Apis::SheetsV4::CellFormat, decorator: Google::Apis::SheetsV4::CellFormat::Representation - property :append_dimension, as: 'appendDimension', class: Google::Apis::SheetsV4::AppendDimensionRequest, decorator: Google::Apis::SheetsV4::AppendDimensionRequest::Representation + property :user_entered_value, as: 'userEnteredValue', class: Google::Apis::SheetsV4::ExtendedValue, decorator: Google::Apis::SheetsV4::ExtendedValue::Representation - property :unmerge_cells, as: 'unmergeCells', class: Google::Apis::SheetsV4::UnmergeCellsRequest, decorator: Google::Apis::SheetsV4::UnmergeCellsRequest::Representation - - property :insert_range, as: 'insertRange', class: Google::Apis::SheetsV4::InsertRangeRequest, decorator: Google::Apis::SheetsV4::InsertRangeRequest::Representation - - property :update_protected_range, as: 'updateProtectedRange', class: Google::Apis::SheetsV4::UpdateProtectedRangeRequest, decorator: Google::Apis::SheetsV4::UpdateProtectedRangeRequest::Representation - - property :delete_filter_view, as: 'deleteFilterView', class: Google::Apis::SheetsV4::DeleteFilterViewRequest, decorator: Google::Apis::SheetsV4::DeleteFilterViewRequest::Representation - - property :clear_basic_filter, as: 'clearBasicFilter', class: Google::Apis::SheetsV4::ClearBasicFilterRequest, decorator: Google::Apis::SheetsV4::ClearBasicFilterRequest::Representation - - property :sort_range, as: 'sortRange', class: Google::Apis::SheetsV4::SortRangeRequest, decorator: Google::Apis::SheetsV4::SortRangeRequest::Representation - - property :repeat_cell, as: 'repeatCell', class: Google::Apis::SheetsV4::RepeatCellRequest, decorator: Google::Apis::SheetsV4::RepeatCellRequest::Representation - - property :set_data_validation, as: 'setDataValidation', class: Google::Apis::SheetsV4::SetDataValidationRequest, decorator: Google::Apis::SheetsV4::SetDataValidationRequest::Representation - - property :update_cells, as: 'updateCells', class: Google::Apis::SheetsV4::UpdateCellsRequest, decorator: Google::Apis::SheetsV4::UpdateCellsRequest::Representation - - property :add_sheet, as: 'addSheet', class: Google::Apis::SheetsV4::AddSheetRequest, decorator: Google::Apis::SheetsV4::AddSheetRequest::Representation - - property :update_filter_view, as: 'updateFilterView', class: Google::Apis::SheetsV4::UpdateFilterViewRequest, decorator: Google::Apis::SheetsV4::UpdateFilterViewRequest::Representation - - property :update_sheet_properties, as: 'updateSheetProperties', class: Google::Apis::SheetsV4::UpdateSheetPropertiesRequest, decorator: Google::Apis::SheetsV4::UpdateSheetPropertiesRequest::Representation - - property :update_dimension_properties, as: 'updateDimensionProperties', class: Google::Apis::SheetsV4::UpdateDimensionPropertiesRequest, decorator: Google::Apis::SheetsV4::UpdateDimensionPropertiesRequest::Representation - - property :delete_sheet, as: 'deleteSheet', class: Google::Apis::SheetsV4::DeleteSheetRequest, decorator: Google::Apis::SheetsV4::DeleteSheetRequest::Representation - - property :find_replace, as: 'findReplace', class: Google::Apis::SheetsV4::FindReplaceRequest, decorator: Google::Apis::SheetsV4::FindReplaceRequest::Representation - - property :add_protected_range, as: 'addProtectedRange', class: Google::Apis::SheetsV4::AddProtectedRangeRequest, decorator: Google::Apis::SheetsV4::AddProtectedRangeRequest::Representation - - property :delete_protected_range, as: 'deleteProtectedRange', class: Google::Apis::SheetsV4::DeleteProtectedRangeRequest, decorator: Google::Apis::SheetsV4::DeleteProtectedRangeRequest::Representation - - property :update_conditional_format_rule, as: 'updateConditionalFormatRule', class: Google::Apis::SheetsV4::UpdateConditionalFormatRuleRequest, decorator: Google::Apis::SheetsV4::UpdateConditionalFormatRuleRequest::Representation - - property :set_basic_filter, as: 'setBasicFilter', class: Google::Apis::SheetsV4::SetBasicFilterRequest, decorator: Google::Apis::SheetsV4::SetBasicFilterRequest::Representation - - property :merge_cells, as: 'mergeCells', class: Google::Apis::SheetsV4::MergeCellsRequest, decorator: Google::Apis::SheetsV4::MergeCellsRequest::Representation - - property :update_banding, as: 'updateBanding', class: Google::Apis::SheetsV4::UpdateBandingRequest, decorator: Google::Apis::SheetsV4::UpdateBandingRequest::Representation - - property :add_chart, as: 'addChart', class: Google::Apis::SheetsV4::AddChartRequest, decorator: Google::Apis::SheetsV4::AddChartRequest::Representation - - property :delete_conditional_format_rule, as: 'deleteConditionalFormatRule', class: Google::Apis::SheetsV4::DeleteConditionalFormatRuleRequest, decorator: Google::Apis::SheetsV4::DeleteConditionalFormatRuleRequest::Representation - - property :add_banding, as: 'addBanding', class: Google::Apis::SheetsV4::AddBandingRequest, decorator: Google::Apis::SheetsV4::AddBandingRequest::Representation - - property :delete_banding, as: 'deleteBanding', class: Google::Apis::SheetsV4::DeleteBandingRequest, decorator: Google::Apis::SheetsV4::DeleteBandingRequest::Representation - - property :update_chart_spec, as: 'updateChartSpec', class: Google::Apis::SheetsV4::UpdateChartSpecRequest, decorator: Google::Apis::SheetsV4::UpdateChartSpecRequest::Representation - - property :delete_range, as: 'deleteRange', class: Google::Apis::SheetsV4::DeleteRangeRequest, decorator: Google::Apis::SheetsV4::DeleteRangeRequest::Representation - - property :delete_dimension, as: 'deleteDimension', class: Google::Apis::SheetsV4::DeleteDimensionRequest, decorator: Google::Apis::SheetsV4::DeleteDimensionRequest::Representation - - property :delete_embedded_object, as: 'deleteEmbeddedObject', class: Google::Apis::SheetsV4::DeleteEmbeddedObjectRequest, decorator: Google::Apis::SheetsV4::DeleteEmbeddedObjectRequest::Representation - - property :paste_data, as: 'pasteData', class: Google::Apis::SheetsV4::PasteDataRequest, decorator: Google::Apis::SheetsV4::PasteDataRequest::Representation - - property :add_conditional_format_rule, as: 'addConditionalFormatRule', class: Google::Apis::SheetsV4::AddConditionalFormatRuleRequest, decorator: Google::Apis::SheetsV4::AddConditionalFormatRuleRequest::Representation - - property :update_borders, as: 'updateBorders', class: Google::Apis::SheetsV4::UpdateBordersRequest, decorator: Google::Apis::SheetsV4::UpdateBordersRequest::Representation - - property :auto_resize_dimensions, as: 'autoResizeDimensions', class: Google::Apis::SheetsV4::AutoResizeDimensionsRequest, decorator: Google::Apis::SheetsV4::AutoResizeDimensionsRequest::Representation - - property :duplicate_sheet, as: 'duplicateSheet', class: Google::Apis::SheetsV4::DuplicateSheetRequest, decorator: Google::Apis::SheetsV4::DuplicateSheetRequest::Representation - - property :duplicate_filter_view, as: 'duplicateFilterView', class: Google::Apis::SheetsV4::DuplicateFilterViewRequest, decorator: Google::Apis::SheetsV4::DuplicateFilterViewRequest::Representation - - property :cut_paste, as: 'cutPaste', class: Google::Apis::SheetsV4::CutPasteRequest, decorator: Google::Apis::SheetsV4::CutPasteRequest::Representation - - property :append_cells, as: 'appendCells', class: Google::Apis::SheetsV4::AppendCellsRequest, decorator: Google::Apis::SheetsV4::AppendCellsRequest::Representation - - property :add_named_range, as: 'addNamedRange', class: Google::Apis::SheetsV4::AddNamedRangeRequest, decorator: Google::Apis::SheetsV4::AddNamedRangeRequest::Representation - - property :auto_fill, as: 'autoFill', class: Google::Apis::SheetsV4::AutoFillRequest, decorator: Google::Apis::SheetsV4::AutoFillRequest::Representation - - property :move_dimension, as: 'moveDimension', class: Google::Apis::SheetsV4::MoveDimensionRequest, decorator: Google::Apis::SheetsV4::MoveDimensionRequest::Representation - - property :text_to_columns, as: 'textToColumns', class: Google::Apis::SheetsV4::TextToColumnsRequest, decorator: Google::Apis::SheetsV4::TextToColumnsRequest::Representation - - property :insert_dimension, as: 'insertDimension', class: Google::Apis::SheetsV4::InsertDimensionRequest, decorator: Google::Apis::SheetsV4::InsertDimensionRequest::Representation - - property :copy_paste, as: 'copyPaste', class: Google::Apis::SheetsV4::CopyPasteRequest, decorator: Google::Apis::SheetsV4::CopyPasteRequest::Representation + property :data_validation, as: 'dataValidation', class: Google::Apis::SheetsV4::DataValidationRule, decorator: Google::Apis::SheetsV4::DataValidationRule::Representation end end - class BatchGetValuesResponse + class BatchUpdateSpreadsheetRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :value_ranges, as: 'valueRanges', class: Google::Apis::SheetsV4::ValueRange, decorator: Google::Apis::SheetsV4::ValueRange::Representation + property :include_spreadsheet_in_response, as: 'includeSpreadsheetInResponse' + collection :response_ranges, as: 'responseRanges' + property :response_include_grid_data, as: 'responseIncludeGridData' + collection :requests, as: 'requests', class: Google::Apis::SheetsV4::Request, decorator: Google::Apis::SheetsV4::Request::Representation - property :spreadsheet_id, as: 'spreadsheetId' end end - class InsertDimensionRequest + class Padding + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :bottom, as: 'bottom' + property :top, as: 'top' + property :left, as: 'left' + property :right, as: 'right' + end + end + + class BasicChartAxis + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :format, as: 'format', class: Google::Apis::SheetsV4::TextFormat, decorator: Google::Apis::SheetsV4::TextFormat::Representation + + property :position, as: 'position' + property :title, as: 'title' + end + end + + class DeleteDimensionRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :inherit_from_before, as: 'inheritFromBefore' property :range, as: 'range', class: Google::Apis::SheetsV4::DimensionRange, decorator: Google::Apis::SheetsV4::DimensionRange::Representation end end - class DeleteEmbeddedObjectRequest + class UpdateChartSpecRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :object_id_prop, as: 'objectId' + property :spec, as: 'spec', class: Google::Apis::SheetsV4::ChartSpec, decorator: Google::Apis::SheetsV4::ChartSpec::Representation + + property :chart_id, as: 'chartId' end end - class BandedRange + class DeleteFilterViewRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :banded_range_id, as: 'bandedRangeId' - property :row_properties, as: 'rowProperties', class: Google::Apis::SheetsV4::BandingProperties, decorator: Google::Apis::SheetsV4::BandingProperties::Representation + property :filter_id, as: 'filterId' + end + end - property :column_properties, as: 'columnProperties', class: Google::Apis::SheetsV4::BandingProperties, decorator: Google::Apis::SheetsV4::BandingProperties::Representation + class BatchUpdateValuesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :responses, as: 'responses', class: Google::Apis::SheetsV4::UpdateValuesResponse, decorator: Google::Apis::SheetsV4::UpdateValuesResponse::Representation + + property :total_updated_sheets, as: 'totalUpdatedSheets' + property :total_updated_cells, as: 'totalUpdatedCells' + property :total_updated_columns, as: 'totalUpdatedColumns' + property :spreadsheet_id, as: 'spreadsheetId' + property :total_updated_rows, as: 'totalUpdatedRows' + end + end + + class SortRangeRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :sort_specs, as: 'sortSpecs', class: Google::Apis::SheetsV4::SortSpec, decorator: Google::Apis::SheetsV4::SortSpec::Representation property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation end end - class DeleteConditionalFormatRuleResponse + class MergeCellsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :rule, as: 'rule', class: Google::Apis::SheetsV4::ConditionalFormatRule, decorator: Google::Apis::SheetsV4::ConditionalFormatRule::Representation + property :merge_type, as: 'mergeType' + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + end + end + + class AddProtectedRangeRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :protected_range, as: 'protectedRange', class: Google::Apis::SheetsV4::ProtectedRange, decorator: Google::Apis::SheetsV4::ProtectedRange::Representation + + end + end + + class BatchClearValuesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :ranges, as: 'ranges' + end + end + + class DuplicateFilterViewResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :filter, as: 'filter', class: Google::Apis::SheetsV4::FilterView, decorator: Google::Apis::SheetsV4::FilterView::Representation + + end + end + + class DuplicateSheetResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :properties, as: 'properties', class: Google::Apis::SheetsV4::SheetProperties, decorator: Google::Apis::SheetsV4::SheetProperties::Representation + + end + end + + class ClearBasicFilterRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :sheet_id, as: 'sheetId' + end + end + + class TextToColumnsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :delimiter, as: 'delimiter' + property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :delimiter_type, as: 'delimiterType' + end + end + + class DeleteBandingRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :banded_range_id, as: 'bandedRangeId' + end + end + + class BatchUpdateSpreadsheetResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :replies, as: 'replies', class: Google::Apis::SheetsV4::Response, decorator: Google::Apis::SheetsV4::Response::Representation + + property :updated_spreadsheet, as: 'updatedSpreadsheet', class: Google::Apis::SheetsV4::Spreadsheet, decorator: Google::Apis::SheetsV4::Spreadsheet::Representation + + property :spreadsheet_id, as: 'spreadsheetId' + end + end + + class AppendValuesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :spreadsheet_id, as: 'spreadsheetId' + property :updates, as: 'updates', class: Google::Apis::SheetsV4::UpdateValuesResponse, decorator: Google::Apis::SheetsV4::UpdateValuesResponse::Representation + + property :table_range, as: 'tableRange' + end + end + + class MoveDimensionRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :destination_index, as: 'destinationIndex' + property :source, as: 'source', class: Google::Apis::SheetsV4::DimensionRange, decorator: Google::Apis::SheetsV4::DimensionRange::Representation + + end + end + + class PivotFilterCriteria + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :visible_values, as: 'visibleValues' + end + end + + class AddFilterViewRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :filter, as: 'filter', class: Google::Apis::SheetsV4::FilterView, decorator: Google::Apis::SheetsV4::FilterView::Representation end end diff --git a/generated/google/apis/sheets_v4/service.rb b/generated/google/apis/sheets_v4/service.rb index 456e29bdf..c19580e63 100644 --- a/generated/google/apis/sheets_v4/service.rb +++ b/generated/google/apis/sheets_v4/service.rb @@ -46,36 +46,6 @@ module Google super('https://sheets.googleapis.com/', '') end - # Creates a spreadsheet, returning the newly created spreadsheet. - # @param [Google::Apis::SheetsV4::Spreadsheet] spreadsheet_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SheetsV4::Spreadsheet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SheetsV4::Spreadsheet] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_spreadsheet(spreadsheet_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v4/spreadsheets', options) - command.request_representation = Google::Apis::SheetsV4::Spreadsheet::Representation - command.request_object = spreadsheet_object - command.response_representation = Google::Apis::SheetsV4::Spreadsheet::Representation - command.response_class = Google::Apis::SheetsV4::Spreadsheet - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - # Returns the spreadsheet at the given ID. # The caller must specify the spreadsheet ID. # By default, data within grids will not be returned. @@ -99,11 +69,11 @@ module Google # @param [Boolean] include_grid_data # True if grid data should be returned. # This parameter is ignored if a field mask was set in the request. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -116,15 +86,45 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_spreadsheet(spreadsheet_id, ranges: nil, include_grid_data: nil, quota_user: nil, fields: nil, options: nil, &block) + def get_spreadsheet(spreadsheet_id, ranges: nil, include_grid_data: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v4/spreadsheets/{spreadsheetId}', options) command.response_representation = Google::Apis::SheetsV4::Spreadsheet::Representation command.response_class = Google::Apis::SheetsV4::Spreadsheet command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? command.query['ranges'] = ranges unless ranges.nil? command.query['includeGridData'] = include_grid_data unless include_grid_data.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a spreadsheet, returning the newly created spreadsheet. + # @param [Google::Apis::SheetsV4::Spreadsheet] spreadsheet_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SheetsV4::Spreadsheet] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SheetsV4::Spreadsheet] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_spreadsheet(spreadsheet_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v4/spreadsheets', options) + command.request_representation = Google::Apis::SheetsV4::Spreadsheet::Representation + command.request_object = spreadsheet_object + command.response_representation = Google::Apis::SheetsV4::Spreadsheet::Representation + command.response_class = Google::Apis::SheetsV4::Spreadsheet + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -147,11 +147,11 @@ module Google # @param [String] spreadsheet_id # The spreadsheet to apply the updates to. # @param [Google::Apis::SheetsV4::BatchUpdateSpreadsheetRequest] batch_update_spreadsheet_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -164,106 +164,74 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_update_spreadsheet(spreadsheet_id, batch_update_spreadsheet_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def batch_update_spreadsheet(spreadsheet_id, batch_update_spreadsheet_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}:batchUpdate', options) command.request_representation = Google::Apis::SheetsV4::BatchUpdateSpreadsheetRequest::Representation command.request_object = batch_update_spreadsheet_request_object command.response_representation = Google::Apis::SheetsV4::BatchUpdateSpreadsheetResponse::Representation command.response_class = Google::Apis::SheetsV4::BatchUpdateSpreadsheetResponse command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - # Clears values from a spreadsheet. - # The caller must specify the spreadsheet ID and range. - # Only values are cleared -- all other properties of the cell (such as - # formatting, data validation, etc..) are kept. + # Sets values in a range of a spreadsheet. + # The caller must specify the spreadsheet ID, range, and + # a valueInputOption. # @param [String] spreadsheet_id # The ID of the spreadsheet to update. # @param [String] range - # The A1 notation of the values to clear. - # @param [Google::Apis::SheetsV4::ClearValuesRequest] clear_values_request_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SheetsV4::ClearValuesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SheetsV4::ClearValuesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def clear_values(spreadsheet_id, range, clear_values_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values/{range}:clear', options) - command.request_representation = Google::Apis::SheetsV4::ClearValuesRequest::Representation - command.request_object = clear_values_request_object - command.response_representation = Google::Apis::SheetsV4::ClearValuesResponse::Representation - command.response_class = Google::Apis::SheetsV4::ClearValuesResponse - command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? - command.params['range'] = range unless range.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Returns one or more ranges of values from a spreadsheet. - # The caller must specify the spreadsheet ID and one or more ranges. - # @param [String] spreadsheet_id - # The ID of the spreadsheet to retrieve data from. - # @param [Array, String] ranges - # The A1 notation of the values to retrieve. - # @param [String] value_render_option - # How values should be represented in the output. - # The default render option is ValueRenderOption.FORMATTED_VALUE. - # @param [String] date_time_render_option - # How dates, times, and durations should be represented in the output. - # This is ignored if value_render_option is + # The A1 notation of the values to update. + # @param [Google::Apis::SheetsV4::ValueRange] value_range_object + # @param [String] value_input_option + # How the input data should be interpreted. + # @param [String] response_date_time_render_option + # Determines how dates, times, and durations in the response should be + # rendered. This is ignored if response_value_render_option is # FORMATTED_VALUE. # The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER]. - # @param [String] major_dimension - # The major dimension that results should use. - # For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, - # then requesting `range=A1:B2,majorDimension=ROWS` will return - # `[[1,2],[3,4]]`, - # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return - # `[[1,3],[2,4]]`. + # @param [Boolean] include_values_in_response + # Determines if the update response should include the values + # of the cells that were updated. By default, responses + # do not include the updated values. + # If the range to write was larger than than the range actually written, + # the response will include all values in the requested range (excluding + # trailing empty rows and columns). + # @param [String] response_value_render_option + # Determines how values in the response should be rendered. + # The default render option is ValueRenderOption.FORMATTED_VALUE. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SheetsV4::BatchGetValuesResponse] parsed result object + # @yieldparam result [Google::Apis::SheetsV4::UpdateValuesResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::SheetsV4::BatchGetValuesResponse] + # @return [Google::Apis::SheetsV4::UpdateValuesResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_get_spreadsheet_values(spreadsheet_id, ranges: nil, value_render_option: nil, date_time_render_option: nil, major_dimension: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v4/spreadsheets/{spreadsheetId}/values:batchGet', options) - command.response_representation = Google::Apis::SheetsV4::BatchGetValuesResponse::Representation - command.response_class = Google::Apis::SheetsV4::BatchGetValuesResponse + def update_spreadsheet_value(spreadsheet_id, range, value_range_object = nil, value_input_option: nil, response_date_time_render_option: nil, include_values_in_response: nil, response_value_render_option: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'v4/spreadsheets/{spreadsheetId}/values/{range}', options) + command.request_representation = Google::Apis::SheetsV4::ValueRange::Representation + command.request_object = value_range_object + command.response_representation = Google::Apis::SheetsV4::UpdateValuesResponse::Representation + command.response_class = Google::Apis::SheetsV4::UpdateValuesResponse command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? - command.query['ranges'] = ranges unless ranges.nil? - command.query['valueRenderOption'] = value_render_option unless value_render_option.nil? - command.query['dateTimeRenderOption'] = date_time_render_option unless date_time_render_option.nil? - command.query['majorDimension'] = major_dimension unless major_dimension.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? + command.params['range'] = range unless range.nil? + command.query['valueInputOption'] = value_input_option unless value_input_option.nil? + command.query['responseDateTimeRenderOption'] = response_date_time_render_option unless response_date_time_render_option.nil? + command.query['includeValuesInResponse'] = include_values_in_response unless include_values_in_response.nil? + command.query['responseValueRenderOption'] = response_value_render_option unless response_value_render_option.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -274,11 +242,11 @@ module Google # @param [String] spreadsheet_id # The ID of the spreadsheet to update. # @param [Google::Apis::SheetsV4::BatchUpdateValuesRequest] batch_update_values_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -291,24 +259,61 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_update_values(spreadsheet_id, batch_update_values_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def batch_update_values(spreadsheet_id, batch_update_values_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values:batchUpdate', options) command.request_representation = Google::Apis::SheetsV4::BatchUpdateValuesRequest::Representation command.request_object = batch_update_values_request_object command.response_representation = Google::Apis::SheetsV4::BatchUpdateValuesResponse::Representation command.response_class = Google::Apis::SheetsV4::BatchUpdateValuesResponse command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - # Returns a range of values from a spreadsheet. - # The caller must specify the spreadsheet ID and a range. + # Clears values from a spreadsheet. + # The caller must specify the spreadsheet ID and range. + # Only values are cleared -- all other properties of the cell (such as + # formatting, data validation, etc..) are kept. + # @param [String] spreadsheet_id + # The ID of the spreadsheet to update. + # @param [String] range + # The A1 notation of the values to clear. + # @param [Google::Apis::SheetsV4::ClearValuesRequest] clear_values_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SheetsV4::ClearValuesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SheetsV4::ClearValuesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def clear_values(spreadsheet_id, range, clear_values_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values/{range}:clear', options) + command.request_representation = Google::Apis::SheetsV4::ClearValuesRequest::Representation + command.request_object = clear_values_request_object + command.response_representation = Google::Apis::SheetsV4::ClearValuesResponse::Representation + command.response_class = Google::Apis::SheetsV4::ClearValuesResponse + command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? + command.params['range'] = range unless range.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns one or more ranges of values from a spreadsheet. + # The caller must specify the spreadsheet ID and one or more ranges. # @param [String] spreadsheet_id # The ID of the spreadsheet to retrieve data from. - # @param [String] range - # The A1 notation of the values to retrieve. # @param [String] value_render_option # How values should be represented in the output. # The default render option is ValueRenderOption.FORMATTED_VALUE. @@ -317,6 +322,8 @@ module Google # This is ignored if value_render_option is # FORMATTED_VALUE. # The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER]. + # @param [Array, String] ranges + # The A1 notation of the values to retrieve. # @param [String] major_dimension # The major dimension that results should use. # For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, @@ -324,34 +331,34 @@ module Google # `[[1,2],[3,4]]`, # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return # `[[1,3],[2,4]]`. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SheetsV4::ValueRange] parsed result object + # @yieldparam result [Google::Apis::SheetsV4::BatchGetValuesResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::SheetsV4::ValueRange] + # @return [Google::Apis::SheetsV4::BatchGetValuesResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_spreadsheet_values(spreadsheet_id, range, value_render_option: nil, date_time_render_option: nil, major_dimension: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v4/spreadsheets/{spreadsheetId}/values/{range}', options) - command.response_representation = Google::Apis::SheetsV4::ValueRange::Representation - command.response_class = Google::Apis::SheetsV4::ValueRange + def batch_get_spreadsheet_values(spreadsheet_id, value_render_option: nil, date_time_render_option: nil, ranges: nil, major_dimension: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v4/spreadsheets/{spreadsheetId}/values:batchGet', options) + command.response_representation = Google::Apis::SheetsV4::BatchGetValuesResponse::Representation + command.response_class = Google::Apis::SheetsV4::BatchGetValuesResponse command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? - command.params['range'] = range unless range.nil? command.query['valueRenderOption'] = value_render_option unless value_render_option.nil? command.query['dateTimeRenderOption'] = date_time_render_option unless date_time_render_option.nil? + command.query['ranges'] = ranges unless ranges.nil? command.query['majorDimension'] = major_dimension unless major_dimension.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -377,6 +384,8 @@ module Google # @param [String] response_value_render_option # Determines how values in the response should be rendered. # The default render option is ValueRenderOption.FORMATTED_VALUE. + # @param [String] insert_data_option + # How the input data should be inserted. # @param [String] value_input_option # How the input data should be interpreted. # @param [String] response_date_time_render_option @@ -388,13 +397,11 @@ module Google # Determines if the update response should include the values # of the cells that were appended. By default, responses # do not include the updated values. - # @param [String] insert_data_option - # How the input data should be inserted. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -407,7 +414,7 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def append_spreadsheet_value(spreadsheet_id, range, value_range_object = nil, response_value_render_option: nil, value_input_option: nil, response_date_time_render_option: nil, include_values_in_response: nil, insert_data_option: nil, quota_user: nil, fields: nil, options: nil, &block) + def append_spreadsheet_value(spreadsheet_id, range, value_range_object = nil, response_value_render_option: nil, insert_data_option: nil, value_input_option: nil, response_date_time_render_option: nil, include_values_in_response: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values/{range}:append', options) command.request_representation = Google::Apis::SheetsV4::ValueRange::Representation command.request_object = value_range_object @@ -416,71 +423,12 @@ module Google command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? command.params['range'] = range unless range.nil? command.query['responseValueRenderOption'] = response_value_render_option unless response_value_render_option.nil? - command.query['valueInputOption'] = value_input_option unless value_input_option.nil? - command.query['responseDateTimeRenderOption'] = response_date_time_render_option unless response_date_time_render_option.nil? - command.query['includeValuesInResponse'] = include_values_in_response unless include_values_in_response.nil? command.query['insertDataOption'] = insert_data_option unless insert_data_option.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Sets values in a range of a spreadsheet. - # The caller must specify the spreadsheet ID, range, and - # a valueInputOption. - # @param [String] spreadsheet_id - # The ID of the spreadsheet to update. - # @param [String] range - # The A1 notation of the values to update. - # @param [Google::Apis::SheetsV4::ValueRange] value_range_object - # @param [String] response_value_render_option - # Determines how values in the response should be rendered. - # The default render option is ValueRenderOption.FORMATTED_VALUE. - # @param [String] value_input_option - # How the input data should be interpreted. - # @param [String] response_date_time_render_option - # Determines how dates, times, and durations in the response should be - # rendered. This is ignored if response_value_render_option is - # FORMATTED_VALUE. - # The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER]. - # @param [Boolean] include_values_in_response - # Determines if the update response should include the values - # of the cells that were updated. By default, responses - # do not include the updated values. - # If the range to write was larger than than the range actually written, - # the response will include all values in the requested range (excluding - # trailing empty rows and columns). - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SheetsV4::UpdateValuesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SheetsV4::UpdateValuesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_spreadsheet_value(spreadsheet_id, range, value_range_object = nil, response_value_render_option: nil, value_input_option: nil, response_date_time_render_option: nil, include_values_in_response: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:put, 'v4/spreadsheets/{spreadsheetId}/values/{range}', options) - command.request_representation = Google::Apis::SheetsV4::ValueRange::Representation - command.request_object = value_range_object - command.response_representation = Google::Apis::SheetsV4::UpdateValuesResponse::Representation - command.response_class = Google::Apis::SheetsV4::UpdateValuesResponse - command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? - command.params['range'] = range unless range.nil? - command.query['responseValueRenderOption'] = response_value_render_option unless response_value_render_option.nil? command.query['valueInputOption'] = value_input_option unless value_input_option.nil? command.query['responseDateTimeRenderOption'] = response_date_time_render_option unless response_date_time_render_option.nil? command.query['includeValuesInResponse'] = include_values_in_response unless include_values_in_response.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -491,11 +439,11 @@ module Google # @param [String] spreadsheet_id # The ID of the spreadsheet to update. # @param [Google::Apis::SheetsV4::BatchClearValuesRequest] batch_clear_values_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -508,15 +456,67 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_clear_values(spreadsheet_id, batch_clear_values_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def batch_clear_values(spreadsheet_id, batch_clear_values_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values:batchClear', options) command.request_representation = Google::Apis::SheetsV4::BatchClearValuesRequest::Representation command.request_object = batch_clear_values_request_object command.response_representation = Google::Apis::SheetsV4::BatchClearValuesResponse::Representation command.response_class = Google::Apis::SheetsV4::BatchClearValuesResponse command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns a range of values from a spreadsheet. + # The caller must specify the spreadsheet ID and a range. + # @param [String] spreadsheet_id + # The ID of the spreadsheet to retrieve data from. + # @param [String] range + # The A1 notation of the values to retrieve. + # @param [String] value_render_option + # How values should be represented in the output. + # The default render option is ValueRenderOption.FORMATTED_VALUE. + # @param [String] date_time_render_option + # How dates, times, and durations should be represented in the output. + # This is ignored if value_render_option is + # FORMATTED_VALUE. + # The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER]. + # @param [String] major_dimension + # The major dimension that results should use. + # For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, + # then requesting `range=A1:B2,majorDimension=ROWS` will return + # `[[1,2],[3,4]]`, + # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return + # `[[1,3],[2,4]]`. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SheetsV4::ValueRange] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SheetsV4::ValueRange] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_spreadsheet_values(spreadsheet_id, range, value_render_option: nil, date_time_render_option: nil, major_dimension: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v4/spreadsheets/{spreadsheetId}/values/{range}', options) + command.response_representation = Google::Apis::SheetsV4::ValueRange::Representation + command.response_class = Google::Apis::SheetsV4::ValueRange + command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? + command.params['range'] = range unless range.nil? + command.query['valueRenderOption'] = value_render_option unless value_render_option.nil? + command.query['dateTimeRenderOption'] = date_time_render_option unless date_time_render_option.nil? + command.query['majorDimension'] = major_dimension unless major_dimension.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -527,11 +527,11 @@ module Google # @param [Fixnum] sheet_id # The ID of the sheet to copy. # @param [Google::Apis::SheetsV4::CopySheetToAnotherSpreadsheetRequest] copy_sheet_to_another_spreadsheet_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -544,7 +544,7 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def copy_spreadsheet(spreadsheet_id, sheet_id, copy_sheet_to_another_spreadsheet_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def copy_spreadsheet(spreadsheet_id, sheet_id, copy_sheet_to_another_spreadsheet_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo', options) command.request_representation = Google::Apis::SheetsV4::CopySheetToAnotherSpreadsheetRequest::Representation command.request_object = copy_sheet_to_another_spreadsheet_request_object @@ -552,8 +552,8 @@ module Google command.response_class = Google::Apis::SheetsV4::SheetProperties command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? command.params['sheetId'] = sheet_id unless sheet_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/speech_v1beta1.rb b/generated/google/apis/speech_v1beta1.rb index 4c4284bfc..a574d6e21 100644 --- a/generated/google/apis/speech_v1beta1.rb +++ b/generated/google/apis/speech_v1beta1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/speech/ module SpeechV1beta1 VERSION = 'V1beta1' - REVISION = '20170118' + REVISION = '20170125' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/speech_v1beta1/classes.rb b/generated/google/apis/speech_v1beta1/classes.rb index 0b575eb84..054d69fe3 100644 --- a/generated/google/apis/speech_v1beta1/classes.rb +++ b/generated/google/apis/speech_v1beta1/classes.rb @@ -22,110 +22,16 @@ module Google module Apis module SpeechV1beta1 - # The `Status` type defines a logical error model that is suitable for different - # programming environments, including REST APIs and RPC APIs. It is used by - # [gRPC](https://github.com/grpc). The error model is designed to be: - # - Simple to use and understand for most users - # - Flexible enough to meet unexpected needs - # # Overview - # The `Status` message contains three pieces of data: error code, error message, - # and error details. The error code should be an enum value of - # google.rpc.Code, but it may accept additional error codes if needed. The - # error message should be a developer-facing English message that helps - # developers *understand* and *resolve* the error. If a localized user-facing - # error message is needed, put the localized message in the error details or - # localize it in the client. The optional error details may contain arbitrary - # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. - # # Language mapping - # The `Status` message is the logical representation of the error model, but it - # is not necessarily the actual wire format. When the `Status` message is - # exposed in different client libraries and different wire protocols, it can be - # mapped differently. For example, it will likely be mapped to some exceptions - # in Java, but more likely mapped to some error codes in C. - # # Other uses - # The error model and the `Status` message can be used in a variety of - # environments, either with or without APIs, to provide a - # consistent developer experience across different environments. - # Example uses of this error model include: - # - Partial errors. If a service needs to return partial errors to the client, - # it may embed the `Status` in the normal response to indicate the partial - # errors. - # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. - # - Batch operations. If a client uses batch request and batch response, the - # `Status` message should be used directly inside batch response, one for - # each error sub-response. - # - Asynchronous operations. If an API call embeds asynchronous operation - # results in its response, the status of those operations should be - # represented directly using the `Status` message. - # - Logging. If some API errors are stored in logs, the message `Status` could - # be used directly after any stripping needed for security/privacy reasons. - class Status + # The request message for Operations.CancelOperation. + class CancelOperationRequest include Google::Apis::Core::Hashable - # The status code, which should be an enum value of google.rpc.Code. - # Corresponds to the JSON property `code` - # @return [Fixnum] - attr_accessor :code - - # A list of messages that carry the error details. There will be a - # common set of message types for APIs to use. - # Corresponds to the JSON property `details` - # @return [Array>] - attr_accessor :details - - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # google.rpc.Status.details field, or localized by the client. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @code = args[:code] if args.key?(:code) - @details = args[:details] if args.key?(:details) - @message = args[:message] if args.key?(:message) - end - end - - # Contains audio data in the encoding specified in the `RecognitionConfig`. - # Either `content` or `uri` must be supplied. Supplying both or neither - # returns google.rpc.Code.INVALID_ARGUMENT. See - # [audio limits](https://cloud.google.com/speech/limits#content). - class RecognitionAudio - include Google::Apis::Core::Hashable - - # The audio data bytes encoded as specified in - # `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a - # pure binary representation, whereas JSON representations use base64. - # Corresponds to the JSON property `content` - # @return [String] - attr_accessor :content - - # URI that points to a file that contains audio data bytes as specified in - # `RecognitionConfig`. Currently, only Google Cloud Storage URIs are - # supported, which must be specified in the following format: - # `gs://bucket_name/object_name` (other URI formats return - # google.rpc.Code.INVALID_ARGUMENT). For more information, see - # [Request URIs](https://cloud.google.com/storage/docs/reference-uris). - # Corresponds to the JSON property `uri` - # @return [String] - attr_accessor :uri - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @content = args[:content] if args.key?(:content) - @uri = args[:uri] if args.key?(:uri) end end @@ -177,14 +83,6 @@ module Google # @return [Google::Apis::SpeechV1beta1::Status] attr_accessor :error - # If the value is `false`, it means the operation is still in progress. - # If true, the operation is completed, and either `error` or `response` is - # available. - # Corresponds to the JSON property `done` - # @return [Boolean] - attr_accessor :done - alias_method :done?, :done - # Service-specific metadata associated with the operation. It typically # contains progress information and common metadata such as create time. # Some services might not provide such metadata. Any method that returns a @@ -193,6 +91,14 @@ module Google # @return [Hash] attr_accessor :metadata + # If the value is `false`, it means the operation is still in progress. + # If true, the operation is completed, and either `error` or `response` is + # available. + # Corresponds to the JSON property `done` + # @return [Boolean] + attr_accessor :done + alias_method :done?, :done + # The normal response of the operation in case of success. If the original # method returns no data on success, such as `Delete`, the response is # `google.protobuf.Empty`. If the original method is standard @@ -219,55 +125,13 @@ module Google # Update properties of this object def update!(**args) @error = args[:error] if args.key?(:error) - @done = args[:done] if args.key?(:done) @metadata = args[:metadata] if args.key?(:metadata) + @done = args[:done] if args.key?(:done) @response = args[:response] if args.key?(:response) @name = args[:name] if args.key?(:name) end end - # Alternative hypotheses (a.k.a. n-best list). - class SpeechRecognitionAlternative - include Google::Apis::Core::Hashable - - # [Output-only] Transcript text representing the words that the user spoke. - # Corresponds to the JSON property `transcript` - # @return [String] - attr_accessor :transcript - - # [Output-only] The confidence estimate between 0.0 and 1.0. A higher number - # means the system is more confident that the recognition is correct. - # This field is typically provided only for the top hypothesis, and only for - # `is_final=true` results. - # The default of 0.0 is a sentinel value indicating confidence was not set. - # Corresponds to the JSON property `confidence` - # @return [Float] - attr_accessor :confidence - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @transcript = args[:transcript] if args.key?(:transcript) - @confidence = args[:confidence] if args.key?(:confidence) - end - end - - # The request message for Operations.CancelOperation. - class CancelOperationRequest - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - # The `RecognitionConfig` message provides information to the recognizer # that specifies how to process the request. class RecognitionConfig @@ -278,11 +142,20 @@ module Google # within each `SpeechRecognitionResult`. # The server may return fewer than `max_alternatives`. # Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of - # `1`. If omitted, defaults to `1`. + # one. If omitted, will return a maximum of one. # Corresponds to the JSON property `maxAlternatives` # @return [Fixnum] attr_accessor :max_alternatives + # [Required] Sample rate in Hertz of the audio data sent in all + # `RecognitionAudio` messages. Valid values are: 8000-48000. + # 16000 is optimal. For best results, set the sampling rate of the audio + # source to 16000 Hz. If that's not possible, use the native sample rate of + # the audio source (instead of re-sampling). + # Corresponds to the JSON property `sampleRate` + # @return [Fixnum] + attr_accessor :sample_rate + # [Optional] The language of the supplied audio as a BCP-47 language tag. # Example: "en-GB" https://www.rfc-editor.org/rfc/bcp/bcp47.txt # If omitted, defaults to "en-US". See @@ -312,15 +185,6 @@ module Google attr_accessor :profanity_filter alias_method :profanity_filter?, :profanity_filter - # [Required] Sample rate in Hertz of the audio data sent in all - # `RecognitionAudio` messages. Valid values are: 8000-48000. - # 16000 is optimal. For best results, set the sampling rate of the audio - # source to 16000 Hz. If that's not possible, use the native sample rate of - # the audio source (instead of re-sampling). - # Corresponds to the JSON property `sampleRate` - # @return [Fixnum] - attr_accessor :sample_rate - def initialize(**args) update!(**args) end @@ -328,11 +192,11 @@ module Google # Update properties of this object def update!(**args) @max_alternatives = args[:max_alternatives] if args.key?(:max_alternatives) + @sample_rate = args[:sample_rate] if args.key?(:sample_rate) @language_code = args[:language_code] if args.key?(:language_code) @speech_context = args[:speech_context] if args.key?(:speech_context) @encoding = args[:encoding] if args.key?(:encoding) @profanity_filter = args[:profanity_filter] if args.key?(:profanity_filter) - @sample_rate = args[:sample_rate] if args.key?(:sample_rate) end end @@ -341,6 +205,12 @@ module Google class SyncRecognizeRequest include Google::Apis::Core::Hashable + # The `RecognitionConfig` message provides information to the recognizer + # that specifies how to process the request. + # Corresponds to the JSON property `config` + # @return [Google::Apis::SpeechV1beta1::RecognitionConfig] + attr_accessor :config + # Contains audio data in the encoding specified in the `RecognitionConfig`. # Either `content` or `uri` must be supplied. Supplying both or neither # returns google.rpc.Code.INVALID_ARGUMENT. See @@ -349,77 +219,76 @@ module Google # @return [Google::Apis::SpeechV1beta1::RecognitionAudio] attr_accessor :audio - # The `RecognitionConfig` message provides information to the recognizer - # that specifies how to process the request. - # Corresponds to the JSON property `config` - # @return [Google::Apis::SpeechV1beta1::RecognitionConfig] - attr_accessor :config - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @audio = args[:audio] if args.key?(:audio) @config = args[:config] if args.key?(:config) + @audio = args[:audio] if args.key?(:audio) end end - # A speech recognition result corresponding to a portion of the audio. - class SpeechRecognitionResult + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` which can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting purpose. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + class Status include Google::Apis::Core::Hashable - # [Output-only] May contain one or more recognition hypotheses (up to the - # maximum specified in `max_alternatives`). - # Corresponds to the JSON property `alternatives` - # @return [Array] - attr_accessor :alternatives + # A list of messages that carry the error details. There will be a + # common set of message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details - def initialize(**args) - update!(**args) - end + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code - # Update properties of this object - def update!(**args) - @alternatives = args[:alternatives] if args.key?(:alternatives) - end - end - - # The response message for Operations.ListOperations. - class ListOperationsResponse - include Google::Apis::Core::Hashable - - # The standard List next-page token. - # Corresponds to the JSON property `nextPageToken` + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # google.rpc.Status.details field, or localized by the client. + # Corresponds to the JSON property `message` # @return [String] - attr_accessor :next_page_token - - # A list of operations that matches the specified filter in the request. - # Corresponds to the JSON property `operations` - # @return [Array] - attr_accessor :operations - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @operations = args[:operations] if args.key?(:operations) - end - end - - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # service Foo ` - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # ` - # The JSON representation for `Empty` is empty JSON object ````. - class Empty - include Google::Apis::Core::Hashable + attr_accessor :message def initialize(**args) update!(**args) @@ -427,6 +296,9 @@ module Google # Update properties of this object def update!(**args) + @details = args[:details] if args.key?(:details) + @code = args[:code] if args.key?(:code) + @message = args[:message] if args.key?(:message) end end @@ -452,6 +324,25 @@ module Google end end + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # service Foo ` + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # ` + # The JSON representation for `Empty` is empty JSON object ````. + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + # Provides "hints" to the speech recognizer to favor specific words and phrases # in the results. class SpeechContext @@ -477,11 +368,128 @@ module Google end end + # The response message for Operations.ListOperations. + class ListOperationsResponse + include Google::Apis::Core::Hashable + + # The standard List next-page token. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # A list of operations that matches the specified filter in the request. + # Corresponds to the JSON property `operations` + # @return [Array] + attr_accessor :operations + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @operations = args[:operations] if args.key?(:operations) + end + end + + # Alternative hypotheses (a.k.a. n-best list). + class SpeechRecognitionAlternative + include Google::Apis::Core::Hashable + + # [Output-only] The confidence estimate between 0.0 and 1.0. A higher number + # indicates an estimated greater likelihood that the recognized words are + # correct. This field is typically provided only for the top hypothesis, and + # only for `is_final=true` results. Clients should not rely on the + # `confidence` field as it is not guaranteed to be accurate, or even set, in + # any of the results. + # The default of 0.0 is a sentinel value indicating `confidence` was not set. + # Corresponds to the JSON property `confidence` + # @return [Float] + attr_accessor :confidence + + # [Output-only] Transcript text representing the words that the user spoke. + # Corresponds to the JSON property `transcript` + # @return [String] + attr_accessor :transcript + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @confidence = args[:confidence] if args.key?(:confidence) + @transcript = args[:transcript] if args.key?(:transcript) + end + end + + # A speech recognition result corresponding to a portion of the audio. + class SpeechRecognitionResult + include Google::Apis::Core::Hashable + + # [Output-only] May contain one or more recognition hypotheses (up to the + # maximum specified in `max_alternatives`). + # Corresponds to the JSON property `alternatives` + # @return [Array] + attr_accessor :alternatives + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @alternatives = args[:alternatives] if args.key?(:alternatives) + end + end + + # Contains audio data in the encoding specified in the `RecognitionConfig`. + # Either `content` or `uri` must be supplied. Supplying both or neither + # returns google.rpc.Code.INVALID_ARGUMENT. See + # [audio limits](https://cloud.google.com/speech/limits#content). + class RecognitionAudio + include Google::Apis::Core::Hashable + + # The audio data bytes encoded as specified in + # `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a + # pure binary representation, whereas JSON representations use base64. + # Corresponds to the JSON property `content` + # @return [String] + attr_accessor :content + + # URI that points to a file that contains audio data bytes as specified in + # `RecognitionConfig`. Currently, only Google Cloud Storage URIs are + # supported, which must be specified in the following format: + # `gs://bucket_name/object_name` (other URI formats return + # google.rpc.Code.INVALID_ARGUMENT). For more information, see + # [Request URIs](https://cloud.google.com/storage/docs/reference-uris). + # Corresponds to the JSON property `uri` + # @return [String] + attr_accessor :uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @content = args[:content] if args.key?(:content) + @uri = args[:uri] if args.key?(:uri) + end + end + # `AsyncRecognizeRequest` is the top-level message sent by the client for # the `AsyncRecognize` method. class AsyncRecognizeRequest include Google::Apis::Core::Hashable + # The `RecognitionConfig` message provides information to the recognizer + # that specifies how to process the request. + # Corresponds to the JSON property `config` + # @return [Google::Apis::SpeechV1beta1::RecognitionConfig] + attr_accessor :config + # Contains audio data in the encoding specified in the `RecognitionConfig`. # Either `content` or `uri` must be supplied. Supplying both or neither # returns google.rpc.Code.INVALID_ARGUMENT. See @@ -490,20 +498,14 @@ module Google # @return [Google::Apis::SpeechV1beta1::RecognitionAudio] attr_accessor :audio - # The `RecognitionConfig` message provides information to the recognizer - # that specifies how to process the request. - # Corresponds to the JSON property `config` - # @return [Google::Apis::SpeechV1beta1::RecognitionConfig] - attr_accessor :config - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @audio = args[:audio] if args.key?(:audio) @config = args[:config] if args.key?(:config) + @audio = args[:audio] if args.key?(:audio) end end end diff --git a/generated/google/apis/speech_v1beta1/representations.rb b/generated/google/apis/speech_v1beta1/representations.rb index e10a971d9..a61bda276 100644 --- a/generated/google/apis/speech_v1beta1/representations.rb +++ b/generated/google/apis/speech_v1beta1/representations.rb @@ -22,13 +22,7 @@ module Google module Apis module SpeechV1beta1 - class Status - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class RecognitionAudio + class CancelOperationRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -40,18 +34,6 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class SpeechRecognitionAlternative - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CancelOperationRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class RecognitionConfig class Representation < Google::Apis::Core::JsonRepresentation; end @@ -64,19 +46,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class SpeechRecognitionResult - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListOperationsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Empty + class Status class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -88,32 +58,51 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class Empty + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class SpeechContext class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class ListOperationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SpeechRecognitionAlternative + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SpeechRecognitionResult + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RecognitionAudio + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class AsyncRecognizeRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Status + class CancelOperationRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - collection :details, as: 'details' - property :message, as: 'message' - end - end - - class RecognitionAudio - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :content, :base64 => true, as: 'content' - property :uri, as: 'uri' end end @@ -122,55 +111,63 @@ module Google class Representation < Google::Apis::Core::JsonRepresentation property :error, as: 'error', class: Google::Apis::SpeechV1beta1::Status, decorator: Google::Apis::SpeechV1beta1::Status::Representation - property :done, as: 'done' hash :metadata, as: 'metadata' + property :done, as: 'done' hash :response, as: 'response' property :name, as: 'name' end end - class SpeechRecognitionAlternative - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :transcript, as: 'transcript' - property :confidence, as: 'confidence' - end - end - - class CancelOperationRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - class RecognitionConfig # @private class Representation < Google::Apis::Core::JsonRepresentation property :max_alternatives, as: 'maxAlternatives' + property :sample_rate, as: 'sampleRate' property :language_code, as: 'languageCode' property :speech_context, as: 'speechContext', class: Google::Apis::SpeechV1beta1::SpeechContext, decorator: Google::Apis::SpeechV1beta1::SpeechContext::Representation property :encoding, as: 'encoding' property :profanity_filter, as: 'profanityFilter' - property :sample_rate, as: 'sampleRate' end end class SyncRecognizeRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :audio, as: 'audio', class: Google::Apis::SpeechV1beta1::RecognitionAudio, decorator: Google::Apis::SpeechV1beta1::RecognitionAudio::Representation - property :config, as: 'config', class: Google::Apis::SpeechV1beta1::RecognitionConfig, decorator: Google::Apis::SpeechV1beta1::RecognitionConfig::Representation + property :audio, as: 'audio', class: Google::Apis::SpeechV1beta1::RecognitionAudio, decorator: Google::Apis::SpeechV1beta1::RecognitionAudio::Representation + end end - class SpeechRecognitionResult + class Status # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :alternatives, as: 'alternatives', class: Google::Apis::SpeechV1beta1::SpeechRecognitionAlternative, decorator: Google::Apis::SpeechV1beta1::SpeechRecognitionAlternative::Representation + collection :details, as: 'details' + property :code, as: 'code' + property :message, as: 'message' + end + end + class SyncRecognizeResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :results, as: 'results', class: Google::Apis::SpeechV1beta1::SpeechRecognitionResult, decorator: Google::Apis::SpeechV1beta1::SpeechRecognitionResult::Representation + + end + end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class SpeechContext + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :phrases, as: 'phrases' end end @@ -183,34 +180,37 @@ module Google end end - class Empty + class SpeechRecognitionAlternative # @private class Representation < Google::Apis::Core::JsonRepresentation + property :confidence, as: 'confidence' + property :transcript, as: 'transcript' end end - class SyncRecognizeResponse + class SpeechRecognitionResult # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :results, as: 'results', class: Google::Apis::SpeechV1beta1::SpeechRecognitionResult, decorator: Google::Apis::SpeechV1beta1::SpeechRecognitionResult::Representation + collection :alternatives, as: 'alternatives', class: Google::Apis::SpeechV1beta1::SpeechRecognitionAlternative, decorator: Google::Apis::SpeechV1beta1::SpeechRecognitionAlternative::Representation end end - class SpeechContext + class RecognitionAudio # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :phrases, as: 'phrases' + property :content, :base64 => true, as: 'content' + property :uri, as: 'uri' end end class AsyncRecognizeRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :audio, as: 'audio', class: Google::Apis::SpeechV1beta1::RecognitionAudio, decorator: Google::Apis::SpeechV1beta1::RecognitionAudio::Representation - property :config, as: 'config', class: Google::Apis::SpeechV1beta1::RecognitionConfig, decorator: Google::Apis::SpeechV1beta1::RecognitionConfig::Representation + property :audio, as: 'audio', class: Google::Apis::SpeechV1beta1::RecognitionAudio, decorator: Google::Apis::SpeechV1beta1::RecognitionAudio::Representation + end end end diff --git a/generated/google/apis/speech_v1beta1/service.rb b/generated/google/apis/speech_v1beta1/service.rb index 42550a716..5490ec45c 100644 --- a/generated/google/apis/speech_v1beta1/service.rb +++ b/generated/google/apis/speech_v1beta1/service.rb @@ -46,38 +46,6 @@ module Google super('https://speech.googleapis.com/', '') end - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # @param [String] name - # The name of the operation resource. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SpeechV1beta1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SpeechV1beta1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_operation(name, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1beta1/operations/{+name}', options) - command.response_representation = Google::Apis::SpeechV1beta1::Operation::Representation - command.response_class = Google::Apis::SpeechV1beta1::Operation - command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - # Lists operations that match the specified filter in the request. If the # server doesn't support this method, it returns `UNIMPLEMENTED`. # NOTE: the `name` binding below allows API services to override the binding @@ -90,11 +58,11 @@ module Google # The name of the operation collection. # @param [String] page_token # The standard list page token. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -107,7 +75,7 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_operations(page_size: nil, filter: nil, name: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_operations(page_size: nil, filter: nil, name: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta1/operations', options) command.response_representation = Google::Apis::SpeechV1beta1::ListOperationsResponse::Representation command.response_class = Google::Apis::SpeechV1beta1::ListOperationsResponse @@ -115,41 +83,40 @@ module Google command.query['filter'] = filter unless filter.nil? command.query['name'] = name unless name.nil? command.query['pageToken'] = page_token unless page_token.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. # @param [String] name - # The name of the operation resource to be deleted. + # The name of the operation resource. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SpeechV1beta1::Empty] parsed result object + # @yieldparam result [Google::Apis::SpeechV1beta1::Operation] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::SpeechV1beta1::Empty] + # @return [Google::Apis::SpeechV1beta1::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_operation(name, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1beta1/operations/{+name}', options) - command.response_representation = Google::Apis::SpeechV1beta1::Empty::Representation - command.response_class = Google::Apis::SpeechV1beta1::Empty + def get_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/operations/{+name}', options) + command.response_representation = Google::Apis::SpeechV1beta1::Operation::Representation + command.response_class = Google::Apis::SpeechV1beta1::Operation command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -166,11 +133,11 @@ module Google # @param [String] name # The name of the operation resource to be cancelled. # @param [Google::Apis::SpeechV1beta1::CancelOperationRequest] cancel_operation_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -183,46 +150,48 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def cancel_operation(name, cancel_operation_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/operations/{+name}:cancel', options) command.request_representation = Google::Apis::SpeechV1beta1::CancelOperationRequest::Representation command.request_object = cancel_operation_request_object command.response_representation = Google::Apis::SpeechV1beta1::Empty::Representation command.response_class = Google::Apis::SpeechV1beta1::Empty command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - # Performs synchronous speech recognition: receive results after all audio - # has been sent and processed. - # @param [Google::Apis::SpeechV1beta1::SyncRecognizeRequest] sync_recognize_request_object + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # @param [String] name + # The name of the operation resource to be deleted. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SpeechV1beta1::SyncRecognizeResponse] parsed result object + # @yieldparam result [Google::Apis::SpeechV1beta1::Empty] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::SpeechV1beta1::SyncRecognizeResponse] + # @return [Google::Apis::SpeechV1beta1::Empty] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def sync_recognize_speech(sync_recognize_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1beta1/speech:syncrecognize', options) - command.request_representation = Google::Apis::SpeechV1beta1::SyncRecognizeRequest::Representation - command.request_object = sync_recognize_request_object - command.response_representation = Google::Apis::SpeechV1beta1::SyncRecognizeResponse::Representation - command.response_class = Google::Apis::SpeechV1beta1::SyncRecognizeResponse - command.query['quotaUser'] = quota_user unless quota_user.nil? + def delete_operation(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1beta1/operations/{+name}', options) + command.response_representation = Google::Apis::SpeechV1beta1::Empty::Representation + command.response_class = Google::Apis::SpeechV1beta1::Empty + command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -233,11 +202,11 @@ module Google # `Operation.error` or an `Operation.response` which contains # an `AsyncRecognizeResponse` message. # @param [Google::Apis::SpeechV1beta1::AsyncRecognizeRequest] async_recognize_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -250,14 +219,45 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def async_recognize_speech(async_recognize_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def async_recognize_speech(async_recognize_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/speech:asyncrecognize', options) command.request_representation = Google::Apis::SpeechV1beta1::AsyncRecognizeRequest::Representation command.request_object = async_recognize_request_object command.response_representation = Google::Apis::SpeechV1beta1::Operation::Representation command.response_class = Google::Apis::SpeechV1beta1::Operation - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Performs synchronous speech recognition: receive results after all audio + # has been sent and processed. + # @param [Google::Apis::SpeechV1beta1::SyncRecognizeRequest] sync_recognize_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SpeechV1beta1::SyncRecognizeResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SpeechV1beta1::SyncRecognizeResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def sync_recognize_speech(sync_recognize_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/speech:syncrecognize', options) + command.request_representation = Google::Apis::SpeechV1beta1::SyncRecognizeRequest::Representation + command.request_object = sync_recognize_request_object + command.response_representation = Google::Apis::SpeechV1beta1::SyncRecognizeResponse::Representation + command.response_class = Google::Apis::SpeechV1beta1::SyncRecognizeResponse + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/sqladmin_v1beta4.rb b/generated/google/apis/sqladmin_v1beta4.rb index 62142b083..39ca803e9 100644 --- a/generated/google/apis/sqladmin_v1beta4.rb +++ b/generated/google/apis/sqladmin_v1beta4.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/sql/docs/reference/latest module SqladminV1beta4 VERSION = 'V1beta4' - REVISION = '20161220' + REVISION = '20170111' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/sqladmin_v1beta4/classes.rb b/generated/google/apis/sqladmin_v1beta4/classes.rb index 52c836c76..21a2ceb35 100644 --- a/generated/google/apis/sqladmin_v1beta4/classes.rb +++ b/generated/google/apis/sqladmin_v1beta4/classes.rb @@ -1609,6 +1609,17 @@ module Google # @return [Array] attr_accessor :authorized_gae_applications + # The availability type. This can be one of the following. + # ZONAL: A Cloud SQL instance that is zonally available. The instance is bound + # to a single GCE zone and may be inaccessible during an outage for that GCE + # zone. + # REGIONAL: A Cloud SQL instance that is regionally available. The instance is + # provisioned in multiple zones within a region and is able to provide higher + # availability than an instance with a zonal availability type. + # Corresponds to the JSON property `availabilityType` + # @return [String] + attr_accessor :availability_type + # Database instance backup configuration. # Corresponds to the JSON property `backupConfiguration` # @return [Google::Apis::SqladminV1beta4::BackupConfiguration] @@ -1698,6 +1709,13 @@ module Google attr_accessor :storage_auto_resize alias_method :storage_auto_resize?, :storage_auto_resize + # The maximum size to which storage capacity can be automatically increased. The + # default value is 0, which specifies that there is no limit. Applies only to + # Second Generation instances. + # Corresponds to the JSON property `storageAutoResizeLimit` + # @return [String] + attr_accessor :storage_auto_resize_limit + # The tier of service for this instance, for example D1, D2. For more # information, see pricing. # Corresponds to the JSON property `tier` @@ -1712,6 +1730,7 @@ module Google def update!(**args) @activation_policy = args[:activation_policy] if args.key?(:activation_policy) @authorized_gae_applications = args[:authorized_gae_applications] if args.key?(:authorized_gae_applications) + @availability_type = args[:availability_type] if args.key?(:availability_type) @backup_configuration = args[:backup_configuration] if args.key?(:backup_configuration) @crash_safe_replication_enabled = args[:crash_safe_replication_enabled] if args.key?(:crash_safe_replication_enabled) @data_disk_size_gb = args[:data_disk_size_gb] if args.key?(:data_disk_size_gb) @@ -1726,6 +1745,7 @@ module Google @replication_type = args[:replication_type] if args.key?(:replication_type) @settings_version = args[:settings_version] if args.key?(:settings_version) @storage_auto_resize = args[:storage_auto_resize] if args.key?(:storage_auto_resize) + @storage_auto_resize_limit = args[:storage_auto_resize_limit] if args.key?(:storage_auto_resize_limit) @tier = args[:tier] if args.key?(:tier) end end diff --git a/generated/google/apis/sqladmin_v1beta4/representations.rb b/generated/google/apis/sqladmin_v1beta4/representations.rb index 725f91cab..09f5c08d7 100644 --- a/generated/google/apis/sqladmin_v1beta4/representations.rb +++ b/generated/google/apis/sqladmin_v1beta4/representations.rb @@ -751,6 +751,7 @@ module Google class Representation < Google::Apis::Core::JsonRepresentation property :activation_policy, as: 'activationPolicy' collection :authorized_gae_applications, as: 'authorizedGaeApplications' + property :availability_type, as: 'availabilityType' property :backup_configuration, as: 'backupConfiguration', class: Google::Apis::SqladminV1beta4::BackupConfiguration, decorator: Google::Apis::SqladminV1beta4::BackupConfiguration::Representation property :crash_safe_replication_enabled, as: 'crashSafeReplicationEnabled' @@ -770,6 +771,7 @@ module Google property :replication_type, as: 'replicationType' property :settings_version, as: 'settingsVersion' property :storage_auto_resize, as: 'storageAutoResize' + property :storage_auto_resize_limit, as: 'storageAutoResizeLimit' property :tier, as: 'tier' end end diff --git a/generated/google/apis/vision_v1.rb b/generated/google/apis/vision_v1.rb index c6ff3ba6d..ff60cee44 100644 --- a/generated/google/apis/vision_v1.rb +++ b/generated/google/apis/vision_v1.rb @@ -27,7 +27,7 @@ module Google # @see https://cloud.google.com/vision/ module VisionV1 VERSION = 'V1' - REVISION = '20170112' + REVISION = '20170126' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/vision_v1/classes.rb b/generated/google/apis/vision_v1/classes.rb index e8afec051..c7faf84f5 100644 --- a/generated/google/apis/vision_v1/classes.rb +++ b/generated/google/apis/vision_v1/classes.rb @@ -22,18 +22,65 @@ module Google module Apis module VisionV1 - # External image source (Google Cloud Storage image location). - class ImageSource + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` which can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting purpose. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + class Status include Google::Apis::Core::Hashable - # Google Cloud Storage image URI, which must be in the following form: - # `gs://bucket_name/object_name` (for details, see - # [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/ - # reference-uris)). - # NOTE: Cloud Storage object versioning is not supported. - # Corresponds to the JSON property `gcsImageUri` + # A list of messages that carry the error details. There will be a + # common set of message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # google.rpc.Status.details field, or localized by the client. + # Corresponds to the JSON property `message` # @return [String] - attr_accessor :gcs_image_uri + attr_accessor :message def initialize(**args) update!(**args) @@ -41,138 +88,9 @@ module Google # Update properties of this object def update!(**args) - @gcs_image_uri = args[:gcs_image_uri] if args.key?(:gcs_image_uri) - end - end - - # Request for performing Google Cloud Vision API tasks over a user-provided - # image, with user-requested features. - class AnnotateImageRequest - include Google::Apis::Core::Hashable - - # Client image to perform Google Cloud Vision API tasks over. - # Corresponds to the JSON property `image` - # @return [Google::Apis::VisionV1::Image] - attr_accessor :image - - # Image context and/or feature-specific parameters. - # Corresponds to the JSON property `imageContext` - # @return [Google::Apis::VisionV1::ImageContext] - attr_accessor :image_context - - # Requested features. - # 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) - @image = args[:image] if args.key?(:image) - @image_context = args[:image_context] if args.key?(:image_context) - @features = args[:features] if args.key?(:features) - end - end - - # Response to an image annotation request. - class AnnotateImageResponse - include Google::Apis::Core::Hashable - - # If present, label detection has completed successfully. - # Corresponds to the JSON property `labelAnnotations` - # @return [Array] - attr_accessor :label_annotations - - # If present, landmark detection has completed successfully. - # Corresponds to the JSON property `landmarkAnnotations` - # @return [Array] - attr_accessor :landmark_annotations - - # If present, safe-search annotation has completed successfully. - # Corresponds to the JSON property `safeSearchAnnotation` - # @return [Google::Apis::VisionV1::SafeSearchAnnotation] - attr_accessor :safe_search_annotation - - # Stores image properties, such as dominant colors. - # Corresponds to the JSON property `imagePropertiesAnnotation` - # @return [Google::Apis::VisionV1::ImageProperties] - attr_accessor :image_properties_annotation - - # If present, text (OCR) detection has completed successfully. - # Corresponds to the JSON property `textAnnotations` - # @return [Array] - attr_accessor :text_annotations - - # If present, logo detection has completed successfully. - # Corresponds to the JSON property `logoAnnotations` - # @return [Array] - attr_accessor :logo_annotations - - # If present, face detection has completed successfully. - # Corresponds to the JSON property `faceAnnotations` - # @return [Array] - attr_accessor :face_annotations - - # The `Status` type defines a logical error model that is suitable for different - # programming environments, including REST APIs and RPC APIs. It is used by - # [gRPC](https://github.com/grpc). The error model is designed to be: - # - Simple to use and understand for most users - # - Flexible enough to meet unexpected needs - # # Overview - # The `Status` message contains three pieces of data: error code, error message, - # and error details. The error code should be an enum value of - # google.rpc.Code, but it may accept additional error codes if needed. The - # error message should be a developer-facing English message that helps - # developers *understand* and *resolve* the error. If a localized user-facing - # error message is needed, put the localized message in the error details or - # localize it in the client. The optional error details may contain arbitrary - # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. - # # Language mapping - # The `Status` message is the logical representation of the error model, but it - # is not necessarily the actual wire format. When the `Status` message is - # exposed in different client libraries and different wire protocols, it can be - # mapped differently. For example, it will likely be mapped to some exceptions - # in Java, but more likely mapped to some error codes in C. - # # Other uses - # The error model and the `Status` message can be used in a variety of - # environments, either with or without APIs, to provide a - # consistent developer experience across different environments. - # Example uses of this error model include: - # - Partial errors. If a service needs to return partial errors to the client, - # it may embed the `Status` in the normal response to indicate the partial - # errors. - # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. - # - Batch operations. If a client uses batch request and batch response, the - # `Status` message should be used directly inside batch response, one for - # each error sub-response. - # - Asynchronous operations. If an API call embeds asynchronous operation - # results in its response, the status of those operations should be - # represented directly using the `Status` message. - # - Logging. If some API errors are stored in logs, the message `Status` could - # be used directly after any stripping needed for security/privacy reasons. - # Corresponds to the JSON property `error` - # @return [Google::Apis::VisionV1::Status] - attr_accessor :error - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @label_annotations = args[:label_annotations] if args.key?(:label_annotations) - @landmark_annotations = args[:landmark_annotations] if args.key?(:landmark_annotations) - @safe_search_annotation = args[:safe_search_annotation] if args.key?(:safe_search_annotation) - @image_properties_annotation = args[:image_properties_annotation] if args.key?(:image_properties_annotation) - @text_annotations = args[:text_annotations] if args.key?(:text_annotations) - @logo_annotations = args[:logo_annotations] if args.key?(:logo_annotations) - @face_annotations = args[:face_annotations] if args.key?(:face_annotations) - @error = args[:error] if args.key?(:error) + @details = args[:details] if args.key?(:details) + @code = args[:code] if args.key?(:code) + @message = args[:message] if args.key?(:message) end end @@ -273,65 +191,55 @@ module Google end end - # The `Status` type defines a logical error model that is suitable for different - # programming environments, including REST APIs and RPC APIs. It is used by - # [gRPC](https://github.com/grpc). The error model is designed to be: - # - Simple to use and understand for most users - # - Flexible enough to meet unexpected needs - # # Overview - # The `Status` message contains three pieces of data: error code, error message, - # and error details. The error code should be an enum value of - # google.rpc.Code, but it may accept additional error codes if needed. The - # error message should be a developer-facing English message that helps - # developers *understand* and *resolve* the error. If a localized user-facing - # error message is needed, put the localized message in the error details or - # localize it in the client. The optional error details may contain arbitrary - # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. - # # Language mapping - # The `Status` message is the logical representation of the error model, but it - # is not necessarily the actual wire format. When the `Status` message is - # exposed in different client libraries and different wire protocols, it can be - # mapped differently. For example, it will likely be mapped to some exceptions - # in Java, but more likely mapped to some error codes in C. - # # Other uses - # The error model and the `Status` message can be used in a variety of - # environments, either with or without APIs, to provide a - # consistent developer experience across different environments. - # Example uses of this error model include: - # - Partial errors. If a service needs to return partial errors to the client, - # it may embed the `Status` in the normal response to indicate the partial - # errors. - # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. - # - Batch operations. If a client uses batch request and batch response, the - # `Status` message should be used directly inside batch response, one for - # each error sub-response. - # - Asynchronous operations. If an API call embeds asynchronous operation - # results in its response, the status of those operations should be - # represented directly using the `Status` message. - # - Logging. If some API errors are stored in logs, the message `Status` could - # be used directly after any stripping needed for security/privacy reasons. - class Status + # An object representing a latitude/longitude pair. This is expressed as a pair + # of doubles representing degrees latitude and degrees longitude. Unless + # specified otherwise, this must conform to the + # WGS84 + # standard. Values must be within normalized ranges. + # Example of normalization code in Python: + # def NormalizeLongitude(longitude): + # """Wraps decimal degrees longitude to [-180.0, 180.0].""" + # q, r = divmod(longitude, 360.0) + # if r > 180.0 or (r == 180.0 and q <= -1.0): + # return r - 360.0 + # return r + # def NormalizeLatLng(latitude, longitude): + # """Wraps decimal degrees latitude and longitude to + # [-90.0, 90.0] and [-180.0, 180.0], respectively.""" + # r = latitude % 360.0 + # if r <= 90.0: + # return r, NormalizeLongitude(longitude) + # elif r >= 270.0: + # return r - 360, NormalizeLongitude(longitude) + # else: + # return 180 - r, NormalizeLongitude(longitude + 180.0) + # assert 180.0 == NormalizeLongitude(180.0) + # assert -180.0 == NormalizeLongitude(-180.0) + # assert -179.0 == NormalizeLongitude(181.0) + # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) + # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) + # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) + # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) + # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) + # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) + # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) + # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) + # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) + # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) + # The code in logs/storage/validator/logs_validator_traits.cc treats this type + # as if it were annotated as ST_LOCATION. + class LatLng include Google::Apis::Core::Hashable - # The status code, which should be an enum value of google.rpc.Code. - # Corresponds to the JSON property `code` - # @return [Fixnum] - attr_accessor :code + # The latitude in degrees. It must be in the range [-90.0, +90.0]. + # Corresponds to the JSON property `latitude` + # @return [Float] + attr_accessor :latitude - # A list of messages that carry the error details. There will be a - # common set of message types for APIs to use. - # Corresponds to the JSON property `details` - # @return [Array>] - attr_accessor :details - - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # google.rpc.Status.details field, or localized by the client. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message + # The longitude in degrees. It must be in the range [-180.0, +180.0]. + # Corresponds to the JSON property `longitude` + # @return [Float] + attr_accessor :longitude def initialize(**args) update!(**args) @@ -339,95 +247,140 @@ module Google # Update properties of this object def update!(**args) - @code = args[:code] if args.key?(:code) - @details = args[:details] if args.key?(:details) - @message = args[:message] if args.key?(:message) + @latitude = args[:latitude] if args.key?(:latitude) + @longitude = args[:longitude] if args.key?(:longitude) end end - # A face annotation object contains the results of face detection. - class FaceAnnotation + # Represents a color in the RGBA color space. This representation is designed + # for simplicity of conversion to/from color representations in various + # languages over compactness; for example, the fields of this representation + # can be trivially provided to the constructor of "java.awt.Color" in Java; it + # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" + # method in iOS; and, with just a little work, it can be easily formatted into + # a CSS "rgba()" string in JavaScript, as well. Here are some examples: + # Example (Java): + # import com.google.type.Color; + # // ... + # public static java.awt.Color fromProto(Color protocolor) ` + # float alpha = protocolor.hasAlpha() + # ? protocolor.getAlpha().getValue() + # : 1.0; + # return new java.awt.Color( + # protocolor.getRed(), + # protocolor.getGreen(), + # protocolor.getBlue(), + # alpha); + # ` + # public static Color toProto(java.awt.Color color) ` + # float red = (float) color.getRed(); + # float green = (float) color.getGreen(); + # float blue = (float) color.getBlue(); + # float denominator = 255.0; + # Color.Builder resultBuilder = + # Color + # .newBuilder() + # .setRed(red / denominator) + # .setGreen(green / denominator) + # .setBlue(blue / denominator); + # int alpha = color.getAlpha(); + # if (alpha != 255) ` + # result.setAlpha( + # FloatValue + # .newBuilder() + # .setValue(((float) alpha) / denominator) + # .build()); + # ` + # return resultBuilder.build(); + # ` + # // ... + # Example (iOS / Obj-C): + # // ... + # static UIColor* fromProto(Color* protocolor) ` + # float red = [protocolor red]; + # float green = [protocolor green]; + # float blue = [protocolor blue]; + # FloatValue* alpha_wrapper = [protocolor alpha]; + # float alpha = 1.0; + # if (alpha_wrapper != nil) ` + # alpha = [alpha_wrapper value]; + # ` + # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; + # ` + # static Color* toProto(UIColor* color) ` + # CGFloat red, green, blue, alpha; + # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` + # return nil; + # ` + # Color* result = [Color alloc] init]; + # [result setRed:red]; + # [result setGreen:green]; + # [result setBlue:blue]; + # if (alpha <= 0.9999) ` + # [result setAlpha:floatWrapperWithValue(alpha)]; + # ` + # [result autorelease]; + # return result; + # ` + # // ... + # Example (JavaScript): + # // ... + # var protoToCssColor = function(rgb_color) ` + # var redFrac = rgb_color.red || 0.0; + # var greenFrac = rgb_color.green || 0.0; + # var blueFrac = rgb_color.blue || 0.0; + # var red = Math.floor(redFrac * 255); + # var green = Math.floor(greenFrac * 255); + # var blue = Math.floor(blueFrac * 255); + # if (!('alpha' in rgb_color)) ` + # return rgbToCssColor_(red, green, blue); + # ` + # var alphaFrac = rgb_color.alpha.value || 0.0; + # var rgbParams = [red, green, blue].join(','); + # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); + # `; + # var rgbToCssColor_ = function(red, green, blue) ` + # var rgbNumber = new Number((red << 16) | (green << 8) | blue); + # var hexString = rgbNumber.toString(16); + # var missingZeros = 6 - hexString.length; + # var resultBuilder = ['#']; + # for (var i = 0; i < missingZeros; i++) ` + # resultBuilder.push('0'); + # ` + # resultBuilder.push(hexString); + # return resultBuilder.join(''); + # `; + # // ... + class Color include Google::Apis::Core::Hashable - # Pitch angle, which indicates the upwards/downwards angle that the face is - # pointing relative to the image's horizontal plane. Range [-180,180]. - # Corresponds to the JSON property `tiltAngle` + # The amount of red in the color as a value in the interval [0, 1]. + # Corresponds to the JSON property `red` # @return [Float] - attr_accessor :tilt_angle + attr_accessor :red - # Under-exposed likelihood. - # Corresponds to the JSON property `underExposedLikelihood` - # @return [String] - attr_accessor :under_exposed_likelihood - - # A bounding polygon for the detected image annotation. - # Corresponds to the JSON property `fdBoundingPoly` - # @return [Google::Apis::VisionV1::BoundingPoly] - attr_accessor :fd_bounding_poly - - # Face landmarking confidence. Range [0, 1]. - # Corresponds to the JSON property `landmarkingConfidence` + # The amount of green in the color as a value in the interval [0, 1]. + # Corresponds to the JSON property `green` # @return [Float] - attr_accessor :landmarking_confidence + attr_accessor :green - # Joy likelihood. - # Corresponds to the JSON property `joyLikelihood` - # @return [String] - attr_accessor :joy_likelihood - - # Detection confidence. Range [0, 1]. - # Corresponds to the JSON property `detectionConfidence` + # The amount of blue in the color as a value in the interval [0, 1]. + # Corresponds to the JSON property `blue` # @return [Float] - attr_accessor :detection_confidence + attr_accessor :blue - # Surprise likelihood. - # Corresponds to the JSON property `surpriseLikelihood` - # @return [String] - attr_accessor :surprise_likelihood - - # Anger likelihood. - # Corresponds to the JSON property `angerLikelihood` - # @return [String] - attr_accessor :anger_likelihood - - # Headwear likelihood. - # Corresponds to the JSON property `headwearLikelihood` - # @return [String] - attr_accessor :headwear_likelihood - - # Yaw angle, which indicates the leftward/rightward angle that the face is - # pointing relative to the vertical plane perpendicular to the image. Range - # [-180,180]. - # Corresponds to the JSON property `panAngle` + # The fraction of this color that should be applied to the pixel. That is, + # the final pixel color is defined by the equation: + # pixel color = alpha * (this color) + (1.0 - alpha) * (background color) + # This means that a value of 1.0 corresponds to a solid color, whereas + # a value of 0.0 corresponds to a completely transparent color. This + # uses a wrapper message rather than a simple float scalar so that it is + # possible to distinguish between a default value and the value being unset. + # If omitted, this color object is to be rendered as a solid color + # (as if the alpha value had been explicitly given with a value of 1.0). + # Corresponds to the JSON property `alpha` # @return [Float] - attr_accessor :pan_angle - - # A bounding polygon for the detected image annotation. - # Corresponds to the JSON property `boundingPoly` - # @return [Google::Apis::VisionV1::BoundingPoly] - attr_accessor :bounding_poly - - # Detected face landmarks. - # Corresponds to the JSON property `landmarks` - # @return [Array] - attr_accessor :landmarks - - # Blurred likelihood. - # Corresponds to the JSON property `blurredLikelihood` - # @return [String] - attr_accessor :blurred_likelihood - - # Roll angle, which indicates the amount of clockwise/anti-clockwise rotation - # of the face relative to the image vertical about the axis perpendicular to - # the face. Range [-180,180]. - # Corresponds to the JSON property `rollAngle` - # @return [Float] - attr_accessor :roll_angle - - # Sorrow likelihood. - # Corresponds to the JSON property `sorrowLikelihood` - # @return [String] - attr_accessor :sorrow_likelihood + attr_accessor :alpha def initialize(**args) update!(**args) @@ -435,21 +388,115 @@ module Google # Update properties of this object def update!(**args) - @tilt_angle = args[:tilt_angle] if args.key?(:tilt_angle) - @under_exposed_likelihood = args[:under_exposed_likelihood] if args.key?(:under_exposed_likelihood) - @fd_bounding_poly = args[:fd_bounding_poly] if args.key?(:fd_bounding_poly) - @landmarking_confidence = args[:landmarking_confidence] if args.key?(:landmarking_confidence) - @joy_likelihood = args[:joy_likelihood] if args.key?(:joy_likelihood) - @detection_confidence = args[:detection_confidence] if args.key?(:detection_confidence) - @surprise_likelihood = args[:surprise_likelihood] if args.key?(:surprise_likelihood) - @anger_likelihood = args[:anger_likelihood] if args.key?(:anger_likelihood) - @headwear_likelihood = args[:headwear_likelihood] if args.key?(:headwear_likelihood) - @pan_angle = args[:pan_angle] if args.key?(:pan_angle) - @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly) - @landmarks = args[:landmarks] if args.key?(:landmarks) - @blurred_likelihood = args[:blurred_likelihood] if args.key?(:blurred_likelihood) - @roll_angle = args[:roll_angle] if args.key?(:roll_angle) - @sorrow_likelihood = args[:sorrow_likelihood] if args.key?(:sorrow_likelihood) + @red = args[:red] if args.key?(:red) + @green = args[:green] if args.key?(:green) + @blue = args[:blue] if args.key?(:blue) + @alpha = args[:alpha] if args.key?(:alpha) + end + end + + # Stores image properties, such as dominant colors. + class ImageProperties + include Google::Apis::Core::Hashable + + # Set of dominant colors and their corresponding scores. + # Corresponds to the JSON property `dominantColors` + # @return [Google::Apis::VisionV1::DominantColorsAnnotation] + attr_accessor :dominant_colors + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @dominant_colors = args[:dominant_colors] if args.key?(:dominant_colors) + end + end + + # Users describe the type of Google Cloud Vision API tasks to perform over + # images by using *Feature*s. Each Feature indicates a type of image + # detection task to perform. Features encode the Cloud Vision API + # vertical to operate on and the number of top-scoring results to return. + class Feature + include Google::Apis::Core::Hashable + + # The feature type. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # Maximum number of results of this type. + # Corresponds to the JSON property `maxResults` + # @return [Fixnum] + attr_accessor :max_results + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type = args[:type] if args.key?(:type) + @max_results = args[:max_results] if args.key?(:max_results) + end + end + + # + class SafeSearchAnnotation + include Google::Apis::Core::Hashable + + # Spoof likelihood. The likelihood that an modification + # was made to the image's canonical version to make it appear + # funny or offensive. + # Corresponds to the JSON property `spoof` + # @return [String] + attr_accessor :spoof + + # Likelihood that this is a medical image. + # Corresponds to the JSON property `medical` + # @return [String] + attr_accessor :medical + + # Violence likelihood. + # Corresponds to the JSON property `violence` + # @return [String] + attr_accessor :violence + + # Represents the adult content likelihood for the image. + # Corresponds to the JSON property `adult` + # @return [String] + attr_accessor :adult + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @spoof = args[:spoof] if args.key?(:spoof) + @medical = args[:medical] if args.key?(:medical) + @violence = args[:violence] if args.key?(:violence) + @adult = args[:adult] if args.key?(:adult) + end + end + + # Set of dominant colors and their corresponding scores. + class DominantColorsAnnotation + include Google::Apis::Core::Hashable + + # RGB color values with their score and pixel fraction. + # Corresponds to the JSON property `colors` + # @return [Array] + attr_accessor :colors + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @colors = args[:colors] if args.key?(:colors) end end @@ -479,6 +526,281 @@ module Google end end + # A bounding polygon for the detected image annotation. + class BoundingPoly + include Google::Apis::Core::Hashable + + # The bounding polygon vertices. + # Corresponds to the JSON property `vertices` + # @return [Array] + attr_accessor :vertices + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @vertices = args[:vertices] if args.key?(:vertices) + end + end + + # Response to an image annotation request. + class AnnotateImageResponse + include Google::Apis::Core::Hashable + + # If present, logo detection has completed successfully. + # Corresponds to the JSON property `logoAnnotations` + # @return [Array] + attr_accessor :logo_annotations + + # If present, label detection has completed successfully. + # Corresponds to the JSON property `labelAnnotations` + # @return [Array] + attr_accessor :label_annotations + + # If present, safe-search annotation has completed successfully. + # Corresponds to the JSON property `safeSearchAnnotation` + # @return [Google::Apis::VisionV1::SafeSearchAnnotation] + attr_accessor :safe_search_annotation + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` which can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting purpose. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + # Corresponds to the JSON property `error` + # @return [Google::Apis::VisionV1::Status] + attr_accessor :error + + # If present, landmark detection has completed successfully. + # Corresponds to the JSON property `landmarkAnnotations` + # @return [Array] + attr_accessor :landmark_annotations + + # If present, text (OCR) detection or document (OCR) text detection has + # completed successfully. + # Corresponds to the JSON property `textAnnotations` + # @return [Array] + attr_accessor :text_annotations + + # Stores image properties, such as dominant colors. + # Corresponds to the JSON property `imagePropertiesAnnotation` + # @return [Google::Apis::VisionV1::ImageProperties] + attr_accessor :image_properties_annotation + + # If present, face detection has completed successfully. + # Corresponds to the JSON property `faceAnnotations` + # @return [Array] + attr_accessor :face_annotations + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @logo_annotations = args[:logo_annotations] if args.key?(:logo_annotations) + @label_annotations = args[:label_annotations] if args.key?(:label_annotations) + @safe_search_annotation = args[:safe_search_annotation] if args.key?(:safe_search_annotation) + @error = args[:error] if args.key?(:error) + @landmark_annotations = args[:landmark_annotations] if args.key?(:landmark_annotations) + @text_annotations = args[:text_annotations] if args.key?(:text_annotations) + @image_properties_annotation = args[:image_properties_annotation] if args.key?(:image_properties_annotation) + @face_annotations = args[:face_annotations] if args.key?(:face_annotations) + end + end + + # A `Property` consists of a user-supplied name/value pair. + class Property + include Google::Apis::Core::Hashable + + # Value of the property. + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + + # Name of the property. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @value = args[:value] if args.key?(:value) + @name = args[:name] if args.key?(:name) + end + end + + # Detected entity location information. + class LocationInfo + include Google::Apis::Core::Hashable + + # An object representing a latitude/longitude pair. This is expressed as a pair + # of doubles representing degrees latitude and degrees longitude. Unless + # specified otherwise, this must conform to the + # WGS84 + # standard. Values must be within normalized ranges. + # Example of normalization code in Python: + # def NormalizeLongitude(longitude): + # """Wraps decimal degrees longitude to [-180.0, 180.0].""" + # q, r = divmod(longitude, 360.0) + # if r > 180.0 or (r == 180.0 and q <= -1.0): + # return r - 360.0 + # return r + # def NormalizeLatLng(latitude, longitude): + # """Wraps decimal degrees latitude and longitude to + # [-90.0, 90.0] and [-180.0, 180.0], respectively.""" + # r = latitude % 360.0 + # if r <= 90.0: + # return r, NormalizeLongitude(longitude) + # elif r >= 270.0: + # return r - 360, NormalizeLongitude(longitude) + # else: + # return 180 - r, NormalizeLongitude(longitude + 180.0) + # assert 180.0 == NormalizeLongitude(180.0) + # assert -180.0 == NormalizeLongitude(-180.0) + # assert -179.0 == NormalizeLongitude(181.0) + # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) + # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) + # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) + # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) + # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) + # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) + # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) + # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) + # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) + # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) + # The code in logs/storage/validator/logs_validator_traits.cc treats this type + # as if it were annotated as ST_LOCATION. + # Corresponds to the JSON property `latLng` + # @return [Google::Apis::VisionV1::LatLng] + attr_accessor :lat_lng + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @lat_lng = args[:lat_lng] if args.key?(:lat_lng) + end + end + + # Response to a batch image annotation request. + class BatchAnnotateImagesResponse + include Google::Apis::Core::Hashable + + # Individual responses to image annotation requests within the batch. + # Corresponds to the JSON property `responses` + # @return [Array] + attr_accessor :responses + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @responses = args[:responses] if args.key?(:responses) + end + end + + # External image source (Google Cloud Storage image location). + class ImageSource + include Google::Apis::Core::Hashable + + # NOTE: For new code `image_uri` below is preferred. + # Google Cloud Storage image URI, which must be in the following form: + # `gs://bucket_name/object_name` (for details, see + # [Google Cloud Storage Request + # URIs](https://cloud.google.com/storage/docs/reference-uris)). + # NOTE: Cloud Storage object versioning is not supported. + # Corresponds to the JSON property `gcsImageUri` + # @return [String] + attr_accessor :gcs_image_uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @gcs_image_uri = args[:gcs_image_uri] if args.key?(:gcs_image_uri) + end + end + + # A 3D position in the image, used primarily for Face detection landmarks. + # A valid Position must have both x and y coordinates. + # The position coordinates are in the same scale as the original image. + class Position + include Google::Apis::Core::Hashable + + # Y coordinate. + # Corresponds to the JSON property `y` + # @return [Float] + attr_accessor :y + + # X coordinate. + # Corresponds to the JSON property `x` + # @return [Float] + attr_accessor :x + + # Z coordinate (or depth). + # Corresponds to the JSON property `z` + # @return [Float] + attr_accessor :z + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @y = args[:y] if args.key?(:y) + @x = args[:x] if args.key?(:x) + @z = args[:z] if args.key?(:z) + end + end + # Color information consists of RGB channels, score, and the fraction of # the image that the color occupies in the image. class ColorInfo @@ -610,14 +932,69 @@ module Google end end - # A bounding polygon for the detected image annotation. - class BoundingPoly + # Set of detected entity features. + class EntityAnnotation include Google::Apis::Core::Hashable - # The bounding polygon vertices. - # Corresponds to the JSON property `vertices` - # @return [Array] - attr_accessor :vertices + # The location information for the detected entity. Multiple + # `LocationInfo` elements can be present because one location may + # indicate the location of the scene in the image, and another location + # may indicate the location of the place where the image was taken. + # Location information is usually present for landmarks. + # Corresponds to the JSON property `locations` + # @return [Array] + attr_accessor :locations + + # Opaque entity ID. Some IDs may be available in + # [Google Knowledge Graph Search API](https://developers.google.com/knowledge- + # graph/). + # Corresponds to the JSON property `mid` + # @return [String] + attr_accessor :mid + + # The accuracy of the entity detection in an image. + # For example, for an image in which the "Eiffel Tower" entity is detected, + # this field represents the confidence that there is a tower in the query + # image. Range [0, 1]. + # Corresponds to the JSON property `confidence` + # @return [Float] + attr_accessor :confidence + + # The language code for the locale in which the entity textual + # `description` is expressed. + # Corresponds to the JSON property `locale` + # @return [String] + attr_accessor :locale + + # A bounding polygon for the detected image annotation. + # Corresponds to the JSON property `boundingPoly` + # @return [Google::Apis::VisionV1::BoundingPoly] + attr_accessor :bounding_poly + + # The relevancy of the ICA (Image Content Annotation) label to the + # image. For example, the relevancy of "tower" is likely higher to an image + # containing the detected "Eiffel Tower" than to an image containing a + # detected distant towering building, even though the confidence that + # there is a tower in each image may be the same. Range [0, 1]. + # Corresponds to the JSON property `topicality` + # @return [Float] + attr_accessor :topicality + + # Entity textual description, expressed in its `locale` language. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Some entities may have optional user-supplied `Property` (name/value) + # fields, such a score or string that qualifies the entity. + # Corresponds to the JSON property `properties` + # @return [Array] + attr_accessor :properties + + # Overall score of the result. Range [0, 1]. + # Corresponds to the JSON property `score` + # @return [Float] + attr_accessor :score def initialize(**args) update!(**args) @@ -625,7 +1002,15 @@ module Google # Update properties of this object def update!(**args) - @vertices = args[:vertices] if args.key?(:vertices) + @locations = args[:locations] if args.key?(:locations) + @mid = args[:mid] if args.key?(:mid) + @confidence = args[:confidence] if args.key?(:confidence) + @locale = args[:locale] if args.key?(:locale) + @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly) + @topicality = args[:topicality] if args.key?(:topicality) + @description = args[:description] if args.key?(:description) + @properties = args[:properties] if args.key?(:properties) + @score = args[:score] if args.key?(:score) end end @@ -637,6 +1022,11 @@ module Google class Landmark include Google::Apis::Core::Hashable + # Face landmark type. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + # A 3D position in the image, used primarily for Face detection landmarks. # A valid Position must have both x and y coordinates. # The position coordinates are in the same scale as the original image. @@ -644,10 +1034,32 @@ module Google # @return [Google::Apis::VisionV1::Position] attr_accessor :position - # Face landmark type. - # Corresponds to the JSON property `type` + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type = args[:type] if args.key?(:type) + @position = args[:position] if args.key?(:position) + end + end + + # Client image to perform Google Cloud Vision API tasks over. + class Image + include Google::Apis::Core::Hashable + + # Image content, represented as a stream of bytes. + # Note: as with all `bytes` fields, protobuffers use a pure binary + # representation, whereas JSON representations use base64. + # Corresponds to the JSON property `content` # @return [String] - attr_accessor :type + attr_accessor :content + + # External image source (Google Cloud Storage image location). + # Corresponds to the JSON property `source` + # @return [Google::Apis::VisionV1::ImageSource] + attr_accessor :source def initialize(**args) update!(**args) @@ -655,8 +1067,135 @@ module Google # Update properties of this object def update!(**args) - @position = args[:position] if args.key?(:position) - @type = args[:type] if args.key?(:type) + @content = args[:content] if args.key?(:content) + @source = args[:source] if args.key?(:source) + end + end + + # A face annotation object contains the results of face detection. + class FaceAnnotation + include Google::Apis::Core::Hashable + + # A bounding polygon for the detected image annotation. + # Corresponds to the JSON property `fdBoundingPoly` + # @return [Google::Apis::VisionV1::BoundingPoly] + attr_accessor :fd_bounding_poly + + # Anger likelihood. + # Corresponds to the JSON property `angerLikelihood` + # @return [String] + attr_accessor :anger_likelihood + + # Detected face landmarks. + # Corresponds to the JSON property `landmarks` + # @return [Array] + attr_accessor :landmarks + + # Surprise likelihood. + # Corresponds to the JSON property `surpriseLikelihood` + # @return [String] + attr_accessor :surprise_likelihood + + # Face landmarking confidence. Range [0, 1]. + # Corresponds to the JSON property `landmarkingConfidence` + # @return [Float] + attr_accessor :landmarking_confidence + + # Joy likelihood. + # Corresponds to the JSON property `joyLikelihood` + # @return [String] + attr_accessor :joy_likelihood + + # Under-exposed likelihood. + # Corresponds to the JSON property `underExposedLikelihood` + # @return [String] + attr_accessor :under_exposed_likelihood + + # Yaw angle, which indicates the leftward/rightward angle that the face is + # pointing relative to the vertical plane perpendicular to the image. Range + # [-180,180]. + # Corresponds to the JSON property `panAngle` + # @return [Float] + attr_accessor :pan_angle + + # Detection confidence. Range [0, 1]. + # Corresponds to the JSON property `detectionConfidence` + # @return [Float] + attr_accessor :detection_confidence + + # Blurred likelihood. + # Corresponds to the JSON property `blurredLikelihood` + # @return [String] + attr_accessor :blurred_likelihood + + # Headwear likelihood. + # Corresponds to the JSON property `headwearLikelihood` + # @return [String] + attr_accessor :headwear_likelihood + + # A bounding polygon for the detected image annotation. + # Corresponds to the JSON property `boundingPoly` + # @return [Google::Apis::VisionV1::BoundingPoly] + attr_accessor :bounding_poly + + # Roll angle, which indicates the amount of clockwise/anti-clockwise rotation + # of the face relative to the image vertical about the axis perpendicular to + # the face. Range [-180,180]. + # Corresponds to the JSON property `rollAngle` + # @return [Float] + attr_accessor :roll_angle + + # Sorrow likelihood. + # Corresponds to the JSON property `sorrowLikelihood` + # @return [String] + attr_accessor :sorrow_likelihood + + # Pitch angle, which indicates the upwards/downwards angle that the face is + # pointing relative to the image's horizontal plane. Range [-180,180]. + # Corresponds to the JSON property `tiltAngle` + # @return [Float] + attr_accessor :tilt_angle + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @fd_bounding_poly = args[:fd_bounding_poly] if args.key?(:fd_bounding_poly) + @anger_likelihood = args[:anger_likelihood] if args.key?(:anger_likelihood) + @landmarks = args[:landmarks] if args.key?(:landmarks) + @surprise_likelihood = args[:surprise_likelihood] if args.key?(:surprise_likelihood) + @landmarking_confidence = args[:landmarking_confidence] if args.key?(:landmarking_confidence) + @joy_likelihood = args[:joy_likelihood] if args.key?(:joy_likelihood) + @under_exposed_likelihood = args[:under_exposed_likelihood] if args.key?(:under_exposed_likelihood) + @pan_angle = args[:pan_angle] if args.key?(:pan_angle) + @detection_confidence = args[:detection_confidence] if args.key?(:detection_confidence) + @blurred_likelihood = args[:blurred_likelihood] if args.key?(:blurred_likelihood) + @headwear_likelihood = args[:headwear_likelihood] if args.key?(:headwear_likelihood) + @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly) + @roll_angle = args[:roll_angle] if args.key?(:roll_angle) + @sorrow_likelihood = args[:sorrow_likelihood] if args.key?(:sorrow_likelihood) + @tilt_angle = args[:tilt_angle] if args.key?(:tilt_angle) + end + end + + # Multiple image annotation requests are batched into a single service call. + class BatchAnnotateImagesRequest + include Google::Apis::Core::Hashable + + # Individual image annotation requests for this batch. + # Corresponds to the JSON property `requests` + # @return [Array] + attr_accessor :requests + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @requests = args[:requests] if args.key?(:requests) end end @@ -692,14 +1231,25 @@ module Google end end - # Multiple image annotation requests are batched into a single service call. - class BatchAnnotateImagesRequest + # Request for performing Google Cloud Vision API tasks over a user-provided + # image, with user-requested features. + class AnnotateImageRequest include Google::Apis::Core::Hashable - # Individual image annotation requests for this batch. - # Corresponds to the JSON property `requests` - # @return [Array] - attr_accessor :requests + # Client image to perform Google Cloud Vision API tasks over. + # Corresponds to the JSON property `image` + # @return [Google::Apis::VisionV1::Image] + attr_accessor :image + + # Requested features. + # Corresponds to the JSON property `features` + # @return [Array] + attr_accessor :features + + # Image context and/or feature-specific parameters. + # Corresponds to the JSON property `imageContext` + # @return [Google::Apis::VisionV1::ImageContext] + attr_accessor :image_context def initialize(**args) update!(**args) @@ -707,557 +1257,9 @@ module Google # Update properties of this object def update!(**args) - @requests = args[:requests] if args.key?(:requests) - end - end - - # Set of detected entity features. - class EntityAnnotation - include Google::Apis::Core::Hashable - - # Opaque entity ID. Some IDs may be available in - # [Google Knowledge Graph Search API](https://developers.google.com/knowledge- - # graph/). - # Corresponds to the JSON property `mid` - # @return [String] - attr_accessor :mid - - # Entity textual description, expressed in its `locale` language. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The relevancy of the ICA (Image Content Annotation) label to the - # image. For example, the relevancy of "tower" is likely higher to an image - # containing the detected "Eiffel Tower" than to an image containing a - # detected distant towering building, even though the confidence that - # there is a tower in each image may be the same. Range [0, 1]. - # Corresponds to the JSON property `topicality` - # @return [Float] - attr_accessor :topicality - - # The language code for the locale in which the entity textual - # `description` is expressed. - # Corresponds to the JSON property `locale` - # @return [String] - attr_accessor :locale - - # Some entities may have optional user-supplied `Property` (name/value) - # fields, such a score or string that qualifies the entity. - # Corresponds to the JSON property `properties` - # @return [Array] - attr_accessor :properties - - # Overall score of the result. Range [0, 1]. - # Corresponds to the JSON property `score` - # @return [Float] - attr_accessor :score - - # A bounding polygon for the detected image annotation. - # Corresponds to the JSON property `boundingPoly` - # @return [Google::Apis::VisionV1::BoundingPoly] - attr_accessor :bounding_poly - - # The location information for the detected entity. Multiple - # `LocationInfo` elements can be present because one location may - # indicate the location of the scene in the image, and another location - # may indicate the location of the place where the image was taken. - # Location information is usually present for landmarks. - # Corresponds to the JSON property `locations` - # @return [Array] - attr_accessor :locations - - # The accuracy of the entity detection in an image. - # For example, for an image in which the "Eiffel Tower" entity is detected, - # this field represents the confidence that there is a tower in the query - # image. Range [0, 1]. - # Corresponds to the JSON property `confidence` - # @return [Float] - attr_accessor :confidence - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @mid = args[:mid] if args.key?(:mid) - @description = args[:description] if args.key?(:description) - @topicality = args[:topicality] if args.key?(:topicality) - @locale = args[:locale] if args.key?(:locale) - @properties = args[:properties] if args.key?(:properties) - @score = args[:score] if args.key?(:score) - @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly) - @locations = args[:locations] if args.key?(:locations) - @confidence = args[:confidence] if args.key?(:confidence) - end - end - - # A `Property` consists of a user-supplied name/value pair. - class Property - include Google::Apis::Core::Hashable - - # Value of the property. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - # Name of the property. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @value = args[:value] if args.key?(:value) - @name = args[:name] if args.key?(:name) - end - end - - # Represents a color in the RGBA color space. This representation is designed - # for simplicity of conversion to/from color representations in various - # languages over compactness; for example, the fields of this representation - # can be trivially provided to the constructor of "java.awt.Color" in Java; it - # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" - # method in iOS; and, with just a little work, it can be easily formatted into - # a CSS "rgba()" string in JavaScript, as well. Here are some examples: - # Example (Java): - # import com.google.type.Color; - # // ... - # public static java.awt.Color fromProto(Color protocolor) ` - # float alpha = protocolor.hasAlpha() - # ? protocolor.getAlpha().getValue() - # : 1.0; - # return new java.awt.Color( - # protocolor.getRed(), - # protocolor.getGreen(), - # protocolor.getBlue(), - # alpha); - # ` - # public static Color toProto(java.awt.Color color) ` - # float red = (float) color.getRed(); - # float green = (float) color.getGreen(); - # float blue = (float) color.getBlue(); - # float denominator = 255.0; - # Color.Builder resultBuilder = - # Color - # .newBuilder() - # .setRed(red / denominator) - # .setGreen(green / denominator) - # .setBlue(blue / denominator); - # int alpha = color.getAlpha(); - # if (alpha != 255) ` - # result.setAlpha( - # FloatValue - # .newBuilder() - # .setValue(((float) alpha) / denominator) - # .build()); - # ` - # return resultBuilder.build(); - # ` - # // ... - # Example (iOS / Obj-C): - # // ... - # static UIColor* fromProto(Color* protocolor) ` - # float red = [protocolor red]; - # float green = [protocolor green]; - # float blue = [protocolor blue]; - # FloatValue* alpha_wrapper = [protocolor alpha]; - # float alpha = 1.0; - # if (alpha_wrapper != nil) ` - # alpha = [alpha_wrapper value]; - # ` - # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; - # ` - # static Color* toProto(UIColor* color) ` - # CGFloat red, green, blue, alpha; - # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` - # return nil; - # ` - # Color* result = [Color alloc] init]; - # [result setRed:red]; - # [result setGreen:green]; - # [result setBlue:blue]; - # if (alpha <= 0.9999) ` - # [result setAlpha:floatWrapperWithValue(alpha)]; - # ` - # [result autorelease]; - # return result; - # ` - # // ... - # Example (JavaScript): - # // ... - # var protoToCssColor = function(rgb_color) ` - # var redFrac = rgb_color.red || 0.0; - # var greenFrac = rgb_color.green || 0.0; - # var blueFrac = rgb_color.blue || 0.0; - # var red = Math.floor(redFrac * 255); - # var green = Math.floor(greenFrac * 255); - # var blue = Math.floor(blueFrac * 255); - # if (!('alpha' in rgb_color)) ` - # return rgbToCssColor_(red, green, blue); - # ` - # var alphaFrac = rgb_color.alpha.value || 0.0; - # var rgbParams = [red, green, blue].join(','); - # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); - # `; - # var rgbToCssColor_ = function(red, green, blue) ` - # var rgbNumber = new Number((red << 16) | (green << 8) | blue); - # var hexString = rgbNumber.toString(16); - # var missingZeros = 6 - hexString.length; - # var resultBuilder = ['#']; - # for (var i = 0; i < missingZeros; i++) ` - # resultBuilder.push('0'); - # ` - # resultBuilder.push(hexString); - # return resultBuilder.join(''); - # `; - # // ... - class Color - include Google::Apis::Core::Hashable - - # The amount of green in the color as a value in the interval [0, 1]. - # Corresponds to the JSON property `green` - # @return [Float] - attr_accessor :green - - # The amount of blue in the color as a value in the interval [0, 1]. - # Corresponds to the JSON property `blue` - # @return [Float] - attr_accessor :blue - - # The amount of red in the color as a value in the interval [0, 1]. - # Corresponds to the JSON property `red` - # @return [Float] - attr_accessor :red - - # The fraction of this color that should be applied to the pixel. That is, - # the final pixel color is defined by the equation: - # pixel color = alpha * (this color) + (1.0 - alpha) * (background color) - # This means that a value of 1.0 corresponds to a solid color, whereas - # a value of 0.0 corresponds to a completely transparent color. This - # uses a wrapper message rather than a simple float scalar so that it is - # possible to distinguish between a default value and the value being unset. - # If omitted, this color object is to be rendered as a solid color - # (as if the alpha value had been explicitly given with a value of 1.0). - # Corresponds to the JSON property `alpha` - # @return [Float] - attr_accessor :alpha - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @green = args[:green] if args.key?(:green) - @blue = args[:blue] if args.key?(:blue) - @red = args[:red] if args.key?(:red) - @alpha = args[:alpha] if args.key?(:alpha) - end - end - - # Detected entity location information. - class LocationInfo - include Google::Apis::Core::Hashable - - # An object representing a latitude/longitude pair. This is expressed as a pair - # of doubles representing degrees latitude and degrees longitude. Unless - # specified otherwise, this must conform to the - # WGS84 - # standard. Values must be within normalized ranges. - # Example of normalization code in Python: - # def NormalizeLongitude(longitude): - # """Wraps decimal degrees longitude to [-180.0, 180.0].""" - # q, r = divmod(longitude, 360.0) - # if r > 180.0 or (r == 180.0 and q <= -1.0): - # return r - 360.0 - # return r - # def NormalizeLatLng(latitude, longitude): - # """Wraps decimal degrees latitude and longitude to - # [-90.0, 90.0] and [-180.0, 180.0], respectively.""" - # r = latitude % 360.0 - # if r <= 90.0: - # return r, NormalizeLongitude(longitude) - # elif r >= 270.0: - # return r - 360, NormalizeLongitude(longitude) - # else: - # return 180 - r, NormalizeLongitude(longitude + 180.0) - # assert 180.0 == NormalizeLongitude(180.0) - # assert -180.0 == NormalizeLongitude(-180.0) - # assert -179.0 == NormalizeLongitude(181.0) - # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) - # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) - # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) - # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) - # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) - # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) - # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) - # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) - # The code in logs/storage/validator/logs_validator_traits.cc treats this type - # as if it were annotated as ST_LOCATION. - # Corresponds to the JSON property `latLng` - # @return [Google::Apis::VisionV1::LatLng] - attr_accessor :lat_lng - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @lat_lng = args[:lat_lng] if args.key?(:lat_lng) - end - end - - # - class SafeSearchAnnotation - include Google::Apis::Core::Hashable - - # Likelihood that this is a medical image. - # Corresponds to the JSON property `medical` - # @return [String] - attr_accessor :medical - - # Spoof likelihood. The likelihood that an modification - # was made to the image's canonical version to make it appear - # funny or offensive. - # Corresponds to the JSON property `spoof` - # @return [String] - attr_accessor :spoof - - # Violence likelihood. - # Corresponds to the JSON property `violence` - # @return [String] - attr_accessor :violence - - # Represents the adult content likelihood for the image. - # Corresponds to the JSON property `adult` - # @return [String] - attr_accessor :adult - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @medical = args[:medical] if args.key?(:medical) - @spoof = args[:spoof] if args.key?(:spoof) - @violence = args[:violence] if args.key?(:violence) - @adult = args[:adult] if args.key?(:adult) - end - end - - # Client image to perform Google Cloud Vision API tasks over. - class Image - include Google::Apis::Core::Hashable - - # External image source (Google Cloud Storage image location). - # Corresponds to the JSON property `source` - # @return [Google::Apis::VisionV1::ImageSource] - attr_accessor :source - - # Image content, represented as a stream of bytes. - # Note: as with all `bytes` fields, protobuffers use a pure binary - # representation, whereas JSON representations use base64. - # Corresponds to the JSON property `content` - # @return [String] - attr_accessor :content - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @source = args[:source] if args.key?(:source) - @content = args[:content] if args.key?(:content) - end - end - - # Set of dominant colors and their corresponding scores. - class DominantColorsAnnotation - include Google::Apis::Core::Hashable - - # RGB color values with their score and pixel fraction. - # Corresponds to the JSON property `colors` - # @return [Array] - attr_accessor :colors - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @colors = args[:colors] if args.key?(:colors) - end - end - - # Users describe the type of Google Cloud Vision API tasks to perform over - # images by using *Feature*s. Each Feature indicates a type of image - # detection task to perform. Features encode the Cloud Vision API - # vertical to operate on and the number of top-scoring results to return. - class Feature - include Google::Apis::Core::Hashable - - # The feature type. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Maximum number of results of this type. - # Corresponds to the JSON property `maxResults` - # @return [Fixnum] - attr_accessor :max_results - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] if args.key?(:type) - @max_results = args[:max_results] if args.key?(:max_results) - end - end - - # Response to a batch image annotation request. - class BatchAnnotateImagesResponse - include Google::Apis::Core::Hashable - - # Individual responses to image annotation requests within the batch. - # Corresponds to the JSON property `responses` - # @return [Array] - attr_accessor :responses - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @responses = args[:responses] if args.key?(:responses) - end - end - - # Stores image properties, such as dominant colors. - class ImageProperties - include Google::Apis::Core::Hashable - - # Set of dominant colors and their corresponding scores. - # Corresponds to the JSON property `dominantColors` - # @return [Google::Apis::VisionV1::DominantColorsAnnotation] - attr_accessor :dominant_colors - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dominant_colors = args[:dominant_colors] if args.key?(:dominant_colors) - end - end - - # An object representing a latitude/longitude pair. This is expressed as a pair - # of doubles representing degrees latitude and degrees longitude. Unless - # specified otherwise, this must conform to the - # WGS84 - # standard. Values must be within normalized ranges. - # Example of normalization code in Python: - # def NormalizeLongitude(longitude): - # """Wraps decimal degrees longitude to [-180.0, 180.0].""" - # q, r = divmod(longitude, 360.0) - # if r > 180.0 or (r == 180.0 and q <= -1.0): - # return r - 360.0 - # return r - # def NormalizeLatLng(latitude, longitude): - # """Wraps decimal degrees latitude and longitude to - # [-90.0, 90.0] and [-180.0, 180.0], respectively.""" - # r = latitude % 360.0 - # if r <= 90.0: - # return r, NormalizeLongitude(longitude) - # elif r >= 270.0: - # return r - 360, NormalizeLongitude(longitude) - # else: - # return 180 - r, NormalizeLongitude(longitude + 180.0) - # assert 180.0 == NormalizeLongitude(180.0) - # assert -180.0 == NormalizeLongitude(-180.0) - # assert -179.0 == NormalizeLongitude(181.0) - # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) - # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) - # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) - # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) - # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) - # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) - # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) - # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) - # The code in logs/storage/validator/logs_validator_traits.cc treats this type - # as if it were annotated as ST_LOCATION. - class LatLng - include Google::Apis::Core::Hashable - - # The latitude in degrees. It must be in the range [-90.0, +90.0]. - # Corresponds to the JSON property `latitude` - # @return [Float] - attr_accessor :latitude - - # The longitude in degrees. It must be in the range [-180.0, +180.0]. - # Corresponds to the JSON property `longitude` - # @return [Float] - attr_accessor :longitude - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @latitude = args[:latitude] if args.key?(:latitude) - @longitude = args[:longitude] if args.key?(:longitude) - end - end - - # A 3D position in the image, used primarily for Face detection landmarks. - # A valid Position must have both x and y coordinates. - # The position coordinates are in the same scale as the original image. - class Position - include Google::Apis::Core::Hashable - - # Y coordinate. - # Corresponds to the JSON property `y` - # @return [Float] - attr_accessor :y - - # X coordinate. - # Corresponds to the JSON property `x` - # @return [Float] - attr_accessor :x - - # Z coordinate (or depth). - # Corresponds to the JSON property `z` - # @return [Float] - attr_accessor :z - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @y = args[:y] if args.key?(:y) - @x = args[:x] if args.key?(:x) - @z = args[:z] if args.key?(:z) + @image = args[:image] if args.key?(:image) + @features = args[:features] if args.key?(:features) + @image_context = args[:image_context] if args.key?(:image_context) end end end diff --git a/generated/google/apis/vision_v1/representations.rb b/generated/google/apis/vision_v1/representations.rb index eb10df3d0..abaa07dd6 100644 --- a/generated/google/apis/vision_v1/representations.rb +++ b/generated/google/apis/vision_v1/representations.rb @@ -22,19 +22,7 @@ module Google module Apis module VisionV1 - class ImageSource - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AnnotateImageRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AnnotateImageResponse + class Status class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -46,61 +34,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Status - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class FaceAnnotation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Vertex - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ColorInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BoundingPoly - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Landmark - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ImageContext - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BatchAnnotateImagesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class EntityAnnotation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Property + class LatLng class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -112,25 +46,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class LocationInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SafeSearchAnnotation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Image - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DominantColorsAnnotation + class ImageProperties class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -142,19 +58,55 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class SafeSearchAnnotation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DominantColorsAnnotation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Vertex + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BoundingPoly + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AnnotateImageResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Property + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class LocationInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class BatchAnnotateImagesResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ImageProperties - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class LatLng + class ImageSource class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -166,44 +118,60 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class ImageSource - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :gcs_image_uri, as: 'gcsImageUri' - end + class ColorInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class EntityAnnotation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Landmark + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Image + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class FaceAnnotation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BatchAnnotateImagesRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ImageContext + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class AnnotateImageRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :image, as: 'image', class: Google::Apis::VisionV1::Image, decorator: Google::Apis::VisionV1::Image::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :image_context, as: 'imageContext', class: Google::Apis::VisionV1::ImageContext, decorator: Google::Apis::VisionV1::ImageContext::Representation - - collection :features, as: 'features', class: Google::Apis::VisionV1::Feature, decorator: Google::Apis::VisionV1::Feature::Representation - - end + include Google::Apis::Core::JsonObjectSupport end - class AnnotateImageResponse + class Status # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :label_annotations, as: 'labelAnnotations', class: Google::Apis::VisionV1::EntityAnnotation, decorator: Google::Apis::VisionV1::EntityAnnotation::Representation - - collection :landmark_annotations, as: 'landmarkAnnotations', class: Google::Apis::VisionV1::EntityAnnotation, decorator: Google::Apis::VisionV1::EntityAnnotation::Representation - - property :safe_search_annotation, as: 'safeSearchAnnotation', class: Google::Apis::VisionV1::SafeSearchAnnotation, decorator: Google::Apis::VisionV1::SafeSearchAnnotation::Representation - - property :image_properties_annotation, as: 'imagePropertiesAnnotation', class: Google::Apis::VisionV1::ImageProperties, decorator: Google::Apis::VisionV1::ImageProperties::Representation - - collection :text_annotations, as: 'textAnnotations', class: Google::Apis::VisionV1::EntityAnnotation, decorator: Google::Apis::VisionV1::EntityAnnotation::Representation - - collection :logo_annotations, as: 'logoAnnotations', class: Google::Apis::VisionV1::EntityAnnotation, decorator: Google::Apis::VisionV1::EntityAnnotation::Representation - - collection :face_annotations, as: 'faceAnnotations', class: Google::Apis::VisionV1::FaceAnnotation, decorator: Google::Apis::VisionV1::FaceAnnotation::Representation - - property :error, as: 'error', class: Google::Apis::VisionV1::Status, decorator: Google::Apis::VisionV1::Status::Representation - + collection :details, as: 'details' + property :code, as: 'code' + property :message, as: 'message' end end @@ -217,36 +185,55 @@ module Google end end - class Status + class LatLng # @private class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - collection :details, as: 'details' - property :message, as: 'message' + property :latitude, as: 'latitude' + property :longitude, as: 'longitude' end end - class FaceAnnotation + class Color # @private class Representation < Google::Apis::Core::JsonRepresentation - property :tilt_angle, as: 'tiltAngle' - property :under_exposed_likelihood, as: 'underExposedLikelihood' - property :fd_bounding_poly, as: 'fdBoundingPoly', class: Google::Apis::VisionV1::BoundingPoly, decorator: Google::Apis::VisionV1::BoundingPoly::Representation + property :red, as: 'red' + property :green, as: 'green' + property :blue, as: 'blue' + property :alpha, as: 'alpha' + end + end - property :landmarking_confidence, as: 'landmarkingConfidence' - property :joy_likelihood, as: 'joyLikelihood' - property :detection_confidence, as: 'detectionConfidence' - property :surprise_likelihood, as: 'surpriseLikelihood' - property :anger_likelihood, as: 'angerLikelihood' - property :headwear_likelihood, as: 'headwearLikelihood' - property :pan_angle, as: 'panAngle' - property :bounding_poly, as: 'boundingPoly', class: Google::Apis::VisionV1::BoundingPoly, decorator: Google::Apis::VisionV1::BoundingPoly::Representation + class ImageProperties + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :dominant_colors, as: 'dominantColors', class: Google::Apis::VisionV1::DominantColorsAnnotation, decorator: Google::Apis::VisionV1::DominantColorsAnnotation::Representation - collection :landmarks, as: 'landmarks', class: Google::Apis::VisionV1::Landmark, decorator: Google::Apis::VisionV1::Landmark::Representation + end + end + + class Feature + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' + property :max_results, as: 'maxResults' + end + end + + class SafeSearchAnnotation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :spoof, as: 'spoof' + property :medical, as: 'medical' + property :violence, as: 'violence' + property :adult, as: 'adult' + end + end + + class DominantColorsAnnotation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :colors, as: 'colors', class: Google::Apis::VisionV1::ColorInfo, decorator: Google::Apis::VisionV1::ColorInfo::Representation - property :blurred_likelihood, as: 'blurredLikelihood' - property :roll_angle, as: 'rollAngle' - property :sorrow_likelihood, as: 'sorrowLikelihood' end end @@ -258,6 +245,76 @@ module Google end end + class BoundingPoly + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :vertices, as: 'vertices', class: Google::Apis::VisionV1::Vertex, decorator: Google::Apis::VisionV1::Vertex::Representation + + end + end + + class AnnotateImageResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :logo_annotations, as: 'logoAnnotations', class: Google::Apis::VisionV1::EntityAnnotation, decorator: Google::Apis::VisionV1::EntityAnnotation::Representation + + collection :label_annotations, as: 'labelAnnotations', class: Google::Apis::VisionV1::EntityAnnotation, decorator: Google::Apis::VisionV1::EntityAnnotation::Representation + + property :safe_search_annotation, as: 'safeSearchAnnotation', class: Google::Apis::VisionV1::SafeSearchAnnotation, decorator: Google::Apis::VisionV1::SafeSearchAnnotation::Representation + + property :error, as: 'error', class: Google::Apis::VisionV1::Status, decorator: Google::Apis::VisionV1::Status::Representation + + collection :landmark_annotations, as: 'landmarkAnnotations', class: Google::Apis::VisionV1::EntityAnnotation, decorator: Google::Apis::VisionV1::EntityAnnotation::Representation + + collection :text_annotations, as: 'textAnnotations', class: Google::Apis::VisionV1::EntityAnnotation, decorator: Google::Apis::VisionV1::EntityAnnotation::Representation + + property :image_properties_annotation, as: 'imagePropertiesAnnotation', class: Google::Apis::VisionV1::ImageProperties, decorator: Google::Apis::VisionV1::ImageProperties::Representation + + collection :face_annotations, as: 'faceAnnotations', class: Google::Apis::VisionV1::FaceAnnotation, decorator: Google::Apis::VisionV1::FaceAnnotation::Representation + + end + end + + class Property + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :value, as: 'value' + property :name, as: 'name' + end + end + + class LocationInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :lat_lng, as: 'latLng', class: Google::Apis::VisionV1::LatLng, decorator: Google::Apis::VisionV1::LatLng::Representation + + end + end + + class BatchAnnotateImagesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :responses, as: 'responses', class: Google::Apis::VisionV1::AnnotateImageResponse, decorator: Google::Apis::VisionV1::AnnotateImageResponse::Representation + + end + end + + class ImageSource + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :gcs_image_uri, as: 'gcsImageUri' + end + end + + class Position + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :y, as: 'y' + property :x, as: 'x' + property :z, as: 'z' + end + end + class ColorInfo # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -268,20 +325,71 @@ module Google end end - class BoundingPoly + class EntityAnnotation # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :vertices, as: 'vertices', class: Google::Apis::VisionV1::Vertex, decorator: Google::Apis::VisionV1::Vertex::Representation + collection :locations, as: 'locations', class: Google::Apis::VisionV1::LocationInfo, decorator: Google::Apis::VisionV1::LocationInfo::Representation + property :mid, as: 'mid' + property :confidence, as: 'confidence' + property :locale, as: 'locale' + property :bounding_poly, as: 'boundingPoly', class: Google::Apis::VisionV1::BoundingPoly, decorator: Google::Apis::VisionV1::BoundingPoly::Representation + + property :topicality, as: 'topicality' + property :description, as: 'description' + collection :properties, as: 'properties', class: Google::Apis::VisionV1::Property, decorator: Google::Apis::VisionV1::Property::Representation + + property :score, as: 'score' end end class Landmark # @private class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' property :position, as: 'position', class: Google::Apis::VisionV1::Position, decorator: Google::Apis::VisionV1::Position::Representation - property :type, as: 'type' + end + end + + class Image + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :content, :base64 => true, as: 'content' + property :source, as: 'source', class: Google::Apis::VisionV1::ImageSource, decorator: Google::Apis::VisionV1::ImageSource::Representation + + end + end + + class FaceAnnotation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :fd_bounding_poly, as: 'fdBoundingPoly', class: Google::Apis::VisionV1::BoundingPoly, decorator: Google::Apis::VisionV1::BoundingPoly::Representation + + property :anger_likelihood, as: 'angerLikelihood' + collection :landmarks, as: 'landmarks', class: Google::Apis::VisionV1::Landmark, decorator: Google::Apis::VisionV1::Landmark::Representation + + property :surprise_likelihood, as: 'surpriseLikelihood' + property :landmarking_confidence, as: 'landmarkingConfidence' + property :joy_likelihood, as: 'joyLikelihood' + property :under_exposed_likelihood, as: 'underExposedLikelihood' + property :pan_angle, as: 'panAngle' + property :detection_confidence, as: 'detectionConfidence' + property :blurred_likelihood, as: 'blurredLikelihood' + property :headwear_likelihood, as: 'headwearLikelihood' + property :bounding_poly, as: 'boundingPoly', class: Google::Apis::VisionV1::BoundingPoly, decorator: Google::Apis::VisionV1::BoundingPoly::Representation + + property :roll_angle, as: 'rollAngle' + property :sorrow_likelihood, as: 'sorrowLikelihood' + property :tilt_angle, as: 'tiltAngle' + end + end + + class BatchAnnotateImagesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :requests, as: 'requests', class: Google::Apis::VisionV1::AnnotateImageRequest, decorator: Google::Apis::VisionV1::AnnotateImageRequest::Representation + end end @@ -294,123 +402,15 @@ module Google end end - class BatchAnnotateImagesRequest + class AnnotateImageRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :requests, as: 'requests', class: Google::Apis::VisionV1::AnnotateImageRequest, decorator: Google::Apis::VisionV1::AnnotateImageRequest::Representation + property :image, as: 'image', class: Google::Apis::VisionV1::Image, decorator: Google::Apis::VisionV1::Image::Representation - end - end + collection :features, as: 'features', class: Google::Apis::VisionV1::Feature, decorator: Google::Apis::VisionV1::Feature::Representation - class EntityAnnotation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :mid, as: 'mid' - property :description, as: 'description' - property :topicality, as: 'topicality' - property :locale, as: 'locale' - collection :properties, as: 'properties', class: Google::Apis::VisionV1::Property, decorator: Google::Apis::VisionV1::Property::Representation + property :image_context, as: 'imageContext', class: Google::Apis::VisionV1::ImageContext, decorator: Google::Apis::VisionV1::ImageContext::Representation - property :score, as: 'score' - property :bounding_poly, as: 'boundingPoly', class: Google::Apis::VisionV1::BoundingPoly, decorator: Google::Apis::VisionV1::BoundingPoly::Representation - - collection :locations, as: 'locations', class: Google::Apis::VisionV1::LocationInfo, decorator: Google::Apis::VisionV1::LocationInfo::Representation - - property :confidence, as: 'confidence' - end - end - - class Property - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :value, as: 'value' - property :name, as: 'name' - end - end - - class Color - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :green, as: 'green' - property :blue, as: 'blue' - property :red, as: 'red' - property :alpha, as: 'alpha' - end - end - - class LocationInfo - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :lat_lng, as: 'latLng', class: Google::Apis::VisionV1::LatLng, decorator: Google::Apis::VisionV1::LatLng::Representation - - end - end - - class SafeSearchAnnotation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :medical, as: 'medical' - property :spoof, as: 'spoof' - property :violence, as: 'violence' - property :adult, as: 'adult' - end - end - - class Image - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :source, as: 'source', class: Google::Apis::VisionV1::ImageSource, decorator: Google::Apis::VisionV1::ImageSource::Representation - - property :content, :base64 => true, as: 'content' - end - end - - class DominantColorsAnnotation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :colors, as: 'colors', class: Google::Apis::VisionV1::ColorInfo, decorator: Google::Apis::VisionV1::ColorInfo::Representation - - end - end - - class Feature - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - property :max_results, as: 'maxResults' - end - end - - class BatchAnnotateImagesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :responses, as: 'responses', class: Google::Apis::VisionV1::AnnotateImageResponse, decorator: Google::Apis::VisionV1::AnnotateImageResponse::Representation - - end - end - - class ImageProperties - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :dominant_colors, as: 'dominantColors', class: Google::Apis::VisionV1::DominantColorsAnnotation, decorator: Google::Apis::VisionV1::DominantColorsAnnotation::Representation - - end - end - - class LatLng - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :latitude, as: 'latitude' - property :longitude, as: 'longitude' - end - end - - class Position - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :y, as: 'y' - property :x, as: 'x' - property :z, as: 'z' end end end diff --git a/generated/google/apis/vision_v1/service.rb b/generated/google/apis/vision_v1/service.rb index 376460244..08cffdcc1 100644 --- a/generated/google/apis/vision_v1/service.rb +++ b/generated/google/apis/vision_v1/service.rb @@ -50,11 +50,11 @@ module Google # Run image detection and annotation for a batch of images. # @param [Google::Apis::VisionV1::BatchAnnotateImagesRequest] batch_annotate_images_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -67,14 +67,14 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def annotate_image(batch_annotate_images_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def annotate_image(batch_annotate_images_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/images:annotate', options) command.request_representation = Google::Apis::VisionV1::BatchAnnotateImagesRequest::Representation command.request_object = batch_annotate_images_request_object command.response_representation = Google::Apis::VisionV1::BatchAnnotateImagesResponse::Representation command.response_class = Google::Apis::VisionV1::BatchAnnotateImagesResponse - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/youtube_analytics_v1.rb b/generated/google/apis/youtube_analytics_v1.rb index c096ab9ef..1135df3b0 100644 --- a/generated/google/apis/youtube_analytics_v1.rb +++ b/generated/google/apis/youtube_analytics_v1.rb @@ -25,7 +25,7 @@ module Google # @see http://developers.google.com/youtube/analytics/ module YoutubeAnalyticsV1 VERSION = 'V1' - REVISION = '20170123' + REVISION = '20170125' # Manage your YouTube account AUTH_YOUTUBE = 'https://www.googleapis.com/auth/youtube' diff --git a/generated/google/apis/youtube_partner_v1.rb b/generated/google/apis/youtube_partner_v1.rb index 72886f566..1dfbb9c1b 100644 --- a/generated/google/apis/youtube_partner_v1.rb +++ b/generated/google/apis/youtube_partner_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/youtube/partner/ module YoutubePartnerV1 VERSION = 'V1' - REVISION = '20170117' + REVISION = '20170124' # View and manage your assets and associated content on YouTube AUTH_YOUTUBEPARTNER = 'https://www.googleapis.com/auth/youtubepartner' diff --git a/generated/google/apis/youtubereporting_v1.rb b/generated/google/apis/youtubereporting_v1.rb index f5639ff79..2fe4e3949 100644 --- a/generated/google/apis/youtubereporting_v1.rb +++ b/generated/google/apis/youtubereporting_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/youtube/reporting/v1/reports/ module YoutubereportingV1 VERSION = 'V1' - REVISION = '20170122' + REVISION = '20170126' # View YouTube Analytics reports for your YouTube content AUTH_YT_ANALYTICS_READONLY = 'https://www.googleapis.com/auth/yt-analytics.readonly' diff --git a/generated/google/apis/youtubereporting_v1/classes.rb b/generated/google/apis/youtubereporting_v1/classes.rb index 32c86f67c..75cbd4483 100644 --- a/generated/google/apis/youtubereporting_v1/classes.rb +++ b/generated/google/apis/youtubereporting_v1/classes.rb @@ -22,253 +22,6 @@ module Google module Apis module YoutubereportingV1 - # A report's metadata including the URL from which the report itself can be - # downloaded. - class Report - include Google::Apis::Core::Hashable - - # The server-generated ID of the report. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The URL from which the report can be downloaded (max. 1000 characters). - # Corresponds to the JSON property `downloadUrl` - # @return [String] - attr_accessor :download_url - - # The end of the time period that the report instance covers. The value is - # exclusive. - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - # The date/time when this report was created. - # Corresponds to the JSON property `createTime` - # @return [String] - attr_accessor :create_time - - # The start of the time period that the report instance covers. The value is - # inclusive. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - # The date/time when the job this report belongs to will expire/expired. - # Corresponds to the JSON property `jobExpireTime` - # @return [String] - attr_accessor :job_expire_time - - # The ID of the job that created this report. - # Corresponds to the JSON property `jobId` - # @return [String] - attr_accessor :job_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] if args.key?(:id) - @download_url = args[:download_url] if args.key?(:download_url) - @end_time = args[:end_time] if args.key?(:end_time) - @create_time = args[:create_time] if args.key?(:create_time) - @start_time = args[:start_time] if args.key?(:start_time) - @job_expire_time = args[:job_expire_time] if args.key?(:job_expire_time) - @job_id = args[:job_id] if args.key?(:job_id) - end - end - - # Response message for ReportingService.ListJobs. - class ListJobsResponse - include Google::Apis::Core::Hashable - - # A token to retrieve next page of results. - # Pass this value in the - # ListJobsRequest.page_token - # field in the subsequent call to `ListJobs` method to retrieve the next - # page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The list of jobs. - # Corresponds to the JSON property `jobs` - # @return [Array] - attr_accessor :jobs - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @jobs = args[:jobs] if args.key?(:jobs) - end - end - - # Media resource. - class Media - include Google::Apis::Core::Hashable - - # Name of the media resource. - # Corresponds to the JSON property `resourceName` - # @return [String] - attr_accessor :resource_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @resource_name = args[:resource_name] if args.key?(:resource_name) - end - end - - # A job creating reports of a specific type. - class Job - include Google::Apis::Core::Hashable - - # The server-generated ID of the job (max. 40 characters). - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The creation date/time of the job. - # Corresponds to the JSON property `createTime` - # @return [String] - attr_accessor :create_time - - # True if this a system-managed job that cannot be modified by the user; - # otherwise false. - # Corresponds to the JSON property `systemManaged` - # @return [Boolean] - attr_accessor :system_managed - alias_method :system_managed?, :system_managed - - # The date/time when this job will expire/expired. After a job expired, no - # new reports are generated. - # Corresponds to the JSON property `expireTime` - # @return [String] - attr_accessor :expire_time - - # The name of the job (max. 100 characters). - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The type of reports this job creates. Corresponds to the ID of a - # ReportType. - # Corresponds to the JSON property `reportTypeId` - # @return [String] - attr_accessor :report_type_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] if args.key?(:id) - @create_time = args[:create_time] if args.key?(:create_time) - @system_managed = args[:system_managed] if args.key?(:system_managed) - @expire_time = args[:expire_time] if args.key?(:expire_time) - @name = args[:name] if args.key?(:name) - @report_type_id = args[:report_type_id] if args.key?(:report_type_id) - end - end - - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # service Foo ` - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # ` - # The JSON representation for `Empty` is empty JSON object ````. - class Empty - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # A report type. - class ReportType - include Google::Apis::Core::Hashable - - # True if this a system-managed report type; otherwise false. Reporting jobs - # for system-managed report types are created automatically and can thus not - # be used in the `CreateJob` method. - # Corresponds to the JSON property `systemManaged` - # @return [Boolean] - attr_accessor :system_managed - alias_method :system_managed?, :system_managed - - # The date/time when this report type was/will be deprecated. - # Corresponds to the JSON property `deprecateTime` - # @return [String] - attr_accessor :deprecate_time - - # The ID of the report type (max. 100 characters). - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The name of the report type (max. 100 characters). - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @system_managed = args[:system_managed] if args.key?(:system_managed) - @deprecate_time = args[:deprecate_time] if args.key?(:deprecate_time) - @id = args[:id] if args.key?(:id) - @name = args[:name] if args.key?(:name) - end - end - - # Response message for ReportingService.ListReports. - class ListReportsResponse - include Google::Apis::Core::Hashable - - # A token to retrieve next page of results. - # Pass this value in the - # ListReportsRequest.page_token - # field in the subsequent call to `ListReports` method to retrieve the next - # page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The list of report types. - # Corresponds to the JSON property `reports` - # @return [Array] - attr_accessor :reports - - 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) - @reports = args[:reports] if args.key?(:reports) - end - end - # Response message for ReportingService.ListReportTypes. class ListReportTypesResponse include Google::Apis::Core::Hashable @@ -297,6 +50,253 @@ module Google @next_page_token = args[:next_page_token] if args.key?(:next_page_token) end end + + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # service Foo ` + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # ` + # The JSON representation for `Empty` is empty JSON object ````. + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # A report type. + class ReportType + include Google::Apis::Core::Hashable + + # The ID of the report type (max. 100 characters). + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # True if this a system-managed report type; otherwise false. Reporting jobs + # for system-managed report types are created automatically and can thus not + # be used in the `CreateJob` method. + # Corresponds to the JSON property `systemManaged` + # @return [Boolean] + attr_accessor :system_managed + alias_method :system_managed?, :system_managed + + # The date/time when this report type was/will be deprecated. + # Corresponds to the JSON property `deprecateTime` + # @return [String] + attr_accessor :deprecate_time + + # The name of the report type (max. 100 characters). + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @id = args[:id] if args.key?(:id) + @system_managed = args[:system_managed] if args.key?(:system_managed) + @deprecate_time = args[:deprecate_time] if args.key?(:deprecate_time) + @name = args[:name] if args.key?(:name) + end + end + + # A report's metadata including the URL from which the report itself can be + # downloaded. + class Report + include Google::Apis::Core::Hashable + + # The start of the time period that the report instance covers. The value is + # inclusive. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + # The date/time when this report was created. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # The ID of the job that created this report. + # Corresponds to the JSON property `jobId` + # @return [String] + attr_accessor :job_id + + # The server-generated ID of the report. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # The end of the time period that the report instance covers. The value is + # exclusive. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # The date/time when the job this report belongs to will expire/expired. + # Corresponds to the JSON property `jobExpireTime` + # @return [String] + attr_accessor :job_expire_time + + # The URL from which the report can be downloaded (max. 1000 characters). + # Corresponds to the JSON property `downloadUrl` + # @return [String] + attr_accessor :download_url + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @start_time = args[:start_time] if args.key?(:start_time) + @create_time = args[:create_time] if args.key?(:create_time) + @job_id = args[:job_id] if args.key?(:job_id) + @id = args[:id] if args.key?(:id) + @end_time = args[:end_time] if args.key?(:end_time) + @job_expire_time = args[:job_expire_time] if args.key?(:job_expire_time) + @download_url = args[:download_url] if args.key?(:download_url) + end + end + + # Response message for ReportingService.ListJobs. + class ListJobsResponse + include Google::Apis::Core::Hashable + + # The list of jobs. + # Corresponds to the JSON property `jobs` + # @return [Array] + attr_accessor :jobs + + # A token to retrieve next page of results. + # Pass this value in the + # ListJobsRequest.page_token + # field in the subsequent call to `ListJobs` method to retrieve the next + # page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @jobs = args[:jobs] if args.key?(:jobs) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # A job creating reports of a specific type. + class Job + include Google::Apis::Core::Hashable + + # The creation date/time of the job. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # The date/time when this job will expire/expired. After a job expired, no + # new reports are generated. + # Corresponds to the JSON property `expireTime` + # @return [String] + attr_accessor :expire_time + + # The type of reports this job creates. Corresponds to the ID of a + # ReportType. + # Corresponds to the JSON property `reportTypeId` + # @return [String] + attr_accessor :report_type_id + + # The name of the job (max. 100 characters). + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # True if this a system-managed job that cannot be modified by the user; + # otherwise false. + # Corresponds to the JSON property `systemManaged` + # @return [Boolean] + attr_accessor :system_managed + alias_method :system_managed?, :system_managed + + # The server-generated ID of the job (max. 40 characters). + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @create_time = args[:create_time] if args.key?(:create_time) + @expire_time = args[:expire_time] if args.key?(:expire_time) + @report_type_id = args[:report_type_id] if args.key?(:report_type_id) + @name = args[:name] if args.key?(:name) + @system_managed = args[:system_managed] if args.key?(:system_managed) + @id = args[:id] if args.key?(:id) + end + end + + # Response message for ReportingService.ListReports. + class ListReportsResponse + include Google::Apis::Core::Hashable + + # The list of report types. + # Corresponds to the JSON property `reports` + # @return [Array] + attr_accessor :reports + + # A token to retrieve next page of results. + # Pass this value in the + # ListReportsRequest.page_token + # field in the subsequent call to `ListReports` method to retrieve the next + # page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @reports = args[:reports] if args.key?(:reports) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # Media resource. + class Media + include Google::Apis::Core::Hashable + + # Name of the media resource. + # Corresponds to the JSON property `resourceName` + # @return [String] + attr_accessor :resource_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @resource_name = args[:resource_name] if args.key?(:resource_name) + end + end end end end diff --git a/generated/google/apis/youtubereporting_v1/representations.rb b/generated/google/apis/youtubereporting_v1/representations.rb index 62739bc52..c17c17ff7 100644 --- a/generated/google/apis/youtubereporting_v1/representations.rb +++ b/generated/google/apis/youtubereporting_v1/representations.rb @@ -22,118 +22,52 @@ module Google module Apis module YoutubereportingV1 - class Report - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListJobsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Media - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Job - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Empty - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ReportType - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListReportsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class ListReportTypesResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Report - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :download_url, as: 'downloadUrl' - property :end_time, as: 'endTime' - property :create_time, as: 'createTime' - property :start_time, as: 'startTime' - property :job_expire_time, as: 'jobExpireTime' - property :job_id, as: 'jobId' - end - end - - class ListJobsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :jobs, as: 'jobs', class: Google::Apis::YoutubereportingV1::Job, decorator: Google::Apis::YoutubereportingV1::Job::Representation - - end - end - - class Media - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :resource_name, as: 'resourceName' - end - end - - class Job - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :create_time, as: 'createTime' - property :system_managed, as: 'systemManaged' - property :expire_time, as: 'expireTime' - property :name, as: 'name' - property :report_type_id, as: 'reportTypeId' - end - end - class Empty - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ReportType - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :system_managed, as: 'systemManaged' - property :deprecate_time, as: 'deprecateTime' - property :id, as: 'id' - property :name, as: 'name' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Report + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListJobsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Job + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ListReportsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :reports, as: 'reports', class: Google::Apis::YoutubereportingV1::Report, decorator: Google::Apis::YoutubereportingV1::Report::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport + end + + class Media + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ListReportTypesResponse @@ -144,6 +78,72 @@ module Google property :next_page_token, as: 'nextPageToken' end end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class ReportType + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :id, as: 'id' + property :system_managed, as: 'systemManaged' + property :deprecate_time, as: 'deprecateTime' + property :name, as: 'name' + end + end + + class Report + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :start_time, as: 'startTime' + property :create_time, as: 'createTime' + property :job_id, as: 'jobId' + property :id, as: 'id' + property :end_time, as: 'endTime' + property :job_expire_time, as: 'jobExpireTime' + property :download_url, as: 'downloadUrl' + end + end + + class ListJobsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :jobs, as: 'jobs', class: Google::Apis::YoutubereportingV1::Job, decorator: Google::Apis::YoutubereportingV1::Job::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class Job + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + property :expire_time, as: 'expireTime' + property :report_type_id, as: 'reportTypeId' + property :name, as: 'name' + property :system_managed, as: 'systemManaged' + property :id, as: 'id' + end + end + + class ListReportsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :reports, as: 'reports', class: Google::Apis::YoutubereportingV1::Report, decorator: Google::Apis::YoutubereportingV1::Report::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class Media + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :resource_name, as: 'resourceName' + end + end end end end diff --git a/generated/google/apis/youtubereporting_v1/service.rb b/generated/google/apis/youtubereporting_v1/service.rb index 72b2586e9..4ce88a566 100644 --- a/generated/google/apis/youtubereporting_v1/service.rb +++ b/generated/google/apis/youtubereporting_v1/service.rb @@ -47,14 +47,248 @@ module Google super('https://youtubereporting.googleapis.com/', '') end - # Lists report types. + # Creates a job and returns it. + # @param [Google::Apis::YoutubereportingV1::Job] job_object + # @param [String] on_behalf_of_content_owner + # The content owner's external ID on which behalf the user is acting on. If + # not set, the user is acting for himself (his own channel). + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::YoutubereportingV1::Job] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::YoutubereportingV1::Job] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_job(job_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/jobs', options) + command.request_representation = Google::Apis::YoutubereportingV1::Job::Representation + command.request_object = job_object + command.response_representation = Google::Apis::YoutubereportingV1::Job::Representation + command.response_class = Google::Apis::YoutubereportingV1::Job + command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a job. + # @param [String] job_id + # The ID of the job to delete. + # @param [String] on_behalf_of_content_owner + # The content owner's external ID on which behalf the user is acting on. If + # not set, the user is acting for himself (his own channel). + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::YoutubereportingV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::YoutubereportingV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_job(job_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/jobs/{jobId}', options) + command.response_representation = Google::Apis::YoutubereportingV1::Empty::Representation + command.response_class = Google::Apis::YoutubereportingV1::Empty + command.params['jobId'] = job_id unless job_id.nil? + command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists jobs. + # @param [String] page_token + # A token identifying a page of results the server should return. Typically, + # this is the value of + # ListReportTypesResponse.next_page_token + # returned in response to the previous call to the `ListJobs` method. + # @param [Boolean] include_system_managed + # If set to true, also system-managed jobs will be returned; otherwise only + # user-created jobs will be returned. System-managed jobs can neither be + # modified nor deleted. + # @param [Fixnum] page_size + # Requested page size. Server may return fewer jobs than requested. + # If unspecified, server will pick an appropriate default. + # @param [String] on_behalf_of_content_owner + # The content owner's external ID on which behalf the user is acting on. If + # not set, the user is acting for himself (his own channel). + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::YoutubereportingV1::ListJobsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::YoutubereportingV1::ListJobsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_jobs(page_token: nil, include_system_managed: nil, page_size: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/jobs', options) + command.response_representation = Google::Apis::YoutubereportingV1::ListJobsResponse::Representation + command.response_class = Google::Apis::YoutubereportingV1::ListJobsResponse + command.query['pageToken'] = page_token unless page_token.nil? + command.query['includeSystemManaged'] = include_system_managed unless include_system_managed.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a job. + # @param [String] job_id + # The ID of the job to retrieve. + # @param [String] on_behalf_of_content_owner + # The content owner's external ID on which behalf the user is acting on. If + # not set, the user is acting for himself (his own channel). + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::YoutubereportingV1::Job] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::YoutubereportingV1::Job] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_job(job_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/jobs/{jobId}', options) + command.response_representation = Google::Apis::YoutubereportingV1::Job::Representation + command.response_class = Google::Apis::YoutubereportingV1::Job + command.params['jobId'] = job_id unless job_id.nil? + command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists reports created by a specific job. + # Returns NOT_FOUND if the job does not exist. + # @param [String] job_id + # The ID of the job. + # @param [String] created_after + # If set, only reports created after the specified date/time are returned. + # @param [String] start_time_at_or_after + # If set, only reports whose start time is greater than or equal the + # specified date/time are returned. + # @param [String] page_token + # A token identifying a page of results the server should return. Typically, + # this is the value of + # ListReportsResponse.next_page_token + # returned in response to the previous call to the `ListReports` method. # @param [Fixnum] page_size # Requested page size. Server may return fewer report types than requested. # If unspecified, server will pick an appropriate default. - # @param [Boolean] include_system_managed - # If set to true, also system-managed report types will be returned; - # otherwise only the report types that can be used to create new reporting - # jobs will be returned. + # @param [String] on_behalf_of_content_owner + # The content owner's external ID on which behalf the user is acting on. If + # not set, the user is acting for himself (his own channel). + # @param [String] start_time_before + # If set, only reports whose start time is smaller than the specified + # date/time are returned. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::YoutubereportingV1::ListReportsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::YoutubereportingV1::ListReportsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_job_reports(job_id, created_after: nil, start_time_at_or_after: nil, page_token: nil, page_size: nil, on_behalf_of_content_owner: nil, start_time_before: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/jobs/{jobId}/reports', options) + command.response_representation = Google::Apis::YoutubereportingV1::ListReportsResponse::Representation + command.response_class = Google::Apis::YoutubereportingV1::ListReportsResponse + command.params['jobId'] = job_id unless job_id.nil? + command.query['createdAfter'] = created_after unless created_after.nil? + command.query['startTimeAtOrAfter'] = start_time_at_or_after unless start_time_at_or_after.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? + command.query['startTimeBefore'] = start_time_before unless start_time_before.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the metadata of a specific report. + # @param [String] job_id + # The ID of the job. + # @param [String] report_id + # The ID of the report to retrieve. + # @param [String] on_behalf_of_content_owner + # The content owner's external ID on which behalf the user is acting on. If + # not set, the user is acting for himself (his own channel). + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::YoutubereportingV1::Report] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::YoutubereportingV1::Report] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_job_report(job_id, report_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/jobs/{jobId}/reports/{reportId}', options) + command.response_representation = Google::Apis::YoutubereportingV1::Report::Representation + command.response_class = Google::Apis::YoutubereportingV1::Report + command.params['jobId'] = job_id unless job_id.nil? + command.params['reportId'] = report_id unless report_id.nil? + command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists report types. # @param [String] on_behalf_of_content_owner # The content owner's external ID on which behalf the user is acting on. If # not set, the user is acting for himself (his own channel). @@ -63,11 +297,18 @@ module Google # this is the value of # ListReportTypesResponse.next_page_token # returned in response to the previous call to the `ListReportTypes` method. + # @param [Boolean] include_system_managed + # If set to true, also system-managed report types will be returned; + # otherwise only the report types that can be used to create new reporting + # jobs will be returned. + # @param [Fixnum] page_size + # Requested page size. Server may return fewer report types than requested. + # If unspecified, server will pick an appropriate default. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -80,16 +321,16 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_report_types(page_size: nil, include_system_managed: nil, on_behalf_of_content_owner: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_report_types(on_behalf_of_content_owner: nil, page_token: nil, include_system_managed: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/reportTypes', options) command.response_representation = Google::Apis::YoutubereportingV1::ListReportTypesResponse::Representation command.response_class = Google::Apis::YoutubereportingV1::ListReportTypesResponse - command.query['pageSize'] = page_size unless page_size.nil? - command.query['includeSystemManaged'] = include_system_managed unless include_system_managed.nil? command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? command.query['pageToken'] = page_token unless page_token.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['includeSystemManaged'] = include_system_managed unless include_system_managed.nil? + command.query['pageSize'] = page_size unless page_size.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -98,11 +339,11 @@ module Google # @param [String] resource_name # Name of the media that is being downloaded. See # ReadRequest.resource_name. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [IO, String] download_dest # IO stream or filename to receive content download # @param [Google::Apis::RequestOptions] options @@ -117,7 +358,7 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def download_medium(resource_name, quota_user: nil, fields: nil, download_dest: nil, options: nil, &block) + def download_medium(resource_name, fields: nil, quota_user: nil, download_dest: nil, options: nil, &block) if download_dest.nil? command = make_simple_command(:get, 'v1/media/{+resourceName}', options) else @@ -127,249 +368,8 @@ module Google command.response_representation = Google::Apis::YoutubereportingV1::Media::Representation command.response_class = Google::Apis::YoutubereportingV1::Media command.params['resourceName'] = resource_name unless resource_name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Creates a job and returns it. - # @param [Google::Apis::YoutubereportingV1::Job] job_object - # @param [String] on_behalf_of_content_owner - # The content owner's external ID on which behalf the user is acting on. If - # not set, the user is acting for himself (his own channel). - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::YoutubereportingV1::Job] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::YoutubereportingV1::Job] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_job(job_object = nil, on_behalf_of_content_owner: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/jobs', options) - command.request_representation = Google::Apis::YoutubereportingV1::Job::Representation - command.request_object = job_object - command.response_representation = Google::Apis::YoutubereportingV1::Job::Representation - command.response_class = Google::Apis::YoutubereportingV1::Job - command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Gets a job. - # @param [String] job_id - # The ID of the job to retrieve. - # @param [String] on_behalf_of_content_owner - # The content owner's external ID on which behalf the user is acting on. If - # not set, the user is acting for himself (his own channel). - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::YoutubereportingV1::Job] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::YoutubereportingV1::Job] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_job(job_id, on_behalf_of_content_owner: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/jobs/{jobId}', options) - command.response_representation = Google::Apis::YoutubereportingV1::Job::Representation - command.response_class = Google::Apis::YoutubereportingV1::Job - command.params['jobId'] = job_id unless job_id.nil? - command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Lists jobs. - # @param [Fixnum] page_size - # Requested page size. Server may return fewer jobs than requested. - # If unspecified, server will pick an appropriate default. - # @param [Boolean] include_system_managed - # If set to true, also system-managed jobs will be returned; otherwise only - # user-created jobs will be returned. System-managed jobs can neither be - # modified nor deleted. - # @param [String] on_behalf_of_content_owner - # The content owner's external ID on which behalf the user is acting on. If - # not set, the user is acting for himself (his own channel). - # @param [String] page_token - # A token identifying a page of results the server should return. Typically, - # this is the value of - # ListReportTypesResponse.next_page_token - # returned in response to the previous call to the `ListJobs` method. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::YoutubereportingV1::ListJobsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::YoutubereportingV1::ListJobsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_jobs(page_size: nil, include_system_managed: nil, on_behalf_of_content_owner: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/jobs', options) - command.response_representation = Google::Apis::YoutubereportingV1::ListJobsResponse::Representation - command.response_class = Google::Apis::YoutubereportingV1::ListJobsResponse - command.query['pageSize'] = page_size unless page_size.nil? - command.query['includeSystemManaged'] = include_system_managed unless include_system_managed.nil? - command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a job. - # @param [String] job_id - # The ID of the job to delete. - # @param [String] on_behalf_of_content_owner - # The content owner's external ID on which behalf the user is acting on. If - # not set, the user is acting for himself (his own channel). - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::YoutubereportingV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::YoutubereportingV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_job(job_id, on_behalf_of_content_owner: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/jobs/{jobId}', options) - command.response_representation = Google::Apis::YoutubereportingV1::Empty::Representation - command.response_class = Google::Apis::YoutubereportingV1::Empty - command.params['jobId'] = job_id unless job_id.nil? - command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Gets the metadata of a specific report. - # @param [String] job_id - # The ID of the job. - # @param [String] report_id - # The ID of the report to retrieve. - # @param [String] on_behalf_of_content_owner - # The content owner's external ID on which behalf the user is acting on. If - # not set, the user is acting for himself (his own channel). - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::YoutubereportingV1::Report] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::YoutubereportingV1::Report] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_job_report(job_id, report_id, on_behalf_of_content_owner: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/jobs/{jobId}/reports/{reportId}', options) - command.response_representation = Google::Apis::YoutubereportingV1::Report::Representation - command.response_class = Google::Apis::YoutubereportingV1::Report - command.params['jobId'] = job_id unless job_id.nil? - command.params['reportId'] = report_id unless report_id.nil? - command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Lists reports created by a specific job. - # Returns NOT_FOUND if the job does not exist. - # @param [String] job_id - # The ID of the job. - # @param [String] on_behalf_of_content_owner - # The content owner's external ID on which behalf the user is acting on. If - # not set, the user is acting for himself (his own channel). - # @param [String] start_time_at_or_after - # If set, only reports whose start time is greater than or equal the - # specified date/time are returned. - # @param [String] start_time_before - # If set, only reports whose start time is smaller than the specified - # date/time are returned. - # @param [Fixnum] page_size - # Requested page size. Server may return fewer report types than requested. - # If unspecified, server will pick an appropriate default. - # @param [String] created_after - # If set, only reports created after the specified date/time are returned. - # @param [String] page_token - # A token identifying a page of results the server should return. Typically, - # this is the value of - # ListReportsResponse.next_page_token - # returned in response to the previous call to the `ListReports` method. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::YoutubereportingV1::ListReportsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::YoutubereportingV1::ListReportsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_job_reports(job_id, on_behalf_of_content_owner: nil, start_time_at_or_after: nil, start_time_before: nil, page_size: nil, created_after: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/jobs/{jobId}/reports', options) - command.response_representation = Google::Apis::YoutubereportingV1::ListReportsResponse::Representation - command.response_class = Google::Apis::YoutubereportingV1::ListReportsResponse - command.params['jobId'] = job_id unless job_id.nil? - command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? - command.query['startTimeAtOrAfter'] = start_time_at_or_after unless start_time_at_or_after.nil? - command.query['startTimeBefore'] = start_time_before unless start_time_before.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['createdAfter'] = created_after unless created_after.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end diff --git a/script/generate b/script/generate index e0257a8b9..47a77e40e 100755 --- a/script/generate +++ b/script/generate @@ -6,105 +6,107 @@ DIR=$(dirname $( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )) API_IDS=(adexchangebuyer:v1.4 \ adexchangebuyer2:v2beta1 \ - adexchangeseller:v2.0 \ - admin:directory_v1 \ - admin:datatransfer_v1 \ - admin:reports_v1 \ - adsense:v1.4 \ - adsensehost:v4.1 \ - analytics:v3 \ - analyticsreporting:v4 \ - androidenterprise:v1 \ - androidpublisher:v2 \ - appengine:v1beta5 \ - appsactivity:v1 \ - appstate:v1 \ - autoscaler:v1beta2 \ - bigquery:v2 \ - blogger:v3 \ - books:v1 \ - calendar:v3 \ - civicinfo:v2 \ - classroom:v1 \ - cloudbilling:v1 \ - cloudbuild:v1 \ - clouddebugger:v2 \ - cloudlatencytest:v2 \ - cloudmonitoring:v2beta2 \ - cloudresourcemanager:v1beta1 \ - cloudresourcemanager:v1 \ - cloudtrace:v1 \ - clouduseraccounts:beta \ - compute:v1 \ - compute:beta \ - container:v1 \ - content:v2 \ - coordinate:v1 \ - customsearch:v1 \ - dataflow:v1b3 \ + adexchangeseller:v2.0 \ + admin:directory_v1 \ + admin:datatransfer_v1 \ + admin:reports_v1 \ + adsense:v1.4 \ + adsensehost:v4.1 \ + analytics:v3 \ + analyticsreporting:v4 \ + androidenterprise:v1 \ + androidpublisher:v2 \ + appengine:v1beta5 \ + appsactivity:v1 \ + appstate:v1 \ + autoscaler:v1beta2 \ + bigquery:v2 \ + blogger:v3 \ + books:v1 \ + calendar:v3 \ + civicinfo:v2 \ + classroom:v1 \ + cloudbilling:v1 \ + cloudbuild:v1 \ + clouddebugger:v2 \ + cloudkms:v1beta1 \ + cloudlatencytest:v2 \ + cloudmonitoring:v2beta2 \ + cloudresourcemanager:v1beta1 \ + cloudresourcemanager:v1 \ + cloudtrace:v1 \ + clouduseraccounts:beta \ + compute:v1 \ + compute:beta \ + container:v1 \ + content:v2 \ + coordinate:v1 \ + customsearch:v1 \ + dataflow:v1b3 \ dataproc:v1 \ - datastore:v1 \ - deploymentmanager:v2 \ - dfareporting:v2.6 \ - dfareporting:v2.7 \ - discovery:v1 \ - dns:v1 \ - dns:v2beta1 \ - doubleclickbidmanager:v1 \ - doubleclicksearch:v2 \ - drive:v2 \ - drive:v3 \ - fitness:v1 \ - fusiontables:v2 \ - games:v1 \ - gamesConfiguration:v1configuration \ - gamesManagement:v1management \ - gan:v1beta1 \ - genomics:v1 \ - gmail:v1 \ - groupsmigration:v1 \ - groupssettings:v1 \ - iam:v1 \ - identitytoolkit:v3 \ - kgsearch:v1 \ - language:v1beta1 \ - licensing:v1 \ - logging:v2beta1 \ - manager:v1beta2 \ - mapsengine:v1 \ - mirror:v1 \ - oauth2:v2 \ - pagespeedonline:v2 \ - partners:v2 \ - people:v1 \ - plus:v1 \ - plusDomains:v1 \ - prediction:v1.6 \ - proximitybeacon:v1beta1 \ - pubsub:v1 \ - qpxExpress:v1 \ - replicapool:v1beta2 \ - replicapoolupdater:v1beta1 \ - reseller:v1 \ - resourceviews:v1beta2 \ - script:v1 \ - sheets:v4 \ - siteVerification:v1 \ - slides:v1 \ - speech:v1beta1 \ - sqladmin:v1beta4 \ - storage:v1 \ - storagetransfer:v1 \ - tagmanager:v1 \ - taskqueue:v1beta2 \ - tasks:v1 \ - translate:v2 \ - urlshortener:v1 \ - vision:v1 \ - webmasters:v3 \ - youtube:v3 \ - youtubeAnalytics:v1 \ - youtubereporting:v1 \ + datastore:v1 \ + deploymentmanager:v2 \ + dfareporting:v2.6 \ + dfareporting:v2.7 \ + discovery:v1 \ + dns:v1 \ + dns:v2beta1 \ + doubleclickbidmanager:v1 \ + doubleclicksearch:v2 \ + drive:v2 \ + drive:v3 \ + fitness:v1 \ + fusiontables:v2 \ + games:v1 \ + gamesConfiguration:v1configuration \ + gamesManagement:v1management \ + gan:v1beta1 \ + genomics:v1 \ + gmail:v1 \ + groupsmigration:v1 \ + groupssettings:v1 \ + iam:v1 \ + identitytoolkit:v3 \ + kgsearch:v1 \ + language:v1beta1 \ + licensing:v1 \ + logging:v2beta1 \ + manager:v1beta2 \ + manufacturers:v1 \ + mapsengine:v1 \ + mirror:v1 \ + oauth2:v2 \ + pagespeedonline:v2 \ + partners:v2 \ + people:v1 \ + plus:v1 \ + plusDomains:v1 \ + prediction:v1.6 \ + proximitybeacon:v1beta1 \ + pubsub:v1 \ + qpxExpress:v1 \ + replicapool:v1beta2 \ + replicapoolupdater:v1beta1 \ + reseller:v1 \ + resourceviews:v1beta2 \ + script:v1 \ + sheets:v4 \ + siteVerification:v1 \ + slides:v1 \ + speech:v1beta1 \ + sqladmin:v1beta4 \ + storage:v1 \ + storagetransfer:v1 \ + tagmanager:v1 \ + taskqueue:v1beta2 \ + tasks:v1 \ + translate:v2 \ + urlshortener:v1 \ + vision:v1 \ + webmasters:v3 \ + youtube:v3 \ + youtubeAnalytics:v1 \ + youtubereporting:v1 \ ) URLS=(https://content.googleapis.com/discovery/v1/apis/youtubePartner/v1/rest \