Regen APIs (#527)

Add `cloudkms:v1beta1` and `manufacturers:v1` APIs.
This commit is contained in:
Sai Cheemalapati 2017-01-27 19:38:40 -08:00 committed by GitHub
parent 2634c95e95
commit 88c64fe87e
77 changed files with 27214 additions and 23135 deletions

View File

@ -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

View File

@ -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

View File

@ -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'

View File

@ -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<Google::Apis::Adexchangebuyer2V2beta1::Client>]
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<Google::Apis::Adexchangebuyer2V2beta1::ClientUser>]
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<Google::Apis::Adexchangebuyer2V2beta1::ClientUser>]
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&mdash;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<Google::Apis::Adexchangebuyer2V2beta1::Client>]
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

View File

@ -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

View File

@ -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

View File

@ -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'

View File

@ -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'

View File

@ -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'

View File

@ -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'

View File

@ -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<String>]
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<Google::Apis::CloudbuildV1::BuildStep>]
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<Google::Apis::CloudbuildV1::BuiltImage>]
attr_accessor :images
# List of build step digests, in order corresponding to build step indices.
# Corresponds to the JSON property `buildStepImages`
# @return [Array<String>]
attr_accessor :build_step_images
# Images that were built as a part of the build.
# Corresponds to the JSON property `images`
# @return [Array<Google::Apis::CloudbuildV1::BuiltImage>]
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<String,Object>]
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<String,Object>]
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<String,Object>]
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<String>]
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<String>]
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<String>]
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<String>]
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<String>]
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<String>]
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<String>]
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<Google::Apis::CloudbuildV1::BuildStep>]
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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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<String>]
attr_accessor :members
# Role that is assigned to `members`.
# For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
# Required
# Corresponds to the JSON property `role`
# @return [String]
attr_accessor :role
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@members = args[:members] if args.key?(:members)
@role = args[:role] if args.key?(:role)
end
end
# 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<Google::Apis::CloudkmsV1beta1::CryptoKeyVersion>]
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<String>]
attr_accessor :permissions
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@permissions = args[:permissions] if args.key?(:permissions)
end
end
# 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<Google::Apis::CloudkmsV1beta1::LogConfig>]
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<String>]
attr_accessor :in
# A permission is a string of form '<service>.<resource type>.<verb>'
# (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<String>]
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<String>]
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<Google::Apis::CloudkmsV1beta1::Condition>]
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<String,String>]
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<String,Object>]
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<Google::Apis::CloudkmsV1beta1::CryptoKey>]
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<String>]
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<String>]
attr_accessor :exempted_members
# The log type that this config enables.
# Corresponds to the JSON property `logType`
# @return [String]
attr_accessor :log_type
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@exempted_members = args[:exempted_members] if args.key?(:exempted_members)
@log_type = args[:log_type] if args.key?(:log_type)
end
end
# 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<String>]
attr_accessor :permissions
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@permissions = args[:permissions] if args.key?(:permissions)
end
end
# 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<Google::Apis::CloudkmsV1beta1::Rule>]
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<Google::Apis::CloudkmsV1beta1::AuditConfig>]
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<Google::Apis::CloudkmsV1beta1::Binding>]
attr_accessor :bindings
# `etag` is used for optimistic concurrency control as a way to help
# prevent simultaneous updates of a policy from overwriting each other.
# It is strongly suggested that systems make use of the `etag` in the
# read-modify-write cycle to perform policy updates in order to avoid race
# conditions: An `etag` is returned in the response to `getIamPolicy`, and
# systems are expected to put that etag in the request to `setIamPolicy` to
# ensure that their change will be applied to the same version of the policy.
# If no `etag` is provided in the call to `setIamPolicy`, then the existing
# policy is overwritten blindly.
# Corresponds to the JSON property `etag`
# @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<Google::Apis::CloudkmsV1beta1::Location>]
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<Google::Apis::CloudkmsV1beta1::KeyRing>]
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<Google::Apis::CloudkmsV1beta1::AuditLogConfig>]
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<String>]
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

View File

@ -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

View File

@ -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

View File

@ -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

File diff suppressed because it is too large Load Diff

View File

@ -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

View File

@ -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

View File

@ -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

File diff suppressed because it is too large Load Diff

View File

@ -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

View File

@ -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`
# + <code>labels.<em>key</em></code> 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&nbsp;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`
# + <code>labels.<em>key</em></code> 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&nbsp;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

View File

@ -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'

View File

@ -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<Google::Apis::ContainerV1::NodePool>]
@ -142,6 +141,16 @@ module Google
# @return [Array<String>]
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<String>]
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<String,String>]
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<String,String>]
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<String>]
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<String>]
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<String>]
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<String>]
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<String>]
attr_accessor :valid_image_families
attr_accessor :valid_image_types
# List of valid master versions.
# Corresponds to the JSON property `validMasterVersions`
# @return [Array<String>]
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

View File

@ -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

View File

@ -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

View File

@ -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'

View File

@ -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'

View File

@ -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'

View File

@ -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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -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/'

View File

@ -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'

File diff suppressed because it is too large Load Diff

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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<Google::Apis::ManufacturersV1::Product>]
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<String>]
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<String>]
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<String>]
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<Google::Apis::ManufacturersV1::Issue>]
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

View File

@ -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

View File

@ -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

View File

@ -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

File diff suppressed because it is too large Load Diff

View File

@ -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

File diff suppressed because it is too large Load Diff

View File

@ -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'

View File

@ -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'

View File

@ -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

View File

@ -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<Google::Apis::PubsubV1::Message>]
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<String>]
attr_accessor :permissions
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@permissions = args[:permissions] if args.key?(:permissions)
end
end
# Response 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<String>]
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<Google::Apis::PubsubV1::Subscription>]
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<String>]
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<String>]
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<String,String>]
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<Google::Apis::PubsubV1::ReceivedMessage>]
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<String>]
attr_accessor :members
# Role that is assigned to `members`.
# For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
# Required
# Corresponds to the JSON property `role`
# @return [String]
attr_accessor :role
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@members = args[:members] if args.key?(:members)
@role = args[:role] if args.key?(:role)
end
end
# 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<Google::Apis::PubsubV1::Topic>]
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<Google::Apis::PubsubV1::Topic>]
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<String>]
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<String>]
attr_accessor :members
# Role that is assigned to `members`.
# For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
# Required
# Corresponds to the JSON property `role`
# @return [String]
attr_accessor :role
# 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<Google::Apis::PubsubV1::ReceivedMessage>]
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<String,String>]
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<String>]
attr_accessor :permissions
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@permissions = args[:permissions] if args.key?(:permissions)
end
end
# 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<Google::Apis::PubsubV1::Subscription>]
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<Google::Apis::PubsubV1::Message>]
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<String>]
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<String>]
attr_accessor :permissions
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@permissions = args[:permissions] if args.key?(:permissions)
end
end
end

View File

@ -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

View File

@ -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

View File

@ -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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -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>, 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>, 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

View File

@ -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'

View File

@ -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<Hash<String,Object>>]
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<String,Object>]
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<Google::Apis::SpeechV1beta1::SpeechRecognitionAlternative>]
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<Hash<String,Object>>]
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<Google::Apis::SpeechV1beta1::Operation>]
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<Google::Apis::SpeechV1beta1::Operation>]
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<Google::Apis::SpeechV1beta1::SpeechRecognitionAlternative>]
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

View File

@ -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

View File

@ -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

View File

@ -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'

View File

@ -1609,6 +1609,17 @@ module Google
# @return [Array<String>]
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

View File

@ -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

View File

@ -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'

File diff suppressed because it is too large Load Diff

View File

@ -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

View File

@ -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

View File

@ -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'

View File

@ -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'

View File

@ -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'

View File

@ -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<Google::Apis::YoutubereportingV1::Job>]
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<Google::Apis::YoutubereportingV1::Report>]
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<Google::Apis::YoutubereportingV1::Job>]
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<Google::Apis::YoutubereportingV1::Report>]
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

View File

@ -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

View File

@ -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

View File

@ -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 \