diff --git a/CHANGELOG.md b/CHANGELOG.md index 02eb92afc..680bfca35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# 0.10.2 +* Regenerate APIs + # 0.10.1 * Regenerate APIs * Add `cloudkms:v1` diff --git a/api_names.yaml b/api_names.yaml index 32058f830..6fa76328f 100644 --- a/api_names.yaml +++ b/api_names.yaml @@ -37747,3 +37747,398 @@ "/vision:v1/DetectedLanguage": detected_language "/vision:v1/DetectedLanguage/languageCode": language_code "/vision:v1/DetectedLanguage/confidence": confidence +"/youtubePartner:v1/youtubePartner.package.insert": insert_package +"/youtubePartner:v1/youtubePartner.package.insert/onBehalfOfContentOwner": on_behalf_of_content_owner +"/youtubePartner:v1/Package": package +"/youtubePartner:v1/Package/content": content +"/youtubePartner:v1/Package/id": id +"/youtubePartner:v1/Package/kind": kind +"/youtubePartner:v1/Package/locale": locale +"/youtubePartner:v1/Package/uploaderName": uploader_name +"/youtubePartner:v1/PackageInsertResponse": package_insert_response +"/youtubePartner:v1/PackageInsertResponse/errors": errors +"/youtubePartner:v1/PackageInsertResponse/errors/error": error +"/youtubePartner:v1/PackageInsertResponse/kind": kind +"/youtubePartner:v1/PackageInsertResponse/resource": resource +"/compute:beta/compute.subnetworks.setPrivateIpGoogleAccess": set_subnetwork_private_ip_google_access +"/compute:beta/compute.subnetworks.setPrivateIpGoogleAccess/project": project +"/compute:beta/compute.subnetworks.setPrivateIpGoogleAccess/region": region +"/compute:beta/compute.subnetworks.setPrivateIpGoogleAccess/subnetwork": subnetwork +"/compute:beta/Firewall/denied": denied +"/compute:beta/Firewall/denied/denied": denied +"/compute:beta/Firewall/denied/denied/IPProtocol": ip_protocol +"/compute:beta/Firewall/denied/denied/ports": ports +"/compute:beta/Firewall/denied/denied/ports/port": port +"/compute:beta/Firewall/destinationRanges": destination_ranges +"/compute:beta/Firewall/destinationRanges/destination_range": destination_range +"/compute:beta/Firewall/direction": direction +"/compute:beta/Firewall/priority": priority +"/compute:beta/ManagedInstance/version": version +"/compute:beta/ManagedInstanceVersion": managed_instance_version +"/compute:beta/ManagedInstanceVersion/instanceTemplate": instance_template +"/compute:beta/ManagedInstanceVersion/name": name +"/compute:beta/SubnetworksSetPrivateIpGoogleAccessRequest": subnetworks_set_private_ip_google_access_request +"/compute:beta/SubnetworksSetPrivateIpGoogleAccessRequest/privateIpGoogleAccess": private_ip_google_access +"/admin:directory_v1/User/posixAccounts": posix_accounts +"/admin:directory_v1/User/sshPublicKeys": ssh_public_keys +"/admin:directory_v1/UserPosixAccount": user_posix_account +"/admin:directory_v1/UserPosixAccount/gecos": gecos +"/admin:directory_v1/UserPosixAccount/gid": gid +"/admin:directory_v1/UserPosixAccount/homeDirectory": home_directory +"/admin:directory_v1/UserPosixAccount/primary": primary +"/admin:directory_v1/UserPosixAccount/shell": shell +"/admin:directory_v1/UserPosixAccount/systemId": system_id +"/admin:directory_v1/UserPosixAccount/uid": uid +"/admin:directory_v1/UserPosixAccount/username": username +"/admin:directory_v1/UserSshPublicKey": user_ssh_public_key +"/admin:directory_v1/UserSshPublicKey/expirationTimeUsec": expiration_time_usec +"/admin:directory_v1/UserSshPublicKey/fingerprint": fingerprint +"/admin:directory_v1/UserSshPublicKey/key": key +"/analytics:v3/analytics.management.remarketingAudience.delete": delete_management_remarketing_audience +"/analytics:v3/analytics.management.remarketingAudience.delete/accountId": account_id +"/analytics:v3/analytics.management.remarketingAudience.delete/remarketingAudienceId": remarketing_audience_id +"/analytics:v3/analytics.management.remarketingAudience.delete/webPropertyId": web_property_id +"/bigquery:v2/bigquery.tabledata.list/selectedFields": selected_fields +"/bigquery:v2/bigquery.tables.get/selectedFields": selected_fields +"/calendar:v3/DeepLinkData": deep_link_data +"/calendar:v3/DeepLinkData/links": links +"/calendar:v3/DeepLinkData/links/link": link +"/calendar:v3/DeepLinkData/url": url +"/calendar:v3/DisplayInfo": display_info +"/calendar:v3/DisplayInfo/appIconUrl": app_icon_url +"/calendar:v3/DisplayInfo/appShortTitle": app_short_title +"/calendar:v3/DisplayInfo/appTitle": app_title +"/calendar:v3/DisplayInfo/linkShortTitle": link_short_title +"/calendar:v3/DisplayInfo/linkTitle": link_title +"/calendar:v3/EventHabitInstance": event_habit_instance +"/calendar:v3/EventHabitInstance/data": data +"/calendar:v3/EventHabitInstance/parentId": parent_id +"/calendar:v3/HabitInstanceData": habit_instance_data +"/calendar:v3/HabitInstanceData/status": status +"/calendar:v3/HabitInstanceData/statusInferred": status_inferred +"/calendar:v3/HabitInstanceData/type": type +"/calendar:v3/LaunchInfo": launch_info +"/calendar:v3/LaunchInfo/appId": app_id +"/calendar:v3/LaunchInfo/installUrl": install_url +"/calendar:v3/LaunchInfo/intentAction": intent_action +"/calendar:v3/LaunchInfo/uri": uri +"/calendar:v3/Link": link +"/calendar:v3/Link/applinkingSource": applinking_source +"/calendar:v3/Link/displayInfo": display_info +"/calendar:v3/Link/launchInfo": launch_info +"/calendar:v3/Link/platform": platform +"/calendar:v3/Link/url": url +"/cloudresourcemanager:v1/cloudresourcemanager.folders.setOrgPolicyV1": set_folder_org_policy_v1 +"/cloudresourcemanager:v1/cloudresourcemanager.folders.setOrgPolicyV1/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.folders.getEffectiveOrgPolicyV1": get_folder_effective_org_policy_v1 +"/cloudresourcemanager:v1/cloudresourcemanager.folders.getEffectiveOrgPolicyV1/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.folders.clearOrgPolicy": clear_folder_org_policy +"/cloudresourcemanager:v1/cloudresourcemanager.folders.clearOrgPolicy/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.folders.setOrgPolicy": set_folder_org_policy +"/cloudresourcemanager:v1/cloudresourcemanager.folders.setOrgPolicy/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.folders.clearOrgPolicyV1": clear_folder_org_policy_v1 +"/cloudresourcemanager:v1/cloudresourcemanager.folders.clearOrgPolicyV1/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.folders.listOrgPolicies": list_folder_org_policies +"/cloudresourcemanager:v1/cloudresourcemanager.folders.listOrgPolicies/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.folders.listAvailableOrgPolicyConstraints": list_folder_available_org_policy_constraints +"/cloudresourcemanager:v1/cloudresourcemanager.folders.listAvailableOrgPolicyConstraints/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.folders.getOrgPolicy": get_folder_org_policy +"/cloudresourcemanager:v1/cloudresourcemanager.folders.getOrgPolicy/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.folders.getEffectiveOrgPolicy": get_folder_effective_org_policy +"/cloudresourcemanager:v1/cloudresourcemanager.folders.getEffectiveOrgPolicy/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.folders.getOrgPolicyV1": get_folder_org_policy_v1 +"/cloudresourcemanager:v1/cloudresourcemanager.folders.getOrgPolicyV1/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.projects.listAvailableOrgPolicyConstraints": list_project_available_org_policy_constraints +"/cloudresourcemanager:v1/cloudresourcemanager.projects.listAvailableOrgPolicyConstraints/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.projects.getOrgPolicy": get_project_org_policy +"/cloudresourcemanager:v1/cloudresourcemanager.projects.getOrgPolicy/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.projects.getEffectiveOrgPolicy": get_project_effective_org_policy +"/cloudresourcemanager:v1/cloudresourcemanager.projects.getEffectiveOrgPolicy/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.projects.getOrgPolicyV1": get_project_org_policy_v1 +"/cloudresourcemanager:v1/cloudresourcemanager.projects.getOrgPolicyV1/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.projects.setOrgPolicyV1": set_project_org_policy_v1 +"/cloudresourcemanager:v1/cloudresourcemanager.projects.setOrgPolicyV1/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.projects.setOrgPolicy": set_project_org_policy +"/cloudresourcemanager:v1/cloudresourcemanager.projects.setOrgPolicy/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.projects.clearOrgPolicyV1": clear_project_org_policy_v1 +"/cloudresourcemanager:v1/cloudresourcemanager.projects.clearOrgPolicyV1/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.projects.listOrgPolicies": list_project_org_policies +"/cloudresourcemanager:v1/cloudresourcemanager.projects.listOrgPolicies/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.projects.getEffectiveOrgPolicyV1": get_project_effective_org_policy_v1 +"/cloudresourcemanager:v1/cloudresourcemanager.projects.getEffectiveOrgPolicyV1/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.projects.clearOrgPolicy": clear_project_org_policy +"/cloudresourcemanager:v1/cloudresourcemanager.projects.clearOrgPolicy/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.listOrgPolicies": list_organization_org_policies +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.listOrgPolicies/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.getEffectiveOrgPolicyV1": get_organization_effective_org_policy_v1 +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.getEffectiveOrgPolicyV1/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.clearOrgPolicy": clear_organization_org_policy +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.clearOrgPolicy/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.listAvailableOrgPolicyConstraints": list_organization_available_org_policy_constraints +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.listAvailableOrgPolicyConstraints/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.getOrgPolicy": get_organization_org_policy +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.getOrgPolicy/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.getEffectiveOrgPolicy": get_organization_effective_org_policy +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.getEffectiveOrgPolicy/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.getOrgPolicyV1": get_organization_org_policy_v1 +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.getOrgPolicyV1/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.setOrgPolicyV1": set_organization_org_policy_v1 +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.setOrgPolicyV1/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.setOrgPolicy": set_organization_org_policy +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.setOrgPolicy/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.clearOrgPolicyV1": clear_organization_org_policy_v1 +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.clearOrgPolicyV1/resource": resource +"/cloudresourcemanager:v1/ListConstraint": list_constraint +"/cloudresourcemanager:v1/ListConstraint/suggestedValue": suggested_value +"/cloudresourcemanager:v1/SetOrgPolicyRequest": set_org_policy_request +"/cloudresourcemanager:v1/SetOrgPolicyRequest/policy": policy +"/cloudresourcemanager:v1/ListAvailableOrgPolicyConstraintsResponse": list_available_org_policy_constraints_response +"/cloudresourcemanager:v1/ListAvailableOrgPolicyConstraintsResponse/nextPageToken": next_page_token +"/cloudresourcemanager:v1/ListAvailableOrgPolicyConstraintsResponse/constraints": constraints +"/cloudresourcemanager:v1/ListAvailableOrgPolicyConstraintsResponse/constraints/constraint": constraint +"/cloudresourcemanager:v1/ListPolicy": list_policy +"/cloudresourcemanager:v1/ListPolicy/allowedValues": allowed_values +"/cloudresourcemanager:v1/ListPolicy/allowedValues/allowed_value": allowed_value +"/cloudresourcemanager:v1/ListPolicy/suggestedValue": suggested_value +"/cloudresourcemanager:v1/ListPolicy/inheritFromParent": inherit_from_parent +"/cloudresourcemanager:v1/ListPolicy/deniedValues": denied_values +"/cloudresourcemanager:v1/ListPolicy/deniedValues/denied_value": denied_value +"/cloudresourcemanager:v1/ListPolicy/allValues": all_values +"/cloudresourcemanager:v1/ListAvailableOrgPolicyConstraintsRequest": list_available_org_policy_constraints_request +"/cloudresourcemanager:v1/ListAvailableOrgPolicyConstraintsRequest/pageToken": page_token +"/cloudresourcemanager:v1/ListAvailableOrgPolicyConstraintsRequest/pageSize": page_size +"/cloudresourcemanager:v1/GetEffectiveOrgPolicyRequest": get_effective_org_policy_request +"/cloudresourcemanager:v1/GetEffectiveOrgPolicyRequest/constraint": constraint +"/cloudresourcemanager:v1/ListOrgPoliciesRequest": list_org_policies_request +"/cloudresourcemanager:v1/ListOrgPoliciesRequest/pageToken": page_token +"/cloudresourcemanager:v1/ListOrgPoliciesRequest/pageSize": page_size +"/cloudresourcemanager:v1/Constraint": constraint +"/cloudresourcemanager:v1/Constraint/version": version +"/cloudresourcemanager:v1/Constraint/listConstraint": list_constraint +"/cloudresourcemanager:v1/Constraint/displayName": display_name +"/cloudresourcemanager:v1/Constraint/description": description +"/cloudresourcemanager:v1/Constraint/booleanConstraint": boolean_constraint +"/cloudresourcemanager:v1/Constraint/constraintDefault": constraint_default +"/cloudresourcemanager:v1/Constraint/name": name +"/cloudresourcemanager:v1/RestoreDefault": restore_default +"/cloudresourcemanager:v1/GetOrgPolicyRequest": get_org_policy_request +"/cloudresourcemanager:v1/GetOrgPolicyRequest/constraint": constraint +"/cloudresourcemanager:v1/ClearOrgPolicyRequest": clear_org_policy_request +"/cloudresourcemanager:v1/ClearOrgPolicyRequest/etag": etag +"/cloudresourcemanager:v1/ClearOrgPolicyRequest/constraint": constraint +"/cloudresourcemanager:v1/BooleanConstraint": boolean_constraint +"/cloudresourcemanager:v1/ListOrgPoliciesResponse": list_org_policies_response +"/cloudresourcemanager:v1/ListOrgPoliciesResponse/nextPageToken": next_page_token +"/cloudresourcemanager:v1/ListOrgPoliciesResponse/policies": policies +"/cloudresourcemanager:v1/ListOrgPoliciesResponse/policies/policy": policy +"/cloudresourcemanager:v1/OrgPolicy": org_policy +"/cloudresourcemanager:v1/OrgPolicy/etag": etag +"/cloudresourcemanager:v1/OrgPolicy/booleanPolicy": boolean_policy +"/cloudresourcemanager:v1/OrgPolicy/constraint": constraint +"/cloudresourcemanager:v1/OrgPolicy/updateTime": update_time +"/cloudresourcemanager:v1/OrgPolicy/version": version +"/cloudresourcemanager:v1/OrgPolicy/restoreDefault": restore_default +"/cloudresourcemanager:v1/OrgPolicy/listPolicy": list_policy +"/cloudresourcemanager:v1/BooleanPolicy": boolean_policy +"/cloudresourcemanager:v1/BooleanPolicy/enforced": enforced +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.clearOrgPolicy": clear_organization_org_policy +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.clearOrgPolicy/resource": resource +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.listAvailableOrgPolicyConstraints": list_organization_available_org_policy_constraints +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.listAvailableOrgPolicyConstraints/resource": resource +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.getOrgPolicy": get_organization_org_policy +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.getOrgPolicy/resource": resource +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.getOrgPolicyV1": get_organization_org_policy_v1 +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.getOrgPolicyV1/resource": resource +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.getEffectiveOrgPolicy": get_organization_effective_org_policy +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.getEffectiveOrgPolicy/resource": resource +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.setOrgPolicyV1": set_organization_org_policy_v1 +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.setOrgPolicyV1/resource": resource +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.setOrgPolicy": set_organization_org_policy +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.setOrgPolicy/resource": resource +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.clearOrgPolicyV1": clear_organization_org_policy_v1 +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.clearOrgPolicyV1/resource": resource +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.listOrgPolicies": list_organization_org_policies +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.listOrgPolicies/resource": resource +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.getEffectiveOrgPolicyV1": get_organization_effective_org_policy_v1 +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.getEffectiveOrgPolicyV1/resource": resource +"/cloudresourcemanager:v1beta1/ClearOrgPolicyRequest": clear_org_policy_request +"/cloudresourcemanager:v1beta1/ClearOrgPolicyRequest/etag": etag +"/cloudresourcemanager:v1beta1/ClearOrgPolicyRequest/constraint": constraint +"/cloudresourcemanager:v1beta1/BooleanConstraint": boolean_constraint +"/cloudresourcemanager:v1beta1/ListOrgPoliciesResponse": list_org_policies_response +"/cloudresourcemanager:v1beta1/ListOrgPoliciesResponse/policies": policies +"/cloudresourcemanager:v1beta1/ListOrgPoliciesResponse/policies/policy": policy +"/cloudresourcemanager:v1beta1/ListOrgPoliciesResponse/nextPageToken": next_page_token +"/cloudresourcemanager:v1beta1/OrgPolicy": org_policy +"/cloudresourcemanager:v1beta1/OrgPolicy/version": version +"/cloudresourcemanager:v1beta1/OrgPolicy/restoreDefault": restore_default +"/cloudresourcemanager:v1beta1/OrgPolicy/listPolicy": list_policy +"/cloudresourcemanager:v1beta1/OrgPolicy/etag": etag +"/cloudresourcemanager:v1beta1/OrgPolicy/constraint": constraint +"/cloudresourcemanager:v1beta1/OrgPolicy/booleanPolicy": boolean_policy +"/cloudresourcemanager:v1beta1/OrgPolicy/updateTime": update_time +"/cloudresourcemanager:v1beta1/BooleanPolicy": boolean_policy +"/cloudresourcemanager:v1beta1/BooleanPolicy/enforced": enforced +"/cloudresourcemanager:v1beta1/ListConstraint": list_constraint +"/cloudresourcemanager:v1beta1/ListConstraint/suggestedValue": suggested_value +"/cloudresourcemanager:v1beta1/SetOrgPolicyRequest": set_org_policy_request +"/cloudresourcemanager:v1beta1/SetOrgPolicyRequest/policy": policy +"/cloudresourcemanager:v1beta1/ListAvailableOrgPolicyConstraintsResponse": list_available_org_policy_constraints_response +"/cloudresourcemanager:v1beta1/ListAvailableOrgPolicyConstraintsResponse/nextPageToken": next_page_token +"/cloudresourcemanager:v1beta1/ListAvailableOrgPolicyConstraintsResponse/constraints": constraints +"/cloudresourcemanager:v1beta1/ListAvailableOrgPolicyConstraintsResponse/constraints/constraint": constraint +"/cloudresourcemanager:v1beta1/ListPolicy": list_policy +"/cloudresourcemanager:v1beta1/ListPolicy/allValues": all_values +"/cloudresourcemanager:v1beta1/ListPolicy/allowedValues": allowed_values +"/cloudresourcemanager:v1beta1/ListPolicy/allowedValues/allowed_value": allowed_value +"/cloudresourcemanager:v1beta1/ListPolicy/suggestedValue": suggested_value +"/cloudresourcemanager:v1beta1/ListPolicy/inheritFromParent": inherit_from_parent +"/cloudresourcemanager:v1beta1/ListPolicy/deniedValues": denied_values +"/cloudresourcemanager:v1beta1/ListPolicy/deniedValues/denied_value": denied_value +"/cloudresourcemanager:v1beta1/ListAvailableOrgPolicyConstraintsRequest": list_available_org_policy_constraints_request +"/cloudresourcemanager:v1beta1/ListAvailableOrgPolicyConstraintsRequest/pageToken": page_token +"/cloudresourcemanager:v1beta1/ListAvailableOrgPolicyConstraintsRequest/pageSize": page_size +"/cloudresourcemanager:v1beta1/GetEffectiveOrgPolicyRequest": get_effective_org_policy_request +"/cloudresourcemanager:v1beta1/GetEffectiveOrgPolicyRequest/constraint": constraint +"/cloudresourcemanager:v1beta1/ListOrgPoliciesRequest": list_org_policies_request +"/cloudresourcemanager:v1beta1/ListOrgPoliciesRequest/pageToken": page_token +"/cloudresourcemanager:v1beta1/ListOrgPoliciesRequest/pageSize": page_size +"/cloudresourcemanager:v1beta1/Constraint": constraint +"/cloudresourcemanager:v1beta1/Constraint/description": description +"/cloudresourcemanager:v1beta1/Constraint/displayName": display_name +"/cloudresourcemanager:v1beta1/Constraint/booleanConstraint": boolean_constraint +"/cloudresourcemanager:v1beta1/Constraint/constraintDefault": constraint_default +"/cloudresourcemanager:v1beta1/Constraint/name": name +"/cloudresourcemanager:v1beta1/Constraint/listConstraint": list_constraint +"/cloudresourcemanager:v1beta1/Constraint/version": version +"/cloudresourcemanager:v1beta1/RestoreDefault": restore_default +"/cloudresourcemanager:v1beta1/GetOrgPolicyRequest": get_org_policy_request +"/cloudresourcemanager:v1beta1/GetOrgPolicyRequest/constraint": constraint +"/dataflow:v1b3/KeyRangeLocation/deprecatedPersistentDirectory": deprecated_persistent_directory +"/dataproc:v1/ClusterStatus/substate": substate +"/dataproc:v1/JobStatus/substate": substate +"/appengine:v1beta5/Application/iap": iap +"/appengine:v1beta5/IdentityAwareProxy": identity_aware_proxy +"/appengine:v1beta5/IdentityAwareProxy/enabled": enabled +"/appengine:v1beta5/IdentityAwareProxy/oauth2ClientId": oauth2_client_id +"/appengine:v1beta5/IdentityAwareProxy/oauth2ClientSecret": oauth2_client_secret +"/appengine:v1beta5/IdentityAwareProxy/oauth2ClientSecretSha256": oauth2_client_secret_sha256 +"/appengine:v1beta5/OperationMetadataV1Beta": operation_metadata_v1_beta +"/appengine:v1beta5/OperationMetadataV1Beta/method": method_prop +"/appengine:v1beta5/OperationMetadataV1Beta/insertTime": insert_time +"/appengine:v1beta5/OperationMetadataV1Beta/endTime": end_time +"/appengine:v1beta5/OperationMetadataV1Beta/user": user +"/appengine:v1beta5/OperationMetadataV1Beta/target": target +"/appengine:v1beta5/OperationMetadataV1Beta/ephemeralMessage": ephemeral_message +"/appengine:v1beta5/OperationMetadataV1Beta/warning": warning +"/appengine:v1beta5/OperationMetadataV1Beta/warning/warning": warning +"/identitytoolkit:v3/IdentitytoolkitRelyingpartyVerifyAssertionRequest/autoCreate": auto_create +"/identitytoolkit:v3/Relyingparty/androidInstallApp": android_install_app +"/identitytoolkit:v3/Relyingparty/androidMinimumVersion": android_minimum_version +"/identitytoolkit:v3/Relyingparty/androidPackageName": android_package_name +"/identitytoolkit:v3/Relyingparty/canHandleCodeInApp": can_handle_code_in_app +"/identitytoolkit:v3/Relyingparty/continueUrl": continue_url +"/identitytoolkit:v3/Relyingparty/iOSAppStoreId": i_os_app_store_id +"/identitytoolkit:v3/Relyingparty/iOSBundleId": i_os_bundle_id +"/licensing:v1/LicenseAssignment/productName": product_name +"/licensing:v1/LicenseAssignment/skuName": sku_name +"/manufacturers:v1/Count": count +"/manufacturers:v1/Count/value": value +"/manufacturers:v1/Count/unit": unit +"/manufacturers:v1/Capacity": capacity +"/manufacturers:v1/Capacity/value": value +"/manufacturers:v1/Capacity/unit": unit +"/manufacturers:v1/ProductDetail": product_detail +"/manufacturers:v1/ProductDetail/attributeValue": attribute_value +"/manufacturers:v1/ProductDetail/sectionName": section_name +"/manufacturers:v1/ProductDetail/attributeName": attribute_name +"/manufacturers:v1/FeatureDescription": feature_description +"/manufacturers:v1/FeatureDescription/text": text +"/manufacturers:v1/FeatureDescription/image": image +"/manufacturers:v1/FeatureDescription/headline": headline +"/manufacturers:v1/Issue/timestamp": timestamp +"/manufacturers:v1/Price": price +"/manufacturers:v1/Price/amount": amount +"/manufacturers:v1/Price/currency": currency +"/manufacturers:v1/Image": image +"/manufacturers:v1/Image/type": type +"/manufacturers:v1/Image/imageUrl": image_url +"/manufacturers:v1/Image/status": status +"/manufacturers:v1/Attributes/sizeSystem": size_system +"/manufacturers:v1/Attributes/theme": theme +"/manufacturers:v1/Attributes/pattern": pattern +"/manufacturers:v1/Attributes/imageLink": image_link +"/manufacturers:v1/Attributes/format": format +"/manufacturers:v1/Attributes/additionalImageLink": additional_image_link +"/manufacturers:v1/Attributes/additionalImageLink/additional_image_link": additional_image_link +"/manufacturers:v1/Attributes/videoLink": video_link +"/manufacturers:v1/Attributes/videoLink/video_link": video_link +"/manufacturers:v1/Attributes/color": color +"/manufacturers:v1/Attributes/sizeType": size_type +"/manufacturers:v1/Attributes/suggestedRetailPrice": suggested_retail_price +"/manufacturers:v1/Attributes/featureDescription": feature_description +"/manufacturers:v1/Attributes/featureDescription/feature_description": feature_description +"/manufacturers:v1/Attributes/size": size +"/manufacturers:v1/Attributes/count": count +"/manufacturers:v1/Attributes/disclosureDate": disclosure_date +"/manufacturers:v1/Attributes/material": material +"/manufacturers:v1/Attributes/scent": scent +"/manufacturers:v1/Attributes/ageGroup": age_group +"/manufacturers:v1/Attributes/productDetail": product_detail +"/manufacturers:v1/Attributes/productDetail/product_detail": product_detail +"/manufacturers:v1/Attributes/flavor": flavor +"/manufacturers:v1/Attributes/releaseDate": release_date +"/manufacturers:v1/Attributes/itemGroupId": item_group_id +"/manufacturers:v1/Attributes/capacity": capacity +"/manufacturers:v1/Attributes/description": description +"/manufacturers:v1/Attributes/gender": gender +"/people:v1/ListConnectionsResponse/totalPeople": total_people +"/reseller:v1/Subscription/skuName": sku_name +"/slides:v1/slides.presentations.pages.getThumbnail": get_presentation_page_thumbnail +"/slides:v1/slides.presentations.pages.getThumbnail/thumbnailProperties.mimeType": thumbnail_properties_mime_type +"/slides:v1/slides.presentations.pages.getThumbnail/thumbnailProperties.thumbnailSize": thumbnail_properties_thumbnail_size +"/slides:v1/slides.presentations.pages.getThumbnail/presentationId": presentation_id +"/slides:v1/slides.presentations.pages.getThumbnail/pageObjectId": page_object_id +"/slides:v1/WeightedFontFamily": weighted_font_family +"/slides:v1/WeightedFontFamily/fontFamily": font_family +"/slides:v1/WeightedFontFamily/weight": weight +"/slides:v1/TextStyle/weightedFontFamily": weighted_font_family +"/slides:v1/Thumbnail": thumbnail +"/slides:v1/Thumbnail/height": height +"/slides:v1/Thumbnail/contentUrl": content_url +"/slides:v1/Thumbnail/width": width +"/storage:v1/storage.buckets.getIamPolicy": get_bucket_iam_policy +"/storage:v1/storage.buckets.getIamPolicy/bucket": bucket +"/storage:v1/storage.buckets.setIamPolicy": set_bucket_iam_policy +"/storage:v1/storage.buckets.setIamPolicy/bucket": bucket +"/storage:v1/storage.buckets.testIamPermissions": test_bucket_iam_permissions +"/storage:v1/storage.buckets.testIamPermissions/bucket": bucket +"/storage:v1/storage.buckets.testIamPermissions/permissions": permissions +"/storage:v1/storage.objects.getIamPolicy": get_object_iam_policy +"/storage:v1/storage.objects.getIamPolicy/bucket": bucket +"/storage:v1/storage.objects.getIamPolicy/generation": generation +"/storage:v1/storage.objects.getIamPolicy/object": object +"/storage:v1/storage.objects.setIamPolicy": set_object_iam_policy +"/storage:v1/storage.objects.setIamPolicy/bucket": bucket +"/storage:v1/storage.objects.setIamPolicy/generation": generation +"/storage:v1/storage.objects.setIamPolicy/object": object +"/storage:v1/storage.objects.testIamPermissions": test_object_iam_permissions +"/storage:v1/storage.objects.testIamPermissions/bucket": bucket +"/storage:v1/storage.objects.testIamPermissions/generation": generation +"/storage:v1/storage.objects.testIamPermissions/object": object +"/storage:v1/storage.objects.testIamPermissions/permissions": permissions +"/storage:v1/Policy": policy +"/storage:v1/Policy/bindings": bindings +"/storage:v1/Policy/bindings/binding": binding +"/storage:v1/Policy/bindings/binding/members": members +"/storage:v1/Policy/bindings/binding/members/member": member +"/storage:v1/Policy/bindings/binding/role": role +"/storage:v1/Policy/etag": etag +"/storage:v1/Policy/kind": kind +"/storage:v1/Policy/resourceId": resource_id +"/storage:v1/TestIamPermissionsResponse": test_iam_permissions_response +"/storage:v1/TestIamPermissionsResponse/kind": kind +"/storage:v1/TestIamPermissionsResponse/permissions": permissions +"/storage:v1/TestIamPermissionsResponse/permissions/permission": permission +"/vision:v1/WebDetection/visuallySimilarImages": visually_similar_images +"/vision:v1/WebDetection/visuallySimilarImages/visually_similar_image": visually_similar_image diff --git a/api_names_out.yaml b/api_names_out.yaml index 32058f830..6fa76328f 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -37747,3 +37747,398 @@ "/vision:v1/DetectedLanguage": detected_language "/vision:v1/DetectedLanguage/languageCode": language_code "/vision:v1/DetectedLanguage/confidence": confidence +"/youtubePartner:v1/youtubePartner.package.insert": insert_package +"/youtubePartner:v1/youtubePartner.package.insert/onBehalfOfContentOwner": on_behalf_of_content_owner +"/youtubePartner:v1/Package": package +"/youtubePartner:v1/Package/content": content +"/youtubePartner:v1/Package/id": id +"/youtubePartner:v1/Package/kind": kind +"/youtubePartner:v1/Package/locale": locale +"/youtubePartner:v1/Package/uploaderName": uploader_name +"/youtubePartner:v1/PackageInsertResponse": package_insert_response +"/youtubePartner:v1/PackageInsertResponse/errors": errors +"/youtubePartner:v1/PackageInsertResponse/errors/error": error +"/youtubePartner:v1/PackageInsertResponse/kind": kind +"/youtubePartner:v1/PackageInsertResponse/resource": resource +"/compute:beta/compute.subnetworks.setPrivateIpGoogleAccess": set_subnetwork_private_ip_google_access +"/compute:beta/compute.subnetworks.setPrivateIpGoogleAccess/project": project +"/compute:beta/compute.subnetworks.setPrivateIpGoogleAccess/region": region +"/compute:beta/compute.subnetworks.setPrivateIpGoogleAccess/subnetwork": subnetwork +"/compute:beta/Firewall/denied": denied +"/compute:beta/Firewall/denied/denied": denied +"/compute:beta/Firewall/denied/denied/IPProtocol": ip_protocol +"/compute:beta/Firewall/denied/denied/ports": ports +"/compute:beta/Firewall/denied/denied/ports/port": port +"/compute:beta/Firewall/destinationRanges": destination_ranges +"/compute:beta/Firewall/destinationRanges/destination_range": destination_range +"/compute:beta/Firewall/direction": direction +"/compute:beta/Firewall/priority": priority +"/compute:beta/ManagedInstance/version": version +"/compute:beta/ManagedInstanceVersion": managed_instance_version +"/compute:beta/ManagedInstanceVersion/instanceTemplate": instance_template +"/compute:beta/ManagedInstanceVersion/name": name +"/compute:beta/SubnetworksSetPrivateIpGoogleAccessRequest": subnetworks_set_private_ip_google_access_request +"/compute:beta/SubnetworksSetPrivateIpGoogleAccessRequest/privateIpGoogleAccess": private_ip_google_access +"/admin:directory_v1/User/posixAccounts": posix_accounts +"/admin:directory_v1/User/sshPublicKeys": ssh_public_keys +"/admin:directory_v1/UserPosixAccount": user_posix_account +"/admin:directory_v1/UserPosixAccount/gecos": gecos +"/admin:directory_v1/UserPosixAccount/gid": gid +"/admin:directory_v1/UserPosixAccount/homeDirectory": home_directory +"/admin:directory_v1/UserPosixAccount/primary": primary +"/admin:directory_v1/UserPosixAccount/shell": shell +"/admin:directory_v1/UserPosixAccount/systemId": system_id +"/admin:directory_v1/UserPosixAccount/uid": uid +"/admin:directory_v1/UserPosixAccount/username": username +"/admin:directory_v1/UserSshPublicKey": user_ssh_public_key +"/admin:directory_v1/UserSshPublicKey/expirationTimeUsec": expiration_time_usec +"/admin:directory_v1/UserSshPublicKey/fingerprint": fingerprint +"/admin:directory_v1/UserSshPublicKey/key": key +"/analytics:v3/analytics.management.remarketingAudience.delete": delete_management_remarketing_audience +"/analytics:v3/analytics.management.remarketingAudience.delete/accountId": account_id +"/analytics:v3/analytics.management.remarketingAudience.delete/remarketingAudienceId": remarketing_audience_id +"/analytics:v3/analytics.management.remarketingAudience.delete/webPropertyId": web_property_id +"/bigquery:v2/bigquery.tabledata.list/selectedFields": selected_fields +"/bigquery:v2/bigquery.tables.get/selectedFields": selected_fields +"/calendar:v3/DeepLinkData": deep_link_data +"/calendar:v3/DeepLinkData/links": links +"/calendar:v3/DeepLinkData/links/link": link +"/calendar:v3/DeepLinkData/url": url +"/calendar:v3/DisplayInfo": display_info +"/calendar:v3/DisplayInfo/appIconUrl": app_icon_url +"/calendar:v3/DisplayInfo/appShortTitle": app_short_title +"/calendar:v3/DisplayInfo/appTitle": app_title +"/calendar:v3/DisplayInfo/linkShortTitle": link_short_title +"/calendar:v3/DisplayInfo/linkTitle": link_title +"/calendar:v3/EventHabitInstance": event_habit_instance +"/calendar:v3/EventHabitInstance/data": data +"/calendar:v3/EventHabitInstance/parentId": parent_id +"/calendar:v3/HabitInstanceData": habit_instance_data +"/calendar:v3/HabitInstanceData/status": status +"/calendar:v3/HabitInstanceData/statusInferred": status_inferred +"/calendar:v3/HabitInstanceData/type": type +"/calendar:v3/LaunchInfo": launch_info +"/calendar:v3/LaunchInfo/appId": app_id +"/calendar:v3/LaunchInfo/installUrl": install_url +"/calendar:v3/LaunchInfo/intentAction": intent_action +"/calendar:v3/LaunchInfo/uri": uri +"/calendar:v3/Link": link +"/calendar:v3/Link/applinkingSource": applinking_source +"/calendar:v3/Link/displayInfo": display_info +"/calendar:v3/Link/launchInfo": launch_info +"/calendar:v3/Link/platform": platform +"/calendar:v3/Link/url": url +"/cloudresourcemanager:v1/cloudresourcemanager.folders.setOrgPolicyV1": set_folder_org_policy_v1 +"/cloudresourcemanager:v1/cloudresourcemanager.folders.setOrgPolicyV1/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.folders.getEffectiveOrgPolicyV1": get_folder_effective_org_policy_v1 +"/cloudresourcemanager:v1/cloudresourcemanager.folders.getEffectiveOrgPolicyV1/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.folders.clearOrgPolicy": clear_folder_org_policy +"/cloudresourcemanager:v1/cloudresourcemanager.folders.clearOrgPolicy/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.folders.setOrgPolicy": set_folder_org_policy +"/cloudresourcemanager:v1/cloudresourcemanager.folders.setOrgPolicy/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.folders.clearOrgPolicyV1": clear_folder_org_policy_v1 +"/cloudresourcemanager:v1/cloudresourcemanager.folders.clearOrgPolicyV1/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.folders.listOrgPolicies": list_folder_org_policies +"/cloudresourcemanager:v1/cloudresourcemanager.folders.listOrgPolicies/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.folders.listAvailableOrgPolicyConstraints": list_folder_available_org_policy_constraints +"/cloudresourcemanager:v1/cloudresourcemanager.folders.listAvailableOrgPolicyConstraints/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.folders.getOrgPolicy": get_folder_org_policy +"/cloudresourcemanager:v1/cloudresourcemanager.folders.getOrgPolicy/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.folders.getEffectiveOrgPolicy": get_folder_effective_org_policy +"/cloudresourcemanager:v1/cloudresourcemanager.folders.getEffectiveOrgPolicy/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.folders.getOrgPolicyV1": get_folder_org_policy_v1 +"/cloudresourcemanager:v1/cloudresourcemanager.folders.getOrgPolicyV1/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.projects.listAvailableOrgPolicyConstraints": list_project_available_org_policy_constraints +"/cloudresourcemanager:v1/cloudresourcemanager.projects.listAvailableOrgPolicyConstraints/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.projects.getOrgPolicy": get_project_org_policy +"/cloudresourcemanager:v1/cloudresourcemanager.projects.getOrgPolicy/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.projects.getEffectiveOrgPolicy": get_project_effective_org_policy +"/cloudresourcemanager:v1/cloudresourcemanager.projects.getEffectiveOrgPolicy/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.projects.getOrgPolicyV1": get_project_org_policy_v1 +"/cloudresourcemanager:v1/cloudresourcemanager.projects.getOrgPolicyV1/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.projects.setOrgPolicyV1": set_project_org_policy_v1 +"/cloudresourcemanager:v1/cloudresourcemanager.projects.setOrgPolicyV1/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.projects.setOrgPolicy": set_project_org_policy +"/cloudresourcemanager:v1/cloudresourcemanager.projects.setOrgPolicy/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.projects.clearOrgPolicyV1": clear_project_org_policy_v1 +"/cloudresourcemanager:v1/cloudresourcemanager.projects.clearOrgPolicyV1/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.projects.listOrgPolicies": list_project_org_policies +"/cloudresourcemanager:v1/cloudresourcemanager.projects.listOrgPolicies/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.projects.getEffectiveOrgPolicyV1": get_project_effective_org_policy_v1 +"/cloudresourcemanager:v1/cloudresourcemanager.projects.getEffectiveOrgPolicyV1/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.projects.clearOrgPolicy": clear_project_org_policy +"/cloudresourcemanager:v1/cloudresourcemanager.projects.clearOrgPolicy/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.listOrgPolicies": list_organization_org_policies +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.listOrgPolicies/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.getEffectiveOrgPolicyV1": get_organization_effective_org_policy_v1 +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.getEffectiveOrgPolicyV1/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.clearOrgPolicy": clear_organization_org_policy +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.clearOrgPolicy/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.listAvailableOrgPolicyConstraints": list_organization_available_org_policy_constraints +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.listAvailableOrgPolicyConstraints/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.getOrgPolicy": get_organization_org_policy +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.getOrgPolicy/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.getEffectiveOrgPolicy": get_organization_effective_org_policy +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.getEffectiveOrgPolicy/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.getOrgPolicyV1": get_organization_org_policy_v1 +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.getOrgPolicyV1/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.setOrgPolicyV1": set_organization_org_policy_v1 +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.setOrgPolicyV1/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.setOrgPolicy": set_organization_org_policy +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.setOrgPolicy/resource": resource +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.clearOrgPolicyV1": clear_organization_org_policy_v1 +"/cloudresourcemanager:v1/cloudresourcemanager.organizations.clearOrgPolicyV1/resource": resource +"/cloudresourcemanager:v1/ListConstraint": list_constraint +"/cloudresourcemanager:v1/ListConstraint/suggestedValue": suggested_value +"/cloudresourcemanager:v1/SetOrgPolicyRequest": set_org_policy_request +"/cloudresourcemanager:v1/SetOrgPolicyRequest/policy": policy +"/cloudresourcemanager:v1/ListAvailableOrgPolicyConstraintsResponse": list_available_org_policy_constraints_response +"/cloudresourcemanager:v1/ListAvailableOrgPolicyConstraintsResponse/nextPageToken": next_page_token +"/cloudresourcemanager:v1/ListAvailableOrgPolicyConstraintsResponse/constraints": constraints +"/cloudresourcemanager:v1/ListAvailableOrgPolicyConstraintsResponse/constraints/constraint": constraint +"/cloudresourcemanager:v1/ListPolicy": list_policy +"/cloudresourcemanager:v1/ListPolicy/allowedValues": allowed_values +"/cloudresourcemanager:v1/ListPolicy/allowedValues/allowed_value": allowed_value +"/cloudresourcemanager:v1/ListPolicy/suggestedValue": suggested_value +"/cloudresourcemanager:v1/ListPolicy/inheritFromParent": inherit_from_parent +"/cloudresourcemanager:v1/ListPolicy/deniedValues": denied_values +"/cloudresourcemanager:v1/ListPolicy/deniedValues/denied_value": denied_value +"/cloudresourcemanager:v1/ListPolicy/allValues": all_values +"/cloudresourcemanager:v1/ListAvailableOrgPolicyConstraintsRequest": list_available_org_policy_constraints_request +"/cloudresourcemanager:v1/ListAvailableOrgPolicyConstraintsRequest/pageToken": page_token +"/cloudresourcemanager:v1/ListAvailableOrgPolicyConstraintsRequest/pageSize": page_size +"/cloudresourcemanager:v1/GetEffectiveOrgPolicyRequest": get_effective_org_policy_request +"/cloudresourcemanager:v1/GetEffectiveOrgPolicyRequest/constraint": constraint +"/cloudresourcemanager:v1/ListOrgPoliciesRequest": list_org_policies_request +"/cloudresourcemanager:v1/ListOrgPoliciesRequest/pageToken": page_token +"/cloudresourcemanager:v1/ListOrgPoliciesRequest/pageSize": page_size +"/cloudresourcemanager:v1/Constraint": constraint +"/cloudresourcemanager:v1/Constraint/version": version +"/cloudresourcemanager:v1/Constraint/listConstraint": list_constraint +"/cloudresourcemanager:v1/Constraint/displayName": display_name +"/cloudresourcemanager:v1/Constraint/description": description +"/cloudresourcemanager:v1/Constraint/booleanConstraint": boolean_constraint +"/cloudresourcemanager:v1/Constraint/constraintDefault": constraint_default +"/cloudresourcemanager:v1/Constraint/name": name +"/cloudresourcemanager:v1/RestoreDefault": restore_default +"/cloudresourcemanager:v1/GetOrgPolicyRequest": get_org_policy_request +"/cloudresourcemanager:v1/GetOrgPolicyRequest/constraint": constraint +"/cloudresourcemanager:v1/ClearOrgPolicyRequest": clear_org_policy_request +"/cloudresourcemanager:v1/ClearOrgPolicyRequest/etag": etag +"/cloudresourcemanager:v1/ClearOrgPolicyRequest/constraint": constraint +"/cloudresourcemanager:v1/BooleanConstraint": boolean_constraint +"/cloudresourcemanager:v1/ListOrgPoliciesResponse": list_org_policies_response +"/cloudresourcemanager:v1/ListOrgPoliciesResponse/nextPageToken": next_page_token +"/cloudresourcemanager:v1/ListOrgPoliciesResponse/policies": policies +"/cloudresourcemanager:v1/ListOrgPoliciesResponse/policies/policy": policy +"/cloudresourcemanager:v1/OrgPolicy": org_policy +"/cloudresourcemanager:v1/OrgPolicy/etag": etag +"/cloudresourcemanager:v1/OrgPolicy/booleanPolicy": boolean_policy +"/cloudresourcemanager:v1/OrgPolicy/constraint": constraint +"/cloudresourcemanager:v1/OrgPolicy/updateTime": update_time +"/cloudresourcemanager:v1/OrgPolicy/version": version +"/cloudresourcemanager:v1/OrgPolicy/restoreDefault": restore_default +"/cloudresourcemanager:v1/OrgPolicy/listPolicy": list_policy +"/cloudresourcemanager:v1/BooleanPolicy": boolean_policy +"/cloudresourcemanager:v1/BooleanPolicy/enforced": enforced +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.clearOrgPolicy": clear_organization_org_policy +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.clearOrgPolicy/resource": resource +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.listAvailableOrgPolicyConstraints": list_organization_available_org_policy_constraints +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.listAvailableOrgPolicyConstraints/resource": resource +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.getOrgPolicy": get_organization_org_policy +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.getOrgPolicy/resource": resource +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.getOrgPolicyV1": get_organization_org_policy_v1 +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.getOrgPolicyV1/resource": resource +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.getEffectiveOrgPolicy": get_organization_effective_org_policy +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.getEffectiveOrgPolicy/resource": resource +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.setOrgPolicyV1": set_organization_org_policy_v1 +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.setOrgPolicyV1/resource": resource +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.setOrgPolicy": set_organization_org_policy +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.setOrgPolicy/resource": resource +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.clearOrgPolicyV1": clear_organization_org_policy_v1 +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.clearOrgPolicyV1/resource": resource +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.listOrgPolicies": list_organization_org_policies +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.listOrgPolicies/resource": resource +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.getEffectiveOrgPolicyV1": get_organization_effective_org_policy_v1 +"/cloudresourcemanager:v1beta1/cloudresourcemanager.organizations.getEffectiveOrgPolicyV1/resource": resource +"/cloudresourcemanager:v1beta1/ClearOrgPolicyRequest": clear_org_policy_request +"/cloudresourcemanager:v1beta1/ClearOrgPolicyRequest/etag": etag +"/cloudresourcemanager:v1beta1/ClearOrgPolicyRequest/constraint": constraint +"/cloudresourcemanager:v1beta1/BooleanConstraint": boolean_constraint +"/cloudresourcemanager:v1beta1/ListOrgPoliciesResponse": list_org_policies_response +"/cloudresourcemanager:v1beta1/ListOrgPoliciesResponse/policies": policies +"/cloudresourcemanager:v1beta1/ListOrgPoliciesResponse/policies/policy": policy +"/cloudresourcemanager:v1beta1/ListOrgPoliciesResponse/nextPageToken": next_page_token +"/cloudresourcemanager:v1beta1/OrgPolicy": org_policy +"/cloudresourcemanager:v1beta1/OrgPolicy/version": version +"/cloudresourcemanager:v1beta1/OrgPolicy/restoreDefault": restore_default +"/cloudresourcemanager:v1beta1/OrgPolicy/listPolicy": list_policy +"/cloudresourcemanager:v1beta1/OrgPolicy/etag": etag +"/cloudresourcemanager:v1beta1/OrgPolicy/constraint": constraint +"/cloudresourcemanager:v1beta1/OrgPolicy/booleanPolicy": boolean_policy +"/cloudresourcemanager:v1beta1/OrgPolicy/updateTime": update_time +"/cloudresourcemanager:v1beta1/BooleanPolicy": boolean_policy +"/cloudresourcemanager:v1beta1/BooleanPolicy/enforced": enforced +"/cloudresourcemanager:v1beta1/ListConstraint": list_constraint +"/cloudresourcemanager:v1beta1/ListConstraint/suggestedValue": suggested_value +"/cloudresourcemanager:v1beta1/SetOrgPolicyRequest": set_org_policy_request +"/cloudresourcemanager:v1beta1/SetOrgPolicyRequest/policy": policy +"/cloudresourcemanager:v1beta1/ListAvailableOrgPolicyConstraintsResponse": list_available_org_policy_constraints_response +"/cloudresourcemanager:v1beta1/ListAvailableOrgPolicyConstraintsResponse/nextPageToken": next_page_token +"/cloudresourcemanager:v1beta1/ListAvailableOrgPolicyConstraintsResponse/constraints": constraints +"/cloudresourcemanager:v1beta1/ListAvailableOrgPolicyConstraintsResponse/constraints/constraint": constraint +"/cloudresourcemanager:v1beta1/ListPolicy": list_policy +"/cloudresourcemanager:v1beta1/ListPolicy/allValues": all_values +"/cloudresourcemanager:v1beta1/ListPolicy/allowedValues": allowed_values +"/cloudresourcemanager:v1beta1/ListPolicy/allowedValues/allowed_value": allowed_value +"/cloudresourcemanager:v1beta1/ListPolicy/suggestedValue": suggested_value +"/cloudresourcemanager:v1beta1/ListPolicy/inheritFromParent": inherit_from_parent +"/cloudresourcemanager:v1beta1/ListPolicy/deniedValues": denied_values +"/cloudresourcemanager:v1beta1/ListPolicy/deniedValues/denied_value": denied_value +"/cloudresourcemanager:v1beta1/ListAvailableOrgPolicyConstraintsRequest": list_available_org_policy_constraints_request +"/cloudresourcemanager:v1beta1/ListAvailableOrgPolicyConstraintsRequest/pageToken": page_token +"/cloudresourcemanager:v1beta1/ListAvailableOrgPolicyConstraintsRequest/pageSize": page_size +"/cloudresourcemanager:v1beta1/GetEffectiveOrgPolicyRequest": get_effective_org_policy_request +"/cloudresourcemanager:v1beta1/GetEffectiveOrgPolicyRequest/constraint": constraint +"/cloudresourcemanager:v1beta1/ListOrgPoliciesRequest": list_org_policies_request +"/cloudresourcemanager:v1beta1/ListOrgPoliciesRequest/pageToken": page_token +"/cloudresourcemanager:v1beta1/ListOrgPoliciesRequest/pageSize": page_size +"/cloudresourcemanager:v1beta1/Constraint": constraint +"/cloudresourcemanager:v1beta1/Constraint/description": description +"/cloudresourcemanager:v1beta1/Constraint/displayName": display_name +"/cloudresourcemanager:v1beta1/Constraint/booleanConstraint": boolean_constraint +"/cloudresourcemanager:v1beta1/Constraint/constraintDefault": constraint_default +"/cloudresourcemanager:v1beta1/Constraint/name": name +"/cloudresourcemanager:v1beta1/Constraint/listConstraint": list_constraint +"/cloudresourcemanager:v1beta1/Constraint/version": version +"/cloudresourcemanager:v1beta1/RestoreDefault": restore_default +"/cloudresourcemanager:v1beta1/GetOrgPolicyRequest": get_org_policy_request +"/cloudresourcemanager:v1beta1/GetOrgPolicyRequest/constraint": constraint +"/dataflow:v1b3/KeyRangeLocation/deprecatedPersistentDirectory": deprecated_persistent_directory +"/dataproc:v1/ClusterStatus/substate": substate +"/dataproc:v1/JobStatus/substate": substate +"/appengine:v1beta5/Application/iap": iap +"/appengine:v1beta5/IdentityAwareProxy": identity_aware_proxy +"/appengine:v1beta5/IdentityAwareProxy/enabled": enabled +"/appengine:v1beta5/IdentityAwareProxy/oauth2ClientId": oauth2_client_id +"/appengine:v1beta5/IdentityAwareProxy/oauth2ClientSecret": oauth2_client_secret +"/appengine:v1beta5/IdentityAwareProxy/oauth2ClientSecretSha256": oauth2_client_secret_sha256 +"/appengine:v1beta5/OperationMetadataV1Beta": operation_metadata_v1_beta +"/appengine:v1beta5/OperationMetadataV1Beta/method": method_prop +"/appengine:v1beta5/OperationMetadataV1Beta/insertTime": insert_time +"/appengine:v1beta5/OperationMetadataV1Beta/endTime": end_time +"/appengine:v1beta5/OperationMetadataV1Beta/user": user +"/appengine:v1beta5/OperationMetadataV1Beta/target": target +"/appengine:v1beta5/OperationMetadataV1Beta/ephemeralMessage": ephemeral_message +"/appengine:v1beta5/OperationMetadataV1Beta/warning": warning +"/appengine:v1beta5/OperationMetadataV1Beta/warning/warning": warning +"/identitytoolkit:v3/IdentitytoolkitRelyingpartyVerifyAssertionRequest/autoCreate": auto_create +"/identitytoolkit:v3/Relyingparty/androidInstallApp": android_install_app +"/identitytoolkit:v3/Relyingparty/androidMinimumVersion": android_minimum_version +"/identitytoolkit:v3/Relyingparty/androidPackageName": android_package_name +"/identitytoolkit:v3/Relyingparty/canHandleCodeInApp": can_handle_code_in_app +"/identitytoolkit:v3/Relyingparty/continueUrl": continue_url +"/identitytoolkit:v3/Relyingparty/iOSAppStoreId": i_os_app_store_id +"/identitytoolkit:v3/Relyingparty/iOSBundleId": i_os_bundle_id +"/licensing:v1/LicenseAssignment/productName": product_name +"/licensing:v1/LicenseAssignment/skuName": sku_name +"/manufacturers:v1/Count": count +"/manufacturers:v1/Count/value": value +"/manufacturers:v1/Count/unit": unit +"/manufacturers:v1/Capacity": capacity +"/manufacturers:v1/Capacity/value": value +"/manufacturers:v1/Capacity/unit": unit +"/manufacturers:v1/ProductDetail": product_detail +"/manufacturers:v1/ProductDetail/attributeValue": attribute_value +"/manufacturers:v1/ProductDetail/sectionName": section_name +"/manufacturers:v1/ProductDetail/attributeName": attribute_name +"/manufacturers:v1/FeatureDescription": feature_description +"/manufacturers:v1/FeatureDescription/text": text +"/manufacturers:v1/FeatureDescription/image": image +"/manufacturers:v1/FeatureDescription/headline": headline +"/manufacturers:v1/Issue/timestamp": timestamp +"/manufacturers:v1/Price": price +"/manufacturers:v1/Price/amount": amount +"/manufacturers:v1/Price/currency": currency +"/manufacturers:v1/Image": image +"/manufacturers:v1/Image/type": type +"/manufacturers:v1/Image/imageUrl": image_url +"/manufacturers:v1/Image/status": status +"/manufacturers:v1/Attributes/sizeSystem": size_system +"/manufacturers:v1/Attributes/theme": theme +"/manufacturers:v1/Attributes/pattern": pattern +"/manufacturers:v1/Attributes/imageLink": image_link +"/manufacturers:v1/Attributes/format": format +"/manufacturers:v1/Attributes/additionalImageLink": additional_image_link +"/manufacturers:v1/Attributes/additionalImageLink/additional_image_link": additional_image_link +"/manufacturers:v1/Attributes/videoLink": video_link +"/manufacturers:v1/Attributes/videoLink/video_link": video_link +"/manufacturers:v1/Attributes/color": color +"/manufacturers:v1/Attributes/sizeType": size_type +"/manufacturers:v1/Attributes/suggestedRetailPrice": suggested_retail_price +"/manufacturers:v1/Attributes/featureDescription": feature_description +"/manufacturers:v1/Attributes/featureDescription/feature_description": feature_description +"/manufacturers:v1/Attributes/size": size +"/manufacturers:v1/Attributes/count": count +"/manufacturers:v1/Attributes/disclosureDate": disclosure_date +"/manufacturers:v1/Attributes/material": material +"/manufacturers:v1/Attributes/scent": scent +"/manufacturers:v1/Attributes/ageGroup": age_group +"/manufacturers:v1/Attributes/productDetail": product_detail +"/manufacturers:v1/Attributes/productDetail/product_detail": product_detail +"/manufacturers:v1/Attributes/flavor": flavor +"/manufacturers:v1/Attributes/releaseDate": release_date +"/manufacturers:v1/Attributes/itemGroupId": item_group_id +"/manufacturers:v1/Attributes/capacity": capacity +"/manufacturers:v1/Attributes/description": description +"/manufacturers:v1/Attributes/gender": gender +"/people:v1/ListConnectionsResponse/totalPeople": total_people +"/reseller:v1/Subscription/skuName": sku_name +"/slides:v1/slides.presentations.pages.getThumbnail": get_presentation_page_thumbnail +"/slides:v1/slides.presentations.pages.getThumbnail/thumbnailProperties.mimeType": thumbnail_properties_mime_type +"/slides:v1/slides.presentations.pages.getThumbnail/thumbnailProperties.thumbnailSize": thumbnail_properties_thumbnail_size +"/slides:v1/slides.presentations.pages.getThumbnail/presentationId": presentation_id +"/slides:v1/slides.presentations.pages.getThumbnail/pageObjectId": page_object_id +"/slides:v1/WeightedFontFamily": weighted_font_family +"/slides:v1/WeightedFontFamily/fontFamily": font_family +"/slides:v1/WeightedFontFamily/weight": weight +"/slides:v1/TextStyle/weightedFontFamily": weighted_font_family +"/slides:v1/Thumbnail": thumbnail +"/slides:v1/Thumbnail/height": height +"/slides:v1/Thumbnail/contentUrl": content_url +"/slides:v1/Thumbnail/width": width +"/storage:v1/storage.buckets.getIamPolicy": get_bucket_iam_policy +"/storage:v1/storage.buckets.getIamPolicy/bucket": bucket +"/storage:v1/storage.buckets.setIamPolicy": set_bucket_iam_policy +"/storage:v1/storage.buckets.setIamPolicy/bucket": bucket +"/storage:v1/storage.buckets.testIamPermissions": test_bucket_iam_permissions +"/storage:v1/storage.buckets.testIamPermissions/bucket": bucket +"/storage:v1/storage.buckets.testIamPermissions/permissions": permissions +"/storage:v1/storage.objects.getIamPolicy": get_object_iam_policy +"/storage:v1/storage.objects.getIamPolicy/bucket": bucket +"/storage:v1/storage.objects.getIamPolicy/generation": generation +"/storage:v1/storage.objects.getIamPolicy/object": object +"/storage:v1/storage.objects.setIamPolicy": set_object_iam_policy +"/storage:v1/storage.objects.setIamPolicy/bucket": bucket +"/storage:v1/storage.objects.setIamPolicy/generation": generation +"/storage:v1/storage.objects.setIamPolicy/object": object +"/storage:v1/storage.objects.testIamPermissions": test_object_iam_permissions +"/storage:v1/storage.objects.testIamPermissions/bucket": bucket +"/storage:v1/storage.objects.testIamPermissions/generation": generation +"/storage:v1/storage.objects.testIamPermissions/object": object +"/storage:v1/storage.objects.testIamPermissions/permissions": permissions +"/storage:v1/Policy": policy +"/storage:v1/Policy/bindings": bindings +"/storage:v1/Policy/bindings/binding": binding +"/storage:v1/Policy/bindings/binding/members": members +"/storage:v1/Policy/bindings/binding/members/member": member +"/storage:v1/Policy/bindings/binding/role": role +"/storage:v1/Policy/etag": etag +"/storage:v1/Policy/kind": kind +"/storage:v1/Policy/resourceId": resource_id +"/storage:v1/TestIamPermissionsResponse": test_iam_permissions_response +"/storage:v1/TestIamPermissionsResponse/kind": kind +"/storage:v1/TestIamPermissionsResponse/permissions": permissions +"/storage:v1/TestIamPermissionsResponse/permissions/permission": permission +"/vision:v1/WebDetection/visuallySimilarImages": visually_similar_images +"/vision:v1/WebDetection/visuallySimilarImages/visually_similar_image": visually_similar_image diff --git a/generated/google/apis/adexchangebuyer2_v2beta1.rb b/generated/google/apis/adexchangebuyer2_v2beta1.rb index 30096f803..fc97ee97d 100644 --- a/generated/google/apis/adexchangebuyer2_v2beta1.rb +++ b/generated/google/apis/adexchangebuyer2_v2beta1.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/ad-exchange/buyer-rest/guides/client-access/ module Adexchangebuyer2V2beta1 VERSION = 'V2beta1' - REVISION = '20170308' + REVISION = '20170324' # Manage your Ad Exchange buyer account configuration AUTH_ADEXCHANGE_BUYER = 'https://www.googleapis.com/auth/adexchange.buyer' diff --git a/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb b/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb index 2cdc9fdf4..7879b77c4 100644 --- a/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +++ b/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb @@ -22,25 +22,6 @@ module Google module Apis module Adexchangebuyer2V2beta1 - # 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 request for watching changes to creative Status. class WatchCreativeRequest include Google::Apis::Core::Hashable @@ -83,6 +64,36 @@ module Google end end + # + class ListClientsResponse + include Google::Apis::Core::Hashable + + # The returned list of clients. + # Corresponds to the JSON property `clients` + # @return [Array] + attr_accessor :clients + + # A token to retrieve the next page of results. + # Pass this value in the + # ListClientsRequest.pageToken + # field in the subsequent call to the + # accounts.clients.list method + # to retrieve the next page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @clients = args[:clients] if args.key?(:clients) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + # Native content for a creative. class NativeContent include Google::Apis::Core::Hashable @@ -177,36 +188,6 @@ module Google end end - # - class ListClientsResponse - include Google::Apis::Core::Hashable - - # The returned list of clients. - # Corresponds to the JSON property `clients` - # @return [Array] - attr_accessor :clients - - # A token to retrieve the next page of results. - # Pass this value in the - # ListClientsRequest.pageToken - # field in the subsequent call to the - # accounts.clients.list method - # to retrieve the next page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @clients = args[:clients] if args.key?(:clients) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - # @OutputOnly A security context. class SecurityContext include Google::Apis::Core::Hashable @@ -226,6 +207,37 @@ module Google end end + # HTML content for a creative. + class HtmlContent + include Google::Apis::Core::Hashable + + # The width of the HTML snippet in pixels. + # Corresponds to the JSON property `width` + # @return [Fixnum] + attr_accessor :width + + # The HTML snippet that displays the ad when inserted in the web page. + # Corresponds to the JSON property `snippet` + # @return [String] + attr_accessor :snippet + + # The height of the HTML snippet in pixels. + # Corresponds to the JSON property `height` + # @return [Fixnum] + attr_accessor :height + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @width = args[:width] if args.key?(:width) + @snippet = args[:snippet] if args.key?(:snippet) + @height = args[:height] if args.key?(:height) + end + end + # A response for listing creatives. class ListCreativesResponse include Google::Apis::Core::Hashable @@ -255,37 +267,6 @@ module Google end end - # HTML content for a creative. - class HtmlContent - include Google::Apis::Core::Hashable - - # The height of the HTML snippet in pixels. - # Corresponds to the JSON property `height` - # @return [Fixnum] - attr_accessor :height - - # The width of the HTML snippet in pixels. - # Corresponds to the JSON property `width` - # @return [Fixnum] - attr_accessor :width - - # The HTML snippet that displays the ad when inserted in the web page. - # Corresponds to the JSON property `snippet` - # @return [String] - attr_accessor :snippet - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @height = args[:height] if args.key?(:height) - @width = args[:width] if args.key?(:width) - @snippet = args[:snippet] if args.key?(:snippet) - end - end - # The serving context for this restriction. class ServingContext include Google::Apis::Core::Hashable @@ -421,6 +402,13 @@ module Google class ClientUserInvitation include Google::Apis::Core::Hashable + # The email address to which the invitation is sent. Email + # addresses should be unique among all client users under each sponsor + # buyer. + # Corresponds to the JSON property `email` + # @return [String] + attr_accessor :email + # Numerical account ID of the client buyer # that the invited user is associated with. # The value of this field is ignored in create operations. @@ -434,22 +422,15 @@ module Google # @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. - # Corresponds to the JSON property `email` - # @return [String] - attr_accessor :email - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @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) - @email = args[:email] if args.key?(:email) end end @@ -632,11 +613,6 @@ module Google class CreativeDealAssociation include Google::Apis::Core::Hashable - # The account the creative belongs to. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - # The ID of the creative associated with the deal. # Corresponds to the JSON property `creativeId` # @return [String] @@ -647,15 +623,20 @@ module Google # @return [String] attr_accessor :deals_id + # The account the creative belongs to. + # Corresponds to the JSON property `accountId` + # @return [String] + attr_accessor :account_id + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @account_id = args[:account_id] if args.key?(:account_id) @creative_id = args[:creative_id] if args.key?(:creative_id) @deals_id = args[:deals_id] if args.key?(:deals_id) + @account_id = args[:account_id] if args.key?(:account_id) end end @@ -664,11 +645,6 @@ module Google class FilteringStats include Google::Apis::Core::Hashable - # The set of filtering reasons for this date. - # Corresponds to the JSON property `reasons` - # @return [Array] - attr_accessor :reasons - # Represents a whole calendar date, e.g. date of birth. The time of day and # time zone are either specified elsewhere or are not significant. The date # is relative to the Proleptic Gregorian Calendar. The day may be 0 to @@ -680,14 +656,19 @@ module Google # @return [Google::Apis::Adexchangebuyer2V2beta1::Date] attr_accessor :date + # The set of filtering reasons for this date. + # Corresponds to the JSON property `reasons` + # @return [Array] + attr_accessor :reasons + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @reasons = args[:reasons] if args.key?(:reasons) @date = args[:date] if args.key?(:date) + @reasons = args[:reasons] if args.key?(:reasons) end end @@ -695,10 +676,81 @@ module Google class Creative include Google::Apis::Core::Hashable - # Video content for a creative. - # Corresponds to the JSON property `video` - # @return [Google::Apis::Adexchangebuyer2V2beta1::VideoContent] - attr_accessor :video + # @OutputOnly The top-level open auction status of this creative. + # If disapproved, an entry for 'auctionType = OPEN_AUCTION' (or 'ALL') in + # serving_restrictions will also exist. Note + # that this may be nuanced with other contextual restrictions, in which case, + # it may be preferable to read from serving_restrictions directly. + # Can be used to filter the response of the + # creatives.list + # method. + # Corresponds to the JSON property `openAuctionStatus` + # @return [String] + attr_accessor :open_auction_status + + # The name of the company being advertised in the creative. + # Corresponds to the JSON property `advertiserName` + # @return [String] + attr_accessor :advertiser_name + + # @OutputOnly Detected advertiser IDs, if any. + # Corresponds to the JSON property `detectedAdvertiserIds` + # @return [Array] + attr_accessor :detected_advertiser_ids + + # @OutputOnly + # The detected domains for this creative. + # Corresponds to the JSON property `detectedDomains` + # @return [Array] + attr_accessor :detected_domains + + # @OutputOnly Filtering reasons for this creative during a period of a single + # day (from midnight to midnight Pacific). + # Corresponds to the JSON property `filteringStats` + # @return [Google::Apis::Adexchangebuyer2V2beta1::FilteringStats] + attr_accessor :filtering_stats + + # All attributes for the ads that may be shown from this creative. + # Can be used to filter the response of the + # creatives.list + # method. + # Corresponds to the JSON property `attributes` + # @return [Array] + attr_accessor :attributes + + # @OutputOnly The last update timestamp of the creative via API. + # Corresponds to the JSON property `apiUpdateTime` + # @return [String] + attr_accessor :api_update_time + + # @OutputOnly + # The detected languages for this creative. The order is arbitrary. The codes + # are 2 or 5 characters and are documented at + # https://developers.google.com/adwords/api/docs/appendix/languagecodes. + # Corresponds to the JSON property `detectedLanguages` + # @return [Array] + attr_accessor :detected_languages + + # The buyer-defined creative ID of this creative. + # Can be used to filter the response of the + # creatives.list + # method. + # Corresponds to the JSON property `creativeId` + # @return [String] + attr_accessor :creative_id + + # The account that this creative belongs to. + # Can be used to filter the response of the + # creatives.list + # method. + # Corresponds to the JSON property `accountId` + # @return [String] + attr_accessor :account_id + + # Native content for a creative. + # Corresponds to the JSON property `native` + # @return [Google::Apis::Adexchangebuyer2V2beta1::NativeContent] + attr_accessor :native # @OutputOnly The granular status of this ad in specific contexts. # A context here relates to where something ultimately serves (for example, @@ -708,6 +760,11 @@ module Google # @return [Array] attr_accessor :serving_restrictions + # Video content for a creative. + # Corresponds to the JSON property `video` + # @return [Google::Apis::Adexchangebuyer2V2beta1::VideoContent] + attr_accessor :video + # The agency ID for this creative. # Corresponds to the JSON property `agencyId` # @return [String] @@ -782,90 +839,25 @@ module Google # @return [Array] attr_accessor :detected_product_categories - # @OutputOnly The top-level open auction status of this creative. - # If disapproved, an entry for 'auctionType = OPEN_AUCTION' (or 'ALL') in - # serving_restrictions will also exist. Note - # that this may be nuanced with other contextual restrictions, in which case, - # it may be preferable to read from serving_restrictions directly. - # Can be used to filter the response of the - # creatives.list - # method. - # Corresponds to the JSON property `openAuctionStatus` - # @return [String] - attr_accessor :open_auction_status - - # The name of the company being advertised in the creative. - # Corresponds to the JSON property `advertiserName` - # @return [String] - attr_accessor :advertiser_name - - # @OutputOnly - # The detected domains for this creative. - # Corresponds to the JSON property `detectedDomains` - # @return [Array] - attr_accessor :detected_domains - - # @OutputOnly Detected advertiser IDs, if any. - # Corresponds to the JSON property `detectedAdvertiserIds` - # @return [Array] - attr_accessor :detected_advertiser_ids - - # @OutputOnly Filtering reasons for this creative during a period of a single - # day (from midnight to midnight Pacific). - # Corresponds to the JSON property `filteringStats` - # @return [Google::Apis::Adexchangebuyer2V2beta1::FilteringStats] - attr_accessor :filtering_stats - - # All attributes for the ads that may be shown from this creative. - # Can be used to filter the response of the - # creatives.list - # method. - # Corresponds to the JSON property `attributes` - # @return [Array] - attr_accessor :attributes - - # @OutputOnly The last update timestamp of the creative via API. - # Corresponds to the JSON property `apiUpdateTime` - # @return [String] - attr_accessor :api_update_time - - # @OutputOnly - # The detected languages for this creative. The order is arbitrary. The codes - # are 2 or 5 characters and are documented at - # https://developers.google.com/adwords/api/docs/appendix/languagecodes. - # Corresponds to the JSON property `detectedLanguages` - # @return [Array] - attr_accessor :detected_languages - - # The buyer-defined creative ID of this creative. - # Can be used to filter the response of the - # creatives.list - # method. - # Corresponds to the JSON property `creativeId` - # @return [String] - attr_accessor :creative_id - - # The account that this creative belongs to. - # Can be used to filter the response of the - # creatives.list - # method. - # Corresponds to the JSON property `accountId` - # @return [String] - attr_accessor :account_id - - # Native content for a creative. - # Corresponds to the JSON property `native` - # @return [Google::Apis::Adexchangebuyer2V2beta1::NativeContent] - attr_accessor :native - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @video = args[:video] if args.key?(:video) + @open_auction_status = args[:open_auction_status] if args.key?(:open_auction_status) + @advertiser_name = args[:advertiser_name] if args.key?(:advertiser_name) + @detected_advertiser_ids = args[:detected_advertiser_ids] if args.key?(:detected_advertiser_ids) + @detected_domains = args[:detected_domains] if args.key?(:detected_domains) + @filtering_stats = args[:filtering_stats] if args.key?(:filtering_stats) + @attributes = args[:attributes] if args.key?(:attributes) + @api_update_time = args[:api_update_time] if args.key?(:api_update_time) + @detected_languages = args[:detected_languages] if args.key?(:detected_languages) + @creative_id = args[:creative_id] if args.key?(:creative_id) + @account_id = args[:account_id] if args.key?(:account_id) + @native = args[:native] if args.key?(:native) @serving_restrictions = args[:serving_restrictions] if args.key?(:serving_restrictions) + @video = args[:video] if args.key?(:video) @agency_id = args[:agency_id] if args.key?(:agency_id) @click_through_urls = args[:click_through_urls] if args.key?(:click_through_urls) @ad_choices_destination_url = args[:ad_choices_destination_url] if args.key?(:ad_choices_destination_url) @@ -878,17 +870,6 @@ module Google @html = args[:html] if args.key?(:html) @deals_status = args[:deals_status] if args.key?(:deals_status) @detected_product_categories = args[:detected_product_categories] if args.key?(:detected_product_categories) - @open_auction_status = args[:open_auction_status] if args.key?(:open_auction_status) - @advertiser_name = args[:advertiser_name] if args.key?(:advertiser_name) - @detected_domains = args[:detected_domains] if args.key?(:detected_domains) - @detected_advertiser_ids = args[:detected_advertiser_ids] if args.key?(:detected_advertiser_ids) - @filtering_stats = args[:filtering_stats] if args.key?(:filtering_stats) - @attributes = args[:attributes] if args.key?(:attributes) - @api_update_time = args[:api_update_time] if args.key?(:api_update_time) - @detected_languages = args[:detected_languages] if args.key?(:detected_languages) - @creative_id = args[:creative_id] if args.key?(:creative_id) - @account_id = args[:account_id] if args.key?(:account_id) - @native = args[:native] if args.key?(:native) end end @@ -921,6 +902,23 @@ module Google class Client include Google::Apis::Core::Hashable + # 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` + # @return [String] + attr_accessor :status + + # The type of the client entity: `ADVERTISER`, `BRAND`, or `AGENCY`. + # Corresponds to the JSON property `entityType` + # @return [String] + attr_accessor :entity_type + # 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 @@ -967,37 +965,20 @@ module Google # @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` - # @return [String] - attr_accessor :status - - # The type of the client entity: `ADVERTISER`, `BRAND`, or `AGENCY`. - # Corresponds to the JSON property `entityType` - # @return [String] - attr_accessor :entity_type - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @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) @client_name = args[:client_name] if args.key?(:client_name) @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) @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) end end @@ -1005,6 +986,11 @@ module Google class Correction include Google::Apis::Core::Hashable + # Additional details about what was corrected. + # Corresponds to the JSON property `details` + # @return [Array] + attr_accessor :details + # The type of correction that was applied to the creative. # Corresponds to the JSON property `type` # @return [String] @@ -1015,39 +1001,15 @@ module Google # @return [Array] attr_accessor :contexts - # Additional details about what was corrected. - # Corresponds to the JSON property `details` - # @return [Array] - attr_accessor :details - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @details = args[:details] if args.key?(:details) @type = args[:type] if args.key?(:type) @contexts = args[:contexts] if args.key?(:contexts) - @details = args[:details] if args.key?(:details) - end - end - - # A request for associating a deal and a creative. - class AddDealAssociationRequest - include Google::Apis::Core::Hashable - - # The association between a creative and a deal. - # Corresponds to the JSON property `association` - # @return [Google::Apis::Adexchangebuyer2V2beta1::CreativeDealAssociation] - attr_accessor :association - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @association = args[:association] if args.key?(:association) end end @@ -1080,6 +1042,38 @@ module Google end end + # A request for associating a deal and a creative. + class AddDealAssociationRequest + include Google::Apis::Core::Hashable + + # The association between a creative and a deal. + # Corresponds to the JSON property `association` + # @return [Google::Apis::Adexchangebuyer2V2beta1::CreativeDealAssociation] + attr_accessor :association + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @association = args[:association] if args.key?(:association) + end + end + + # A request for stopping notifications for changes to creative Status. + class StopWatchingCreativeRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + # @OutputOnly The reason and details for a disapproval. class Disapproval include Google::Apis::Core::Hashable @@ -1105,19 +1099,6 @@ module Google end end - # A request for stopping notifications for changes to creative Status. - class StopWatchingCreativeRequest - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - # @OutputOnly A representation of the status of an ad in a # specific context. A context here relates to where something ultimately serves # (for example, a user or publisher geo, a platform, an HTTPS vs HTTP request, @@ -1125,15 +1106,6 @@ module Google class ServingRestriction include Google::Apis::Core::Hashable - # Any disapprovals bound to this restriction. - # Only present if status=DISAPPROVED. - # Can be used to filter the response of the - # creatives.list - # method. - # Corresponds to the JSON property `disapprovalReasons` - # @return [Array] - attr_accessor :disapproval_reasons - # The contexts for the restriction. # Corresponds to the JSON property `contexts` # @return [Array] @@ -1145,15 +1117,24 @@ module Google # @return [String] attr_accessor :status + # Any disapprovals bound to this restriction. + # Only present if status=DISAPPROVED. + # Can be used to filter the response of the + # creatives.list + # method. + # Corresponds to the JSON property `disapprovalReasons` + # @return [Array] + attr_accessor :disapproval_reasons + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @disapproval_reasons = args[:disapproval_reasons] if args.key?(:disapproval_reasons) @contexts = args[:contexts] if args.key?(:contexts) @status = args[:status] if args.key?(:status) + @disapproval_reasons = args[:disapproval_reasons] if args.key?(:disapproval_reasons) end end @@ -1195,6 +1176,25 @@ module Google @month = args[:month] if args.key?(:month) 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 end end end diff --git a/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb b/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb index 8baebc7bc..a7de40409 100644 --- a/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +++ b/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb @@ -22,12 +22,6 @@ module Google module Apis module Adexchangebuyer2V2beta1 - class Empty - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class WatchCreativeRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -40,13 +34,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class NativeContent + class ListClientsResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ListClientsResponse + class NativeContent class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -58,13 +52,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class ListCreativesResponse + class HtmlContent class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class HtmlContent + class ListCreativesResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -172,19 +166,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class AddDealAssociationRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class ListDealAssociationsResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Disapproval + class AddDealAssociationRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -196,6 +184,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class Disapproval + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ServingRestriction class Representation < Google::Apis::Core::JsonRepresentation; end @@ -209,9 +203,9 @@ module Google 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 WatchCreativeRequest @@ -228,6 +222,15 @@ module Google 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 NativeContent # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -250,15 +253,6 @@ module Google 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 SecurityContext # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -266,6 +260,15 @@ module Google end end + class HtmlContent + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :width, as: 'width' + property :snippet, as: 'snippet' + property :height, as: 'height' + end + end + class ListCreativesResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -275,15 +278,6 @@ module Google end end - class HtmlContent - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :height, as: 'height' - property :width, as: 'width' - property :snippet, as: 'snippet' - end - end - class ServingContext # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -328,9 +322,9 @@ module Google class ClientUserInvitation # @private class Representation < Google::Apis::Core::JsonRepresentation + property :email, as: 'email' property :client_account_id, as: 'clientAccountId' property :invitation_id, as: 'invitationId' - property :email, as: 'email' end end @@ -386,29 +380,42 @@ module Google class CreativeDealAssociation # @private class Representation < Google::Apis::Core::JsonRepresentation - property :account_id, as: 'accountId' property :creative_id, as: 'creativeId' property :deals_id, as: 'dealsId' + property :account_id, as: 'accountId' end end class FilteringStats # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :reasons, as: 'reasons', class: Google::Apis::Adexchangebuyer2V2beta1::Reason, decorator: Google::Apis::Adexchangebuyer2V2beta1::Reason::Representation - property :date, as: 'date', class: Google::Apis::Adexchangebuyer2V2beta1::Date, decorator: Google::Apis::Adexchangebuyer2V2beta1::Date::Representation + collection :reasons, as: 'reasons', class: Google::Apis::Adexchangebuyer2V2beta1::Reason, decorator: Google::Apis::Adexchangebuyer2V2beta1::Reason::Representation + end end class Creative # @private class Representation < Google::Apis::Core::JsonRepresentation - property :video, as: 'video', class: Google::Apis::Adexchangebuyer2V2beta1::VideoContent, decorator: Google::Apis::Adexchangebuyer2V2beta1::VideoContent::Representation + property :open_auction_status, as: 'openAuctionStatus' + property :advertiser_name, as: 'advertiserName' + collection :detected_advertiser_ids, as: 'detectedAdvertiserIds' + collection :detected_domains, as: 'detectedDomains' + property :filtering_stats, as: 'filteringStats', class: Google::Apis::Adexchangebuyer2V2beta1::FilteringStats, decorator: Google::Apis::Adexchangebuyer2V2beta1::FilteringStats::Representation + + collection :attributes, as: 'attributes' + property :api_update_time, as: 'apiUpdateTime' + collection :detected_languages, as: 'detectedLanguages' + property :creative_id, as: 'creativeId' + property :account_id, as: 'accountId' + property :native, as: 'native', class: Google::Apis::Adexchangebuyer2V2beta1::NativeContent, decorator: Google::Apis::Adexchangebuyer2V2beta1::NativeContent::Representation collection :serving_restrictions, as: 'servingRestrictions', class: Google::Apis::Adexchangebuyer2V2beta1::ServingRestriction, decorator: Google::Apis::Adexchangebuyer2V2beta1::ServingRestriction::Representation + property :video, as: 'video', class: Google::Apis::Adexchangebuyer2V2beta1::VideoContent, decorator: Google::Apis::Adexchangebuyer2V2beta1::VideoContent::Representation + property :agency_id, as: 'agencyId' collection :click_through_urls, as: 'clickThroughUrls' property :ad_choices_destination_url, as: 'adChoicesDestinationUrl' @@ -423,19 +430,6 @@ module Google property :deals_status, as: 'dealsStatus' collection :detected_product_categories, as: 'detectedProductCategories' - property :open_auction_status, as: 'openAuctionStatus' - property :advertiser_name, as: 'advertiserName' - collection :detected_domains, as: 'detectedDomains' - collection :detected_advertiser_ids, as: 'detectedAdvertiserIds' - property :filtering_stats, as: 'filteringStats', class: Google::Apis::Adexchangebuyer2V2beta1::FilteringStats, decorator: Google::Apis::Adexchangebuyer2V2beta1::FilteringStats::Representation - - collection :attributes, as: 'attributes' - property :api_update_time, as: 'apiUpdateTime' - collection :detected_languages, as: 'detectedLanguages' - property :creative_id, as: 'creativeId' - property :account_id, as: 'accountId' - property :native, as: 'native', class: Google::Apis::Adexchangebuyer2V2beta1::NativeContent, decorator: Google::Apis::Adexchangebuyer2V2beta1::NativeContent::Representation - end end @@ -450,32 +444,24 @@ module Google class Client # @private class Representation < Google::Apis::Core::JsonRepresentation + property :entity_name, as: 'entityName' + property :status, as: 'status' + property :entity_type, as: 'entityType' property :client_name, as: 'clientName' property :role, as: 'role' property :visible_to_seller, as: 'visibleToSeller' property :entity_id, as: 'entityId' property :client_account_id, as: 'clientAccountId' - property :entity_name, as: 'entityName' - property :status, as: 'status' - property :entity_type, as: 'entityType' end end class Correction # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :details, as: 'details' property :type, as: 'type' collection :contexts, as: 'contexts', class: Google::Apis::Adexchangebuyer2V2beta1::ServingContext, decorator: Google::Apis::Adexchangebuyer2V2beta1::ServingContext::Representation - collection :details, as: 'details' - end - end - - class AddDealAssociationRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :association, as: 'association', class: Google::Apis::Adexchangebuyer2V2beta1::CreativeDealAssociation, decorator: Google::Apis::Adexchangebuyer2V2beta1::CreativeDealAssociation::Representation - end end @@ -488,11 +474,11 @@ module Google end end - class Disapproval + class AddDealAssociationRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :details, as: 'details' - property :reason, as: 'reason' + property :association, as: 'association', class: Google::Apis::Adexchangebuyer2V2beta1::CreativeDealAssociation, decorator: Google::Apis::Adexchangebuyer2V2beta1::CreativeDealAssociation::Representation + end end @@ -502,14 +488,22 @@ module Google end end + class Disapproval + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :details, as: 'details' + property :reason, as: 'reason' + end + end + class ServingRestriction # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :disapproval_reasons, as: 'disapprovalReasons', class: Google::Apis::Adexchangebuyer2V2beta1::Disapproval, decorator: Google::Apis::Adexchangebuyer2V2beta1::Disapproval::Representation - collection :contexts, as: 'contexts', class: Google::Apis::Adexchangebuyer2V2beta1::ServingContext, decorator: Google::Apis::Adexchangebuyer2V2beta1::ServingContext::Representation property :status, as: 'status' + collection :disapproval_reasons, as: 'disapprovalReasons', class: Google::Apis::Adexchangebuyer2V2beta1::Disapproval, decorator: Google::Apis::Adexchangebuyer2V2beta1::Disapproval::Representation + end end @@ -521,6 +515,12 @@ module Google property :month, as: 'month' end end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end end end end diff --git a/generated/google/apis/adexchangebuyer2_v2beta1/service.rb b/generated/google/apis/adexchangebuyer2_v2beta1/service.rb index 2c5942410..2aa498499 100644 --- a/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +++ b/generated/google/apis/adexchangebuyer2_v2beta1/service.rb @@ -33,16 +33,16 @@ module Google # # @see https://developers.google.com/ad-exchange/buyer-rest/guides/client-access/ class AdExchangeBuyerIIService < 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://adexchangebuyer.googleapis.com/', '') end @@ -52,11 +52,11 @@ module Google # 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 # @@ -69,14 +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? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -92,11 +92,11 @@ module Google # @param [Fixnum] page_size # Requested page size. The server may return fewer clients than requested. # If unspecified, the server will pick an appropriate default. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -109,15 +109,15 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_account_clients(account_id, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_account_clients(account_id, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/clients', options) command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ListClientsResponse::Representation command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ListClientsResponse command.params['accountId'] = account_id unless account_id.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -128,11 +128,11 @@ module Google # @param [String] client_account_id # Unique numerical account ID of the client to update. (required) # @param [Google::Apis::Adexchangebuyer2V2beta1::Client] client_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -145,7 +145,7 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_account_client(account_id, client_account_id, client_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def update_account_client(account_id, client_account_id, client_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:put, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}', options) command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::Client::Representation command.request_object = client_object @@ -153,8 +153,8 @@ module Google command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Client command.params['accountId'] = account_id unless account_id.nil? command.params['clientAccountId'] = client_account_id unless client_account_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -163,11 +163,11 @@ module Google # Unique numerical account ID for the buyer of which the client buyer # is a customer; the sponsor buyer to create a client for. (required) # @param [Google::Apis::Adexchangebuyer2V2beta1::Client] client_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -180,159 +180,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 create_account_client(account_id, client_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def create_account_client(account_id, client_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/clients', options) command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::Client::Representation command.request_object = client_object command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Client::Representation command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Client command.params['accountId'] = account_id unless account_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - # Lists all the known client users for a specified - # sponsor buyer account ID. - # @param [String] account_id - # Numerical account ID of the sponsor buyer of the client to list users for. - # (required) - # @param [String] client_account_id - # The account ID of the client buyer to list users for. (required) - # You must specify either a string representation of a - # 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 [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include 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::ListClientUsersResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::Adexchangebuyer2V2beta1::ListClientUsersResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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) - 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['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves an existing client user. + # 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 to be retrieved is associated with. (required) - # @param [String] user_id - # Numerical identifier of the user to retrieve. (required) + # Numerical account ID of the client buyer that the user + # should be associated with. (required) + # @param [Google::Apis::Adexchangebuyer2V2beta1::ClientUserInvitation] client_user_invitation_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @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 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 - command.params['accountId'] = account_id unless account_id.nil? - command.params['clientAccountId'] = client_account_id unless client_account_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # 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] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::ClientUser] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::Adexchangebuyer2V2beta1::ClientUser] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_account_client_user(account_id, client_account_id, user_id, client_user_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:put, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}', options) - command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUser::Representation - command.request_object = client_user_object - command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUser::Representation - command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ClientUser - command.params['accountId'] = account_id unless account_id.nil? - command.params['clientAccountId'] = client_account_id unless client_account_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Retrieves an existing client user invitation. - # @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 invitation - # to be retrieved is associated with. (required) - # @param [String] invitation_id - # Numerical identifier of the user invitation to retrieve. (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 # @@ -345,15 +217,53 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @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 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 + + # Retrieves an existing client user invitation. + # @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 invitation + # 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 [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 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 @@ -368,9 +278,6 @@ module Google # numerical account identifier or the `-` character # to list all the invitations for all the clients # of a given sponsor buyer. - # @param [Fixnum] page_size - # Requested page size. Server may return fewer clients than requested. - # If unspecified, server will pick an appropriate default. # @param [String] page_token # A token identifying a page of results the server should return. # Typically, this is the value of @@ -378,11 +285,14 @@ module Google # returned from the previous call to the # clients.invitations.list # method. + # @param [Fixnum] page_size + # Requested page size. Server may return fewer clients than requested. + # If unspecified, server will pick an appropriate default. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -395,54 +305,338 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations', options) command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ListClientUserInvitationsResponse::Representation command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ListClientUserInvitationsResponse command.params['accountId'] = account_id unless account_id.nil? command.params['clientAccountId'] = client_account_id unless client_account_id.nil? - command.query['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. + # 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 - # 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 [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 [String] fields - # Selector specifying which fields to include 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 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.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 + + # Lists all the known client users for a specified + # sponsor buyer account ID. + # @param [String] account_id + # Numerical account ID of the sponsor buyer of the client to list users for. + # (required) + # @param [String] client_account_id + # The account ID of the client buyer to list users for. (required) + # You must specify either a string representation of a + # numerical account identifier or the `-` character + # to list all the client users for all the clients + # of a given sponsor buyer. + # @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 [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::ListClientUsersResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::Adexchangebuyer2V2beta1::ListClientUsersResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_account_client_users(account_id, client_account_id, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/users', options) + command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ListClientUsersResponse::Representation + command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ListClientUsersResponse + command.params['accountId'] = account_id unless account_id.nil? + command.params['clientAccountId'] = client_account_id unless client_account_id.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['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. + # @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 [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should 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 get_account_client_user(account_id, client_account_id, user_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}', options) + command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ClientUser::Representation + command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ClientUser + command.params['accountId'] = account_id unless account_id.nil? + command.params['clientAccountId'] = client_account_id unless client_account_id.nil? + command.params['userId'] = user_id unless user_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a creative. + # @param [String] account_id + # The account that this creative belongs to. + # Can be used to filter the response of the + # creatives.list + # method. + # @param [Google::Apis::Adexchangebuyer2V2beta1::Creative] creative_object + # @param [String] duplicate_id_mode + # Indicates if multiple creatives can share an ID or not. Default is + # NO_DUPLICATES (one ID per creative). + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::Creative] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::Adexchangebuyer2V2beta1::Creative] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_account_creative(account_id, creative_object = nil, duplicate_id_mode: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/creatives', options) + command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::Creative::Representation + command.request_object = creative_object + command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Creative::Representation + command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Creative + command.params['accountId'] = account_id unless account_id.nil? + command.query['duplicateIdMode'] = duplicate_id_mode unless duplicate_id_mode.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Stops watching a creative. Will stop push notifications being sent to the + # topics when the creative changes status. + # @param [String] account_id + # The account of the creative to stop notifications for. + # @param [String] creative_id + # The creative ID of the creative to stop notifications for. + # Specify "-" to specify stopping account level notifications. + # @param [Google::Apis::Adexchangebuyer2V2beta1::StopWatchingCreativeRequest] stop_watching_creative_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::Adexchangebuyer2V2beta1::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 stop_watching_creative(account_id, creative_id, stop_watching_creative_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/creatives/{creativeId}:stopWatching', options) + command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::StopWatchingCreativeRequest::Representation + command.request_object = stop_watching_creative_request_object + command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Empty::Representation + command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Empty + command.params['accountId'] = account_id unless account_id.nil? + command.params['creativeId'] = creative_id unless creative_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a creative. + # @param [String] account_id + # The account the creative belongs to. + # @param [String] creative_id + # The ID of the creative to retrieve. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::Creative] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::Adexchangebuyer2V2beta1::Creative] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_account_creative(account_id, creative_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/creatives/{creativeId}', options) + command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Creative::Representation + command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Creative + command.params['accountId'] = account_id unless account_id.nil? + command.params['creativeId'] = creative_id unless creative_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Watches a creative. Will result in push notifications being sent to the + # topic when the creative changes status. + # @param [String] account_id + # The account of the creative to watch. + # @param [String] creative_id + # The creative ID to watch for status changes. + # Specify "-" to watch all creatives under the above account. + # If both creative-level and account-level notifications are + # sent, only a single notification will be sent to the + # creative-level notification topic. + # @param [Google::Apis::Adexchangebuyer2V2beta1::WatchCreativeRequest] watch_creative_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::Adexchangebuyer2V2beta1::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 watch_creative(account_id, creative_id, watch_creative_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/creatives/{creativeId}:watch', options) + command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::WatchCreativeRequest::Representation + command.request_object = watch_creative_request_object + command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Empty::Representation + command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Empty + command.params['accountId'] = account_id unless account_id.nil? + command.params['creativeId'] = creative_id unless creative_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a creative. + # @param [String] account_id + # The account that this creative belongs to. + # Can be used to filter the response of the + # creatives.list + # method. + # @param [String] creative_id + # The buyer-defined creative ID of this creative. + # Can be used to filter the response of the + # creatives.list + # method. + # @param [Google::Apis::Adexchangebuyer2V2beta1::Creative] creative_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::Creative] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::Adexchangebuyer2V2beta1::Creative] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_account_creative(account_id, creative_id, creative_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'v2beta1/accounts/{accountId}/creatives/{creativeId}', options) + command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::Creative::Representation + command.request_object = creative_object + command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Creative::Representation + command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Creative + command.params['accountId'] = account_id unless account_id.nil? + command.params['creativeId'] = creative_id unless creative_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -450,6 +644,11 @@ module Google # @param [String] account_id # The account to list the creatives from. # Specify "-" to list all creatives the current user has access to. + # @param [String] page_token + # A token identifying a page of results the server should return. + # Typically, this is the value of + # ListCreativesResponse.next_page_token + # returned from the previous call to 'ListCreatives' method. # @param [Fixnum] page_size # Requested page size. The server may return fewer creatives than requested # (due to timeout constraint) even if more are available via another call. @@ -471,16 +670,11 @@ module Google # # Example: 'accountId=12345 AND (dealsStatus:disapproved AND disapprovalReason: # unacceptable_content) OR attribute:47' - # @param [String] page_token - # A token identifying a page of results the server should return. - # Typically, this is the value of - # ListCreativesResponse.next_page_token - # returned from the previous call to 'ListCreatives' 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 # @@ -493,210 +687,16 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_account_creatives(account_id, page_size: nil, query: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_account_creatives(account_id, page_token: nil, page_size: nil, query: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/creatives', options) command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ListCreativesResponse::Representation command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ListCreativesResponse command.params['accountId'] = account_id unless account_id.nil? + command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['query'] = query unless query.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 - - # Creates a creative. - # @param [String] account_id - # The account that this creative belongs to. - # Can be used to filter the response of the - # creatives.list - # method. - # @param [Google::Apis::Adexchangebuyer2V2beta1::Creative] creative_object - # @param [String] duplicate_id_mode - # Indicates if multiple creatives can share an ID or not. Default is - # NO_DUPLICATES (one ID per creative). - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include 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::Creative] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::Adexchangebuyer2V2beta1::Creative] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_account_creative(account_id, creative_object = nil, duplicate_id_mode: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/creatives', options) - command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::Creative::Representation - command.request_object = creative_object - command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Creative::Representation - command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Creative - command.params['accountId'] = account_id unless account_id.nil? - command.query['duplicateIdMode'] = duplicate_id_mode unless duplicate_id_mode.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Stops watching a creative. Will stop push notifications being sent to the - # topics when the creative changes status. - # @param [String] account_id - # The account of the creative to stop notifications for. - # @param [String] creative_id - # The creative ID of the creative to stop notifications for. - # Specify "-" to specify stopping account level notifications. - # @param [Google::Apis::Adexchangebuyer2V2beta1::StopWatchingCreativeRequest] stop_watching_creative_request_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include 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::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::Adexchangebuyer2V2beta1::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 stop_watching_creative(account_id, creative_id, stop_watching_creative_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/creatives/{creativeId}:stopWatching', options) - command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::StopWatchingCreativeRequest::Representation - command.request_object = stop_watching_creative_request_object - command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Empty::Representation - command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Empty - command.params['accountId'] = account_id unless account_id.nil? - command.params['creativeId'] = creative_id unless creative_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Gets a creative. - # @param [String] account_id - # The account the creative belongs to. - # @param [String] creative_id - # The ID of the creative to retrieve. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::Creative] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::Adexchangebuyer2V2beta1::Creative] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_account_creative(account_id, creative_id, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/creatives/{creativeId}', options) - command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Creative::Representation - command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Creative - command.params['accountId'] = account_id unless account_id.nil? - command.params['creativeId'] = creative_id unless creative_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Watches a creative. Will result in push notifications being sent to the - # topic when the creative changes status. - # @param [String] account_id - # The account of the creative to watch. - # @param [String] creative_id - # The creative ID to watch for status changes. - # Specify "-" to watch all creatives under the above account. - # If both creative-level and account-level notifications are - # sent, only a single notification will be sent to the - # creative-level notification topic. - # @param [Google::Apis::Adexchangebuyer2V2beta1::WatchCreativeRequest] watch_creative_request_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include 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::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::Adexchangebuyer2V2beta1::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 watch_creative(account_id, creative_id, watch_creative_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/creatives/{creativeId}:watch', options) - command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::WatchCreativeRequest::Representation - command.request_object = watch_creative_request_object - command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Empty::Representation - command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Empty - command.params['accountId'] = account_id unless account_id.nil? - command.params['creativeId'] = creative_id unless creative_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Updates a creative. - # @param [String] account_id - # The account that this creative belongs to. - # Can be used to filter the response of the - # creatives.list - # method. - # @param [String] creative_id - # The buyer-defined creative ID of this creative. - # Can be used to filter the response of the - # creatives.list - # method. - # @param [Google::Apis::Adexchangebuyer2V2beta1::Creative] creative_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::Creative] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::Adexchangebuyer2V2beta1::Creative] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_account_creative(account_id, creative_id, creative_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:put, 'v2beta1/accounts/{accountId}/creatives/{creativeId}', options) - command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::Creative::Representation - command.request_object = creative_object - command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Creative::Representation - command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Creative - command.params['accountId'] = account_id unless account_id.nil? - command.params['creativeId'] = creative_id unless creative_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -729,11 +729,11 @@ module Google # not_checked` # # Example: 'dealsId=12345 AND dealsStatus:disapproved' + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -746,7 +746,7 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_account_creative_deal_associations(account_id, creative_id, page_token: nil, page_size: nil, query: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_account_creative_deal_associations(account_id, creative_id, page_token: nil, page_size: nil, query: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations', options) command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::ListDealAssociationsResponse::Representation command.response_class = Google::Apis::Adexchangebuyer2V2beta1::ListDealAssociationsResponse @@ -755,8 +755,8 @@ module Google command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['query'] = query unless query.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -766,11 +766,11 @@ module Google # @param [String] creative_id # The ID of the creative associated with the deal. # @param [Google::Apis::Adexchangebuyer2V2beta1::AddDealAssociationRequest] add_deal_association_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -783,7 +783,7 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def add_deal_association(account_id, creative_id, add_deal_association_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def add_deal_association(account_id, creative_id, add_deal_association_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:add', options) command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::AddDealAssociationRequest::Representation command.request_object = add_deal_association_request_object @@ -791,8 +791,8 @@ module Google command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Empty command.params['accountId'] = account_id unless account_id.nil? command.params['creativeId'] = creative_id unless creative_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -802,11 +802,11 @@ module Google # @param [String] creative_id # The ID of the creative associated with the deal. # @param [Google::Apis::Adexchangebuyer2V2beta1::RemoveDealAssociationRequest] remove_deal_association_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -819,7 +819,7 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def remove_deal_association(account_id, creative_id, remove_deal_association_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def remove_deal_association(account_id, creative_id, remove_deal_association_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:remove', options) command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::RemoveDealAssociationRequest::Representation command.request_object = remove_deal_association_request_object @@ -827,16 +827,16 @@ module Google command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Empty command.params['accountId'] = account_id unless account_id.nil? command.params['creativeId'] = creative_id unless creative_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end protected def apply_command_defaults(command) - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? end end end diff --git a/generated/google/apis/admin_directory_v1.rb b/generated/google/apis/admin_directory_v1.rb index 1b082ba83..17b6dfc5d 100644 --- a/generated/google/apis/admin_directory_v1.rb +++ b/generated/google/apis/admin_directory_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/admin-sdk/directory/ module AdminDirectoryV1 VERSION = 'DirectoryV1' - REVISION = '20161214' + REVISION = '20170216' # View and manage customer related information AUTH_ADMIN_DIRECTORY_CUSTOMER = 'https://www.googleapis.com/auth/admin.directory.customer' diff --git a/generated/google/apis/admin_directory_v1/classes.rb b/generated/google/apis/admin_directory_v1/classes.rb index 58988ec91..4ccf397e9 100644 --- a/generated/google/apis/admin_directory_v1/classes.rb +++ b/generated/google/apis/admin_directory_v1/classes.rb @@ -2463,6 +2463,11 @@ module Google # @return [Object] attr_accessor :phones + # + # Corresponds to the JSON property `posixAccounts` + # @return [Object] + attr_accessor :posix_accounts + # username of User # Corresponds to the JSON property `primaryEmail` # @return [String] @@ -2473,6 +2478,11 @@ module Google # @return [Object] attr_accessor :relations + # + # Corresponds to the JSON property `sshPublicKeys` + # @return [Object] + attr_accessor :ssh_public_keys + # Indicates if user is suspended # Corresponds to the JSON property `suspended` # @return [Boolean] @@ -2535,8 +2545,10 @@ module Google @organizations = args[:organizations] if args.key?(:organizations) @password = args[:password] if args.key?(:password) @phones = args[:phones] if args.key?(:phones) + @posix_accounts = args[:posix_accounts] if args.key?(:posix_accounts) @primary_email = args[:primary_email] if args.key?(:primary_email) @relations = args[:relations] if args.key?(:relations) + @ssh_public_keys = args[:ssh_public_keys] if args.key?(:ssh_public_keys) @suspended = args[:suspended] if args.key?(:suspended) @suspension_reason = args[:suspension_reason] if args.key?(:suspension_reason) @thumbnail_photo_etag = args[:thumbnail_photo_etag] if args.key?(:thumbnail_photo_etag) @@ -3033,6 +3045,69 @@ module Google end end + # JSON template for a POSIX account entry. Description of the field family: go/ + # fbs-posix. + class UserPosixAccount + include Google::Apis::Core::Hashable + + # The GECOS (user information) entry for this account. + # Corresponds to the JSON property `gecos` + # @return [String] + attr_accessor :gecos + + # The default group ID. + # Corresponds to the JSON property `gid` + # @return [Fixnum] + attr_accessor :gid + + # The path to the home directory for this account. + # Corresponds to the JSON property `homeDirectory` + # @return [String] + attr_accessor :home_directory + + # If this is user's primary account within the SystemId. + # Corresponds to the JSON property `primary` + # @return [Boolean] + attr_accessor :primary + alias_method :primary?, :primary + + # The path to the login shell for this account. + # Corresponds to the JSON property `shell` + # @return [String] + attr_accessor :shell + + # System identifier for which account Username or Uid apply to. + # Corresponds to the JSON property `systemId` + # @return [String] + attr_accessor :system_id + + # The user ID. + # Corresponds to the JSON property `uid` + # @return [Fixnum] + attr_accessor :uid + + # The username of the account. + # Corresponds to the JSON property `username` + # @return [String] + attr_accessor :username + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @gecos = args[:gecos] if args.key?(:gecos) + @gid = args[:gid] if args.key?(:gid) + @home_directory = args[:home_directory] if args.key?(:home_directory) + @primary = args[:primary] if args.key?(:primary) + @shell = args[:shell] if args.key?(:shell) + @system_id = args[:system_id] if args.key?(:system_id) + @uid = args[:uid] if args.key?(:uid) + @username = args[:username] if args.key?(:username) + end + end + # JSON template for a relation entry. class UserRelation include Google::Apis::Core::Hashable @@ -3065,6 +3140,37 @@ module Google end end + # JSON template for a POSIX account entry. + class UserSshPublicKey + include Google::Apis::Core::Hashable + + # An expiration time in microseconds since epoch. + # Corresponds to the JSON property `expirationTimeUsec` + # @return [String] + attr_accessor :expiration_time_usec + + # A SHA-256 fingerprint of the SSH public key. (Read-only) + # Corresponds to the JSON property `fingerprint` + # @return [String] + attr_accessor :fingerprint + + # An SSH public key. + # Corresponds to the JSON property `key` + # @return [String] + attr_accessor :key + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @expiration_time_usec = args[:expiration_time_usec] if args.key?(:expiration_time_usec) + @fingerprint = args[:fingerprint] if args.key?(:fingerprint) + @key = args[:key] if args.key?(:key) + end + end + # JSON request template to undelete a user in Directory API. class UserUndelete include Google::Apis::Core::Hashable diff --git a/generated/google/apis/admin_directory_v1/representations.rb b/generated/google/apis/admin_directory_v1/representations.rb index a74fc77d9..3589414a7 100644 --- a/generated/google/apis/admin_directory_v1/representations.rb +++ b/generated/google/apis/admin_directory_v1/representations.rb @@ -346,12 +346,24 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class UserPosixAccount + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class UserRelation class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class UserSshPublicKey + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class UserUndelete class Representation < Google::Apis::Core::JsonRepresentation; end @@ -985,8 +997,10 @@ module Google property :organizations, as: 'organizations' property :password, as: 'password' property :phones, as: 'phones' + property :posix_accounts, as: 'posixAccounts' property :primary_email, as: 'primaryEmail' property :relations, as: 'relations' + property :ssh_public_keys, as: 'sshPublicKeys' property :suspended, as: 'suspended' property :suspension_reason, as: 'suspensionReason' property :thumbnail_photo_etag, as: 'thumbnailPhotoEtag' @@ -1110,6 +1124,20 @@ module Google end end + class UserPosixAccount + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :gecos, as: 'gecos' + property :gid, as: 'gid' + property :home_directory, as: 'homeDirectory' + property :primary, as: 'primary' + property :shell, as: 'shell' + property :system_id, as: 'systemId' + property :uid, as: 'uid' + property :username, as: 'username' + end + end + class UserRelation # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1119,6 +1147,15 @@ module Google end end + class UserSshPublicKey + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :expiration_time_usec, as: 'expirationTimeUsec' + property :fingerprint, as: 'fingerprint' + property :key, as: 'key' + end + end + class UserUndelete # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/admin_reports_v1.rb b/generated/google/apis/admin_reports_v1.rb index 3112b7d97..e11b675e8 100644 --- a/generated/google/apis/admin_reports_v1.rb +++ b/generated/google/apis/admin_reports_v1.rb @@ -20,13 +20,13 @@ module Google module Apis # Admin Reports API # - # Fetches reports for the administrators of Google Apps customers about the - # usage, collaboration, security, and risk for their users. + # Fetches reports for the administrators of G Suite customers about the usage, + # collaboration, security, and risk for their users. # # @see https://developers.google.com/admin-sdk/reports/ module AdminReportsV1 VERSION = 'ReportsV1' - REVISION = '20160704' + REVISION = '20170315' # View audit reports for your G Suite domain AUTH_ADMIN_REPORTS_AUDIT_READONLY = 'https://www.googleapis.com/auth/admin.reports.audit.readonly' diff --git a/generated/google/apis/admin_reports_v1/service.rb b/generated/google/apis/admin_reports_v1/service.rb index fc089c00c..b08ad21e3 100644 --- a/generated/google/apis/admin_reports_v1/service.rb +++ b/generated/google/apis/admin_reports_v1/service.rb @@ -22,8 +22,8 @@ module Google module AdminReportsV1 # Admin Reports API # - # Fetches reports for the administrators of Google Apps customers about the - # usage, collaboration, security, and risk for their users. + # Fetches reports for the administrators of G Suite customers about the usage, + # collaboration, security, and risk for their users. # # @example # require 'google/apis/admin_reports_v1' @@ -66,7 +66,7 @@ module Google # @param [String] customer_id # Represents the customer for which the data is to be fetched. # @param [String] end_time - # Return events which occured at or before this time. + # Return events which occurred at or before this time. # @param [String] event_name # Name of the event being queried. # @param [String] filters @@ -77,7 +77,7 @@ module Google # @param [String] page_token # Token to specify next page. # @param [String] start_time - # Return events which occured at or after this time. + # Return events which occurred at or after this time. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -133,7 +133,7 @@ module Google # @param [String] customer_id # Represents the customer for which the data is to be fetched. # @param [String] end_time - # Return events which occured at or before this time. + # Return events which occurred at or before this time. # @param [String] event_name # Name of the event being queried. # @param [String] filters @@ -144,7 +144,7 @@ module Google # @param [String] page_token # Token to specify next page. # @param [String] start_time - # Return events which occured at or after this time. + # Return events which occurred at or after this time. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user diff --git a/generated/google/apis/adsense_v1_4.rb b/generated/google/apis/adsense_v1_4.rb index 216668164..8cbb0597b 100644 --- a/generated/google/apis/adsense_v1_4.rb +++ b/generated/google/apis/adsense_v1_4.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/adsense/management/ module AdsenseV1_4 VERSION = 'V1_4' - REVISION = '20170304' + REVISION = '20170325' # View and manage your AdSense data AUTH_ADSENSE = 'https://www.googleapis.com/auth/adsense' diff --git a/generated/google/apis/adsensehost_v4_1.rb b/generated/google/apis/adsensehost_v4_1.rb index e32a52ac9..a6170e946 100644 --- a/generated/google/apis/adsensehost_v4_1.rb +++ b/generated/google/apis/adsensehost_v4_1.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/adsense/host/ module AdsensehostV4_1 VERSION = 'V4_1' - REVISION = '20170304' + REVISION = '20170325' # View and manage your AdSense host data and associated accounts AUTH_ADSENSEHOST = 'https://www.googleapis.com/auth/adsensehost' diff --git a/generated/google/apis/analytics_v3.rb b/generated/google/apis/analytics_v3.rb index 8f06218cd..5db379750 100644 --- a/generated/google/apis/analytics_v3.rb +++ b/generated/google/apis/analytics_v3.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/analytics/ module AnalyticsV3 VERSION = 'V3' - REVISION = '20170302' + REVISION = '20170321' # View and manage your Google Analytics data AUTH_ANALYTICS = 'https://www.googleapis.com/auth/analytics' diff --git a/generated/google/apis/analytics_v3/service.rb b/generated/google/apis/analytics_v3/service.rb index a0f381bb1..e2a9930df 100644 --- a/generated/google/apis/analytics_v3/service.rb +++ b/generated/google/apis/analytics_v3/service.rb @@ -2450,6 +2450,45 @@ module Google execute_or_queue_command(command, &block) end + # Delete a remarketing audience. + # @param [String] account_id + # Account ID to which the remarketing audience belongs. + # @param [String] web_property_id + # Web property ID to which the remarketing audience belongs. + # @param [String] remarketing_audience_id + # The ID of the remarketing audience to delete. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # Overrides userIp if both are provided. + # @param [String] user_ip + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [NilClass] No result returned for this method + # @yieldparam err [StandardError] error object if request failed + # + # @return [void] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_management_remarketing_audience(account_id, web_property_id, remarketing_audience_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:delete, 'management/accounts/{accountId}/webproperties/{webPropertyId}/remarketingAudiences/{remarketingAudienceId}', options) + command.params['accountId'] = account_id unless account_id.nil? + command.params['webPropertyId'] = web_property_id unless web_property_id.nil? + command.params['remarketingAudienceId'] = remarketing_audience_id unless remarketing_audience_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + # Gets a remarketing audience to which the user has access. # @param [String] account_id # The account ID of the remarketing audience to retrieve. diff --git a/generated/google/apis/analyticsreporting_v4/classes.rb b/generated/google/apis/analyticsreporting_v4/classes.rb index 56b2b18b4..dac221a2b 100644 --- a/generated/google/apis/analyticsreporting_v4/classes.rb +++ b/generated/google/apis/analyticsreporting_v4/classes.rb @@ -22,933 +22,16 @@ module Google module Apis module AnalyticsreportingV4 - # The headers for the each of the metric column corresponding to the metrics - # requested in the pivots section of the response. - class PivotHeaderEntry - include Google::Apis::Core::Hashable - - # The name of the dimensions in the pivot response. - # Corresponds to the JSON property `dimensionNames` - # @return [Array] - attr_accessor :dimension_names - - # Header for the metrics. - # Corresponds to the JSON property `metric` - # @return [Google::Apis::AnalyticsreportingV4::MetricHeaderEntry] - attr_accessor :metric - - # The values for the dimensions in the pivot. - # Corresponds to the JSON property `dimensionValues` - # @return [Array] - attr_accessor :dimension_values - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dimension_names = args[:dimension_names] if args.key?(:dimension_names) - @metric = args[:metric] if args.key?(:metric) - @dimension_values = args[:dimension_values] if args.key?(:dimension_values) - end - end - - # SegmentFilter defines the segment to be either a simple or a sequence - # segment. A simple segment condition contains dimension and metric conditions - # to select the sessions or users. A sequence segment condition can be used to - # select users or sessions based on sequential conditions. - class SegmentFilter - include Google::Apis::Core::Hashable - - # If true, match the complement of simple or sequence segment. - # For example, to match all visits not from "New York", we can define the - # segment as follows: - # "sessionSegment": ` - # "segmentFilters": [` - # "simpleSegment" :` - # "orFiltersForSegment": [` - # "segmentFilterClauses":[` - # "dimensionFilter": ` - # "dimensionName": "ga:city", - # "expressions": ["New York"] - # ` - # `] - # `] - # `, - # "not": "True" - # `] - # `, - # Corresponds to the JSON property `not` - # @return [Boolean] - attr_accessor :not - alias_method :not?, :not - - # A Simple segment conditions consist of one or more dimension/metric - # conditions that can be combined. - # Corresponds to the JSON property `simpleSegment` - # @return [Google::Apis::AnalyticsreportingV4::SimpleSegment] - attr_accessor :simple_segment - - # Sequence conditions consist of one or more steps, where each step is defined - # by one or more dimension/metric conditions. Multiple steps can be combined - # with special sequence operators. - # Corresponds to the JSON property `sequenceSegment` - # @return [Google::Apis::AnalyticsreportingV4::SequenceSegment] - attr_accessor :sequence_segment - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @not = args[:not] if args.key?(:not) - @simple_segment = args[:simple_segment] if args.key?(:simple_segment) - @sequence_segment = args[:sequence_segment] if args.key?(:sequence_segment) - end - end - - # SegmentDefinition defines the segment to be a set of SegmentFilters which - # are combined together with a logical `AND` operation. - class SegmentDefinition - include Google::Apis::Core::Hashable - - # A segment is defined by a set of segment filters which are combined - # together with a logical `AND` operation. - # Corresponds to the JSON property `segmentFilters` - # @return [Array] - attr_accessor :segment_filters - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @segment_filters = args[:segment_filters] if args.key?(:segment_filters) - end - end - - # Header for the metrics. - class MetricHeaderEntry - include Google::Apis::Core::Hashable - - # The name of the header. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The type of the metric, for example `INTEGER`. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - @type = args[:type] if args.key?(:type) - end - end - - # The data part of the report. - class ReportData - include Google::Apis::Core::Hashable - - # If the results are - # [sampled](https://support.google.com/analytics/answer/2637192), - # this returns the total number of - # samples present, one entry per date range. If the results are not sampled - # this field will not be defined. See - # [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling) - # for details. - # Corresponds to the JSON property `samplingSpaceSizes` - # @return [Array] - attr_accessor :sampling_space_sizes - - # Minimum and maximum values seen over all matching rows. These are both - # empty when `hideValueRanges` in the request is false, or when - # rowCount is zero. - # Corresponds to the JSON property `minimums` - # @return [Array] - attr_accessor :minimums - - # For each requested date range, for the set of all rows that match - # the query, every requested value format gets a total. The total - # for a value format is computed by first totaling the metrics - # mentioned in the value format and then evaluating the value - # format as a scalar expression. E.g., The "totals" for - # `3 / (ga:sessions + 2)` we compute - # `3 / ((sum of all relevant ga:sessions) + 2)`. - # Totals are computed before pagination. - # Corresponds to the JSON property `totals` - # @return [Array] - attr_accessor :totals - - # If the results are - # [sampled](https://support.google.com/analytics/answer/2637192), - # this returns the total number of samples read, one entry per date range. - # If the results are not sampled this field will not be defined. See - # [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling) - # for details. - # Corresponds to the JSON property `samplesReadCounts` - # @return [Array] - attr_accessor :samples_read_counts - - # Total number of matching rows for this query. - # Corresponds to the JSON property `rowCount` - # @return [Fixnum] - attr_accessor :row_count - - # There's one ReportRow for every unique combination of dimensions. - # Corresponds to the JSON property `rows` - # @return [Array] - attr_accessor :rows - - # Indicates if response to this request is golden or not. Data is - # golden when the exact same request will not produce any new results if - # asked at a later point in time. - # Corresponds to the JSON property `isDataGolden` - # @return [Boolean] - attr_accessor :is_data_golden - alias_method :is_data_golden?, :is_data_golden - - # The last time the data in the report was refreshed. All the hits received - # before this timestamp are included in the calculation of the report. - # Corresponds to the JSON property `dataLastRefreshed` - # @return [String] - attr_accessor :data_last_refreshed - - # Minimum and maximum values seen over all matching rows. These are both - # empty when `hideValueRanges` in the request is false, or when - # rowCount is zero. - # Corresponds to the JSON property `maximums` - # @return [Array] - attr_accessor :maximums - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sampling_space_sizes = args[:sampling_space_sizes] if args.key?(:sampling_space_sizes) - @minimums = args[:minimums] if args.key?(:minimums) - @totals = args[:totals] if args.key?(:totals) - @samples_read_counts = args[:samples_read_counts] if args.key?(:samples_read_counts) - @row_count = args[:row_count] if args.key?(:row_count) - @rows = args[:rows] if args.key?(:rows) - @is_data_golden = args[:is_data_golden] if args.key?(:is_data_golden) - @data_last_refreshed = args[:data_last_refreshed] if args.key?(:data_last_refreshed) - @maximums = args[:maximums] if args.key?(:maximums) - end - end - - # Dimension filter specifies the filtering options on a dimension. - class DimensionFilter - include Google::Apis::Core::Hashable - - # The dimension to filter on. A DimensionFilter must contain a dimension. - # Corresponds to the JSON property `dimensionName` - # @return [String] - attr_accessor :dimension_name - - # How to match the dimension to the expression. The default is REGEXP. - # Corresponds to the JSON property `operator` - # @return [String] - attr_accessor :operator - - # Logical `NOT` operator. If this boolean is set to true, then the matching - # dimension values will be excluded in the report. The default is false. - # Corresponds to the JSON property `not` - # @return [Boolean] - attr_accessor :not - alias_method :not?, :not - - # Strings or regular expression to match against. Only the first value of - # the list is used for comparison unless the operator is `IN_LIST`. - # If `IN_LIST` operator, then the entire list is used to filter the - # dimensions as explained in the description of the `IN_LIST` operator. - # Corresponds to the JSON property `expressions` - # @return [Array] - attr_accessor :expressions - - # Should the match be case sensitive? Default is false. - # Corresponds to the JSON property `caseSensitive` - # @return [Boolean] - attr_accessor :case_sensitive - alias_method :case_sensitive?, :case_sensitive - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dimension_name = args[:dimension_name] if args.key?(:dimension_name) - @operator = args[:operator] if args.key?(:operator) - @not = args[:not] if args.key?(:not) - @expressions = args[:expressions] if args.key?(:expressions) - @case_sensitive = args[:case_sensitive] if args.key?(:case_sensitive) - end - end - - # The segment definition, if the report needs to be segmented. - # A Segment is a subset of the Analytics data. For example, of the entire - # set of users, one Segment might be users from a particular country or city. - class Segment - include Google::Apis::Core::Hashable - - # Dynamic segment definition for defining the segment within the request. - # A segment can select users, sessions or both. - # Corresponds to the JSON property `dynamicSegment` - # @return [Google::Apis::AnalyticsreportingV4::DynamicSegment] - attr_accessor :dynamic_segment - - # The segment ID of a built-in or custom segment, for example `gaid::-3`. - # Corresponds to the JSON property `segmentId` - # @return [String] - attr_accessor :segment_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dynamic_segment = args[:dynamic_segment] if args.key?(:dynamic_segment) - @segment_id = args[:segment_id] if args.key?(:segment_id) - end - end - - # Specifies the sorting options. - class OrderBy - include Google::Apis::Core::Hashable - - # The field which to sort by. The default sort order is ascending. Example: - # `ga:browser`. - # Note, that you can only specify one field for sort here. For example, - # `ga:browser, ga:city` is not valid. - # Corresponds to the JSON property `fieldName` - # @return [String] - attr_accessor :field_name - - # The order type. The default orderType is `VALUE`. - # Corresponds to the JSON property `orderType` - # @return [String] - attr_accessor :order_type - - # The sorting order for the field. - # Corresponds to the JSON property `sortOrder` - # @return [String] - attr_accessor :sort_order - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @field_name = args[:field_name] if args.key?(:field_name) - @order_type = args[:order_type] if args.key?(:order_type) - @sort_order = args[:sort_order] if args.key?(:sort_order) - end - end - - # Dimension filter specifies the filtering options on a dimension. - class SegmentDimensionFilter - include Google::Apis::Core::Hashable - - # Should the match be case sensitive, ignored for `IN_LIST` operator. - # Corresponds to the JSON property `caseSensitive` - # @return [Boolean] - attr_accessor :case_sensitive - alias_method :case_sensitive?, :case_sensitive - - # Minimum comparison values for `BETWEEN` match type. - # Corresponds to the JSON property `minComparisonValue` - # @return [String] - attr_accessor :min_comparison_value - - # Maximum comparison values for `BETWEEN` match type. - # Corresponds to the JSON property `maxComparisonValue` - # @return [String] - attr_accessor :max_comparison_value - - # Name of the dimension for which the filter is being applied. - # Corresponds to the JSON property `dimensionName` - # @return [String] - attr_accessor :dimension_name - - # The operator to use to match the dimension with the expressions. - # Corresponds to the JSON property `operator` - # @return [String] - attr_accessor :operator - - # The list of expressions, only the first element is used for all operators - # Corresponds to the JSON property `expressions` - # @return [Array] - attr_accessor :expressions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @case_sensitive = args[:case_sensitive] if args.key?(:case_sensitive) - @min_comparison_value = args[:min_comparison_value] if args.key?(:min_comparison_value) - @max_comparison_value = args[:max_comparison_value] if args.key?(:max_comparison_value) - @dimension_name = args[:dimension_name] if args.key?(:dimension_name) - @operator = args[:operator] if args.key?(:operator) - @expressions = args[:expressions] if args.key?(:expressions) - end - end - - # A segment sequence definition. - class SegmentSequenceStep - include Google::Apis::Core::Hashable - - # A sequence is specified with a list of Or grouped filters which are - # combined with `AND` operator. - # Corresponds to the JSON property `orFiltersForSegment` - # @return [Array] - attr_accessor :or_filters_for_segment - - # Specifies if the step immediately precedes or can be any time before the - # next step. - # Corresponds to the JSON property `matchType` - # @return [String] - attr_accessor :match_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @or_filters_for_segment = args[:or_filters_for_segment] if args.key?(:or_filters_for_segment) - @match_type = args[:match_type] if args.key?(:match_type) - end - end - - # [Metrics](https://support.google.com/analytics/answer/1033861) - # are the quantitative measurements. For example, the metric `ga:users` - # indicates the total number of users for the requested time period. - class Metric - include Google::Apis::Core::Hashable - - # A metric expression in the request. An expression is constructed from one - # or more metrics and numbers. Accepted operators include: Plus (+), Minus - # (-), Negation (Unary -), Divided by (/), Multiplied by (*), Parenthesis, - # Positive cardinal numbers (0-9), can include decimals and is limited to - # 1024 characters. Example `ga:totalRefunds/ga:users`, in most cases the - # metric expression is just a single metric name like `ga:users`. - # Adding mixed `MetricType` (E.g., `CURRENCY` + `PERCENTAGE`) metrics - # will result in unexpected results. - # Corresponds to the JSON property `expression` - # @return [String] - attr_accessor :expression - - # Specifies how the metric expression should be formatted, for example - # `INTEGER`. - # Corresponds to the JSON property `formattingType` - # @return [String] - attr_accessor :formatting_type - - # An alias for the metric expression is an alternate name for the - # expression. The alias can be used for filtering and sorting. This field - # is optional and is useful if the expression is not a single metric but - # a complex expression which cannot be used in filtering and sorting. - # The alias is also used in the response column header. - # Corresponds to the JSON property `alias` - # @return [String] - attr_accessor :alias - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @expression = args[:expression] if args.key?(:expression) - @formatting_type = args[:formatting_type] if args.key?(:formatting_type) - @alias = args[:alias] if args.key?(:alias) - end - end - - # The metric values in the pivot region. - class PivotValueRegion - include Google::Apis::Core::Hashable - - # The values of the metrics in each of the pivot regions. - # Corresponds to the JSON property `values` - # @return [Array] - attr_accessor :values - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @values = args[:values] if args.key?(:values) - end - end - - # The data response corresponding to the request. - class Report - include Google::Apis::Core::Hashable - - # Column headers. - # Corresponds to the JSON property `columnHeader` - # @return [Google::Apis::AnalyticsreportingV4::ColumnHeader] - attr_accessor :column_header - - # The data part of the report. - # Corresponds to the JSON property `data` - # @return [Google::Apis::AnalyticsreportingV4::ReportData] - attr_accessor :data - - # Page token to retrieve the next page of results in the list. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @column_header = args[:column_header] if args.key?(:column_header) - @data = args[:data] if args.key?(:data) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # The headers for each of the pivot sections defined in the request. - class PivotHeader - include Google::Apis::Core::Hashable - - # A single pivot section header. - # Corresponds to the JSON property `pivotHeaderEntries` - # @return [Array] - attr_accessor :pivot_header_entries - - # The total number of groups for this pivot. - # Corresponds to the JSON property `totalPivotGroupsCount` - # @return [Fixnum] - attr_accessor :total_pivot_groups_count - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @pivot_header_entries = args[:pivot_header_entries] if args.key?(:pivot_header_entries) - @total_pivot_groups_count = args[:total_pivot_groups_count] if args.key?(:total_pivot_groups_count) - end - end - - # A contiguous set of days: startDate, startDate + 1 day, ..., endDate. - # The start and end dates are specified in - # [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) date format `YYYY-MM-DD`. - class DateRange - include Google::Apis::Core::Hashable - - # The start date for the query in the format `YYYY-MM-DD`. - # Corresponds to the JSON property `startDate` - # @return [String] - attr_accessor :start_date - - # The end date for the query in the format `YYYY-MM-DD`. - # Corresponds to the JSON property `endDate` - # @return [String] - attr_accessor :end_date - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @start_date = args[:start_date] if args.key?(:start_date) - @end_date = args[:end_date] if args.key?(:end_date) - end - end - - # The main request class which specifies the Reporting API request. - class ReportRequest - include Google::Apis::Core::Hashable - - # The metric filter clauses. They are logically combined with the `AND` - # operator. Metric filters look at only the first date range and not the - # comparing date range. Note that filtering on metrics occurs after the - # metrics are aggregated. - # Corresponds to the JSON property `metricFilterClauses` - # @return [Array] - attr_accessor :metric_filter_clauses - - # Page size is for paging and specifies the maximum number of returned rows. - # Page size should be >= 0. A query returns the default of 1,000 rows. - # The Analytics Core Reporting API returns a maximum of 10,000 rows per - # request, no matter how many you ask for. It can also return fewer rows - # than requested, if there aren't as many dimension segments as you expect. - # For instance, there are fewer than 300 possible values for `ga:country`, - # so when segmenting only by country, you can't get more than 300 rows, - # even if you set `pageSize` to a higher value. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - # If set to true, hides the minimum and maximum across all matching rows. - # The default is false and the value ranges are returned. - # Corresponds to the JSON property `hideValueRanges` - # @return [Boolean] - attr_accessor :hide_value_ranges - alias_method :hide_value_ranges?, :hide_value_ranges - - # If set to true, hides the total of all metrics for all the matching rows, - # for every date range. The default false and will return the totals. - # Corresponds to the JSON property `hideTotals` - # @return [Boolean] - attr_accessor :hide_totals - alias_method :hide_totals?, :hide_totals - - # Dimension or metric filters that restrict the data returned for your - # request. To use the `filtersExpression`, supply a dimension or metric on - # which to filter, followed by the filter expression. For example, the - # following expression selects `ga:browser` dimension which starts with - # Firefox; `ga:browser=~^Firefox`. For more information on dimensions - # and metric filters, see - # [Filters reference](https://developers.google.com/analytics/devguides/ - # reporting/core/v3/reference#filters). - # Corresponds to the JSON property `filtersExpression` - # @return [String] - attr_accessor :filters_expression - - # Defines a cohort group. - # For example: - # "cohortGroup": ` - # "cohorts": [` - # "name": "cohort 1", - # "type": "FIRST_VISIT_DATE", - # "dateRange": ` "startDate": "2015-08-01", "endDate": "2015-08-01" ` - # `,` - # "name": "cohort 2" - # "type": "FIRST_VISIT_DATE" - # "dateRange": ` "startDate": "2015-07-01", "endDate": "2015-07-01" ` - # `] - # ` - # Corresponds to the JSON property `cohortGroup` - # @return [Google::Apis::AnalyticsreportingV4::CohortGroup] - attr_accessor :cohort_group - - # The Analytics - # [view ID](https://support.google.com/analytics/answer/1009618) - # from which to retrieve data. Every [ReportRequest](#ReportRequest) - # within a `batchGet` method must contain the same `viewId`. - # Corresponds to the JSON property `viewId` - # @return [String] - attr_accessor :view_id - - # The metrics requested. - # Requests must specify at least one metric. Requests can have a - # total of 10 metrics. - # Corresponds to the JSON property `metrics` - # @return [Array] - attr_accessor :metrics - - # The dimension filter clauses for filtering Dimension Values. They are - # logically combined with the `AND` operator. Note that filtering occurs - # before any dimensions are aggregated, so that the returned metrics - # represent the total for only the relevant dimensions. - # Corresponds to the JSON property `dimensionFilterClauses` - # @return [Array] - attr_accessor :dimension_filter_clauses - - # Sort order on output rows. To compare two rows, the elements of the - # following are applied in order until a difference is found. All date - # ranges in the output get the same row order. - # Corresponds to the JSON property `orderBys` - # @return [Array] - attr_accessor :order_bys - - # Segment the data returned for the request. A segment definition helps look - # at a subset of the segment request. A request can contain up to four - # segments. Every [ReportRequest](#ReportRequest) within a - # `batchGet` method must contain the same `segments` definition. Requests - # with segments must have the `ga:segment` dimension. - # Corresponds to the JSON property `segments` - # @return [Array] - attr_accessor :segments - - # The desired report - # [sample](https://support.google.com/analytics/answer/2637192) size. - # If the the `samplingLevel` field is unspecified the `DEFAULT` sampling - # level is used. Every [ReportRequest](#ReportRequest) within a - # `batchGet` method must contain the same `samplingLevel` definition. See - # [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling) - # for details. - # Corresponds to the JSON property `samplingLevel` - # @return [String] - attr_accessor :sampling_level - - # The dimensions requested. - # Requests can have a total of 7 dimensions. - # Corresponds to the JSON property `dimensions` - # @return [Array] - attr_accessor :dimensions - - # A continuation token to get the next page of the results. Adding this to - # the request will return the rows after the pageToken. The pageToken should - # be the value returned in the nextPageToken parameter in the response to - # the GetReports request. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # Date ranges in the request. The request can have a maximum of 2 date - # ranges. The response will contain a set of metric values for each - # combination of the dimensions for each date range in the request. So, if - # there are two date ranges, there will be two set of metric values, one for - # the original date range and one for the second date range. - # The `reportRequest.dateRanges` field should not be specified for cohorts - # or Lifetime value requests. - # If a date range is not provided, the default date range is (startDate: - # current date - 7 days, endDate: current date - 1 day). Every - # [ReportRequest](#ReportRequest) within a `batchGet` method must - # contain the same `dateRanges` definition. - # Corresponds to the JSON property `dateRanges` - # @return [Array] - attr_accessor :date_ranges - - # The pivot definitions. Requests can have a maximum of 2 pivots. - # Corresponds to the JSON property `pivots` - # @return [Array] - attr_accessor :pivots - - # If set to false, the response does not include rows if all the retrieved - # metrics are equal to zero. The default is false which will exclude these - # rows. - # Corresponds to the JSON property `includeEmptyRows` - # @return [Boolean] - attr_accessor :include_empty_rows - alias_method :include_empty_rows?, :include_empty_rows - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @metric_filter_clauses = args[:metric_filter_clauses] if args.key?(:metric_filter_clauses) - @page_size = args[:page_size] if args.key?(:page_size) - @hide_value_ranges = args[:hide_value_ranges] if args.key?(:hide_value_ranges) - @hide_totals = args[:hide_totals] if args.key?(:hide_totals) - @filters_expression = args[:filters_expression] if args.key?(:filters_expression) - @cohort_group = args[:cohort_group] if args.key?(:cohort_group) - @view_id = args[:view_id] if args.key?(:view_id) - @metrics = args[:metrics] if args.key?(:metrics) - @dimension_filter_clauses = args[:dimension_filter_clauses] if args.key?(:dimension_filter_clauses) - @order_bys = args[:order_bys] if args.key?(:order_bys) - @segments = args[:segments] if args.key?(:segments) - @sampling_level = args[:sampling_level] if args.key?(:sampling_level) - @dimensions = args[:dimensions] if args.key?(:dimensions) - @page_token = args[:page_token] if args.key?(:page_token) - @date_ranges = args[:date_ranges] if args.key?(:date_ranges) - @pivots = args[:pivots] if args.key?(:pivots) - @include_empty_rows = args[:include_empty_rows] if args.key?(:include_empty_rows) - end - end - - # MetricFilter specifies the filter on a metric. - class MetricFilter - include Google::Apis::Core::Hashable - - # The metric that will be filtered on. A metricFilter must contain a metric - # name. A metric name can be an alias earlier defined as a metric or it can - # also be a metric expression. - # Corresponds to the JSON property `metricName` - # @return [String] - attr_accessor :metric_name - - # The value to compare against. - # Corresponds to the JSON property `comparisonValue` - # @return [String] - attr_accessor :comparison_value - - # Is the metric `EQUAL`, `LESS_THAN` or `GREATER_THAN` the - # comparisonValue, the default is `EQUAL`. If the operator is - # `IS_MISSING`, checks if the metric is missing and would ignore the - # comparisonValue. - # Corresponds to the JSON property `operator` - # @return [String] - attr_accessor :operator - - # Logical `NOT` operator. If this boolean is set to true, then the matching - # metric values will be excluded in the report. The default is false. - # Corresponds to the JSON property `not` - # @return [Boolean] - attr_accessor :not - alias_method :not?, :not - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @metric_name = args[:metric_name] if args.key?(:metric_name) - @comparison_value = args[:comparison_value] if args.key?(:comparison_value) - @operator = args[:operator] if args.key?(:operator) - @not = args[:not] if args.key?(:not) - end - end - - # [Dimensions](https://support.google.com/analytics/answer/1033861) - # are attributes of your data. For example, the dimension `ga:city` - # indicates the city, for example, "Paris" or "New York", from which - # a session originates. - class Dimension - include Google::Apis::Core::Hashable - - # If non-empty, we place dimension values into buckets after string to - # int64. Dimension values that are not the string representation of an - # integral value will be converted to zero. The bucket values have to be in - # increasing order. Each bucket is closed on the lower end, and open on the - # upper end. The "first" bucket includes all values less than the first - # boundary, the "last" bucket includes all values up to infinity. Dimension - # values that fall in a bucket get transformed to a new dimension value. For - # example, if one gives a list of "0, 1, 3, 4, 7", then we return the - # following buckets: - # - bucket #1: values < 0, dimension value "<0" - # - bucket #2: values in [0,1), dimension value "0" - # - bucket #3: values in [1,3), dimension value "1-2" - # - bucket #4: values in [3,4), dimension value "3" - # - bucket #5: values in [4,7), dimension value "4-6" - # - bucket #6: values >= 7, dimension value "7+" - # NOTE: If you are applying histogram mutation on any dimension, and using - # that dimension in sort, you will want to use the sort type - # `HISTOGRAM_BUCKET` for that purpose. Without that the dimension values - # will be sorted according to dictionary - # (lexicographic) order. For example the ascending dictionary order is: - # "<50", "1001+", "121-1000", "50-120" - # And the ascending `HISTOGRAM_BUCKET` order is: - # "<50", "50-120", "121-1000", "1001+" - # The client has to explicitly request `"orderType": "HISTOGRAM_BUCKET"` - # for a histogram-mutated dimension. - # Corresponds to the JSON property `histogramBuckets` - # @return [Array] - attr_accessor :histogram_buckets - - # Name of the dimension to fetch, for example `ga:browser`. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @histogram_buckets = args[:histogram_buckets] if args.key?(:histogram_buckets) - @name = args[:name] if args.key?(:name) - end - end - - # Dynamic segment definition for defining the segment within the request. - # A segment can select users, sessions or both. - class DynamicSegment - include Google::Apis::Core::Hashable - - # SegmentDefinition defines the segment to be a set of SegmentFilters which - # are combined together with a logical `AND` operation. - # Corresponds to the JSON property `sessionSegment` - # @return [Google::Apis::AnalyticsreportingV4::SegmentDefinition] - attr_accessor :session_segment - - # The name of the dynamic segment. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # SegmentDefinition defines the segment to be a set of SegmentFilters which - # are combined together with a logical `AND` operation. - # Corresponds to the JSON property `userSegment` - # @return [Google::Apis::AnalyticsreportingV4::SegmentDefinition] - attr_accessor :user_segment - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @session_segment = args[:session_segment] if args.key?(:session_segment) - @name = args[:name] if args.key?(:name) - @user_segment = args[:user_segment] if args.key?(:user_segment) - end - end - - # A Simple segment conditions consist of one or more dimension/metric - # conditions that can be combined. - class SimpleSegment - include Google::Apis::Core::Hashable - - # A list of segment filters groups which are combined with logical `AND` - # operator. - # Corresponds to the JSON property `orFiltersForSegment` - # @return [Array] - attr_accessor :or_filters_for_segment - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @or_filters_for_segment = args[:or_filters_for_segment] if args.key?(:or_filters_for_segment) - end - end - - # Column headers. - class ColumnHeader - include Google::Apis::Core::Hashable - - # The headers for the metrics. - # Corresponds to the JSON property `metricHeader` - # @return [Google::Apis::AnalyticsreportingV4::MetricHeader] - attr_accessor :metric_header - - # The dimension names in the response. - # Corresponds to the JSON property `dimensions` - # @return [Array] - attr_accessor :dimensions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @metric_header = args[:metric_header] if args.key?(:metric_header) - @dimensions = args[:dimensions] if args.key?(:dimensions) - end - end - # Filter Clause to be used in a segment definition, can be wither a metric or # a dimension filter. class SegmentFilterClause include Google::Apis::Core::Hashable + # Metric filter to be used in a segment filter clause. + # Corresponds to the JSON property `metricFilter` + # @return [Google::Apis::AnalyticsreportingV4::SegmentMetricFilter] + attr_accessor :metric_filter + # Matches the complement (`!`) of the filter. # Corresponds to the JSON property `not` # @return [Boolean] @@ -960,20 +43,15 @@ module Google # @return [Google::Apis::AnalyticsreportingV4::SegmentDimensionFilter] attr_accessor :dimension_filter - # Metric filter to be used in a segment filter clause. - # Corresponds to the JSON property `metricFilter` - # @return [Google::Apis::AnalyticsreportingV4::SegmentMetricFilter] - attr_accessor :metric_filter - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @metric_filter = args[:metric_filter] if args.key?(:metric_filter) @not = args[:not] if args.key?(:not) @dimension_filter = args[:dimension_filter] if args.key?(:dimension_filter) - @metric_filter = args[:metric_filter] if args.key?(:metric_filter) end end @@ -1011,13 +89,6 @@ module Google class Cohort include Google::Apis::Core::Hashable - # Type of the cohort. The only supported type as of now is - # `FIRST_VISIT_DATE`. If this field is unspecified the cohort is treated - # as `FIRST_VISIT_DATE` type cohort. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - # A unique name for the cohort. If not defined name will be auto-generated # with values cohort_[1234...]. # Corresponds to the JSON property `name` @@ -1031,15 +102,22 @@ module Google # @return [Google::Apis::AnalyticsreportingV4::DateRange] attr_accessor :date_range + # Type of the cohort. The only supported type as of now is + # `FIRST_VISIT_DATE`. If this field is unspecified the cohort is treated + # as `FIRST_VISIT_DATE` type cohort. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @type = args[:type] if args.key?(:type) @name = args[:name] if args.key?(:name) @date_range = args[:date_range] if args.key?(:date_range) + @type = args[:type] if args.key?(:type) end end @@ -1092,24 +170,24 @@ module Google class MetricHeader include Google::Apis::Core::Hashable - # Headers for the metrics in the response. - # Corresponds to the JSON property `metricHeaderEntries` - # @return [Array] - attr_accessor :metric_header_entries - # Headers for the pivots in the response. # Corresponds to the JSON property `pivotHeaders` # @return [Array] attr_accessor :pivot_headers + # Headers for the metrics in the response. + # Corresponds to the JSON property `metricHeaderEntries` + # @return [Array] + attr_accessor :metric_header_entries + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @metric_header_entries = args[:metric_header_entries] if args.key?(:metric_header_entries) @pivot_headers = args[:pivot_headers] if args.key?(:pivot_headers) + @metric_header_entries = args[:metric_header_entries] if args.key?(:metric_header_entries) end end @@ -1415,6 +493,928 @@ module Google @dimension_filter_clauses = args[:dimension_filter_clauses] if args.key?(:dimension_filter_clauses) end end + + # The headers for the each of the metric column corresponding to the metrics + # requested in the pivots section of the response. + class PivotHeaderEntry + include Google::Apis::Core::Hashable + + # The name of the dimensions in the pivot response. + # Corresponds to the JSON property `dimensionNames` + # @return [Array] + attr_accessor :dimension_names + + # Header for the metrics. + # Corresponds to the JSON property `metric` + # @return [Google::Apis::AnalyticsreportingV4::MetricHeaderEntry] + attr_accessor :metric + + # The values for the dimensions in the pivot. + # Corresponds to the JSON property `dimensionValues` + # @return [Array] + attr_accessor :dimension_values + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @dimension_names = args[:dimension_names] if args.key?(:dimension_names) + @metric = args[:metric] if args.key?(:metric) + @dimension_values = args[:dimension_values] if args.key?(:dimension_values) + end + end + + # SegmentFilter defines the segment to be either a simple or a sequence + # segment. A simple segment condition contains dimension and metric conditions + # to select the sessions or users. A sequence segment condition can be used to + # select users or sessions based on sequential conditions. + class SegmentFilter + include Google::Apis::Core::Hashable + + # Sequence conditions consist of one or more steps, where each step is defined + # by one or more dimension/metric conditions. Multiple steps can be combined + # with special sequence operators. + # Corresponds to the JSON property `sequenceSegment` + # @return [Google::Apis::AnalyticsreportingV4::SequenceSegment] + attr_accessor :sequence_segment + + # If true, match the complement of simple or sequence segment. + # For example, to match all visits not from "New York", we can define the + # segment as follows: + # "sessionSegment": ` + # "segmentFilters": [` + # "simpleSegment" :` + # "orFiltersForSegment": [` + # "segmentFilterClauses":[` + # "dimensionFilter": ` + # "dimensionName": "ga:city", + # "expressions": ["New York"] + # ` + # `] + # `] + # `, + # "not": "True" + # `] + # `, + # Corresponds to the JSON property `not` + # @return [Boolean] + attr_accessor :not + alias_method :not?, :not + + # A Simple segment conditions consist of one or more dimension/metric + # conditions that can be combined. + # Corresponds to the JSON property `simpleSegment` + # @return [Google::Apis::AnalyticsreportingV4::SimpleSegment] + attr_accessor :simple_segment + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @sequence_segment = args[:sequence_segment] if args.key?(:sequence_segment) + @not = args[:not] if args.key?(:not) + @simple_segment = args[:simple_segment] if args.key?(:simple_segment) + end + end + + # SegmentDefinition defines the segment to be a set of SegmentFilters which + # are combined together with a logical `AND` operation. + class SegmentDefinition + include Google::Apis::Core::Hashable + + # A segment is defined by a set of segment filters which are combined + # together with a logical `AND` operation. + # Corresponds to the JSON property `segmentFilters` + # @return [Array] + attr_accessor :segment_filters + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @segment_filters = args[:segment_filters] if args.key?(:segment_filters) + end + end + + # Header for the metrics. + class MetricHeaderEntry + include Google::Apis::Core::Hashable + + # The type of the metric, for example `INTEGER`. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The name of the header. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type = args[:type] if args.key?(:type) + @name = args[:name] if args.key?(:name) + end + end + + # The data part of the report. + class ReportData + include Google::Apis::Core::Hashable + + # Minimum and maximum values seen over all matching rows. These are both + # empty when `hideValueRanges` in the request is false, or when + # rowCount is zero. + # Corresponds to the JSON property `minimums` + # @return [Array] + attr_accessor :minimums + + # If the results are + # [sampled](https://support.google.com/analytics/answer/2637192), + # this returns the total number of + # samples present, one entry per date range. If the results are not sampled + # this field will not be defined. See + # [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling) + # for details. + # Corresponds to the JSON property `samplingSpaceSizes` + # @return [Array] + attr_accessor :sampling_space_sizes + + # For each requested date range, for the set of all rows that match + # the query, every requested value format gets a total. The total + # for a value format is computed by first totaling the metrics + # mentioned in the value format and then evaluating the value + # format as a scalar expression. E.g., The "totals" for + # `3 / (ga:sessions + 2)` we compute + # `3 / ((sum of all relevant ga:sessions) + 2)`. + # Totals are computed before pagination. + # Corresponds to the JSON property `totals` + # @return [Array] + attr_accessor :totals + + # If the results are + # [sampled](https://support.google.com/analytics/answer/2637192), + # this returns the total number of samples read, one entry per date range. + # If the results are not sampled this field will not be defined. See + # [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling) + # for details. + # Corresponds to the JSON property `samplesReadCounts` + # @return [Array] + attr_accessor :samples_read_counts + + # Indicates if response to this request is golden or not. Data is + # golden when the exact same request will not produce any new results if + # asked at a later point in time. + # Corresponds to the JSON property `isDataGolden` + # @return [Boolean] + attr_accessor :is_data_golden + alias_method :is_data_golden?, :is_data_golden + + # There's one ReportRow for every unique combination of dimensions. + # Corresponds to the JSON property `rows` + # @return [Array] + attr_accessor :rows + + # Total number of matching rows for this query. + # Corresponds to the JSON property `rowCount` + # @return [Fixnum] + attr_accessor :row_count + + # The last time the data in the report was refreshed. All the hits received + # before this timestamp are included in the calculation of the report. + # Corresponds to the JSON property `dataLastRefreshed` + # @return [String] + attr_accessor :data_last_refreshed + + # Minimum and maximum values seen over all matching rows. These are both + # empty when `hideValueRanges` in the request is false, or when + # rowCount is zero. + # Corresponds to the JSON property `maximums` + # @return [Array] + attr_accessor :maximums + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @minimums = args[:minimums] if args.key?(:minimums) + @sampling_space_sizes = args[:sampling_space_sizes] if args.key?(:sampling_space_sizes) + @totals = args[:totals] if args.key?(:totals) + @samples_read_counts = args[:samples_read_counts] if args.key?(:samples_read_counts) + @is_data_golden = args[:is_data_golden] if args.key?(:is_data_golden) + @rows = args[:rows] if args.key?(:rows) + @row_count = args[:row_count] if args.key?(:row_count) + @data_last_refreshed = args[:data_last_refreshed] if args.key?(:data_last_refreshed) + @maximums = args[:maximums] if args.key?(:maximums) + end + end + + # Dimension filter specifies the filtering options on a dimension. + class DimensionFilter + include Google::Apis::Core::Hashable + + # Should the match be case sensitive? Default is false. + # Corresponds to the JSON property `caseSensitive` + # @return [Boolean] + attr_accessor :case_sensitive + alias_method :case_sensitive?, :case_sensitive + + # The dimension to filter on. A DimensionFilter must contain a dimension. + # Corresponds to the JSON property `dimensionName` + # @return [String] + attr_accessor :dimension_name + + # How to match the dimension to the expression. The default is REGEXP. + # Corresponds to the JSON property `operator` + # @return [String] + attr_accessor :operator + + # Logical `NOT` operator. If this boolean is set to true, then the matching + # dimension values will be excluded in the report. The default is false. + # Corresponds to the JSON property `not` + # @return [Boolean] + attr_accessor :not + alias_method :not?, :not + + # Strings or regular expression to match against. Only the first value of + # the list is used for comparison unless the operator is `IN_LIST`. + # If `IN_LIST` operator, then the entire list is used to filter the + # dimensions as explained in the description of the `IN_LIST` operator. + # Corresponds to the JSON property `expressions` + # @return [Array] + attr_accessor :expressions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @case_sensitive = args[:case_sensitive] if args.key?(:case_sensitive) + @dimension_name = args[:dimension_name] if args.key?(:dimension_name) + @operator = args[:operator] if args.key?(:operator) + @not = args[:not] if args.key?(:not) + @expressions = args[:expressions] if args.key?(:expressions) + end + end + + # Dimension filter specifies the filtering options on a dimension. + class SegmentDimensionFilter + include Google::Apis::Core::Hashable + + # Minimum comparison values for `BETWEEN` match type. + # Corresponds to the JSON property `minComparisonValue` + # @return [String] + attr_accessor :min_comparison_value + + # Maximum comparison values for `BETWEEN` match type. + # Corresponds to the JSON property `maxComparisonValue` + # @return [String] + attr_accessor :max_comparison_value + + # Name of the dimension for which the filter is being applied. + # Corresponds to the JSON property `dimensionName` + # @return [String] + attr_accessor :dimension_name + + # The operator to use to match the dimension with the expressions. + # Corresponds to the JSON property `operator` + # @return [String] + attr_accessor :operator + + # The list of expressions, only the first element is used for all operators + # Corresponds to the JSON property `expressions` + # @return [Array] + attr_accessor :expressions + + # Should the match be case sensitive, ignored for `IN_LIST` operator. + # Corresponds to the JSON property `caseSensitive` + # @return [Boolean] + attr_accessor :case_sensitive + alias_method :case_sensitive?, :case_sensitive + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @min_comparison_value = args[:min_comparison_value] if args.key?(:min_comparison_value) + @max_comparison_value = args[:max_comparison_value] if args.key?(:max_comparison_value) + @dimension_name = args[:dimension_name] if args.key?(:dimension_name) + @operator = args[:operator] if args.key?(:operator) + @expressions = args[:expressions] if args.key?(:expressions) + @case_sensitive = args[:case_sensitive] if args.key?(:case_sensitive) + end + end + + # Specifies the sorting options. + class OrderBy + include Google::Apis::Core::Hashable + + # The field which to sort by. The default sort order is ascending. Example: + # `ga:browser`. + # Note, that you can only specify one field for sort here. For example, + # `ga:browser, ga:city` is not valid. + # Corresponds to the JSON property `fieldName` + # @return [String] + attr_accessor :field_name + + # The order type. The default orderType is `VALUE`. + # Corresponds to the JSON property `orderType` + # @return [String] + attr_accessor :order_type + + # The sorting order for the field. + # Corresponds to the JSON property `sortOrder` + # @return [String] + attr_accessor :sort_order + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @field_name = args[:field_name] if args.key?(:field_name) + @order_type = args[:order_type] if args.key?(:order_type) + @sort_order = args[:sort_order] if args.key?(:sort_order) + end + end + + # The segment definition, if the report needs to be segmented. + # A Segment is a subset of the Analytics data. For example, of the entire + # set of users, one Segment might be users from a particular country or city. + class Segment + include Google::Apis::Core::Hashable + + # Dynamic segment definition for defining the segment within the request. + # A segment can select users, sessions or both. + # Corresponds to the JSON property `dynamicSegment` + # @return [Google::Apis::AnalyticsreportingV4::DynamicSegment] + attr_accessor :dynamic_segment + + # The segment ID of a built-in or custom segment, for example `gaid::-3`. + # Corresponds to the JSON property `segmentId` + # @return [String] + attr_accessor :segment_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @dynamic_segment = args[:dynamic_segment] if args.key?(:dynamic_segment) + @segment_id = args[:segment_id] if args.key?(:segment_id) + end + end + + # A segment sequence definition. + class SegmentSequenceStep + include Google::Apis::Core::Hashable + + # A sequence is specified with a list of Or grouped filters which are + # combined with `AND` operator. + # Corresponds to the JSON property `orFiltersForSegment` + # @return [Array] + attr_accessor :or_filters_for_segment + + # Specifies if the step immediately precedes or can be any time before the + # next step. + # Corresponds to the JSON property `matchType` + # @return [String] + attr_accessor :match_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @or_filters_for_segment = args[:or_filters_for_segment] if args.key?(:or_filters_for_segment) + @match_type = args[:match_type] if args.key?(:match_type) + end + end + + # [Metrics](https://support.google.com/analytics/answer/1033861) + # are the quantitative measurements. For example, the metric `ga:users` + # indicates the total number of users for the requested time period. + class Metric + include Google::Apis::Core::Hashable + + # A metric expression in the request. An expression is constructed from one + # or more metrics and numbers. Accepted operators include: Plus (+), Minus + # (-), Negation (Unary -), Divided by (/), Multiplied by (*), Parenthesis, + # Positive cardinal numbers (0-9), can include decimals and is limited to + # 1024 characters. Example `ga:totalRefunds/ga:users`, in most cases the + # metric expression is just a single metric name like `ga:users`. + # Adding mixed `MetricType` (E.g., `CURRENCY` + `PERCENTAGE`) metrics + # will result in unexpected results. + # Corresponds to the JSON property `expression` + # @return [String] + attr_accessor :expression + + # Specifies how the metric expression should be formatted, for example + # `INTEGER`. + # Corresponds to the JSON property `formattingType` + # @return [String] + attr_accessor :formatting_type + + # An alias for the metric expression is an alternate name for the + # expression. The alias can be used for filtering and sorting. This field + # is optional and is useful if the expression is not a single metric but + # a complex expression which cannot be used in filtering and sorting. + # The alias is also used in the response column header. + # Corresponds to the JSON property `alias` + # @return [String] + attr_accessor :alias + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @expression = args[:expression] if args.key?(:expression) + @formatting_type = args[:formatting_type] if args.key?(:formatting_type) + @alias = args[:alias] if args.key?(:alias) + end + end + + # The metric values in the pivot region. + class PivotValueRegion + include Google::Apis::Core::Hashable + + # The values of the metrics in each of the pivot regions. + # Corresponds to the JSON property `values` + # @return [Array] + attr_accessor :values + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @values = args[:values] if args.key?(:values) + end + end + + # The data response corresponding to the request. + class Report + include Google::Apis::Core::Hashable + + # The data part of the report. + # Corresponds to the JSON property `data` + # @return [Google::Apis::AnalyticsreportingV4::ReportData] + attr_accessor :data + + # Page token to retrieve the next page of results in the list. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # Column headers. + # Corresponds to the JSON property `columnHeader` + # @return [Google::Apis::AnalyticsreportingV4::ColumnHeader] + attr_accessor :column_header + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @data = args[:data] if args.key?(:data) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @column_header = args[:column_header] if args.key?(:column_header) + end + end + + # The headers for each of the pivot sections defined in the request. + class PivotHeader + include Google::Apis::Core::Hashable + + # A single pivot section header. + # Corresponds to the JSON property `pivotHeaderEntries` + # @return [Array] + attr_accessor :pivot_header_entries + + # The total number of groups for this pivot. + # Corresponds to the JSON property `totalPivotGroupsCount` + # @return [Fixnum] + attr_accessor :total_pivot_groups_count + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @pivot_header_entries = args[:pivot_header_entries] if args.key?(:pivot_header_entries) + @total_pivot_groups_count = args[:total_pivot_groups_count] if args.key?(:total_pivot_groups_count) + end + end + + # A contiguous set of days: startDate, startDate + 1 day, ..., endDate. + # The start and end dates are specified in + # [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) date format `YYYY-MM-DD`. + class DateRange + include Google::Apis::Core::Hashable + + # The start date for the query in the format `YYYY-MM-DD`. + # Corresponds to the JSON property `startDate` + # @return [String] + attr_accessor :start_date + + # The end date for the query in the format `YYYY-MM-DD`. + # Corresponds to the JSON property `endDate` + # @return [String] + attr_accessor :end_date + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @start_date = args[:start_date] if args.key?(:start_date) + @end_date = args[:end_date] if args.key?(:end_date) + end + end + + # MetricFilter specifies the filter on a metric. + class MetricFilter + include Google::Apis::Core::Hashable + + # The metric that will be filtered on. A metricFilter must contain a metric + # name. A metric name can be an alias earlier defined as a metric or it can + # also be a metric expression. + # Corresponds to the JSON property `metricName` + # @return [String] + attr_accessor :metric_name + + # The value to compare against. + # Corresponds to the JSON property `comparisonValue` + # @return [String] + attr_accessor :comparison_value + + # Is the metric `EQUAL`, `LESS_THAN` or `GREATER_THAN` the + # comparisonValue, the default is `EQUAL`. If the operator is + # `IS_MISSING`, checks if the metric is missing and would ignore the + # comparisonValue. + # Corresponds to the JSON property `operator` + # @return [String] + attr_accessor :operator + + # Logical `NOT` operator. If this boolean is set to true, then the matching + # metric values will be excluded in the report. The default is false. + # Corresponds to the JSON property `not` + # @return [Boolean] + attr_accessor :not + alias_method :not?, :not + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @metric_name = args[:metric_name] if args.key?(:metric_name) + @comparison_value = args[:comparison_value] if args.key?(:comparison_value) + @operator = args[:operator] if args.key?(:operator) + @not = args[:not] if args.key?(:not) + end + end + + # The main request class which specifies the Reporting API request. + class ReportRequest + include Google::Apis::Core::Hashable + + # The metric filter clauses. They are logically combined with the `AND` + # operator. Metric filters look at only the first date range and not the + # comparing date range. Note that filtering on metrics occurs after the + # metrics are aggregated. + # Corresponds to the JSON property `metricFilterClauses` + # @return [Array] + attr_accessor :metric_filter_clauses + + # Page size is for paging and specifies the maximum number of returned rows. + # Page size should be >= 0. A query returns the default of 1,000 rows. + # The Analytics Core Reporting API returns a maximum of 10,000 rows per + # request, no matter how many you ask for. It can also return fewer rows + # than requested, if there aren't as many dimension segments as you expect. + # For instance, there are fewer than 300 possible values for `ga:country`, + # so when segmenting only by country, you can't get more than 300 rows, + # even if you set `pageSize` to a higher value. + # Corresponds to the JSON property `pageSize` + # @return [Fixnum] + attr_accessor :page_size + + # If set to true, hides the total of all metrics for all the matching rows, + # for every date range. The default false and will return the totals. + # Corresponds to the JSON property `hideTotals` + # @return [Boolean] + attr_accessor :hide_totals + alias_method :hide_totals?, :hide_totals + + # If set to true, hides the minimum and maximum across all matching rows. + # The default is false and the value ranges are returned. + # Corresponds to the JSON property `hideValueRanges` + # @return [Boolean] + attr_accessor :hide_value_ranges + alias_method :hide_value_ranges?, :hide_value_ranges + + # Dimension or metric filters that restrict the data returned for your + # request. To use the `filtersExpression`, supply a dimension or metric on + # which to filter, followed by the filter expression. For example, the + # following expression selects `ga:browser` dimension which starts with + # Firefox; `ga:browser=~^Firefox`. For more information on dimensions + # and metric filters, see + # [Filters reference](https://developers.google.com/analytics/devguides/ + # reporting/core/v3/reference#filters). + # Corresponds to the JSON property `filtersExpression` + # @return [String] + attr_accessor :filters_expression + + # Defines a cohort group. + # For example: + # "cohortGroup": ` + # "cohorts": [` + # "name": "cohort 1", + # "type": "FIRST_VISIT_DATE", + # "dateRange": ` "startDate": "2015-08-01", "endDate": "2015-08-01" ` + # `,` + # "name": "cohort 2" + # "type": "FIRST_VISIT_DATE" + # "dateRange": ` "startDate": "2015-07-01", "endDate": "2015-07-01" ` + # `] + # ` + # Corresponds to the JSON property `cohortGroup` + # @return [Google::Apis::AnalyticsreportingV4::CohortGroup] + attr_accessor :cohort_group + + # The Analytics + # [view ID](https://support.google.com/analytics/answer/1009618) + # from which to retrieve data. Every [ReportRequest](#ReportRequest) + # within a `batchGet` method must contain the same `viewId`. + # Corresponds to the JSON property `viewId` + # @return [String] + attr_accessor :view_id + + # The metrics requested. + # Requests must specify at least one metric. Requests can have a + # total of 10 metrics. + # Corresponds to the JSON property `metrics` + # @return [Array] + attr_accessor :metrics + + # The dimension filter clauses for filtering Dimension Values. They are + # logically combined with the `AND` operator. Note that filtering occurs + # before any dimensions are aggregated, so that the returned metrics + # represent the total for only the relevant dimensions. + # Corresponds to the JSON property `dimensionFilterClauses` + # @return [Array] + attr_accessor :dimension_filter_clauses + + # Sort order on output rows. To compare two rows, the elements of the + # following are applied in order until a difference is found. All date + # ranges in the output get the same row order. + # Corresponds to the JSON property `orderBys` + # @return [Array] + attr_accessor :order_bys + + # Segment the data returned for the request. A segment definition helps look + # at a subset of the segment request. A request can contain up to four + # segments. Every [ReportRequest](#ReportRequest) within a + # `batchGet` method must contain the same `segments` definition. Requests + # with segments must have the `ga:segment` dimension. + # Corresponds to the JSON property `segments` + # @return [Array] + attr_accessor :segments + + # The desired report + # [sample](https://support.google.com/analytics/answer/2637192) size. + # If the the `samplingLevel` field is unspecified the `DEFAULT` sampling + # level is used. Every [ReportRequest](#ReportRequest) within a + # `batchGet` method must contain the same `samplingLevel` definition. See + # [developer guide](/analytics/devguides/reporting/core/v4/basics#sampling) + # for details. + # Corresponds to the JSON property `samplingLevel` + # @return [String] + attr_accessor :sampling_level + + # The dimensions requested. + # Requests can have a total of 7 dimensions. + # Corresponds to the JSON property `dimensions` + # @return [Array] + attr_accessor :dimensions + + # A continuation token to get the next page of the results. Adding this to + # the request will return the rows after the pageToken. The pageToken should + # be the value returned in the nextPageToken parameter in the response to + # the GetReports request. + # Corresponds to the JSON property `pageToken` + # @return [String] + attr_accessor :page_token + + # Date ranges in the request. The request can have a maximum of 2 date + # ranges. The response will contain a set of metric values for each + # combination of the dimensions for each date range in the request. So, if + # there are two date ranges, there will be two set of metric values, one for + # the original date range and one for the second date range. + # The `reportRequest.dateRanges` field should not be specified for cohorts + # or Lifetime value requests. + # If a date range is not provided, the default date range is (startDate: + # current date - 7 days, endDate: current date - 1 day). Every + # [ReportRequest](#ReportRequest) within a `batchGet` method must + # contain the same `dateRanges` definition. + # Corresponds to the JSON property `dateRanges` + # @return [Array] + attr_accessor :date_ranges + + # The pivot definitions. Requests can have a maximum of 2 pivots. + # Corresponds to the JSON property `pivots` + # @return [Array] + attr_accessor :pivots + + # If set to false, the response does not include rows if all the retrieved + # metrics are equal to zero. The default is false which will exclude these + # rows. + # Corresponds to the JSON property `includeEmptyRows` + # @return [Boolean] + attr_accessor :include_empty_rows + alias_method :include_empty_rows?, :include_empty_rows + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @metric_filter_clauses = args[:metric_filter_clauses] if args.key?(:metric_filter_clauses) + @page_size = args[:page_size] if args.key?(:page_size) + @hide_totals = args[:hide_totals] if args.key?(:hide_totals) + @hide_value_ranges = args[:hide_value_ranges] if args.key?(:hide_value_ranges) + @filters_expression = args[:filters_expression] if args.key?(:filters_expression) + @cohort_group = args[:cohort_group] if args.key?(:cohort_group) + @view_id = args[:view_id] if args.key?(:view_id) + @metrics = args[:metrics] if args.key?(:metrics) + @dimension_filter_clauses = args[:dimension_filter_clauses] if args.key?(:dimension_filter_clauses) + @order_bys = args[:order_bys] if args.key?(:order_bys) + @segments = args[:segments] if args.key?(:segments) + @sampling_level = args[:sampling_level] if args.key?(:sampling_level) + @dimensions = args[:dimensions] if args.key?(:dimensions) + @page_token = args[:page_token] if args.key?(:page_token) + @date_ranges = args[:date_ranges] if args.key?(:date_ranges) + @pivots = args[:pivots] if args.key?(:pivots) + @include_empty_rows = args[:include_empty_rows] if args.key?(:include_empty_rows) + end + end + + # [Dimensions](https://support.google.com/analytics/answer/1033861) + # are attributes of your data. For example, the dimension `ga:city` + # indicates the city, for example, "Paris" or "New York", from which + # a session originates. + class Dimension + include Google::Apis::Core::Hashable + + # If non-empty, we place dimension values into buckets after string to + # int64. Dimension values that are not the string representation of an + # integral value will be converted to zero. The bucket values have to be in + # increasing order. Each bucket is closed on the lower end, and open on the + # upper end. The "first" bucket includes all values less than the first + # boundary, the "last" bucket includes all values up to infinity. Dimension + # values that fall in a bucket get transformed to a new dimension value. For + # example, if one gives a list of "0, 1, 3, 4, 7", then we return the + # following buckets: + # - bucket #1: values < 0, dimension value "<0" + # - bucket #2: values in [0,1), dimension value "0" + # - bucket #3: values in [1,3), dimension value "1-2" + # - bucket #4: values in [3,4), dimension value "3" + # - bucket #5: values in [4,7), dimension value "4-6" + # - bucket #6: values >= 7, dimension value "7+" + # NOTE: If you are applying histogram mutation on any dimension, and using + # that dimension in sort, you will want to use the sort type + # `HISTOGRAM_BUCKET` for that purpose. Without that the dimension values + # will be sorted according to dictionary + # (lexicographic) order. For example the ascending dictionary order is: + # "<50", "1001+", "121-1000", "50-120" + # And the ascending `HISTOGRAM_BUCKET` order is: + # "<50", "50-120", "121-1000", "1001+" + # The client has to explicitly request `"orderType": "HISTOGRAM_BUCKET"` + # for a histogram-mutated dimension. + # Corresponds to the JSON property `histogramBuckets` + # @return [Array] + attr_accessor :histogram_buckets + + # Name of the dimension to fetch, for example `ga:browser`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @histogram_buckets = args[:histogram_buckets] if args.key?(:histogram_buckets) + @name = args[:name] if args.key?(:name) + end + end + + # Dynamic segment definition for defining the segment within the request. + # A segment can select users, sessions or both. + class DynamicSegment + include Google::Apis::Core::Hashable + + # SegmentDefinition defines the segment to be a set of SegmentFilters which + # are combined together with a logical `AND` operation. + # Corresponds to the JSON property `sessionSegment` + # @return [Google::Apis::AnalyticsreportingV4::SegmentDefinition] + attr_accessor :session_segment + + # The name of the dynamic segment. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # SegmentDefinition defines the segment to be a set of SegmentFilters which + # are combined together with a logical `AND` operation. + # Corresponds to the JSON property `userSegment` + # @return [Google::Apis::AnalyticsreportingV4::SegmentDefinition] + attr_accessor :user_segment + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @session_segment = args[:session_segment] if args.key?(:session_segment) + @name = args[:name] if args.key?(:name) + @user_segment = args[:user_segment] if args.key?(:user_segment) + end + end + + # A Simple segment conditions consist of one or more dimension/metric + # conditions that can be combined. + class SimpleSegment + include Google::Apis::Core::Hashable + + # A list of segment filters groups which are combined with logical `AND` + # operator. + # Corresponds to the JSON property `orFiltersForSegment` + # @return [Array] + attr_accessor :or_filters_for_segment + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @or_filters_for_segment = args[:or_filters_for_segment] if args.key?(:or_filters_for_segment) + end + end + + # Column headers. + class ColumnHeader + include Google::Apis::Core::Hashable + + # The headers for the metrics. + # Corresponds to the JSON property `metricHeader` + # @return [Google::Apis::AnalyticsreportingV4::MetricHeader] + attr_accessor :metric_header + + # The dimension names in the response. + # Corresponds to the JSON property `dimensions` + # @return [Array] + attr_accessor :dimensions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @metric_header = args[:metric_header] if args.key?(:metric_header) + @dimensions = args[:dimensions] if args.key?(:dimensions) + end + end end end end diff --git a/generated/google/apis/analyticsreporting_v4/representations.rb b/generated/google/apis/analyticsreporting_v4/representations.rb index 58c8ae7af..110c93130 100644 --- a/generated/google/apis/analyticsreporting_v4/representations.rb +++ b/generated/google/apis/analyticsreporting_v4/representations.rb @@ -22,132 +22,6 @@ module Google module Apis module AnalyticsreportingV4 - class PivotHeaderEntry - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SegmentFilter - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SegmentDefinition - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MetricHeaderEntry - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ReportData - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DimensionFilter - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Segment - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class OrderBy - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SegmentDimensionFilter - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SegmentSequenceStep - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Metric - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PivotValueRegion - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Report - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PivotHeader - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DateRange - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ReportRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MetricFilter - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Dimension - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DynamicSegment - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SimpleSegment - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ColumnHeader - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class SegmentFilterClause class Representation < Google::Apis::Core::JsonRepresentation; end @@ -233,241 +107,139 @@ module Google end class PivotHeaderEntry - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :dimension_names, as: 'dimensionNames' - property :metric, as: 'metric', class: Google::Apis::AnalyticsreportingV4::MetricHeaderEntry, decorator: Google::Apis::AnalyticsreportingV4::MetricHeaderEntry::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - collection :dimension_values, as: 'dimensionValues' - end + include Google::Apis::Core::JsonObjectSupport end class SegmentFilter - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :not, as: 'not' - property :simple_segment, as: 'simpleSegment', class: Google::Apis::AnalyticsreportingV4::SimpleSegment, decorator: Google::Apis::AnalyticsreportingV4::SimpleSegment::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :sequence_segment, as: 'sequenceSegment', class: Google::Apis::AnalyticsreportingV4::SequenceSegment, decorator: Google::Apis::AnalyticsreportingV4::SequenceSegment::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class SegmentDefinition - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :segment_filters, as: 'segmentFilters', class: Google::Apis::AnalyticsreportingV4::SegmentFilter, decorator: Google::Apis::AnalyticsreportingV4::SegmentFilter::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class MetricHeaderEntry - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :type, as: 'type' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ReportData - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :sampling_space_sizes, as: 'samplingSpaceSizes' - collection :minimums, as: 'minimums', class: Google::Apis::AnalyticsreportingV4::DateRangeValues, decorator: Google::Apis::AnalyticsreportingV4::DateRangeValues::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - collection :totals, as: 'totals', class: Google::Apis::AnalyticsreportingV4::DateRangeValues, decorator: Google::Apis::AnalyticsreportingV4::DateRangeValues::Representation - - collection :samples_read_counts, as: 'samplesReadCounts' - property :row_count, as: 'rowCount' - collection :rows, as: 'rows', class: Google::Apis::AnalyticsreportingV4::ReportRow, decorator: Google::Apis::AnalyticsreportingV4::ReportRow::Representation - - property :is_data_golden, as: 'isDataGolden' - property :data_last_refreshed, as: 'dataLastRefreshed' - collection :maximums, as: 'maximums', class: Google::Apis::AnalyticsreportingV4::DateRangeValues, decorator: Google::Apis::AnalyticsreportingV4::DateRangeValues::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class DimensionFilter - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :dimension_name, as: 'dimensionName' - property :operator, as: 'operator' - property :not, as: 'not' - collection :expressions, as: 'expressions' - property :case_sensitive, as: 'caseSensitive' - end - end + class Representation < Google::Apis::Core::JsonRepresentation; end - class Segment - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :dynamic_segment, as: 'dynamicSegment', class: Google::Apis::AnalyticsreportingV4::DynamicSegment, decorator: Google::Apis::AnalyticsreportingV4::DynamicSegment::Representation - - property :segment_id, as: 'segmentId' - end - end - - class OrderBy - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :field_name, as: 'fieldName' - property :order_type, as: 'orderType' - property :sort_order, as: 'sortOrder' - end + include Google::Apis::Core::JsonObjectSupport end class SegmentDimensionFilter - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :case_sensitive, as: 'caseSensitive' - property :min_comparison_value, as: 'minComparisonValue' - property :max_comparison_value, as: 'maxComparisonValue' - property :dimension_name, as: 'dimensionName' - property :operator, as: 'operator' - collection :expressions, as: 'expressions' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class OrderBy + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Segment + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class SegmentSequenceStep - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :or_filters_for_segment, as: 'orFiltersForSegment', class: Google::Apis::AnalyticsreportingV4::OrFiltersForSegment, decorator: Google::Apis::AnalyticsreportingV4::OrFiltersForSegment::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :match_type, as: 'matchType' - end + include Google::Apis::Core::JsonObjectSupport end class Metric - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :expression, as: 'expression' - property :formatting_type, as: 'formattingType' - property :alias, as: 'alias' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class PivotValueRegion - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :values, as: 'values' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Report - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :column_header, as: 'columnHeader', class: Google::Apis::AnalyticsreportingV4::ColumnHeader, decorator: Google::Apis::AnalyticsreportingV4::ColumnHeader::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :data, as: 'data', class: Google::Apis::AnalyticsreportingV4::ReportData, decorator: Google::Apis::AnalyticsreportingV4::ReportData::Representation - - property :next_page_token, as: 'nextPageToken' - end + include Google::Apis::Core::JsonObjectSupport end class PivotHeader - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :pivot_header_entries, as: 'pivotHeaderEntries', class: Google::Apis::AnalyticsreportingV4::PivotHeaderEntry, decorator: Google::Apis::AnalyticsreportingV4::PivotHeaderEntry::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :total_pivot_groups_count, as: 'totalPivotGroupsCount' - end + include Google::Apis::Core::JsonObjectSupport end class DateRange - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :start_date, as: 'startDate' - property :end_date, as: 'endDate' - end - end + class Representation < Google::Apis::Core::JsonRepresentation; end - class ReportRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :metric_filter_clauses, as: 'metricFilterClauses', class: Google::Apis::AnalyticsreportingV4::MetricFilterClause, decorator: Google::Apis::AnalyticsreportingV4::MetricFilterClause::Representation - - property :page_size, as: 'pageSize' - property :hide_value_ranges, as: 'hideValueRanges' - property :hide_totals, as: 'hideTotals' - property :filters_expression, as: 'filtersExpression' - property :cohort_group, as: 'cohortGroup', class: Google::Apis::AnalyticsreportingV4::CohortGroup, decorator: Google::Apis::AnalyticsreportingV4::CohortGroup::Representation - - property :view_id, as: 'viewId' - collection :metrics, as: 'metrics', class: Google::Apis::AnalyticsreportingV4::Metric, decorator: Google::Apis::AnalyticsreportingV4::Metric::Representation - - collection :dimension_filter_clauses, as: 'dimensionFilterClauses', class: Google::Apis::AnalyticsreportingV4::DimensionFilterClause, decorator: Google::Apis::AnalyticsreportingV4::DimensionFilterClause::Representation - - collection :order_bys, as: 'orderBys', class: Google::Apis::AnalyticsreportingV4::OrderBy, decorator: Google::Apis::AnalyticsreportingV4::OrderBy::Representation - - collection :segments, as: 'segments', class: Google::Apis::AnalyticsreportingV4::Segment, decorator: Google::Apis::AnalyticsreportingV4::Segment::Representation - - property :sampling_level, as: 'samplingLevel' - collection :dimensions, as: 'dimensions', class: Google::Apis::AnalyticsreportingV4::Dimension, decorator: Google::Apis::AnalyticsreportingV4::Dimension::Representation - - property :page_token, as: 'pageToken' - collection :date_ranges, as: 'dateRanges', class: Google::Apis::AnalyticsreportingV4::DateRange, decorator: Google::Apis::AnalyticsreportingV4::DateRange::Representation - - collection :pivots, as: 'pivots', class: Google::Apis::AnalyticsreportingV4::Pivot, decorator: Google::Apis::AnalyticsreportingV4::Pivot::Representation - - property :include_empty_rows, as: 'includeEmptyRows' - end + include Google::Apis::Core::JsonObjectSupport end class MetricFilter - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :metric_name, as: 'metricName' - property :comparison_value, as: 'comparisonValue' - property :operator, as: 'operator' - property :not, as: 'not' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ReportRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Dimension - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :histogram_buckets, as: 'histogramBuckets' - property :name, as: 'name' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class DynamicSegment - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :session_segment, as: 'sessionSegment', class: Google::Apis::AnalyticsreportingV4::SegmentDefinition, decorator: Google::Apis::AnalyticsreportingV4::SegmentDefinition::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :name, as: 'name' - property :user_segment, as: 'userSegment', class: Google::Apis::AnalyticsreportingV4::SegmentDefinition, decorator: Google::Apis::AnalyticsreportingV4::SegmentDefinition::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class SimpleSegment - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :or_filters_for_segment, as: 'orFiltersForSegment', class: Google::Apis::AnalyticsreportingV4::OrFiltersForSegment, decorator: Google::Apis::AnalyticsreportingV4::OrFiltersForSegment::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class ColumnHeader - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :metric_header, as: 'metricHeader', class: Google::Apis::AnalyticsreportingV4::MetricHeader, decorator: Google::Apis::AnalyticsreportingV4::MetricHeader::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - collection :dimensions, as: 'dimensions' - end + include Google::Apis::Core::JsonObjectSupport end class SegmentFilterClause # @private class Representation < Google::Apis::Core::JsonRepresentation + property :metric_filter, as: 'metricFilter', class: Google::Apis::AnalyticsreportingV4::SegmentMetricFilter, decorator: Google::Apis::AnalyticsreportingV4::SegmentMetricFilter::Representation + property :not, as: 'not' property :dimension_filter, as: 'dimensionFilter', class: Google::Apis::AnalyticsreportingV4::SegmentDimensionFilter, decorator: Google::Apis::AnalyticsreportingV4::SegmentDimensionFilter::Representation - property :metric_filter, as: 'metricFilter', class: Google::Apis::AnalyticsreportingV4::SegmentMetricFilter, decorator: Google::Apis::AnalyticsreportingV4::SegmentMetricFilter::Representation - end end @@ -483,10 +255,10 @@ module Google class Cohort # @private class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' property :name, as: 'name' property :date_range, as: 'dateRange', class: Google::Apis::AnalyticsreportingV4::DateRange, decorator: Google::Apis::AnalyticsreportingV4::DateRange::Representation + property :type, as: 'type' end end @@ -510,10 +282,10 @@ module Google class MetricHeader # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :metric_header_entries, as: 'metricHeaderEntries', class: Google::Apis::AnalyticsreportingV4::MetricHeaderEntry, decorator: Google::Apis::AnalyticsreportingV4::MetricHeaderEntry::Representation - collection :pivot_headers, as: 'pivotHeaders', class: Google::Apis::AnalyticsreportingV4::PivotHeader, decorator: Google::Apis::AnalyticsreportingV4::PivotHeader::Representation + collection :metric_header_entries, as: 'metricHeaderEntries', class: Google::Apis::AnalyticsreportingV4::MetricHeaderEntry, decorator: Google::Apis::AnalyticsreportingV4::MetricHeaderEntry::Representation + end end @@ -593,6 +365,234 @@ module Google end end + + class PivotHeaderEntry + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :dimension_names, as: 'dimensionNames' + property :metric, as: 'metric', class: Google::Apis::AnalyticsreportingV4::MetricHeaderEntry, decorator: Google::Apis::AnalyticsreportingV4::MetricHeaderEntry::Representation + + collection :dimension_values, as: 'dimensionValues' + end + end + + class SegmentFilter + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :sequence_segment, as: 'sequenceSegment', class: Google::Apis::AnalyticsreportingV4::SequenceSegment, decorator: Google::Apis::AnalyticsreportingV4::SequenceSegment::Representation + + property :not, as: 'not' + property :simple_segment, as: 'simpleSegment', class: Google::Apis::AnalyticsreportingV4::SimpleSegment, decorator: Google::Apis::AnalyticsreportingV4::SimpleSegment::Representation + + end + end + + class SegmentDefinition + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :segment_filters, as: 'segmentFilters', class: Google::Apis::AnalyticsreportingV4::SegmentFilter, decorator: Google::Apis::AnalyticsreportingV4::SegmentFilter::Representation + + end + end + + class MetricHeaderEntry + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' + property :name, as: 'name' + end + end + + class ReportData + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :minimums, as: 'minimums', class: Google::Apis::AnalyticsreportingV4::DateRangeValues, decorator: Google::Apis::AnalyticsreportingV4::DateRangeValues::Representation + + collection :sampling_space_sizes, as: 'samplingSpaceSizes' + collection :totals, as: 'totals', class: Google::Apis::AnalyticsreportingV4::DateRangeValues, decorator: Google::Apis::AnalyticsreportingV4::DateRangeValues::Representation + + collection :samples_read_counts, as: 'samplesReadCounts' + property :is_data_golden, as: 'isDataGolden' + collection :rows, as: 'rows', class: Google::Apis::AnalyticsreportingV4::ReportRow, decorator: Google::Apis::AnalyticsreportingV4::ReportRow::Representation + + property :row_count, as: 'rowCount' + property :data_last_refreshed, as: 'dataLastRefreshed' + collection :maximums, as: 'maximums', class: Google::Apis::AnalyticsreportingV4::DateRangeValues, decorator: Google::Apis::AnalyticsreportingV4::DateRangeValues::Representation + + end + end + + class DimensionFilter + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :case_sensitive, as: 'caseSensitive' + property :dimension_name, as: 'dimensionName' + property :operator, as: 'operator' + property :not, as: 'not' + collection :expressions, as: 'expressions' + end + end + + class SegmentDimensionFilter + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :min_comparison_value, as: 'minComparisonValue' + property :max_comparison_value, as: 'maxComparisonValue' + property :dimension_name, as: 'dimensionName' + property :operator, as: 'operator' + collection :expressions, as: 'expressions' + property :case_sensitive, as: 'caseSensitive' + end + end + + class OrderBy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :field_name, as: 'fieldName' + property :order_type, as: 'orderType' + property :sort_order, as: 'sortOrder' + end + end + + class Segment + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :dynamic_segment, as: 'dynamicSegment', class: Google::Apis::AnalyticsreportingV4::DynamicSegment, decorator: Google::Apis::AnalyticsreportingV4::DynamicSegment::Representation + + property :segment_id, as: 'segmentId' + end + end + + class SegmentSequenceStep + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :or_filters_for_segment, as: 'orFiltersForSegment', class: Google::Apis::AnalyticsreportingV4::OrFiltersForSegment, decorator: Google::Apis::AnalyticsreportingV4::OrFiltersForSegment::Representation + + property :match_type, as: 'matchType' + end + end + + class Metric + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :expression, as: 'expression' + property :formatting_type, as: 'formattingType' + property :alias, as: 'alias' + end + end + + class PivotValueRegion + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :values, as: 'values' + end + end + + class Report + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :data, as: 'data', class: Google::Apis::AnalyticsreportingV4::ReportData, decorator: Google::Apis::AnalyticsreportingV4::ReportData::Representation + + property :next_page_token, as: 'nextPageToken' + property :column_header, as: 'columnHeader', class: Google::Apis::AnalyticsreportingV4::ColumnHeader, decorator: Google::Apis::AnalyticsreportingV4::ColumnHeader::Representation + + end + end + + class PivotHeader + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :pivot_header_entries, as: 'pivotHeaderEntries', class: Google::Apis::AnalyticsreportingV4::PivotHeaderEntry, decorator: Google::Apis::AnalyticsreportingV4::PivotHeaderEntry::Representation + + property :total_pivot_groups_count, as: 'totalPivotGroupsCount' + end + end + + class DateRange + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :start_date, as: 'startDate' + property :end_date, as: 'endDate' + end + end + + class MetricFilter + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :metric_name, as: 'metricName' + property :comparison_value, as: 'comparisonValue' + property :operator, as: 'operator' + property :not, as: 'not' + end + end + + class ReportRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :metric_filter_clauses, as: 'metricFilterClauses', class: Google::Apis::AnalyticsreportingV4::MetricFilterClause, decorator: Google::Apis::AnalyticsreportingV4::MetricFilterClause::Representation + + property :page_size, as: 'pageSize' + property :hide_totals, as: 'hideTotals' + property :hide_value_ranges, as: 'hideValueRanges' + property :filters_expression, as: 'filtersExpression' + property :cohort_group, as: 'cohortGroup', class: Google::Apis::AnalyticsreportingV4::CohortGroup, decorator: Google::Apis::AnalyticsreportingV4::CohortGroup::Representation + + property :view_id, as: 'viewId' + collection :metrics, as: 'metrics', class: Google::Apis::AnalyticsreportingV4::Metric, decorator: Google::Apis::AnalyticsreportingV4::Metric::Representation + + collection :dimension_filter_clauses, as: 'dimensionFilterClauses', class: Google::Apis::AnalyticsreportingV4::DimensionFilterClause, decorator: Google::Apis::AnalyticsreportingV4::DimensionFilterClause::Representation + + collection :order_bys, as: 'orderBys', class: Google::Apis::AnalyticsreportingV4::OrderBy, decorator: Google::Apis::AnalyticsreportingV4::OrderBy::Representation + + collection :segments, as: 'segments', class: Google::Apis::AnalyticsreportingV4::Segment, decorator: Google::Apis::AnalyticsreportingV4::Segment::Representation + + property :sampling_level, as: 'samplingLevel' + collection :dimensions, as: 'dimensions', class: Google::Apis::AnalyticsreportingV4::Dimension, decorator: Google::Apis::AnalyticsreportingV4::Dimension::Representation + + property :page_token, as: 'pageToken' + collection :date_ranges, as: 'dateRanges', class: Google::Apis::AnalyticsreportingV4::DateRange, decorator: Google::Apis::AnalyticsreportingV4::DateRange::Representation + + collection :pivots, as: 'pivots', class: Google::Apis::AnalyticsreportingV4::Pivot, decorator: Google::Apis::AnalyticsreportingV4::Pivot::Representation + + property :include_empty_rows, as: 'includeEmptyRows' + end + end + + class Dimension + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :histogram_buckets, as: 'histogramBuckets' + property :name, as: 'name' + end + end + + class DynamicSegment + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :session_segment, as: 'sessionSegment', class: Google::Apis::AnalyticsreportingV4::SegmentDefinition, decorator: Google::Apis::AnalyticsreportingV4::SegmentDefinition::Representation + + property :name, as: 'name' + property :user_segment, as: 'userSegment', class: Google::Apis::AnalyticsreportingV4::SegmentDefinition, decorator: Google::Apis::AnalyticsreportingV4::SegmentDefinition::Representation + + end + end + + class SimpleSegment + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :or_filters_for_segment, as: 'orFiltersForSegment', class: Google::Apis::AnalyticsreportingV4::OrFiltersForSegment, decorator: Google::Apis::AnalyticsreportingV4::OrFiltersForSegment::Representation + + end + end + + class ColumnHeader + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :metric_header, as: 'metricHeader', class: Google::Apis::AnalyticsreportingV4::MetricHeader, decorator: Google::Apis::AnalyticsreportingV4::MetricHeader::Representation + + collection :dimensions, as: 'dimensions' + end + end end end end diff --git a/generated/google/apis/analyticsreporting_v4/service.rb b/generated/google/apis/analyticsreporting_v4/service.rb index c16c996d0..4d4ac4e50 100644 --- a/generated/google/apis/analyticsreporting_v4/service.rb +++ b/generated/google/apis/analyticsreporting_v4/service.rb @@ -48,11 +48,11 @@ module Google # Returns the Analytics data. # @param [Google::Apis::AnalyticsreportingV4::GetReportsRequest] get_reports_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 # @@ -65,14 +65,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 batch_get_reports(get_reports_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def batch_get_reports(get_reports_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v4/reports:batchGet', options) command.request_representation = Google::Apis::AnalyticsreportingV4::GetReportsRequest::Representation command.request_object = get_reports_request_object command.response_representation = Google::Apis::AnalyticsreportingV4::GetReportsResponse::Representation command.response_class = Google::Apis::AnalyticsreportingV4::GetReportsResponse - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/androidenterprise_v1.rb b/generated/google/apis/androidenterprise_v1.rb index 0b55b3a61..5f86f357f 100644 --- a/generated/google/apis/androidenterprise_v1.rb +++ b/generated/google/apis/androidenterprise_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/android/work/play/emm-api module AndroidenterpriseV1 VERSION = 'V1' - REVISION = '20170301' + REVISION = '20170322' # Manage corporate Android devices AUTH_ANDROIDENTERPRISE = 'https://www.googleapis.com/auth/androidenterprise' diff --git a/generated/google/apis/androidenterprise_v1/classes.rb b/generated/google/apis/androidenterprise_v1/classes.rb index c126ce927..cb613c5af 100644 --- a/generated/google/apis/androidenterprise_v1/classes.rb +++ b/generated/google/apis/androidenterprise_v1/classes.rb @@ -1941,12 +1941,10 @@ module Google class StoreLayout include Google::Apis::Core::Hashable - # The ID of the store page to be used as the homepage. The homepage will be used - # as the first page shown in the managed Google Play store. - # If a homepage has not been set, the Play store shown on devices will be empty. - # Not specifying a homepage on a store layout effectively empties the store. - # If there exists at least one page, this field must be set to the ID of a valid - # page. + # The ID of the store page to be used as the homepage. The homepage is the first + # page shown in the managed Google Play Store. + # Not specifying a homepage is equivalent to setting the store layout type to " + # basic". # Corresponds to the JSON property `homepageId` # @return [String] attr_accessor :homepage_id @@ -1957,13 +1955,10 @@ module Google # @return [String] attr_accessor :kind - # The store layout type. By default, this value is set to "basic". If set to " - # custom", "homepageId" must be specified. If set to "basic", the layout will - # consist of all approved apps accessible by the user, split in pages of 100 - # each; in this case, "homepageId" must not be specified. The "basic" setting - # takes precedence over any existing collections setup for this enterprise (if - # any). Should the enterprise use collectionViewers for controlling access - # rights, these will still be respected. + # The store layout type. By default, this value is set to "basic" if the + # homepageId field is not set, and to "custom" otherwise. If set to "basic", the + # layout will consist of all approved apps that have been whitelisted for the + # user. # Corresponds to the JSON property `storeLayoutType` # @return [String] attr_accessor :store_layout_type diff --git a/generated/google/apis/androidenterprise_v1/service.rb b/generated/google/apis/androidenterprise_v1/service.rb index c4842f4c1..3736d3e73 100644 --- a/generated/google/apis/androidenterprise_v1/service.rb +++ b/generated/google/apis/androidenterprise_v1/service.rb @@ -539,7 +539,7 @@ module Google end # Returns the store layout for the enterprise. If the store layout has not been - # set, or if the store layout has no homepageId set, returns a NOT_FOUND error. + # set, returns "basic" as the store layout type and no homepage. # @param [String] enterprise_id # The ID of the enterprise. # @param [String] fields @@ -787,8 +787,8 @@ module Google # contains apps approved by the admin, and that have been added to the available # product set for a user (using the setAvailableProductSet call). Apps on the # page are sorted in order of their product ID value. If you create a custom - # store layout (by setting storeLayoutType = "custom"), the basic store layout - # is disabled. + # store layout (by setting storeLayoutType = "custom" and setting a homepage), + # the basic store layout is disabled. # @param [String] enterprise_id # The ID of the enterprise. # @param [Google::Apis::AndroidenterpriseV1::StoreLayout] store_layout_object diff --git a/generated/google/apis/appengine_v1beta5.rb b/generated/google/apis/appengine_v1beta5.rb index b6b4ee77f..76e0e45c1 100644 --- a/generated/google/apis/appengine_v1beta5.rb +++ b/generated/google/apis/appengine_v1beta5.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/appengine/docs/admin-api/ module AppengineV1beta5 VERSION = 'V1beta5' - REVISION = '20161208' + REVISION = '20170324' # View and manage your applications deployed on Google App Engine AUTH_APPENGINE_ADMIN = 'https://www.googleapis.com/auth/appengine.admin' diff --git a/generated/google/apis/appengine_v1beta5/classes.rb b/generated/google/apis/appengine_v1beta5/classes.rb index c9290b1c8..cfdf820b1 100644 --- a/generated/google/apis/appengine_v1beta5/classes.rb +++ b/generated/google/apis/appengine_v1beta5/classes.rb @@ -259,6 +259,11 @@ module Google # @return [String] attr_accessor :default_bucket + # Identity-Aware Proxy + # Corresponds to the JSON property `iap` + # @return [Google::Apis::AppengineV1beta5::IdentityAwareProxy] + attr_accessor :iap + def initialize(**args) update!(**args) end @@ -274,6 +279,7 @@ module Google @default_cookie_expiration = args[:default_cookie_expiration] if args.key?(:default_cookie_expiration) @default_hostname = args[:default_hostname] if args.key?(:default_hostname) @default_bucket = args[:default_bucket] if args.key?(:default_bucket) + @iap = args[:iap] if args.key?(:iap) end end @@ -312,6 +318,48 @@ module Google end end + # Identity-Aware Proxy + class IdentityAwareProxy + include Google::Apis::Core::Hashable + + # Whether the serving infrastructure will authenticate and authorize all + # incoming requests.If true, the oauth2_client_id and oauth2_client_secret + # fields must be non-empty. + # Corresponds to the JSON property `enabled` + # @return [Boolean] + attr_accessor :enabled + alias_method :enabled?, :enabled + + # OAuth2 client ID to use for the authentication flow. + # Corresponds to the JSON property `oauth2ClientId` + # @return [String] + attr_accessor :oauth2_client_id + + # For security reasons, this value cannot be retrieved via the API. Instead, the + # SHA-256 hash of the value is returned in the oauth2_client_secret_sha256 field. + # @InputOnly + # Corresponds to the JSON property `oauth2ClientSecret` + # @return [String] + attr_accessor :oauth2_client_secret + + # Hex-encoded SHA-256 hash of the client secret.@OutputOnly + # Corresponds to the JSON property `oauth2ClientSecretSha256` + # @return [String] + attr_accessor :oauth2_client_secret_sha256 + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @enabled = args[:enabled] if args.key?(:enabled) + @oauth2_client_id = args[:oauth2_client_id] if args.key?(:oauth2_client_id) + @oauth2_client_secret = args[:oauth2_client_secret] if args.key?(:oauth2_client_secret) + @oauth2_client_secret_sha256 = args[:oauth2_client_secret_sha256] if args.key?(:oauth2_client_secret_sha256) + end + end + # A Version resource is a specific set of source code and configuration files # that are deployed into a service. class Version @@ -1260,7 +1308,9 @@ module Google # @return [Hash] attr_accessor :files - # Docker image that is used to start a VM container for the version you deploy. + # Docker image that is used to create a container and start a VM instance for + # the version that you deploy. Only applicable for instances running in the App + # Engine flexible environment. # Corresponds to the JSON property `container` # @return [Google::Apis::AppengineV1beta5::ContainerInfo] attr_accessor :container @@ -1317,12 +1367,14 @@ module Google end end - # Docker image that is used to start a VM container for the version you deploy. + # Docker image that is used to create a container and start a VM instance for + # the version that you deploy. Only applicable for instances running in the App + # Engine flexible environment. class ContainerInfo include Google::Apis::Core::Hashable - # URI to the hosted container image in a Docker repository. The URI must be - # fully qualified and include a tag or digest. Examples: "gcr.io/my-project/ + # URI to the hosted container image in Google Container Registry. The URI must + # be fully qualified and include a tag or digest. Examples: "gcr.io/my-project/ # image:tag" or "gcr.io/my-project/image@digest" # Corresponds to the JSON property `image` # @return [String] @@ -1688,7 +1740,7 @@ module Google end end - # The response message for LocationService.ListLocations. + # The response message for Locations.ListLocations. class ListLocationsResponse include Google::Apis::Core::Hashable @@ -1895,6 +1947,64 @@ module Google end end + # Metadata for the given google.longrunning.Operation. + class OperationMetadataV1Beta + include Google::Apis::Core::Hashable + + # API method that initiated this operation. Example: google.appengine.v1beta. + # Versions.CreateVersion.@OutputOnly + # Corresponds to the JSON property `method` + # @return [String] + attr_accessor :method_prop + + # Time that this operation was created.@OutputOnly + # Corresponds to the JSON property `insertTime` + # @return [String] + attr_accessor :insert_time + + # Time that this operation completed.@OutputOnly + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # User who requested this operation.@OutputOnly + # Corresponds to the JSON property `user` + # @return [String] + attr_accessor :user + + # Name of the resource that this operation is acting on. Example: apps/myapp/ + # services/default.@OutputOnly + # Corresponds to the JSON property `target` + # @return [String] + attr_accessor :target + + # Ephemeral message that may change every time the operation is polled. @ + # OutputOnly + # Corresponds to the JSON property `ephemeralMessage` + # @return [String] + attr_accessor :ephemeral_message + + # Durable messages that persist on every operation poll. @OutputOnly + # Corresponds to the JSON property `warning` + # @return [Array] + attr_accessor :warning + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @method_prop = args[:method_prop] if args.key?(:method_prop) + @insert_time = args[:insert_time] if args.key?(:insert_time) + @end_time = args[:end_time] if args.key?(:end_time) + @user = args[:user] if args.key?(:user) + @target = args[:target] if args.key?(:target) + @ephemeral_message = args[:ephemeral_message] if args.key?(:ephemeral_message) + @warning = args[:warning] if args.key?(:warning) + end + end + # Metadata for the given google.longrunning.Operation. class OperationMetadataV1 include Google::Apis::Core::Hashable diff --git a/generated/google/apis/appengine_v1beta5/representations.rb b/generated/google/apis/appengine_v1beta5/representations.rb index ef00e534c..1f94d3251 100644 --- a/generated/google/apis/appengine_v1beta5/representations.rb +++ b/generated/google/apis/appengine_v1beta5/representations.rb @@ -52,6 +52,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class IdentityAwareProxy + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Version class Representation < Google::Apis::Core::JsonRepresentation; end @@ -268,6 +274,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class OperationMetadataV1Beta + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class OperationMetadataV1 class Representation < Google::Apis::Core::JsonRepresentation; end @@ -323,6 +335,8 @@ module Google property :default_cookie_expiration, as: 'defaultCookieExpiration' property :default_hostname, as: 'defaultHostname' property :default_bucket, as: 'defaultBucket' + property :iap, as: 'iap', class: Google::Apis::AppengineV1beta5::IdentityAwareProxy, decorator: Google::Apis::AppengineV1beta5::IdentityAwareProxy::Representation + end end @@ -335,6 +349,16 @@ module Google end end + class IdentityAwareProxy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :enabled, as: 'enabled' + property :oauth2_client_id, as: 'oauth2ClientId' + property :oauth2_client_secret, as: 'oauth2ClientSecret' + property :oauth2_client_secret_sha256, as: 'oauth2ClientSecretSha256' + end + end + class Version # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -740,6 +764,19 @@ module Google end end + class OperationMetadataV1Beta + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :method_prop, as: 'method' + property :insert_time, as: 'insertTime' + property :end_time, as: 'endTime' + property :user, as: 'user' + property :target, as: 'target' + property :ephemeral_message, as: 'ephemeralMessage' + collection :warning, as: 'warning' + end + end + class OperationMetadataV1 # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/appengine_v1beta5/service.rb b/generated/google/apis/appengine_v1beta5/service.rb index 4adc5e66e..63f456e6c 100644 --- a/generated/google/apis/appengine_v1beta5/service.rb +++ b/generated/google/apis/appengine_v1beta5/service.rb @@ -46,11 +46,12 @@ module Google super('https://appengine.googleapis.com/', '') end - # Creates an App Engine application for a Google Cloud Platform project. This - # requires a project that excludes an App Engine application. For details about - # creating a project without an application, see the Google Cloud Resource - # Manager create project topic (https://cloud.google.com/resource-manager/docs/ - # creating-project). + # Creates an App Engine application for a Google Cloud Platform project. + # Required fields: id - The ID of the target Cloud Platform project. location - + # The region (https://cloud.google.com/appengine/docs/locations) where you want + # the App Engine application located.For more information about App Engine + # applications, see Managing Projects, Applications, and Billing (https://cloud. + # google.com/appengine/docs/python/console/). # @param [Google::Apis::AppengineV1beta5::Application] application_object # @param [String] fields # Selector specifying which fields to include in a partial response. @@ -349,9 +350,9 @@ module Google # @param [String] mask # Standard field mask for the set of fields to be updated. # @param [Boolean] migrate_traffic - # Set to true to gradually shift traffic from one version to another single - # version. By default, traffic is shifted immediately. For gradual traffic - # migration, the target version must be located within instances that are + # Set to true to gradually shift traffic to one or more versions that you + # specify. By default, traffic is shifted immediately. For gradual traffic + # migration, the target versions must be located within instances that are # configured for both warmup requests (https://cloud.google.com/appengine/docs/ # admin-api/reference/rest/v1beta5/apps.services.versions#inboundservicetype) # and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/ @@ -689,7 +690,9 @@ module Google execute_or_queue_command(command, &block) end - # Lists the instances of a version. + # Lists the instances of a version.Tip: To aggregate details about instances + # over time, see the Stackdriver Monitoring API (https://cloud.google.com/ + # monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). # @param [String] apps_id # Part of `name`. Name of the resource requested. Example: apps/myapp/services/ # default/versions/v1. diff --git a/generated/google/apis/appstate_v1.rb b/generated/google/apis/appstate_v1.rb index c0173798f..aa54697e4 100644 --- a/generated/google/apis/appstate_v1.rb +++ b/generated/google/apis/appstate_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/games/services/web/api/states module AppstateV1 VERSION = 'V1' - REVISION = '20170302' + REVISION = '20170323' # View and manage your data for this application AUTH_APPSTATE = 'https://www.googleapis.com/auth/appstate' diff --git a/generated/google/apis/bigquery_v2.rb b/generated/google/apis/bigquery_v2.rb index a531acb57..e540819cf 100644 --- a/generated/google/apis/bigquery_v2.rb +++ b/generated/google/apis/bigquery_v2.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/bigquery/ module BigqueryV2 VERSION = 'V2' - REVISION = '20170224' + REVISION = '20170319' # View and manage your data in Google BigQuery AUTH_BIGQUERY = 'https://www.googleapis.com/auth/bigquery' diff --git a/generated/google/apis/bigquery_v2/classes.rb b/generated/google/apis/bigquery_v2/classes.rb index 6eef6ae15..2843dcc67 100644 --- a/generated/google/apis/bigquery_v2/classes.rb +++ b/generated/google/apis/bigquery_v2/classes.rb @@ -334,9 +334,9 @@ module Google # @return [String] attr_accessor :kind - # [Experimental] The labels associated with this dataset. You can use these to - # organize and group your datasets. You can set this property when inserting or - # updating a dataset. See Labeling Datasets for more information. + # The labels associated with this dataset. You can use these to organize and + # group your datasets. You can set this property when inserting or updating a + # dataset. See Labeling Datasets for more information. # Corresponds to the JSON property `labels` # @return [Hash] attr_accessor :labels @@ -347,8 +347,8 @@ module Google # @return [String] attr_accessor :last_modified_time - # [Experimental] The geographic location where the dataset should reside. - # Possible values include EU and US. The default value is US. + # The geographic location where the dataset should reside. Possible values + # include EU and US. The default value is US. # Corresponds to the JSON property `location` # @return [String] attr_accessor :location @@ -507,8 +507,8 @@ module Google # @return [String] attr_accessor :kind - # [Experimental] The labels associated with this dataset. You can use these to - # organize and group your datasets. + # The labels associated with this dataset. You can use these to organize and + # group your datasets. # Corresponds to the JSON property `labels` # @return [Hash] attr_accessor :labels @@ -720,8 +720,8 @@ module Google class ExternalDataConfiguration include Google::Apis::Core::Hashable - # [Experimental] Try to detect schema and format options automatically. Any - # option specified explicitly will be honored. + # Try to detect schema and format options automatically. Any option specified + # explicitly will be honored. # Corresponds to the JSON property `autodetect` # @return [Boolean] attr_accessor :autodetect @@ -782,10 +782,8 @@ module Google # [Required] The data format. For CSV files, specify "CSV". For Google sheets, # specify "GOOGLE_SHEETS". For newline-delimited JSON, specify " # NEWLINE_DELIMITED_JSON". For Avro files, specify "AVRO". For Google Cloud - # Datastore backups, specify "DATASTORE_BACKUP". [Experimental] For Google Cloud - # Bigtable, specify "BIGTABLE". Please note that reading from Google Cloud - # Bigtable is experimental and has to be enabled for your project. Please - # contact Google Cloud Support to enable this for your project. + # Datastore backups, specify "DATASTORE_BACKUP". [Beta] For Google Cloud + # Bigtable, specify "BIGTABLE". # Corresponds to the JSON property `sourceFormat` # @return [String] attr_accessor :source_format @@ -864,8 +862,8 @@ module Google # @return [String] attr_accessor :kind - # [Output-only, Experimental] The number of rows affected by a DML statement. - # Present only for DML statements INSERT, UPDATE or DELETE. + # [Output-only] The number of rows affected by a DML statement. Present only for + # DML statements INSERT, UPDATE or DELETE. # Corresponds to the JSON property `numDmlAffectedRows` # @return [String] attr_accessor :num_dml_affected_rows @@ -1185,8 +1183,8 @@ module Google attr_accessor :allow_quoted_newlines alias_method :allow_quoted_newlines?, :allow_quoted_newlines - # [Experimental] Indicates if we should automatically infer the options and - # schema for CSV and JSON sources. + # Indicates if we should automatically infer the options and schema for CSV and + # JSON sources. # Corresponds to the JSON property `autodetect` # @return [Boolean] attr_accessor :autodetect @@ -1255,12 +1253,11 @@ module Google # @return [String] attr_accessor :null_marker - # [Experimental] If sourceFormat is set to "DATASTORE_BACKUP", indicates which - # entity properties to load into BigQuery from a Cloud Datastore backup. - # Property names are case sensitive and must be top-level properties. If no - # properties are specified, BigQuery loads all properties. If any named property - # isn't found in the Cloud Datastore backup, an invalid error is returned in the - # job result. + # If sourceFormat is set to "DATASTORE_BACKUP", indicates which entity + # properties to load into BigQuery from a Cloud Datastore backup. Property names + # are case sensitive and must be top-level properties. If no properties are + # specified, BigQuery loads all properties. If any named property isn't found in + # the Cloud Datastore backup, an invalid error is returned in the job result. # Corresponds to the JSON property `projectionFields` # @return [Array] attr_accessor :projection_fields @@ -1423,9 +1420,8 @@ module Google # @return [String] attr_accessor :maximum_bytes_billed - # [Experimental] Standard SQL only. Set to POSITIONAL to use positional (?) - # query parameters or to NAMED to use named (@myparam) query parameters in this - # query. + # Standard SQL only. Set to POSITIONAL to use positional (?) query parameters or + # to NAMED to use named (@myparam) query parameters in this query. # Corresponds to the JSON property `parameterMode` # @return [String] attr_accessor :parameter_mode @@ -1492,7 +1488,7 @@ module Google attr_accessor :use_query_cache alias_method :use_query_cache?, :use_query_cache - # [Experimental] Describes user-defined function resources used in the query. + # Describes user-defined function resources used in the query. # Corresponds to the JSON property `userDefinedFunctionResources` # @return [Array] attr_accessor :user_defined_function_resources @@ -1799,13 +1795,13 @@ module Google attr_accessor :cache_hit alias_method :cache_hit?, :cache_hit - # [Output-only, Experimental] The number of rows affected by a DML statement. - # Present only for DML statements INSERT, UPDATE or DELETE. + # [Output-only] The number of rows affected by a DML statement. Present only for + # DML statements INSERT, UPDATE or DELETE. # Corresponds to the JSON property `numDmlAffectedRows` # @return [String] attr_accessor :num_dml_affected_rows - # [Output-only, Experimental] Describes execution plan for the query. + # [Output-only] Describes execution plan for the query. # Corresponds to the JSON property `queryPlan` # @return [Array] attr_accessor :query_plan @@ -2221,9 +2217,8 @@ module Google # @return [Fixnum] attr_accessor :max_results - # [Experimental] Standard SQL only. Set to POSITIONAL to use positional (?) - # query parameters or to NAMED to use named (@myparam) query parameters in this - # query. + # Standard SQL only. Set to POSITIONAL to use positional (?) query parameters or + # to NAMED to use named (@myparam) query parameters in this query. # Corresponds to the JSON property `parameterMode` # @return [String] attr_accessor :parameter_mode @@ -2241,7 +2236,7 @@ module Google # @return [String] attr_accessor :query - # [Experimental] Query parameters for Standard SQL queries. + # Query parameters for Standard SQL queries. # Corresponds to the JSON property `queryParameters` # @return [Array] attr_accessor :query_parameters @@ -2332,8 +2327,8 @@ module Google # @return [String] attr_accessor :kind - # [Output-only, Experimental] The number of rows affected by a DML statement. - # Present only for DML statements INSERT, UPDATE or DELETE. + # [Output-only] The number of rows affected by a DML statement. Present only for + # DML statements INSERT, UPDATE or DELETE. # Corresponds to the JSON property `numDmlAffectedRows` # @return [String] attr_accessor :num_dml_affected_rows @@ -3086,7 +3081,7 @@ module Google attr_accessor :use_legacy_sql alias_method :use_legacy_sql?, :use_legacy_sql - # [Experimental] Describes user-defined function resources used in the query. + # Describes user-defined function resources used in the query. # Corresponds to the JSON property `userDefinedFunctionResources` # @return [Array] attr_accessor :user_defined_function_resources diff --git a/generated/google/apis/bigquery_v2/service.rb b/generated/google/apis/bigquery_v2/service.rb index e3389a25a..718f3b283 100644 --- a/generated/google/apis/bigquery_v2/service.rb +++ b/generated/google/apis/bigquery_v2/service.rb @@ -676,6 +676,9 @@ module Google # Maximum number of results to return # @param [String] page_token # Page token, returned by a previous call, identifying the result set + # @param [String] selected_fields + # List of fields to return (comma-separated). If unspecified, all fields are + # returned # @param [String] start_index # Zero-based index of the starting row to read # @param [String] fields @@ -699,7 +702,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_table_data(project_id, dataset_id, table_id, max_results: nil, page_token: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def list_table_data(project_id, dataset_id, table_id, max_results: nil, page_token: nil, selected_fields: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'projects/{projectId}/datasets/{datasetId}/tables/{tableId}/data', options) command.response_representation = Google::Apis::BigqueryV2::TableDataList::Representation command.response_class = Google::Apis::BigqueryV2::TableDataList @@ -708,6 +711,7 @@ module Google command.params['tableId'] = table_id unless table_id.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? + command.query['selectedFields'] = selected_fields unless selected_fields.nil? command.query['startIndex'] = start_index unless start_index.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? @@ -764,6 +768,9 @@ module Google # Dataset ID of the requested table # @param [String] table_id # Table ID of the requested table + # @param [String] selected_fields + # List of fields to return (comma-separated). If unspecified, all fields are + # returned # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -785,13 +792,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_table(project_id, dataset_id, table_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + def get_table(project_id, dataset_id, table_id, selected_fields: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'projects/{projectId}/datasets/{datasetId}/tables/{tableId}', options) command.response_representation = Google::Apis::BigqueryV2::Table::Representation command.response_class = Google::Apis::BigqueryV2::Table command.params['projectId'] = project_id unless project_id.nil? command.params['datasetId'] = dataset_id unless dataset_id.nil? command.params['tableId'] = table_id unless table_id.nil? + command.query['selectedFields'] = selected_fields unless selected_fields.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? diff --git a/generated/google/apis/calendar_v3.rb b/generated/google/apis/calendar_v3.rb index f720a290b..0888375bd 100644 --- a/generated/google/apis/calendar_v3.rb +++ b/generated/google/apis/calendar_v3.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/google-apps/calendar/firstapp module CalendarV3 VERSION = 'V3' - REVISION = '20170221' + REVISION = '20170319' # Manage your calendars AUTH_CALENDAR = 'https://www.googleapis.com/auth/calendar' diff --git a/generated/google/apis/calendar_v3/classes.rb b/generated/google/apis/calendar_v3/classes.rb index 1ab46a5da..094fcd734 100644 --- a/generated/google/apis/calendar_v3/classes.rb +++ b/generated/google/apis/calendar_v3/classes.rb @@ -599,6 +599,74 @@ module Google end end + # + class DeepLinkData + include Google::Apis::Core::Hashable + + # + # Corresponds to the JSON property `links` + # @return [Array] + attr_accessor :links + + # + # Corresponds to the JSON property `url` + # @return [String] + attr_accessor :url + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @links = args[:links] if args.key?(:links) + @url = args[:url] if args.key?(:url) + end + end + + # + class DisplayInfo + include Google::Apis::Core::Hashable + + # + # Corresponds to the JSON property `appIconUrl` + # @return [String] + attr_accessor :app_icon_url + + # + # Corresponds to the JSON property `appShortTitle` + # @return [String] + attr_accessor :app_short_title + + # + # Corresponds to the JSON property `appTitle` + # @return [String] + attr_accessor :app_title + + # + # Corresponds to the JSON property `linkShortTitle` + # @return [String] + attr_accessor :link_short_title + + # + # Corresponds to the JSON property `linkTitle` + # @return [String] + attr_accessor :link_title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @app_icon_url = args[:app_icon_url] if args.key?(:app_icon_url) + @app_short_title = args[:app_short_title] if args.key?(:app_short_title) + @app_title = args[:app_title] if args.key?(:app_title) + @link_short_title = args[:link_short_title] if args.key?(:link_short_title) + @link_title = args[:link_title] if args.key?(:link_title) + end + end + # class Error include Google::Apis::Core::Hashable @@ -1339,6 +1407,31 @@ module Google end end + # + class EventHabitInstance + include Google::Apis::Core::Hashable + + # Metadata specific to this instance. + # Corresponds to the JSON property `data` + # @return [Google::Apis::CalendarV3::HabitInstanceData] + attr_accessor :data + + # Id of the habit this instance belongs to. + # Corresponds to the JSON property `parentId` + # @return [String] + attr_accessor :parent_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @data = args[:data] if args.key?(:data) + @parent_id = args[:parent_id] if args.key?(:parent_id) + end + end + # class EventReminder include Google::Apis::Core::Hashable @@ -1627,6 +1720,118 @@ module Google end end + # + class HabitInstanceData + include Google::Apis::Core::Hashable + + # + # Corresponds to the JSON property `status` + # @return [String] + attr_accessor :status + + # + # Corresponds to the JSON property `statusInferred` + # @return [Boolean] + attr_accessor :status_inferred + alias_method :status_inferred?, :status_inferred + + # + # 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) + @status = args[:status] if args.key?(:status) + @status_inferred = args[:status_inferred] if args.key?(:status_inferred) + @type = args[:type] if args.key?(:type) + end + end + + # + class LaunchInfo + include Google::Apis::Core::Hashable + + # + # Corresponds to the JSON property `appId` + # @return [String] + attr_accessor :app_id + + # + # Corresponds to the JSON property `installUrl` + # @return [String] + attr_accessor :install_url + + # + # Corresponds to the JSON property `intentAction` + # @return [String] + attr_accessor :intent_action + + # + # 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) + @app_id = args[:app_id] if args.key?(:app_id) + @install_url = args[:install_url] if args.key?(:install_url) + @intent_action = args[:intent_action] if args.key?(:intent_action) + @uri = args[:uri] if args.key?(:uri) + end + end + + # + class Link + include Google::Apis::Core::Hashable + + # + # Corresponds to the JSON property `applinkingSource` + # @return [String] + attr_accessor :applinking_source + + # + # Corresponds to the JSON property `displayInfo` + # @return [Google::Apis::CalendarV3::DisplayInfo] + attr_accessor :display_info + + # + # Corresponds to the JSON property `launchInfo` + # @return [Google::Apis::CalendarV3::LaunchInfo] + attr_accessor :launch_info + + # + # Corresponds to the JSON property `platform` + # @return [String] + attr_accessor :platform + + # + # Corresponds to the JSON property `url` + # @return [String] + attr_accessor :url + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @applinking_source = args[:applinking_source] if args.key?(:applinking_source) + @display_info = args[:display_info] if args.key?(:display_info) + @launch_info = args[:launch_info] if args.key?(:launch_info) + @platform = args[:platform] if args.key?(:platform) + @url = args[:url] if args.key?(:url) + end + end + # class Setting include Google::Apis::Core::Hashable diff --git a/generated/google/apis/calendar_v3/representations.rb b/generated/google/apis/calendar_v3/representations.rb index c661e2660..6c1c69345 100644 --- a/generated/google/apis/calendar_v3/representations.rb +++ b/generated/google/apis/calendar_v3/representations.rb @@ -88,6 +88,18 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class DeepLinkData + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DisplayInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Error class Representation < Google::Apis::Core::JsonRepresentation; end @@ -154,6 +166,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class EventHabitInstance + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class EventReminder class Representation < Google::Apis::Core::JsonRepresentation; end @@ -196,6 +214,24 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class HabitInstanceData + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class LaunchInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Link + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Setting class Representation < Google::Apis::Core::JsonRepresentation; end @@ -350,6 +386,26 @@ module Google end end + class DeepLinkData + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :links, as: 'links', class: Google::Apis::CalendarV3::Link, decorator: Google::Apis::CalendarV3::Link::Representation + + property :url, as: 'url' + end + end + + class DisplayInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :app_icon_url, as: 'appIconUrl' + property :app_short_title, as: 'appShortTitle' + property :app_title, as: 'appTitle' + property :link_short_title, as: 'linkShortTitle' + property :link_title, as: 'linkTitle' + end + end + class Error # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -511,6 +567,15 @@ module Google end end + class EventHabitInstance + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :data, as: 'data', class: Google::Apis::CalendarV3::HabitInstanceData, decorator: Google::Apis::CalendarV3::HabitInstanceData::Representation + + property :parent_id, as: 'parentId' + end + end + class EventReminder # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -595,6 +660,38 @@ module Google end end + class HabitInstanceData + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :status, as: 'status' + property :status_inferred, as: 'statusInferred' + property :type, as: 'type' + end + end + + class LaunchInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :app_id, as: 'appId' + property :install_url, as: 'installUrl' + property :intent_action, as: 'intentAction' + property :uri, as: 'uri' + end + end + + class Link + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :applinking_source, as: 'applinkingSource' + property :display_info, as: 'displayInfo', class: Google::Apis::CalendarV3::DisplayInfo, decorator: Google::Apis::CalendarV3::DisplayInfo::Representation + + property :launch_info, as: 'launchInfo', class: Google::Apis::CalendarV3::LaunchInfo, decorator: Google::Apis::CalendarV3::LaunchInfo::Representation + + property :platform, as: 'platform' + property :url, as: 'url' + end + end + class Setting # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/classroom_v1.rb b/generated/google/apis/classroom_v1.rb index d928b937e..533440f30 100644 --- a/generated/google/apis/classroom_v1.rb +++ b/generated/google/apis/classroom_v1.rb @@ -25,37 +25,7 @@ module Google # @see https://developers.google.com/classroom/ module ClassroomV1 VERSION = 'V1' - REVISION = '20170110' - - # View instructions for teacher-assigned work in your Google Classroom classes - AUTH_CLASSROOM_COURSE_WORK_READONLY = 'https://www.googleapis.com/auth/classroom.course-work.readonly' - - # Manage your Google Classroom classes - AUTH_CLASSROOM_COURSES = 'https://www.googleapis.com/auth/classroom.courses' - - # View your Google Classroom classes - AUTH_CLASSROOM_COURSES_READONLY = 'https://www.googleapis.com/auth/classroom.courses.readonly' - - # Manage your course work and view your grades in Google Classroom - AUTH_CLASSROOM_COURSEWORK_ME = 'https://www.googleapis.com/auth/classroom.coursework.me' - - # View your course work and grades in Google Classroom - AUTH_CLASSROOM_COURSEWORK_ME_READONLY = 'https://www.googleapis.com/auth/classroom.coursework.me.readonly' - - # Manage course work and grades for students in the Google Classroom classes you teach and view the course work and grades for classes you administer - AUTH_CLASSROOM_COURSEWORK_STUDENTS = 'https://www.googleapis.com/auth/classroom.coursework.students' - - # View course work and grades for students in the Google Classroom classes you teach or administer - AUTH_CLASSROOM_COURSEWORK_STUDENTS_READONLY = 'https://www.googleapis.com/auth/classroom.coursework.students.readonly' - - # View the email addresses of people in your classes - AUTH_CLASSROOM_PROFILE_EMAILS = 'https://www.googleapis.com/auth/classroom.profile.emails' - - # View the profile photos of people in your classes - AUTH_CLASSROOM_PROFILE_PHOTOS = 'https://www.googleapis.com/auth/classroom.profile.photos' - - # Manage your Google Classroom class rosters - AUTH_CLASSROOM_ROSTERS = 'https://www.googleapis.com/auth/classroom.rosters' + REVISION = '20170322' # View your Google Classroom class rosters AUTH_CLASSROOM_ROSTERS_READONLY = 'https://www.googleapis.com/auth/classroom.rosters.readonly' @@ -63,8 +33,35 @@ module Google # View your course work and grades in Google Classroom AUTH_CLASSROOM_STUDENT_SUBMISSIONS_ME_READONLY = 'https://www.googleapis.com/auth/classroom.student-submissions.me.readonly' + # View course work and grades for students in the Google Classroom classes you teach or administer + AUTH_CLASSROOM_COURSEWORK_STUDENTS_READONLY = 'https://www.googleapis.com/auth/classroom.coursework.students.readonly' + # View course work and grades for students in the Google Classroom classes you teach or administer AUTH_CLASSROOM_STUDENT_SUBMISSIONS_STUDENTS_READONLY = 'https://www.googleapis.com/auth/classroom.student-submissions.students.readonly' + + # Manage your Google Classroom class rosters + AUTH_CLASSROOM_ROSTERS = 'https://www.googleapis.com/auth/classroom.rosters' + + # View your course work and grades in Google Classroom + AUTH_CLASSROOM_COURSEWORK_ME_READONLY = 'https://www.googleapis.com/auth/classroom.coursework.me.readonly' + + # View your Google Classroom classes + AUTH_CLASSROOM_COURSES_READONLY = 'https://www.googleapis.com/auth/classroom.courses.readonly' + + # Manage your Google Classroom classes + AUTH_CLASSROOM_COURSES = 'https://www.googleapis.com/auth/classroom.courses' + + # Manage your course work and view your grades in Google Classroom + AUTH_CLASSROOM_COURSEWORK_ME = 'https://www.googleapis.com/auth/classroom.coursework.me' + + # Manage course work and grades for students in the Google Classroom classes you teach and view the course work and grades for classes you administer + AUTH_CLASSROOM_COURSEWORK_STUDENTS = 'https://www.googleapis.com/auth/classroom.coursework.students' + + # View the profile photos of people in your classes + AUTH_CLASSROOM_PROFILE_PHOTOS = 'https://www.googleapis.com/auth/classroom.profile.photos' + + # View the email addresses of people in your classes + AUTH_CLASSROOM_PROFILE_EMAILS = 'https://www.googleapis.com/auth/classroom.profile.emails' end end end diff --git a/generated/google/apis/classroom_v1/classes.rb b/generated/google/apis/classroom_v1/classes.rb index 0f4fecf6d..e308cc5a4 100644 --- a/generated/google/apis/classroom_v1/classes.rb +++ b/generated/google/apis/classroom_v1/classes.rb @@ -22,118 +22,187 @@ module Google module Apis module ClassroomV1 - # A Course in Classroom. - class Course + # Attachment added to student assignment work. + # When creating attachments, setting the `form` field is not supported. + class Attachment include Google::Apis::Core::Hashable - # Identifier for this course assigned by Classroom. When creating a course, you - # may optionally set this identifier to an alias string in the request to create - # a corresponding alias. The `id` is still assigned by Classroom and cannot be - # updated after the course is created. Specifying this field in a course update - # mask results in an error. + # Representation of a Google Drive file. + # Corresponds to the JSON property `driveFile` + # @return [Google::Apis::ClassroomV1::DriveFile] + attr_accessor :drive_file + + # YouTube video item. + # Corresponds to the JSON property `youTubeVideo` + # @return [Google::Apis::ClassroomV1::YouTubeVideo] + attr_accessor :you_tube_video + + # URL item. + # Corresponds to the JSON property `link` + # @return [Google::Apis::ClassroomV1::Link] + attr_accessor :link + + # Google Forms item. + # Corresponds to the JSON property `form` + # @return [Google::Apis::ClassroomV1::Form] + attr_accessor :form + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @drive_file = args[:drive_file] if args.key?(:drive_file) + @you_tube_video = args[:you_tube_video] if args.key?(:you_tube_video) + @link = args[:link] if args.key?(:link) + @form = args[:form] if args.key?(:form) + end + end + + # Response when listing guardian invitations. + class ListGuardianInvitationsResponse + include Google::Apis::Core::Hashable + + # Token identifying the next page of results to return. If empty, no further + # results are available. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # Guardian invitations that matched the list request. + # Corresponds to the JSON property `guardianInvitations` + # @return [Array] + attr_accessor :guardian_invitations + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @guardian_invitations = args[:guardian_invitations] if args.key?(:guardian_invitations) + end + end + + # Course work created by a teacher for students of the course. + class CourseWork + include Google::Apis::Core::Hashable + + # Classroom-assigned identifier of this course work, unique per course. + # Read-only. # Corresponds to the JSON property `id` # @return [String] attr_accessor :id - # Name of the course. For example, "10th Grade Biology". The name is required. - # It must be between 1 and 750 characters and a valid UTF-8 string. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Section of the course. For example, "Period 2". If set, this field must be a - # valid UTF-8 string and no longer than 2800 characters. - # Corresponds to the JSON property `section` - # @return [String] - attr_accessor :section - - # Optional heading for the description. For example, "Welcome to 10th Grade - # Biology." If set, this field must be a valid UTF-8 string and no longer than - # 3600 characters. - # Corresponds to the JSON property `descriptionHeading` - # @return [String] - attr_accessor :description_heading - - # Optional description. For example, "We'll be learning about the structure of - # living creatures from a combination of textbooks, guest lectures, and lab work. - # Expect to be excited!" If set, this field must be a valid UTF-8 string and no - # longer than 30,000 characters. + # Optional description of this course work. + # If set, the description must be a valid UTF-8 string containing no more + # than 30,000 characters. # Corresponds to the JSON property `description` # @return [String] attr_accessor :description - # Optional room location. For example, "301". If set, this field must be a valid - # UTF-8 string and no longer than 650 characters. - # Corresponds to the JSON property `room` + # Setting to determine when students are allowed to modify submissions. + # If unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`. + # Corresponds to the JSON property `submissionModificationMode` # @return [String] - attr_accessor :room + attr_accessor :submission_modification_mode - # The identifier of the owner of a course. When specified as a parameter of a - # create course request, this field is required. The identifier can be one of - # the following: * the numeric identifier for the user * the email address of - # the user * the string literal `"me"`, indicating the requesting user This must - # be set in a create request. Specifying this field in a course update mask - # results in an `INVALID_ARGUMENT` error. - # Corresponds to the JSON property `ownerId` - # @return [String] - attr_accessor :owner_id + # Whether this course work item is associated with the Developer Console + # project making the request. + # See google.classroom.Work.CreateCourseWork for more + # details. + # Read-only. + # Corresponds to the JSON property `associatedWithDeveloper` + # @return [Boolean] + attr_accessor :associated_with_developer + alias_method :associated_with_developer?, :associated_with_developer - # Creation time of the course. Specifying this field in a course update mask - # results in an error. Read-only. - # Corresponds to the JSON property `creationTime` - # @return [String] - attr_accessor :creation_time - - # Time of the most recent update to this course. Specifying this field in a - # course update mask results in an error. Read-only. + # Timestamp of the most recent change to this course work. + # Read-only. # Corresponds to the JSON property `updateTime` # @return [String] attr_accessor :update_time - # Enrollment code to use when joining this course. Specifying this field in a - # course update mask results in an error. Read-only. - # Corresponds to the JSON property `enrollmentCode` + # Title of this course work. + # The title must be a valid UTF-8 string containing between 1 and 3000 + # characters. + # Corresponds to the JSON property `title` # @return [String] - attr_accessor :enrollment_code + attr_accessor :title - # State of the course. If unspecified, the default state is `PROVISIONED`. - # Corresponds to the JSON property `courseState` - # @return [String] - attr_accessor :course_state - - # Absolute link to this course in the Classroom web UI. Read-only. + # Absolute link to this course work in the Classroom web UI. + # This is only populated if `state` is `PUBLISHED`. + # Read-only. # Corresponds to the JSON property `alternateLink` # @return [String] attr_accessor :alternate_link - # The email address of a Google group containing all teachers of the course. - # This group does not accept email and can only be used for permissions. Read- - # only. - # Corresponds to the JSON property `teacherGroupEmail` + # Type of this course work. + # The type is set when the course work is created and cannot be changed. + # Corresponds to the JSON property `workType` # @return [String] - attr_accessor :teacher_group_email + attr_accessor :work_type - # The email address of a Google group containing all members of the course. This - # group does not accept email and can only be used for permissions. Read-only. - # Corresponds to the JSON property `courseGroupEmail` + # Additional materials. + # CourseWork must have no more than 20 material items. + # Corresponds to the JSON property `materials` + # @return [Array] + attr_accessor :materials + + # Status of this course work. + # If unspecified, the default state is `DRAFT`. + # Corresponds to the JSON property `state` # @return [String] - attr_accessor :course_group_email + attr_accessor :state - # Representation of a Google Drive folder. - # Corresponds to the JSON property `teacherFolder` - # @return [Google::Apis::ClassroomV1::DriveFolder] - attr_accessor :teacher_folder + # Represents a whole calendar date, e.g. date of birth. The time of day and + # time zone are either specified elsewhere or are not significant. The date + # is relative to the Proleptic Gregorian Calendar. The day may be 0 to + # represent a year and month where the day is not significant, e.g. credit card + # expiration date. The year may be 0 to represent a month and day independent + # of year, e.g. anniversary date. Related types are google.type.TimeOfDay + # and `google.protobuf.Timestamp`. + # Corresponds to the JSON property `dueDate` + # @return [Google::Apis::ClassroomV1::Date] + attr_accessor :due_date - # Sets of materials that appear on the "about" page of this course. Read-only. - # Corresponds to the JSON property `courseMaterialSets` - # @return [Array] - attr_accessor :course_material_sets + # Additional details for multiple-choice questions. + # Corresponds to the JSON property `multipleChoiceQuestion` + # @return [Google::Apis::ClassroomV1::MultipleChoiceQuestion] + attr_accessor :multiple_choice_question - # Whether or not guardian notifications are enabled for this course. Read-only. - # Corresponds to the JSON property `guardiansEnabled` - # @return [Boolean] - attr_accessor :guardians_enabled - alias_method :guardians_enabled?, :guardians_enabled + # Timestamp when this course work was created. + # Read-only. + # Corresponds to the JSON property `creationTime` + # @return [String] + attr_accessor :creation_time + + # Identifier of the course. + # Read-only. + # Corresponds to the JSON property `courseId` + # @return [String] + attr_accessor :course_id + + # Maximum grade for this course work. + # If zero or unspecified, this assignment is considered ungraded. + # This must be a non-negative integer value. + # Corresponds to the JSON property `maxPoints` + # @return [Float] + attr_accessor :max_points + + # Additional details for assignments. + # Corresponds to the JSON property `assignment` + # @return [Google::Apis::ClassroomV1::Assignment] + attr_accessor :assignment + + # Represents a time of day. The date and time zone are either not significant + # or are specified elsewhere. An API may choose to allow leap seconds. Related + # types are google.type.Date and `google.protobuf.Timestamp`. + # Corresponds to the JSON property `dueTime` + # @return [Google::Apis::ClassroomV1::TimeOfDay] + attr_accessor :due_time def initialize(**args) update!(**args) @@ -142,22 +211,62 @@ module Google # Update properties of this object def update!(**args) @id = args[:id] if args.key?(:id) - @name = args[:name] if args.key?(:name) - @section = args[:section] if args.key?(:section) - @description_heading = args[:description_heading] if args.key?(:description_heading) @description = args[:description] if args.key?(:description) - @room = args[:room] if args.key?(:room) - @owner_id = args[:owner_id] if args.key?(:owner_id) - @creation_time = args[:creation_time] if args.key?(:creation_time) + @submission_modification_mode = args[:submission_modification_mode] if args.key?(:submission_modification_mode) + @associated_with_developer = args[:associated_with_developer] if args.key?(:associated_with_developer) @update_time = args[:update_time] if args.key?(:update_time) - @enrollment_code = args[:enrollment_code] if args.key?(:enrollment_code) - @course_state = args[:course_state] if args.key?(:course_state) + @title = args[:title] if args.key?(:title) @alternate_link = args[:alternate_link] if args.key?(:alternate_link) - @teacher_group_email = args[:teacher_group_email] if args.key?(:teacher_group_email) - @course_group_email = args[:course_group_email] if args.key?(:course_group_email) - @teacher_folder = args[:teacher_folder] if args.key?(:teacher_folder) - @course_material_sets = args[:course_material_sets] if args.key?(:course_material_sets) - @guardians_enabled = args[:guardians_enabled] if args.key?(:guardians_enabled) + @work_type = args[:work_type] if args.key?(:work_type) + @materials = args[:materials] if args.key?(:materials) + @state = args[:state] if args.key?(:state) + @due_date = args[:due_date] if args.key?(:due_date) + @multiple_choice_question = args[:multiple_choice_question] if args.key?(:multiple_choice_question) + @creation_time = args[:creation_time] if args.key?(:creation_time) + @course_id = args[:course_id] if args.key?(:course_id) + @max_points = args[:max_points] if args.key?(:max_points) + @assignment = args[:assignment] if args.key?(:assignment) + @due_time = args[:due_time] if args.key?(:due_time) + end + end + + # Representation of a Google Drive file. + class DriveFile + include Google::Apis::Core::Hashable + + # URL of a thumbnail image of the Drive item. + # Read-only. + # Corresponds to the JSON property `thumbnailUrl` + # @return [String] + attr_accessor :thumbnail_url + + # Title of the Drive item. + # Read-only. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # URL that can be used to access the Drive item. + # Read-only. + # Corresponds to the JSON property `alternateLink` + # @return [String] + attr_accessor :alternate_link + + # Drive API resource ID. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @thumbnail_url = args[:thumbnail_url] if args.key?(:thumbnail_url) + @title = args[:title] if args.key?(:title) + @alternate_link = args[:alternate_link] if args.key?(:alternate_link) + @id = args[:id] if args.key?(:id) end end @@ -165,48 +274,49 @@ module Google class DriveFolder include Google::Apis::Core::Hashable + # Title of the Drive folder. + # Read-only. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # URL that can be used to access the Drive folder. + # Read-only. + # Corresponds to the JSON property `alternateLink` + # @return [String] + attr_accessor :alternate_link + # Drive API resource ID. # Corresponds to the JSON property `id` # @return [String] attr_accessor :id - # Title of the Drive folder. Read-only. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # URL that can be used to access the Drive folder. Read-only. - # Corresponds to the JSON property `alternateLink` - # @return [String] - attr_accessor :alternate_link - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @id = args[:id] if args.key?(:id) @title = args[:title] if args.key?(:title) @alternate_link = args[:alternate_link] if args.key?(:alternate_link) + @id = args[:id] if args.key?(:id) end end - # A set of materials that appears on the "About" page of the course. These - # materials might include a syllabus, schedule, or other background information - # relating to the course as a whole. - class CourseMaterialSet + # Response when listing course aliases. + class ListCourseAliasesResponse include Google::Apis::Core::Hashable - # Title for this set. - # Corresponds to the JSON property `title` + # Token identifying the next page of results to return. If empty, no further + # results are available. + # Corresponds to the JSON property `nextPageToken` # @return [String] - attr_accessor :title + attr_accessor :next_page_token - # Materials attached to this set. - # Corresponds to the JSON property `materials` - # @return [Array] - attr_accessor :materials + # The course aliases. + # Corresponds to the JSON property `aliases` + # @return [Array] + attr_accessor :aliases def initialize(**args) update!(**args) @@ -214,8 +324,27 @@ module Google # Update properties of this object def update!(**args) - @title = args[:title] if args.key?(:title) - @materials = args[:materials] if args.key?(:materials) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @aliases = args[:aliases] if args.key?(:aliases) + end + end + + # Student work for a short answer question. + class ShortAnswerSubmission + include Google::Apis::Core::Hashable + + # Student response to a short-answer question. + # Corresponds to the JSON property `answer` + # @return [String] + attr_accessor :answer + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @answer = args[:answer] if args.key?(:answer) end end @@ -256,29 +385,14 @@ module Google end end - # Representation of a Google Drive file. - class DriveFile + # Student work for a multiple-choice question. + class MultipleChoiceSubmission include Google::Apis::Core::Hashable - # Drive API resource ID. - # Corresponds to the JSON property `id` + # Student's select choice. + # Corresponds to the JSON property `answer` # @return [String] - attr_accessor :id - - # Title of the Drive item. Read-only. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # URL that can be used to access the Drive item. Read-only. - # Corresponds to the JSON property `alternateLink` - # @return [String] - attr_accessor :alternate_link - - # URL of a thumbnail image of the Drive item. Read-only. - # Corresponds to the JSON property `thumbnailUrl` - # @return [String] - attr_accessor :thumbnail_url + attr_accessor :answer def initialize(**args) update!(**args) @@ -286,47 +400,7 @@ module Google # Update properties of this object def update!(**args) - @id = args[:id] if args.key?(:id) - @title = args[:title] if args.key?(:title) - @alternate_link = args[:alternate_link] if args.key?(:alternate_link) - @thumbnail_url = args[:thumbnail_url] if args.key?(:thumbnail_url) - end - end - - # YouTube video item. - class YouTubeVideo - include Google::Apis::Core::Hashable - - # YouTube API resource ID. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Title of the YouTube video. Read-only. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # URL that can be used to view the YouTube video. Read-only. - # Corresponds to the JSON property `alternateLink` - # @return [String] - attr_accessor :alternate_link - - # URL of a thumbnail image of the YouTube video. Read-only. - # Corresponds to the JSON property `thumbnailUrl` - # @return [String] - attr_accessor :thumbnail_url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] if args.key?(:id) - @title = args[:title] if args.key?(:title) - @alternate_link = args[:alternate_link] if args.key?(:alternate_link) - @thumbnail_url = args[:thumbnail_url] if args.key?(:thumbnail_url) + @answer = args[:answer] if args.key?(:answer) end end @@ -334,22 +408,24 @@ module Google class Link include Google::Apis::Core::Hashable - # URL to link to. This must be a valid UTF-8 string containing between 1 and - # 2024 characters. + # URL to link to. + # This must be a valid UTF-8 string containing between 1 and 2024 characters. # Corresponds to the JSON property `url` # @return [String] attr_accessor :url - # Title of the target of the URL. Read-only. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # URL of a thumbnail image of the target URL. Read-only. + # URL of a thumbnail image of the target URL. + # Read-only. # Corresponds to the JSON property `thumbnailUrl` # @return [String] attr_accessor :thumbnail_url + # Title of the target of the URL. + # Read-only. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + def initialize(**args) update!(**args) end @@ -357,8 +433,70 @@ module Google # Update properties of this object def update!(**args) @url = args[:url] if args.key?(:url) - @title = args[:title] if args.key?(:title) @thumbnail_url = args[:thumbnail_url] if args.key?(:thumbnail_url) + @title = args[:title] if args.key?(:title) + end + end + + # Request to modify the attachments of a student submission. + class ModifyAttachmentsRequest + include Google::Apis::Core::Hashable + + # Attachments to add. + # A student submission may not have more than 20 attachments. + # Form attachments are not supported. + # Corresponds to the JSON property `addAttachments` + # @return [Array] + attr_accessor :add_attachments + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @add_attachments = args[:add_attachments] if args.key?(:add_attachments) + end + end + + # Represents a time of day. The date and time zone are either not significant + # or are specified elsewhere. An API may choose to allow leap seconds. Related + # types are google.type.Date and `google.protobuf.Timestamp`. + class TimeOfDay + include Google::Apis::Core::Hashable + + # Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. + # Corresponds to the JSON property `nanos` + # @return [Fixnum] + attr_accessor :nanos + + # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose + # to allow the value "24:00:00" for scenarios like business closing time. + # Corresponds to the JSON property `hours` + # @return [Fixnum] + attr_accessor :hours + + # Minutes of hour of day. Must be from 0 to 59. + # Corresponds to the JSON property `minutes` + # @return [Fixnum] + attr_accessor :minutes + + # Seconds of minutes of the time. Must normally be from 0 to 59. An API may + # allow the value 60 if it allows leap-seconds. + # Corresponds to the JSON property `seconds` + # @return [Fixnum] + attr_accessor :seconds + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @nanos = args[:nanos] if args.key?(:nanos) + @hours = args[:hours] if args.key?(:hours) + @minutes = args[:minutes] if args.key?(:minutes) + @seconds = args[:seconds] if args.key?(:seconds) end end @@ -366,26 +504,30 @@ module Google class Form include Google::Apis::Core::Hashable + # URL of a thumbnail image of the Form. + # Read-only. + # Corresponds to the JSON property `thumbnailUrl` + # @return [String] + attr_accessor :thumbnail_url + # URL of the form. # Corresponds to the JSON property `formUrl` # @return [String] attr_accessor :form_url - # URL of the form responses document. Only set if respsonses have been recorded - # and only when the requesting user is an editor of the form. Read-only. - # Corresponds to the JSON property `responseUrl` - # @return [String] - attr_accessor :response_url - - # Title of the Form. Read-only. + # Title of the Form. + # Read-only. # Corresponds to the JSON property `title` # @return [String] attr_accessor :title - # URL of a thumbnail image of the Form. Read-only. - # Corresponds to the JSON property `thumbnailUrl` + # URL of the form responses document. + # Only set if respsonses have been recorded and only when the + # requesting user is an editor of the form. + # Read-only. + # Corresponds to the JSON property `responseUrl` # @return [String] - attr_accessor :thumbnail_url + attr_accessor :response_url def initialize(**args) update!(**args) @@ -393,44 +535,47 @@ module Google # Update properties of this object def update!(**args) - @form_url = args[:form_url] if args.key?(:form_url) - @response_url = args[:response_url] if args.key?(:response_url) - @title = args[:title] if args.key?(:title) @thumbnail_url = args[:thumbnail_url] if args.key?(:thumbnail_url) + @form_url = args[:form_url] if args.key?(:form_url) + @title = args[:title] if args.key?(:title) + @response_url = args[:response_url] if args.key?(:response_url) 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 + # Additional details for multiple-choice questions. + class MultipleChoiceQuestion include Google::Apis::Core::Hashable + # Possible choices. + # Corresponds to the JSON property `choices` + # @return [Array] + attr_accessor :choices + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @choices = args[:choices] if args.key?(:choices) end end - # Response when listing courses. - class ListCoursesResponse + # A set of materials that appears on the "About" page of the course. + # These materials might include a syllabus, schedule, or other background + # information relating to the course as a whole. + class CourseMaterialSet include Google::Apis::Core::Hashable - # Courses that match the list request. - # Corresponds to the JSON property `courses` - # @return [Array] - attr_accessor :courses + # Materials attached to this set. + # Corresponds to the JSON property `materials` + # @return [Array] + attr_accessor :materials - # Token identifying the next page of results to return. If empty, no further - # results are available. - # Corresponds to the JSON property `nextPageToken` + # Title for this set. + # Corresponds to the JSON property `title` # @return [String] - attr_accessor :next_page_token + attr_accessor :title def initialize(**args) update!(**args) @@ -438,29 +583,167 @@ module Google # Update properties of this object def update!(**args) - @courses = args[:courses] if args.key?(:courses) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @materials = args[:materials] if args.key?(:materials) + @title = args[:title] if args.key?(:title) end end - # Alternative identifier for a course. An alias uniquely identifies a course. It - # must be unique within one of the following scopes: * domain: A domain-scoped - # alias is visible to all users within the alias creator's domain and can be - # created only by a domain admin. A domain-scoped alias is often used when a - # course has an identifier external to Classroom. * project: A project-scoped - # alias is visible to any request from an application using the Developer - # Console project ID that created the alias and can be created by any project. A - # project-scoped alias is often used when an application has alternative - # identifiers. A random value can also be used to avoid duplicate courses in the - # event of transmission failures, as retrying a request will return ` - # ALREADY_EXISTS` if a previous one has succeeded. + # Student submission for course work. + # StudentSubmission items are generated when a CourseWork item is created. + # StudentSubmissions that have never been accessed (i.e. with `state` = NEW) + # may not have a creation time or update time. + class StudentSubmission + include Google::Apis::Core::Hashable + + # Classroom-assigned Identifier for the student submission. + # This is unique among submissions for the relevant course work. + # Read-only. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Type of course work this submission is for. + # Read-only. + # Corresponds to the JSON property `courseWorkType` + # @return [String] + attr_accessor :course_work_type + + # Optional grade. If unset, no grade was set. + # This must be a non-negative integer value. + # This may be modified only by course teachers. + # Corresponds to the JSON property `assignedGrade` + # @return [Float] + attr_accessor :assigned_grade + + # Whether this student submission is associated with the Developer Console + # project making the request. + # See google.classroom.Work.CreateCourseWork for more + # details. + # Read-only. + # Corresponds to the JSON property `associatedWithDeveloper` + # @return [Boolean] + attr_accessor :associated_with_developer + alias_method :associated_with_developer?, :associated_with_developer + + # Last update time of this submission. + # This may be unset if the student has not accessed this item. + # Read-only. + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + # Absolute link to the submission in the Classroom web UI. + # Read-only. + # Corresponds to the JSON property `alternateLink` + # @return [String] + attr_accessor :alternate_link + + # Optional pending grade. If unset, no grade was set. + # This must be a non-negative integer value. + # This is only visible to and modifiable by course teachers. + # Corresponds to the JSON property `draftGrade` + # @return [Float] + attr_accessor :draft_grade + + # Identifier for the student that owns this submission. + # Read-only. + # Corresponds to the JSON property `userId` + # @return [String] + attr_accessor :user_id + + # Student work for a multiple-choice question. + # Corresponds to the JSON property `multipleChoiceSubmission` + # @return [Google::Apis::ClassroomV1::MultipleChoiceSubmission] + attr_accessor :multiple_choice_submission + + # State of this submission. + # Read-only. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + # Student work for an assignment. + # Corresponds to the JSON property `assignmentSubmission` + # @return [Google::Apis::ClassroomV1::AssignmentSubmission] + attr_accessor :assignment_submission + + # Creation time of this submission. + # This may be unset if the student has not accessed this item. + # Read-only. + # Corresponds to the JSON property `creationTime` + # @return [String] + attr_accessor :creation_time + + # Identifier of the course. + # Read-only. + # Corresponds to the JSON property `courseId` + # @return [String] + attr_accessor :course_id + + # Student work for a short answer question. + # Corresponds to the JSON property `shortAnswerSubmission` + # @return [Google::Apis::ClassroomV1::ShortAnswerSubmission] + attr_accessor :short_answer_submission + + # Whether this submission is late. + # Read-only. + # Corresponds to the JSON property `late` + # @return [Boolean] + attr_accessor :late + alias_method :late?, :late + + # Identifier for the course work this corresponds to. + # Read-only. + # Corresponds to the JSON property `courseWorkId` + # @return [String] + attr_accessor :course_work_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @id = args[:id] if args.key?(:id) + @course_work_type = args[:course_work_type] if args.key?(:course_work_type) + @assigned_grade = args[:assigned_grade] if args.key?(:assigned_grade) + @associated_with_developer = args[:associated_with_developer] if args.key?(:associated_with_developer) + @update_time = args[:update_time] if args.key?(:update_time) + @alternate_link = args[:alternate_link] if args.key?(:alternate_link) + @draft_grade = args[:draft_grade] if args.key?(:draft_grade) + @user_id = args[:user_id] if args.key?(:user_id) + @multiple_choice_submission = args[:multiple_choice_submission] if args.key?(:multiple_choice_submission) + @state = args[:state] if args.key?(:state) + @assignment_submission = args[:assignment_submission] if args.key?(:assignment_submission) + @creation_time = args[:creation_time] if args.key?(:creation_time) + @course_id = args[:course_id] if args.key?(:course_id) + @short_answer_submission = args[:short_answer_submission] if args.key?(:short_answer_submission) + @late = args[:late] if args.key?(:late) + @course_work_id = args[:course_work_id] if args.key?(:course_work_id) + end + end + + # Alternative identifier for a course. + # An alias uniquely identifies a course. It must be unique within one of the + # following scopes: + # * domain: A domain-scoped alias is visible to all users within the alias + # creator's domain and can be created only by a domain admin. A domain-scoped + # alias is often used when a course has an identifier external to Classroom. + # * project: A project-scoped alias is visible to any request from an + # application using the Developer Console project ID that created the alias + # and can be created by any project. A project-scoped alias is often used when + # an application has alternative identifiers. A random value can also be used + # to avoid duplicate courses in the event of transmission failures, as retrying + # a request will return `ALREADY_EXISTS` if a previous one has succeeded. class CourseAlias include Google::Apis::Core::Hashable - # Alias string. The format of the string indicates the desired alias scoping. * ` - # d:` indicates a domain-scoped alias. Example: `d:math_101` * `p:` indicates a - # project-scoped alias. Example: `p:abc123` This field has a maximum length of - # 256 characters. + # Alias string. The format of the string indicates the desired alias scoping. + # * `d:` indicates a domain-scoped alias. + # Example: `d:math_101` + # * `p:` indicates a project-scoped alias. + # Example: `p:abc123` + # This field has a maximum length of 256 characters. # Corresponds to the JSON property `alias` # @return [String] attr_accessor :alias @@ -475,329 +758,12 @@ module Google end end - # Response when listing course aliases. - class ListCourseAliasesResponse - include Google::Apis::Core::Hashable - - # The course aliases. - # Corresponds to the JSON property `aliases` - # @return [Array] - attr_accessor :aliases - - # Token identifying the next page of results to return. If empty, no further - # results are available. - # 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) - @aliases = args[:aliases] if args.key?(:aliases) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # Response when listing guardian invitations. - class ListGuardianInvitationsResponse - include Google::Apis::Core::Hashable - - # Guardian invitations that matched the list request. - # Corresponds to the JSON property `guardianInvitations` - # @return [Array] - attr_accessor :guardian_invitations - - # Token identifying the next page of results to return. If empty, no further - # results are available. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @guardian_invitations = args[:guardian_invitations] if args.key?(:guardian_invitations) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # An invitation to become the guardian of a specified user, sent to a specified - # email address. - class GuardianInvitation - include Google::Apis::Core::Hashable - - # ID of the student (in standard format) - # Corresponds to the JSON property `studentId` - # @return [String] - attr_accessor :student_id - - # Unique identifier for this invitation. Read-only. - # Corresponds to the JSON property `invitationId` - # @return [String] - attr_accessor :invitation_id - - # Email address that the invitation was sent to. This field is only visible to - # domain administrators. - # Corresponds to the JSON property `invitedEmailAddress` - # @return [String] - attr_accessor :invited_email_address - - # The state that this invitation is in. - # Corresponds to the JSON property `state` - # @return [String] - attr_accessor :state - - # The time that this invitation was created. Read-only. - # Corresponds to the JSON property `creationTime` - # @return [String] - attr_accessor :creation_time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @student_id = args[:student_id] if args.key?(:student_id) - @invitation_id = args[:invitation_id] if args.key?(:invitation_id) - @invited_email_address = args[:invited_email_address] if args.key?(:invited_email_address) - @state = args[:state] if args.key?(:state) - @creation_time = args[:creation_time] if args.key?(:creation_time) - end - end - - # Global information for a user. - class UserProfile - include Google::Apis::Core::Hashable - - # Identifier of the user. Read-only. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Details of the user's name. - # Corresponds to the JSON property `name` - # @return [Google::Apis::ClassroomV1::Name] - attr_accessor :name - - # Email address of the user. Read-only. - # Corresponds to the JSON property `emailAddress` - # @return [String] - attr_accessor :email_address - - # URL of user's profile photo. Read-only. - # Corresponds to the JSON property `photoUrl` - # @return [String] - attr_accessor :photo_url - - # Global permissions of the user. Read-only. - # Corresponds to the JSON property `permissions` - # @return [Array] - attr_accessor :permissions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] if args.key?(:id) - @name = args[:name] if args.key?(:name) - @email_address = args[:email_address] if args.key?(:email_address) - @photo_url = args[:photo_url] if args.key?(:photo_url) - @permissions = args[:permissions] if args.key?(:permissions) - end - end - - # Details of the user's name. - class Name - include Google::Apis::Core::Hashable - - # The user's first name. Read-only. - # Corresponds to the JSON property `givenName` - # @return [String] - attr_accessor :given_name - - # The user's last name. Read-only. - # Corresponds to the JSON property `familyName` - # @return [String] - attr_accessor :family_name - - # The user's full name formed by concatenating the first and last name values. - # Read-only. - # Corresponds to the JSON property `fullName` - # @return [String] - attr_accessor :full_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @given_name = args[:given_name] if args.key?(:given_name) - @family_name = args[:family_name] if args.key?(:family_name) - @full_name = args[:full_name] if args.key?(:full_name) - end - end - - # Global user permission description. - class GlobalPermission - include Google::Apis::Core::Hashable - - # Permission value. - # Corresponds to the JSON property `permission` - # @return [String] - attr_accessor :permission - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @permission = args[:permission] if args.key?(:permission) - end - end - - # Teacher of a course. - class Teacher - include Google::Apis::Core::Hashable - - # Identifier of the course. Read-only. - # Corresponds to the JSON property `courseId` - # @return [String] - attr_accessor :course_id - - # Identifier of the user. When specified as a parameter of a request, this - # identifier can be one of the following: * the numeric identifier for the user * - # the email address of the user * the string literal `"me"`, indicating the - # requesting user - # Corresponds to the JSON property `userId` - # @return [String] - attr_accessor :user_id - - # Global information for a user. - # Corresponds to the JSON property `profile` - # @return [Google::Apis::ClassroomV1::UserProfile] - attr_accessor :profile - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @course_id = args[:course_id] if args.key?(:course_id) - @user_id = args[:user_id] if args.key?(:user_id) - @profile = args[:profile] if args.key?(:profile) - end - end - - # Response when listing teachers. - class ListTeachersResponse - include Google::Apis::Core::Hashable - - # Teachers who match the list request. - # Corresponds to the JSON property `teachers` - # @return [Array] - attr_accessor :teachers - - # Token identifying the next page of results to return. If empty, no further - # results are available. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @teachers = args[:teachers] if args.key?(:teachers) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # Student in a course. - class Student - include Google::Apis::Core::Hashable - - # Identifier of the course. Read-only. - # Corresponds to the JSON property `courseId` - # @return [String] - attr_accessor :course_id - - # Identifier of the user. When specified as a parameter of a request, this - # identifier can be one of the following: * the numeric identifier for the user * - # the email address of the user * the string literal `"me"`, indicating the - # requesting user - # Corresponds to the JSON property `userId` - # @return [String] - attr_accessor :user_id - - # Global information for a user. - # Corresponds to the JSON property `profile` - # @return [Google::Apis::ClassroomV1::UserProfile] - attr_accessor :profile - - # Representation of a Google Drive folder. - # Corresponds to the JSON property `studentWorkFolder` - # @return [Google::Apis::ClassroomV1::DriveFolder] - attr_accessor :student_work_folder - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @course_id = args[:course_id] if args.key?(:course_id) - @user_id = args[:user_id] if args.key?(:user_id) - @profile = args[:profile] if args.key?(:profile) - @student_work_folder = args[:student_work_folder] if args.key?(:student_work_folder) - end - end - - # Response when listing students. - class ListStudentsResponse - include Google::Apis::Core::Hashable - - # Students who match the list request. - # Corresponds to the JSON property `students` - # @return [Array] - attr_accessor :students - - # Token identifying the next page of results to return. If empty, no further - # results are available. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @students = args[:students] if args.key?(:students) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - # Response when listing guardians. class ListGuardiansResponse include Google::Apis::Core::Hashable - # Guardians on this page of results that met the criteria specified in the - # request. + # Guardians on this page of results that met the criteria specified in + # the request. # Corresponds to the JSON property `guardians` # @return [Array] attr_accessor :guardians @@ -819,11 +785,22 @@ module Google end end - # Association between a student and a guardian of that student. The guardian may - # receive information about the student's course work. + # Association between a student and a guardian of that student. The guardian + # may receive information about the student's course work. class Guardian include Google::Apis::Core::Hashable + # Global information for a user. + # Corresponds to the JSON property `guardianProfile` + # @return [Google::Apis::ClassroomV1::UserProfile] + attr_accessor :guardian_profile + + # The email address to which the initial guardian invitation was sent. + # This field is only visible to domain administrators. + # Corresponds to the JSON property `invitedEmailAddress` + # @return [String] + attr_accessor :invited_email_address + # Identifier for the student to whom the guardian relationship applies. # Corresponds to the JSON property `studentId` # @return [String] @@ -834,56 +811,43 @@ module Google # @return [String] attr_accessor :guardian_id - # Global information for a user. - # Corresponds to the JSON property `guardianProfile` - # @return [Google::Apis::ClassroomV1::UserProfile] - attr_accessor :guardian_profile - - # The email address to which the initial guardian invitation was sent. This - # field is only visible to domain administrators. - # Corresponds to the JSON property `invitedEmailAddress` - # @return [String] - attr_accessor :invited_email_address - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @student_id = args[:student_id] if args.key?(:student_id) - @guardian_id = args[:guardian_id] if args.key?(:guardian_id) @guardian_profile = args[:guardian_profile] if args.key?(:guardian_profile) @invited_email_address = args[:invited_email_address] if args.key?(:invited_email_address) + @student_id = args[:student_id] if args.key?(:student_id) + @guardian_id = args[:guardian_id] if args.key?(:guardian_id) end end - # An invitation to join a course. - class Invitation + # Teacher of a course. + class Teacher include Google::Apis::Core::Hashable - # Identifier assigned by Classroom. Read-only. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifier of the invited user. When specified as a parameter of a request, - # this identifier can be set to one of the following: * the numeric identifier - # for the user * the email address of the user * the string literal `"me"`, - # indicating the requesting user - # Corresponds to the JSON property `userId` - # @return [String] - attr_accessor :user_id - - # Identifier of the course to invite the user to. + # Identifier of the course. + # Read-only. # Corresponds to the JSON property `courseId` # @return [String] attr_accessor :course_id - # Role to invite the user to have. Must not be `COURSE_ROLE_UNSPECIFIED`. - # Corresponds to the JSON property `role` + # Global information for a user. + # Corresponds to the JSON property `profile` + # @return [Google::Apis::ClassroomV1::UserProfile] + attr_accessor :profile + + # Identifier of the user. + # When specified as a parameter of a request, this identifier can be one of + # the following: + # * the numeric identifier for the user + # * the email address of the user + # * the string literal `"me"`, indicating the requesting user + # Corresponds to the JSON property `userId` # @return [String] - attr_accessor :role + attr_accessor :user_id def initialize(**args) update!(**args) @@ -891,21 +855,118 @@ module Google # Update properties of this object def update!(**args) - @id = args[:id] if args.key?(:id) - @user_id = args[:user_id] if args.key?(:user_id) @course_id = args[:course_id] if args.key?(:course_id) - @role = args[:role] if args.key?(:role) + @profile = args[:profile] if args.key?(:profile) + @user_id = args[:user_id] if args.key?(:user_id) end end - # Response when listing invitations. - class ListInvitationsResponse + # Global information for a user. + class UserProfile include Google::Apis::Core::Hashable - # Invitations that match the list request. - # Corresponds to the JSON property `invitations` - # @return [Array] - attr_accessor :invitations + # Email address of the user. + # Read-only. + # Corresponds to the JSON property `emailAddress` + # @return [String] + attr_accessor :email_address + + # Global permissions of the user. + # Read-only. + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + # Identifier of the user. + # Read-only. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Details of the user's name. + # Corresponds to the JSON property `name` + # @return [Google::Apis::ClassroomV1::Name] + attr_accessor :name + + # URL of user's profile photo. + # Read-only. + # Corresponds to the JSON property `photoUrl` + # @return [String] + attr_accessor :photo_url + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @email_address = args[:email_address] if args.key?(:email_address) + @permissions = args[:permissions] if args.key?(:permissions) + @id = args[:id] if args.key?(:id) + @name = args[:name] if args.key?(:name) + @photo_url = args[:photo_url] if args.key?(:photo_url) + end + end + + # Request to reclaim a student submission. + class ReclaimStudentSubmissionRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Student in a course. + class Student + include Google::Apis::Core::Hashable + + # Identifier of the course. + # Read-only. + # Corresponds to the JSON property `courseId` + # @return [String] + attr_accessor :course_id + + # Global information for a user. + # Corresponds to the JSON property `profile` + # @return [Google::Apis::ClassroomV1::UserProfile] + attr_accessor :profile + + # Representation of a Google Drive folder. + # Corresponds to the JSON property `studentWorkFolder` + # @return [Google::Apis::ClassroomV1::DriveFolder] + attr_accessor :student_work_folder + + # Identifier of the user. + # When specified as a parameter of a request, this identifier can be one of + # the following: + # * the numeric identifier for the user + # * the email address of the user + # * the string literal `"me"`, indicating the requesting user + # Corresponds to the JSON property `userId` + # @return [String] + attr_accessor :user_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @course_id = args[:course_id] if args.key?(:course_id) + @profile = args[:profile] if args.key?(:profile) + @student_work_folder = args[:student_work_folder] if args.key?(:student_work_folder) + @user_id = args[:user_id] if args.key?(:user_id) + end + end + + # Response when listing teachers. + class ListTeachersResponse + include Google::Apis::Core::Hashable # Token identifying the next page of results to return. If empty, no further # results are available. @@ -913,123 +974,158 @@ module Google # @return [String] attr_accessor :next_page_token + # Teachers who match the list request. + # Corresponds to the JSON property `teachers` + # @return [Array] + attr_accessor :teachers + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @invitations = args[:invitations] if args.key?(:invitations) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @teachers = args[:teachers] if args.key?(:teachers) end end - # Course work created by a teacher for students of the course. - class CourseWork + # A Course in Classroom. + class Course include Google::Apis::Core::Hashable - # Identifier of the course. Read-only. - # Corresponds to the JSON property `courseId` - # @return [String] - attr_accessor :course_id - - # Classroom-assigned identifier of this course work, unique per course. Read- - # only. + # Identifier for this course assigned by Classroom. + # When + # creating a course, + # you may optionally set this identifier to an + # alias string in the + # request to create a corresponding alias. The `id` is still assigned by + # Classroom and cannot be updated after the course is created. + # Specifying this field in a course update mask results in an error. # Corresponds to the JSON property `id` # @return [String] attr_accessor :id - # Title of this course work. The title must be a valid UTF-8 string containing - # between 1 and 3000 characters. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # Optional description of this course work. If set, the description must be a - # valid UTF-8 string containing no more than 30,000 characters. + # Optional description. + # For example, "We'll be learning about the structure of living + # creatures from a combination of textbooks, guest lectures, and lab work. + # Expect to be excited!" + # If set, this field must be a valid UTF-8 string and no longer than 30,000 + # characters. # Corresponds to the JSON property `description` # @return [String] attr_accessor :description - # Additional materials. CourseWork must have no more than 20 material items. - # Corresponds to the JSON property `materials` - # @return [Array] - attr_accessor :materials - - # Status of this course work. If unspecified, the default state is `DRAFT`. - # Corresponds to the JSON property `state` - # @return [String] - attr_accessor :state - - # Absolute link to this course work in the Classroom web UI. This is only - # populated if `state` is `PUBLISHED`. Read-only. - # Corresponds to the JSON property `alternateLink` - # @return [String] - attr_accessor :alternate_link - - # Timestamp when this course work was created. Read-only. - # Corresponds to the JSON property `creationTime` - # @return [String] - attr_accessor :creation_time - - # Timestamp of the most recent change to this course work. Read-only. + # Time of the most recent update to this course. + # Specifying this field in a course update mask results in an error. + # Read-only. # Corresponds to the JSON property `updateTime` # @return [String] attr_accessor :update_time - # Represents a whole calendar date, e.g. date of birth. The time of day and time - # zone are either specified elsewhere or are not significant. The date is - # relative to the Proleptic Gregorian Calendar. The day may be 0 to represent a - # year and month where the day is not significant, e.g. credit card expiration - # date. The year may be 0 to represent a month and day independent of year, e.g. - # anniversary date. Related types are google.type.TimeOfDay and `google.protobuf. - # Timestamp`. - # Corresponds to the JSON property `dueDate` - # @return [Google::Apis::ClassroomV1::Date] - attr_accessor :due_date - - # Represents a time of day. The date and time zone are either not significant or - # are specified elsewhere. An API may chose to allow leap seconds. Related types - # are google.type.Date and `google.protobuf.Timestamp`. - # Corresponds to the JSON property `dueTime` - # @return [Google::Apis::ClassroomV1::TimeOfDay] - attr_accessor :due_time - - # Maximum grade for this course work. If zero or unspecified, this assignment is - # considered ungraded. This must be a non-negative integer value. - # Corresponds to the JSON property `maxPoints` - # @return [Float] - attr_accessor :max_points - - # Type of this course work. The type is set when the course work is created and - # cannot be changed. - # Corresponds to the JSON property `workType` + # Section of the course. + # For example, "Period 2". + # If set, this field must be a valid UTF-8 string and no longer than 2800 + # characters. + # Corresponds to the JSON property `section` # @return [String] - attr_accessor :work_type + attr_accessor :section - # Whether this course work item is associated with the Developer Console project - # making the request. See google.classroom.Work.CreateCourseWork for more - # details. Read-only. - # Corresponds to the JSON property `associatedWithDeveloper` + # Absolute link to this course in the Classroom web UI. + # Read-only. + # Corresponds to the JSON property `alternateLink` + # @return [String] + attr_accessor :alternate_link + + # The email address of a Google group containing all teachers of the course. + # This group does not accept email and can only be used for permissions. + # Read-only. + # Corresponds to the JSON property `teacherGroupEmail` + # @return [String] + attr_accessor :teacher_group_email + + # Whether or not guardian notifications are enabled for this course. + # Read-only. + # Corresponds to the JSON property `guardiansEnabled` # @return [Boolean] - attr_accessor :associated_with_developer - alias_method :associated_with_developer?, :associated_with_developer + attr_accessor :guardians_enabled + alias_method :guardians_enabled?, :guardians_enabled - # Setting to determine when students are allowed to modify submissions. If - # unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`. - # Corresponds to the JSON property `submissionModificationMode` + # The identifier of the owner of a course. + # When specified as a parameter of a + # create course request, this + # field is required. + # The identifier can be one of the following: + # * the numeric identifier for the user + # * the email address of the user + # * the string literal `"me"`, indicating the requesting user + # This must be set in a create request. Specifying this field in a course + # update mask results in an `INVALID_ARGUMENT` error. + # Corresponds to the JSON property `ownerId` # @return [String] - attr_accessor :submission_modification_mode + attr_accessor :owner_id - # Additional details for assignments. - # Corresponds to the JSON property `assignment` - # @return [Google::Apis::ClassroomV1::Assignment] - attr_accessor :assignment + # Optional heading for the description. + # For example, "Welcome to 10th Grade Biology." + # If set, this field must be a valid UTF-8 string and no longer than 3600 + # characters. + # Corresponds to the JSON property `descriptionHeading` + # @return [String] + attr_accessor :description_heading - # Additional details for multiple-choice questions. - # Corresponds to the JSON property `multipleChoiceQuestion` - # @return [Google::Apis::ClassroomV1::MultipleChoiceQuestion] - attr_accessor :multiple_choice_question + # The email address of a Google group containing all members of the course. + # This group does not accept email and can only be used for permissions. + # Read-only. + # Corresponds to the JSON property `courseGroupEmail` + # @return [String] + attr_accessor :course_group_email + + # State of the course. + # If unspecified, the default state is `PROVISIONED`. + # Corresponds to the JSON property `courseState` + # @return [String] + attr_accessor :course_state + + # Optional room location. + # For example, "301". + # If set, this field must be a valid UTF-8 string and no longer than 650 + # characters. + # Corresponds to the JSON property `room` + # @return [String] + attr_accessor :room + + # Name of the course. + # For example, "10th Grade Biology". + # The name is required. It must be between 1 and 750 characters and a valid + # UTF-8 string. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Creation time of the course. + # Specifying this field in a course update mask results in an error. + # Read-only. + # Corresponds to the JSON property `creationTime` + # @return [String] + attr_accessor :creation_time + + # Enrollment code to use when joining this course. + # Specifying this field in a course update mask results in an error. + # Read-only. + # Corresponds to the JSON property `enrollmentCode` + # @return [String] + attr_accessor :enrollment_code + + # Representation of a Google Drive folder. + # Corresponds to the JSON property `teacherFolder` + # @return [Google::Apis::ClassroomV1::DriveFolder] + attr_accessor :teacher_folder + + # Sets of materials that appear on the "about" page of this course. + # Read-only. + # Corresponds to the JSON property `courseMaterialSets` + # @return [Array] + attr_accessor :course_material_sets def initialize(**args) update!(**args) @@ -1037,61 +1133,181 @@ module Google # Update properties of this object def update!(**args) - @course_id = args[:course_id] if args.key?(:course_id) @id = args[:id] if args.key?(:id) - @title = args[:title] if args.key?(:title) @description = args[:description] if args.key?(:description) - @materials = args[:materials] if args.key?(:materials) - @state = args[:state] if args.key?(:state) - @alternate_link = args[:alternate_link] if args.key?(:alternate_link) - @creation_time = args[:creation_time] if args.key?(:creation_time) @update_time = args[:update_time] if args.key?(:update_time) - @due_date = args[:due_date] if args.key?(:due_date) - @due_time = args[:due_time] if args.key?(:due_time) - @max_points = args[:max_points] if args.key?(:max_points) - @work_type = args[:work_type] if args.key?(:work_type) - @associated_with_developer = args[:associated_with_developer] if args.key?(:associated_with_developer) - @submission_modification_mode = args[:submission_modification_mode] if args.key?(:submission_modification_mode) - @assignment = args[:assignment] if args.key?(:assignment) - @multiple_choice_question = args[:multiple_choice_question] if args.key?(:multiple_choice_question) + @section = args[:section] if args.key?(:section) + @alternate_link = args[:alternate_link] if args.key?(:alternate_link) + @teacher_group_email = args[:teacher_group_email] if args.key?(:teacher_group_email) + @guardians_enabled = args[:guardians_enabled] if args.key?(:guardians_enabled) + @owner_id = args[:owner_id] if args.key?(:owner_id) + @description_heading = args[:description_heading] if args.key?(:description_heading) + @course_group_email = args[:course_group_email] if args.key?(:course_group_email) + @course_state = args[:course_state] if args.key?(:course_state) + @room = args[:room] if args.key?(:room) + @name = args[:name] if args.key?(:name) + @creation_time = args[:creation_time] if args.key?(:creation_time) + @enrollment_code = args[:enrollment_code] if args.key?(:enrollment_code) + @teacher_folder = args[:teacher_folder] if args.key?(:teacher_folder) + @course_material_sets = args[:course_material_sets] if args.key?(:course_material_sets) end end - # Material attached to course work. When creating attachments, setting the `form` - # field is not supported. - class Material + # Request to return a student submission. + class ReturnStudentSubmissionRequest include Google::Apis::Core::Hashable - # Drive file that is used as material for course work. - # Corresponds to the JSON property `driveFile` - # @return [Google::Apis::ClassroomV1::SharedDriveFile] - attr_accessor :drive_file - - # YouTube video item. - # Corresponds to the JSON property `youtubeVideo` - # @return [Google::Apis::ClassroomV1::YouTubeVideo] - attr_accessor :youtube_video - - # URL item. - # Corresponds to the JSON property `link` - # @return [Google::Apis::ClassroomV1::Link] - attr_accessor :link - - # Google Forms item. - # Corresponds to the JSON property `form` - # @return [Google::Apis::ClassroomV1::Form] - attr_accessor :form - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @drive_file = args[:drive_file] if args.key?(:drive_file) - @youtube_video = args[:youtube_video] if args.key?(:youtube_video) - @link = args[:link] if args.key?(:link) - @form = args[:form] if args.key?(:form) + end + end + + # An invitation to become the guardian of a specified user, sent to a specified + # email address. + class GuardianInvitation + include Google::Apis::Core::Hashable + + # The time that this invitation was created. + # Read-only. + # Corresponds to the JSON property `creationTime` + # @return [String] + attr_accessor :creation_time + + # Unique identifier for this invitation. + # Read-only. + # Corresponds to the JSON property `invitationId` + # @return [String] + attr_accessor :invitation_id + + # The state that this invitation is in. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + # Email address that the invitation was sent to. + # This field is only visible to domain administrators. + # Corresponds to the JSON property `invitedEmailAddress` + # @return [String] + attr_accessor :invited_email_address + + # ID of the student (in standard format) + # Corresponds to the JSON property `studentId` + # @return [String] + attr_accessor :student_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @creation_time = args[:creation_time] if args.key?(:creation_time) + @invitation_id = args[:invitation_id] if args.key?(:invitation_id) + @state = args[:state] if args.key?(:state) + @invited_email_address = args[:invited_email_address] if args.key?(:invited_email_address) + @student_id = args[:student_id] if args.key?(:student_id) + end + end + + # Request to turn in a student submission. + class TurnInStudentSubmissionRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # YouTube video item. + class YouTubeVideo + include Google::Apis::Core::Hashable + + # URL of a thumbnail image of the YouTube video. + # Read-only. + # Corresponds to the JSON property `thumbnailUrl` + # @return [String] + attr_accessor :thumbnail_url + + # Title of the YouTube video. + # Read-only. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # URL that can be used to view the YouTube video. + # Read-only. + # Corresponds to the JSON property `alternateLink` + # @return [String] + attr_accessor :alternate_link + + # YouTube API resource ID. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @thumbnail_url = args[:thumbnail_url] if args.key?(:thumbnail_url) + @title = args[:title] if args.key?(:title) + @alternate_link = args[:alternate_link] if args.key?(:alternate_link) + @id = args[:id] if args.key?(:id) + end + end + + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # service Foo ` + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # ` + # The JSON representation for `Empty` is empty JSON object ````. + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Response when listing course work. + class ListCourseWorkResponse + include Google::Apis::Core::Hashable + + # Token identifying the next page of results to return. If empty, no further + # results are available. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # Course work items that match the request. + # Corresponds to the JSON property `courseWork` + # @return [Array] + attr_accessor :course_work + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @course_work = args[:course_work] if args.key?(:course_work) end end @@ -1120,28 +1336,111 @@ module Google end end - # Represents a whole calendar date, e.g. date of birth. The time of day and time - # zone are either specified elsewhere or are not significant. The date is - # relative to the Proleptic Gregorian Calendar. The day may be 0 to represent a - # year and month where the day is not significant, e.g. credit card expiration - # date. The year may be 0 to represent a month and day independent of year, e.g. - # anniversary date. Related types are google.type.TimeOfDay and `google.protobuf. - # Timestamp`. - class Date + # Global user permission description. + class GlobalPermission include Google::Apis::Core::Hashable - # Year of date. Must be from 1 to 9999, or 0 if specifying a date without a year. - # Corresponds to the JSON property `year` - # @return [Fixnum] - attr_accessor :year + # Permission value. + # Corresponds to the JSON property `permission` + # @return [String] + attr_accessor :permission + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @permission = args[:permission] if args.key?(:permission) + end + end + + # Material attached to course work. + # When creating attachments, setting the `form` field is not supported. + class Material + include Google::Apis::Core::Hashable + + # Drive file that is used as material for course work. + # Corresponds to the JSON property `driveFile` + # @return [Google::Apis::ClassroomV1::SharedDriveFile] + attr_accessor :drive_file + + # URL item. + # Corresponds to the JSON property `link` + # @return [Google::Apis::ClassroomV1::Link] + attr_accessor :link + + # YouTube video item. + # Corresponds to the JSON property `youtubeVideo` + # @return [Google::Apis::ClassroomV1::YouTubeVideo] + attr_accessor :youtube_video + + # Google Forms item. + # Corresponds to the JSON property `form` + # @return [Google::Apis::ClassroomV1::Form] + attr_accessor :form + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @drive_file = args[:drive_file] if args.key?(:drive_file) + @link = args[:link] if args.key?(:link) + @youtube_video = args[:youtube_video] if args.key?(:youtube_video) + @form = args[:form] if args.key?(:form) + end + end + + # Student work for an assignment. + class AssignmentSubmission + include Google::Apis::Core::Hashable + + # Attachments added by the student. + # Drive files that correspond to materials with a share mode of + # STUDENT_COPY may not exist yet if the student has not accessed the + # assignment in Classroom. + # Some attachment metadata is only populated if the requesting user has + # permission to access it. Identifier and alternate_link fields are always + # available, but others (e.g. title) may not be. + # Corresponds to the JSON property `attachments` + # @return [Array] + attr_accessor :attachments + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @attachments = args[:attachments] if args.key?(:attachments) + end + end + + # Represents a whole calendar date, e.g. date of birth. The time of day and + # time zone are either specified elsewhere or are not significant. The date + # is relative to the Proleptic Gregorian Calendar. The day may be 0 to + # represent a year and month where the day is not significant, e.g. credit card + # expiration date. The year may be 0 to represent a month and day independent + # of year, e.g. anniversary date. Related types are google.type.TimeOfDay + # and `google.protobuf.Timestamp`. + class Date + include Google::Apis::Core::Hashable # Month of year. Must be from 1 to 12. # Corresponds to the JSON property `month` # @return [Fixnum] attr_accessor :month - # Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if - # specifying a year/month where the day is not significant. + # Year of date. Must be from 1 to 9999, or 0 if specifying a date without + # a year. + # Corresponds to the JSON property `year` + # @return [Fixnum] + attr_accessor :year + + # Day of month. Must be from 1 to 31 and valid for the year and month, or 0 + # if specifying a year/month where the day is not significant. # Corresponds to the JSON property `day` # @return [Fixnum] attr_accessor :day @@ -1152,53 +1451,12 @@ module Google # Update properties of this object def update!(**args) - @year = args[:year] if args.key?(:year) @month = args[:month] if args.key?(:month) + @year = args[:year] if args.key?(:year) @day = args[:day] if args.key?(:day) end end - # Represents a time of day. The date and time zone are either not significant or - # are specified elsewhere. An API may chose to allow leap seconds. Related types - # are google.type.Date and `google.protobuf.Timestamp`. - class TimeOfDay - include Google::Apis::Core::Hashable - - # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to - # allow the value "24:00:00" for scenarios like business closing time. - # Corresponds to the JSON property `hours` - # @return [Fixnum] - attr_accessor :hours - - # Minutes of hour of day. Must be from 0 to 59. - # Corresponds to the JSON property `minutes` - # @return [Fixnum] - attr_accessor :minutes - - # Seconds of minutes of the time. Must normally be from 0 to 59. An API may - # allow the value 60 if it allows leap-seconds. - # Corresponds to the JSON property `seconds` - # @return [Fixnum] - attr_accessor :seconds - - # Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. - # Corresponds to the JSON property `nanos` - # @return [Fixnum] - attr_accessor :nanos - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @hours = args[:hours] if args.key?(:hours) - @minutes = args[:minutes] if args.key?(:minutes) - @seconds = args[:seconds] if args.key?(:seconds) - @nanos = args[:nanos] if args.key?(:nanos) - end - end - # Additional details for assignments. class Assignment include Google::Apis::Core::Hashable @@ -1218,146 +1476,62 @@ module Google end end - # Additional details for multiple-choice questions. - class MultipleChoiceQuestion + # Response when listing courses. + class ListCoursesResponse include Google::Apis::Core::Hashable - # Possible choices. - # Corresponds to the JSON property `choices` - # @return [Array] - attr_accessor :choices - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @choices = args[:choices] if args.key?(:choices) - end - end - - # Response when listing course work. - class ListCourseWorkResponse - include Google::Apis::Core::Hashable - - # Course work items that match the request. - # Corresponds to the JSON property `courseWork` - # @return [Array] - attr_accessor :course_work - # Token identifying the next page of results to return. If empty, no further # results are available. # Corresponds to the JSON property `nextPageToken` # @return [String] attr_accessor :next_page_token + # Courses that match the list request. + # Corresponds to the JSON property `courses` + # @return [Array] + attr_accessor :courses + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @course_work = args[:course_work] if args.key?(:course_work) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @courses = args[:courses] if args.key?(:courses) end end - # Student submission for course work. StudentSubmission items are generated when - # a CourseWork item is created. StudentSubmissions that have never been accessed - # (i.e. with `state` = NEW) may not have a creation time or update time. - class StudentSubmission + # An invitation to join a course. + class Invitation include Google::Apis::Core::Hashable - # Identifier of the course. Read-only. + # Identifier of the course to invite the user to. # Corresponds to the JSON property `courseId` # @return [String] attr_accessor :course_id - # Identifier for the course work this corresponds to. Read-only. - # Corresponds to the JSON property `courseWorkId` + # Role to invite the user to have. + # Must not be `COURSE_ROLE_UNSPECIFIED`. + # Corresponds to the JSON property `role` # @return [String] - attr_accessor :course_work_id + attr_accessor :role - # Classroom-assigned Identifier for the student submission. This is unique among - # submissions for the relevant course work. Read-only. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Identifier for the student that owns this submission. Read-only. + # Identifier of the invited user. + # When specified as a parameter of a request, this identifier can be set to + # one of the following: + # * the numeric identifier for the user + # * the email address of the user + # * the string literal `"me"`, indicating the requesting user # Corresponds to the JSON property `userId` # @return [String] attr_accessor :user_id - # Creation time of this submission. This may be unset if the student has not - # accessed this item. Read-only. - # Corresponds to the JSON property `creationTime` + # Identifier assigned by Classroom. + # Read-only. + # Corresponds to the JSON property `id` # @return [String] - attr_accessor :creation_time - - # Last update time of this submission. This may be unset if the student has not - # accessed this item. Read-only. - # Corresponds to the JSON property `updateTime` - # @return [String] - attr_accessor :update_time - - # State of this submission. Read-only. - # Corresponds to the JSON property `state` - # @return [String] - attr_accessor :state - - # Whether this submission is late. Read-only. - # Corresponds to the JSON property `late` - # @return [Boolean] - attr_accessor :late - alias_method :late?, :late - - # Optional pending grade. If unset, no grade was set. This must be a non- - # negative integer value. This is only visible to and modifiable by course - # teachers. - # Corresponds to the JSON property `draftGrade` - # @return [Float] - attr_accessor :draft_grade - - # Optional grade. If unset, no grade was set. This must be a non-negative - # integer value. This may be modified only by course teachers. - # Corresponds to the JSON property `assignedGrade` - # @return [Float] - attr_accessor :assigned_grade - - # Absolute link to the submission in the Classroom web UI. Read-only. - # Corresponds to the JSON property `alternateLink` - # @return [String] - attr_accessor :alternate_link - - # Type of course work this submission is for. Read-only. - # Corresponds to the JSON property `courseWorkType` - # @return [String] - attr_accessor :course_work_type - - # Whether this student submission is associated with the Developer Console - # project making the request. See google.classroom.Work.CreateCourseWork for - # more details. Read-only. - # Corresponds to the JSON property `associatedWithDeveloper` - # @return [Boolean] - attr_accessor :associated_with_developer - alias_method :associated_with_developer?, :associated_with_developer - - # Student work for an assignment. - # Corresponds to the JSON property `assignmentSubmission` - # @return [Google::Apis::ClassroomV1::AssignmentSubmission] - attr_accessor :assignment_submission - - # Student work for a short answer question. - # Corresponds to the JSON property `shortAnswerSubmission` - # @return [Google::Apis::ClassroomV1::ShortAnswerSubmission] - attr_accessor :short_answer_submission - - # Student work for a multiple-choice question. - # Corresponds to the JSON property `multipleChoiceSubmission` - # @return [Google::Apis::ClassroomV1::MultipleChoiceSubmission] - attr_accessor :multiple_choice_submission + attr_accessor :id def initialize(**args) update!(**args) @@ -1366,120 +1540,9 @@ module Google # Update properties of this object def update!(**args) @course_id = args[:course_id] if args.key?(:course_id) - @course_work_id = args[:course_work_id] if args.key?(:course_work_id) - @id = args[:id] if args.key?(:id) + @role = args[:role] if args.key?(:role) @user_id = args[:user_id] if args.key?(:user_id) - @creation_time = args[:creation_time] if args.key?(:creation_time) - @update_time = args[:update_time] if args.key?(:update_time) - @state = args[:state] if args.key?(:state) - @late = args[:late] if args.key?(:late) - @draft_grade = args[:draft_grade] if args.key?(:draft_grade) - @assigned_grade = args[:assigned_grade] if args.key?(:assigned_grade) - @alternate_link = args[:alternate_link] if args.key?(:alternate_link) - @course_work_type = args[:course_work_type] if args.key?(:course_work_type) - @associated_with_developer = args[:associated_with_developer] if args.key?(:associated_with_developer) - @assignment_submission = args[:assignment_submission] if args.key?(:assignment_submission) - @short_answer_submission = args[:short_answer_submission] if args.key?(:short_answer_submission) - @multiple_choice_submission = args[:multiple_choice_submission] if args.key?(:multiple_choice_submission) - end - end - - # Student work for an assignment. - class AssignmentSubmission - include Google::Apis::Core::Hashable - - # Attachments added by the student. Drive files that correspond to materials - # with a share mode of STUDENT_COPY may not exist yet if the student has not - # accessed the assignment in Classroom. Some attachment metadata is only - # populated if the requesting user has permission to access it. Identifier and - # alternate_link fields are always available, but others (e.g. title) may not be. - # Corresponds to the JSON property `attachments` - # @return [Array] - attr_accessor :attachments - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @attachments = args[:attachments] if args.key?(:attachments) - end - end - - # Attachment added to student assignment work. When creating attachments, - # setting the `form` field is not supported. - class Attachment - include Google::Apis::Core::Hashable - - # Representation of a Google Drive file. - # Corresponds to the JSON property `driveFile` - # @return [Google::Apis::ClassroomV1::DriveFile] - attr_accessor :drive_file - - # YouTube video item. - # Corresponds to the JSON property `youTubeVideo` - # @return [Google::Apis::ClassroomV1::YouTubeVideo] - attr_accessor :you_tube_video - - # URL item. - # Corresponds to the JSON property `link` - # @return [Google::Apis::ClassroomV1::Link] - attr_accessor :link - - # Google Forms item. - # Corresponds to the JSON property `form` - # @return [Google::Apis::ClassroomV1::Form] - attr_accessor :form - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @drive_file = args[:drive_file] if args.key?(:drive_file) - @you_tube_video = args[:you_tube_video] if args.key?(:you_tube_video) - @link = args[:link] if args.key?(:link) - @form = args[:form] if args.key?(:form) - end - end - - # Student work for a short answer question. - class ShortAnswerSubmission - include Google::Apis::Core::Hashable - - # Student response to a short-answer question. - # Corresponds to the JSON property `answer` - # @return [String] - attr_accessor :answer - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @answer = args[:answer] if args.key?(:answer) - end - end - - # Student work for a multiple-choice question. - class MultipleChoiceSubmission - include Google::Apis::Core::Hashable - - # Student's select choice. - # Corresponds to the JSON property `answer` - # @return [String] - attr_accessor :answer - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @answer = args[:answer] if args.key?(:answer) + @id = args[:id] if args.key?(:id) end end @@ -1487,84 +1550,112 @@ module Google class ListStudentSubmissionsResponse include Google::Apis::Core::Hashable + # Token identifying the next page of results to return. If empty, no further + # results are available. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + # Student work that matches the request. # Corresponds to the JSON property `studentSubmissions` # @return [Array] attr_accessor :student_submissions + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @student_submissions = args[:student_submissions] if args.key?(:student_submissions) + end + end + + # Details of the user's name. + class Name + include Google::Apis::Core::Hashable + + # The user's first name. + # Read-only. + # Corresponds to the JSON property `givenName` + # @return [String] + attr_accessor :given_name + + # The user's last name. + # Read-only. + # Corresponds to the JSON property `familyName` + # @return [String] + attr_accessor :family_name + + # The user's full name formed by concatenating the first and last name + # values. + # Read-only. + # Corresponds to the JSON property `fullName` + # @return [String] + attr_accessor :full_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @given_name = args[:given_name] if args.key?(:given_name) + @family_name = args[:family_name] if args.key?(:family_name) + @full_name = args[:full_name] if args.key?(:full_name) + end + end + + # Response when listing invitations. + class ListInvitationsResponse + include Google::Apis::Core::Hashable + # Token identifying the next page of results to return. If empty, no further # results are available. # Corresponds to the JSON property `nextPageToken` # @return [String] attr_accessor :next_page_token + # Invitations that match the list request. + # Corresponds to the JSON property `invitations` + # @return [Array] + attr_accessor :invitations + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @student_submissions = args[:student_submissions] if args.key?(:student_submissions) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @invitations = args[:invitations] if args.key?(:invitations) end end - # Request to turn in a student submission. - class TurnInStudentSubmissionRequest + # Response when listing students. + class ListStudentsResponse include Google::Apis::Core::Hashable + # Token identifying the next page of results to return. If empty, no further + # results are available. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # Students who match the list request. + # Corresponds to the JSON property `students` + # @return [Array] + attr_accessor :students + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - end - end - - # Request to reclaim a student submission. - class ReclaimStudentSubmissionRequest - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # Request to return a student submission. - class ReturnStudentSubmissionRequest - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # Request to modify the attachments of a student submission. - class ModifyAttachmentsRequest - include Google::Apis::Core::Hashable - - # Attachments to add. A student submission may not have more than 20 attachments. - # Form attachments are not supported. - # Corresponds to the JSON property `addAttachments` - # @return [Array] - attr_accessor :add_attachments - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @add_attachments = args[:add_attachments] if args.key?(:add_attachments) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @students = args[:students] if args.key?(:students) end end end diff --git a/generated/google/apis/classroom_v1/representations.rb b/generated/google/apis/classroom_v1/representations.rb index ebbbe93fe..361451453 100644 --- a/generated/google/apis/classroom_v1/representations.rb +++ b/generated/google/apis/classroom_v1/representations.rb @@ -22,73 +22,7 @@ module Google module Apis module ClassroomV1 - class Course - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DriveFolder - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CourseMaterialSet - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CourseMaterial - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DriveFile - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class YouTubeVideo - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Link - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Form - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Empty - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListCoursesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CourseAlias - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListCourseAliasesResponse + class Attachment class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -100,49 +34,91 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class GuardianInvitation + class CourseWork class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class UserProfile + class DriveFile class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Name + class DriveFolder class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class GlobalPermission + class ListCourseAliasesResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Teacher + class ShortAnswerSubmission class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ListTeachersResponse + class CourseMaterial class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Student + class MultipleChoiceSubmission class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ListStudentsResponse + class Link + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ModifyAttachmentsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TimeOfDay + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Form + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class MultipleChoiceQuestion + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CourseMaterialSet + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class StudentSubmission + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CourseAlias class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -160,103 +136,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Invitation + class Teacher class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ListInvitationsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CourseWork - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Material - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SharedDriveFile - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Date - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TimeOfDay - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Assignment - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MultipleChoiceQuestion - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListCourseWorkResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class StudentSubmission - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AssignmentSubmission - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Attachment - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ShortAnswerSubmission - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class MultipleChoiceSubmission - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListStudentSubmissionsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TurnInStudentSubmissionRequest + class UserProfile class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -268,61 +154,218 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class ReturnStudentSubmissionRequest + class Student class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ModifyAttachmentsRequest + class ListTeachersResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end class Course + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ReturnStudentSubmissionRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GuardianInvitation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TurnInStudentSubmissionRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class YouTubeVideo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Empty + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListCourseWorkResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SharedDriveFile + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GlobalPermission + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Material + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AssignmentSubmission + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Date + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Assignment + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListCoursesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Invitation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListStudentSubmissionsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Name + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListInvitationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListStudentsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Attachment + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :drive_file, as: 'driveFile', class: Google::Apis::ClassroomV1::DriveFile, decorator: Google::Apis::ClassroomV1::DriveFile::Representation + + property :you_tube_video, as: 'youTubeVideo', class: Google::Apis::ClassroomV1::YouTubeVideo, decorator: Google::Apis::ClassroomV1::YouTubeVideo::Representation + + property :link, as: 'link', class: Google::Apis::ClassroomV1::Link, decorator: Google::Apis::ClassroomV1::Link::Representation + + property :form, as: 'form', class: Google::Apis::ClassroomV1::Form, decorator: Google::Apis::ClassroomV1::Form::Representation + + end + end + + class ListGuardianInvitationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :guardian_invitations, as: 'guardianInvitations', class: Google::Apis::ClassroomV1::GuardianInvitation, decorator: Google::Apis::ClassroomV1::GuardianInvitation::Representation + + end + end + + class CourseWork # @private class Representation < Google::Apis::Core::JsonRepresentation property :id, as: 'id' - property :name, as: 'name' - property :section, as: 'section' - property :description_heading, as: 'descriptionHeading' property :description, as: 'description' - property :room, as: 'room' - property :owner_id, as: 'ownerId' - property :creation_time, as: 'creationTime' + property :submission_modification_mode, as: 'submissionModificationMode' + property :associated_with_developer, as: 'associatedWithDeveloper' property :update_time, as: 'updateTime' - property :enrollment_code, as: 'enrollmentCode' - property :course_state, as: 'courseState' + property :title, as: 'title' property :alternate_link, as: 'alternateLink' - property :teacher_group_email, as: 'teacherGroupEmail' - property :course_group_email, as: 'courseGroupEmail' - property :teacher_folder, as: 'teacherFolder', class: Google::Apis::ClassroomV1::DriveFolder, decorator: Google::Apis::ClassroomV1::DriveFolder::Representation + property :work_type, as: 'workType' + collection :materials, as: 'materials', class: Google::Apis::ClassroomV1::Material, decorator: Google::Apis::ClassroomV1::Material::Representation - collection :course_material_sets, as: 'courseMaterialSets', class: Google::Apis::ClassroomV1::CourseMaterialSet, decorator: Google::Apis::ClassroomV1::CourseMaterialSet::Representation + property :state, as: 'state' + property :due_date, as: 'dueDate', class: Google::Apis::ClassroomV1::Date, decorator: Google::Apis::ClassroomV1::Date::Representation - property :guardians_enabled, as: 'guardiansEnabled' + property :multiple_choice_question, as: 'multipleChoiceQuestion', class: Google::Apis::ClassroomV1::MultipleChoiceQuestion, decorator: Google::Apis::ClassroomV1::MultipleChoiceQuestion::Representation + + property :creation_time, as: 'creationTime' + property :course_id, as: 'courseId' + property :max_points, as: 'maxPoints' + property :assignment, as: 'assignment', class: Google::Apis::ClassroomV1::Assignment, decorator: Google::Apis::ClassroomV1::Assignment::Representation + + property :due_time, as: 'dueTime', class: Google::Apis::ClassroomV1::TimeOfDay, decorator: Google::Apis::ClassroomV1::TimeOfDay::Representation + + end + end + + class DriveFile + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :thumbnail_url, as: 'thumbnailUrl' + property :title, as: 'title' + property :alternate_link, as: 'alternateLink' + property :id, as: 'id' end end class DriveFolder # @private class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' property :title, as: 'title' property :alternate_link, as: 'alternateLink' + property :id, as: 'id' end end - class CourseMaterialSet + class ListCourseAliasesResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :title, as: 'title' - collection :materials, as: 'materials', class: Google::Apis::ClassroomV1::CourseMaterial, decorator: Google::Apis::ClassroomV1::CourseMaterial::Representation + property :next_page_token, as: 'nextPageToken' + collection :aliases, as: 'aliases', class: Google::Apis::ClassroomV1::CourseAlias, decorator: Google::Apis::ClassroomV1::CourseAlias::Representation end end + class ShortAnswerSubmission + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :answer, as: 'answer' + end + end + class CourseMaterial # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -337,23 +380,10 @@ module Google end end - class DriveFile + class MultipleChoiceSubmission # @private class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :title, as: 'title' - property :alternate_link, as: 'alternateLink' - property :thumbnail_url, as: 'thumbnailUrl' - end - end - - class YouTubeVideo - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :title, as: 'title' - property :alternate_link, as: 'alternateLink' - property :thumbnail_url, as: 'thumbnailUrl' + property :answer, as: 'answer' end end @@ -361,33 +391,77 @@ module Google # @private class Representation < Google::Apis::Core::JsonRepresentation property :url, as: 'url' - property :title, as: 'title' property :thumbnail_url, as: 'thumbnailUrl' + property :title, as: 'title' + end + end + + class ModifyAttachmentsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :add_attachments, as: 'addAttachments', class: Google::Apis::ClassroomV1::Attachment, decorator: Google::Apis::ClassroomV1::Attachment::Representation + + end + end + + class TimeOfDay + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :nanos, as: 'nanos' + property :hours, as: 'hours' + property :minutes, as: 'minutes' + property :seconds, as: 'seconds' end end class Form # @private class Representation < Google::Apis::Core::JsonRepresentation - property :form_url, as: 'formUrl' - property :response_url, as: 'responseUrl' - property :title, as: 'title' property :thumbnail_url, as: 'thumbnailUrl' + property :form_url, as: 'formUrl' + property :title, as: 'title' + property :response_url, as: 'responseUrl' end end - class Empty + class MultipleChoiceQuestion # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :choices, as: 'choices' end end - class ListCoursesResponse + class CourseMaterialSet # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :courses, as: 'courses', class: Google::Apis::ClassroomV1::Course, decorator: Google::Apis::ClassroomV1::Course::Representation + collection :materials, as: 'materials', class: Google::Apis::ClassroomV1::CourseMaterial, decorator: Google::Apis::ClassroomV1::CourseMaterial::Representation - property :next_page_token, as: 'nextPageToken' + property :title, as: 'title' + end + end + + class StudentSubmission + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :id, as: 'id' + property :course_work_type, as: 'courseWorkType' + property :assigned_grade, as: 'assignedGrade' + property :associated_with_developer, as: 'associatedWithDeveloper' + property :update_time, as: 'updateTime' + property :alternate_link, as: 'alternateLink' + property :draft_grade, as: 'draftGrade' + property :user_id, as: 'userId' + property :multiple_choice_submission, as: 'multipleChoiceSubmission', class: Google::Apis::ClassroomV1::MultipleChoiceSubmission, decorator: Google::Apis::ClassroomV1::MultipleChoiceSubmission::Representation + + property :state, as: 'state' + property :assignment_submission, as: 'assignmentSubmission', class: Google::Apis::ClassroomV1::AssignmentSubmission, decorator: Google::Apis::ClassroomV1::AssignmentSubmission::Representation + + property :creation_time, as: 'creationTime' + property :course_id, as: 'courseId' + property :short_answer_submission, as: 'shortAnswerSubmission', class: Google::Apis::ClassroomV1::ShortAnswerSubmission, decorator: Google::Apis::ClassroomV1::ShortAnswerSubmission::Representation + + property :late, as: 'late' + property :course_work_id, as: 'courseWorkId' end end @@ -398,104 +472,6 @@ module Google end end - class ListCourseAliasesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :aliases, as: 'aliases', class: Google::Apis::ClassroomV1::CourseAlias, decorator: Google::Apis::ClassroomV1::CourseAlias::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - class ListGuardianInvitationsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :guardian_invitations, as: 'guardianInvitations', class: Google::Apis::ClassroomV1::GuardianInvitation, decorator: Google::Apis::ClassroomV1::GuardianInvitation::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - class GuardianInvitation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :student_id, as: 'studentId' - property :invitation_id, as: 'invitationId' - property :invited_email_address, as: 'invitedEmailAddress' - property :state, as: 'state' - property :creation_time, as: 'creationTime' - end - end - - class UserProfile - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :name, as: 'name', class: Google::Apis::ClassroomV1::Name, decorator: Google::Apis::ClassroomV1::Name::Representation - - property :email_address, as: 'emailAddress' - property :photo_url, as: 'photoUrl' - collection :permissions, as: 'permissions', class: Google::Apis::ClassroomV1::GlobalPermission, decorator: Google::Apis::ClassroomV1::GlobalPermission::Representation - - end - end - - class Name - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :given_name, as: 'givenName' - property :family_name, as: 'familyName' - property :full_name, as: 'fullName' - end - end - - class GlobalPermission - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :permission, as: 'permission' - end - end - - class Teacher - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :course_id, as: 'courseId' - property :user_id, as: 'userId' - property :profile, as: 'profile', class: Google::Apis::ClassroomV1::UserProfile, decorator: Google::Apis::ClassroomV1::UserProfile::Representation - - end - end - - class ListTeachersResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :teachers, as: 'teachers', class: Google::Apis::ClassroomV1::Teacher, decorator: Google::Apis::ClassroomV1::Teacher::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - class Student - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :course_id, as: 'courseId' - property :user_id, as: 'userId' - property :profile, as: 'profile', class: Google::Apis::ClassroomV1::UserProfile, decorator: Google::Apis::ClassroomV1::UserProfile::Representation - - property :student_work_folder, as: 'studentWorkFolder', class: Google::Apis::ClassroomV1::DriveFolder, decorator: Google::Apis::ClassroomV1::DriveFolder::Representation - - end - end - - class ListStudentsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :students, as: 'students', class: Google::Apis::ClassroomV1::Student, decorator: Google::Apis::ClassroomV1::Student::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - class ListGuardiansResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -508,71 +484,133 @@ module Google class Guardian # @private class Representation < Google::Apis::Core::JsonRepresentation - property :student_id, as: 'studentId' - property :guardian_id, as: 'guardianId' property :guardian_profile, as: 'guardianProfile', class: Google::Apis::ClassroomV1::UserProfile, decorator: Google::Apis::ClassroomV1::UserProfile::Representation property :invited_email_address, as: 'invitedEmailAddress' + property :student_id, as: 'studentId' + property :guardian_id, as: 'guardianId' end end - class Invitation + class Teacher # @private class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' + property :course_id, as: 'courseId' + property :profile, as: 'profile', class: Google::Apis::ClassroomV1::UserProfile, decorator: Google::Apis::ClassroomV1::UserProfile::Representation + property :user_id, as: 'userId' - property :course_id, as: 'courseId' - property :role, as: 'role' end end - class ListInvitationsResponse + class UserProfile # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :invitations, as: 'invitations', class: Google::Apis::ClassroomV1::Invitation, decorator: Google::Apis::ClassroomV1::Invitation::Representation + property :email_address, as: 'emailAddress' + collection :permissions, as: 'permissions', class: Google::Apis::ClassroomV1::GlobalPermission, decorator: Google::Apis::ClassroomV1::GlobalPermission::Representation - property :next_page_token, as: 'nextPageToken' - end - end - - class CourseWork - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :course_id, as: 'courseId' property :id, as: 'id' - property :title, as: 'title' - property :description, as: 'description' - collection :materials, as: 'materials', class: Google::Apis::ClassroomV1::Material, decorator: Google::Apis::ClassroomV1::Material::Representation + property :name, as: 'name', class: Google::Apis::ClassroomV1::Name, decorator: Google::Apis::ClassroomV1::Name::Representation - property :state, as: 'state' - property :alternate_link, as: 'alternateLink' - property :creation_time, as: 'creationTime' - property :update_time, as: 'updateTime' - property :due_date, as: 'dueDate', class: Google::Apis::ClassroomV1::Date, decorator: Google::Apis::ClassroomV1::Date::Representation + property :photo_url, as: 'photoUrl' + end + end - property :due_time, as: 'dueTime', class: Google::Apis::ClassroomV1::TimeOfDay, decorator: Google::Apis::ClassroomV1::TimeOfDay::Representation + class ReclaimStudentSubmissionRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end - property :max_points, as: 'maxPoints' - property :work_type, as: 'workType' - property :associated_with_developer, as: 'associatedWithDeveloper' - property :submission_modification_mode, as: 'submissionModificationMode' - property :assignment, as: 'assignment', class: Google::Apis::ClassroomV1::Assignment, decorator: Google::Apis::ClassroomV1::Assignment::Representation + class Student + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :course_id, as: 'courseId' + property :profile, as: 'profile', class: Google::Apis::ClassroomV1::UserProfile, decorator: Google::Apis::ClassroomV1::UserProfile::Representation - property :multiple_choice_question, as: 'multipleChoiceQuestion', class: Google::Apis::ClassroomV1::MultipleChoiceQuestion, decorator: Google::Apis::ClassroomV1::MultipleChoiceQuestion::Representation + property :student_work_folder, as: 'studentWorkFolder', class: Google::Apis::ClassroomV1::DriveFolder, decorator: Google::Apis::ClassroomV1::DriveFolder::Representation + + property :user_id, as: 'userId' + end + end + + class ListTeachersResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :teachers, as: 'teachers', class: Google::Apis::ClassroomV1::Teacher, decorator: Google::Apis::ClassroomV1::Teacher::Representation end end - class Material + class Course # @private class Representation < Google::Apis::Core::JsonRepresentation - property :drive_file, as: 'driveFile', class: Google::Apis::ClassroomV1::SharedDriveFile, decorator: Google::Apis::ClassroomV1::SharedDriveFile::Representation + property :id, as: 'id' + property :description, as: 'description' + property :update_time, as: 'updateTime' + property :section, as: 'section' + property :alternate_link, as: 'alternateLink' + property :teacher_group_email, as: 'teacherGroupEmail' + property :guardians_enabled, as: 'guardiansEnabled' + property :owner_id, as: 'ownerId' + property :description_heading, as: 'descriptionHeading' + property :course_group_email, as: 'courseGroupEmail' + property :course_state, as: 'courseState' + property :room, as: 'room' + property :name, as: 'name' + property :creation_time, as: 'creationTime' + property :enrollment_code, as: 'enrollmentCode' + property :teacher_folder, as: 'teacherFolder', class: Google::Apis::ClassroomV1::DriveFolder, decorator: Google::Apis::ClassroomV1::DriveFolder::Representation - property :youtube_video, as: 'youtubeVideo', class: Google::Apis::ClassroomV1::YouTubeVideo, decorator: Google::Apis::ClassroomV1::YouTubeVideo::Representation + collection :course_material_sets, as: 'courseMaterialSets', class: Google::Apis::ClassroomV1::CourseMaterialSet, decorator: Google::Apis::ClassroomV1::CourseMaterialSet::Representation - property :link, as: 'link', class: Google::Apis::ClassroomV1::Link, decorator: Google::Apis::ClassroomV1::Link::Representation + end + end - property :form, as: 'form', class: Google::Apis::ClassroomV1::Form, decorator: Google::Apis::ClassroomV1::Form::Representation + class ReturnStudentSubmissionRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class GuardianInvitation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :creation_time, as: 'creationTime' + property :invitation_id, as: 'invitationId' + property :state, as: 'state' + property :invited_email_address, as: 'invitedEmailAddress' + property :student_id, as: 'studentId' + end + end + + class TurnInStudentSubmissionRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class YouTubeVideo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :thumbnail_url, as: 'thumbnailUrl' + property :title, as: 'title' + property :alternate_link, as: 'alternateLink' + property :id, as: 'id' + end + end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class ListCourseWorkResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :course_work, as: 'courseWork', class: Google::Apis::ClassroomV1::CourseWork, decorator: Google::Apis::ClassroomV1::CourseWork::Representation end end @@ -586,70 +624,23 @@ module Google end end - class Date + class GlobalPermission # @private class Representation < Google::Apis::Core::JsonRepresentation - property :year, as: 'year' - property :month, as: 'month' - property :day, as: 'day' + property :permission, as: 'permission' end end - class TimeOfDay + class Material # @private class Representation < Google::Apis::Core::JsonRepresentation - property :hours, as: 'hours' - property :minutes, as: 'minutes' - property :seconds, as: 'seconds' - property :nanos, as: 'nanos' - end - end + property :drive_file, as: 'driveFile', class: Google::Apis::ClassroomV1::SharedDriveFile, decorator: Google::Apis::ClassroomV1::SharedDriveFile::Representation - class Assignment - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :student_work_folder, as: 'studentWorkFolder', class: Google::Apis::ClassroomV1::DriveFolder, decorator: Google::Apis::ClassroomV1::DriveFolder::Representation + property :link, as: 'link', class: Google::Apis::ClassroomV1::Link, decorator: Google::Apis::ClassroomV1::Link::Representation - end - end + property :youtube_video, as: 'youtubeVideo', class: Google::Apis::ClassroomV1::YouTubeVideo, decorator: Google::Apis::ClassroomV1::YouTubeVideo::Representation - class MultipleChoiceQuestion - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :choices, as: 'choices' - end - end - - class ListCourseWorkResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :course_work, as: 'courseWork', class: Google::Apis::ClassroomV1::CourseWork, decorator: Google::Apis::ClassroomV1::CourseWork::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - class StudentSubmission - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :course_id, as: 'courseId' - property :course_work_id, as: 'courseWorkId' - property :id, as: 'id' - property :user_id, as: 'userId' - property :creation_time, as: 'creationTime' - property :update_time, as: 'updateTime' - property :state, as: 'state' - property :late, as: 'late' - property :draft_grade, as: 'draftGrade' - property :assigned_grade, as: 'assignedGrade' - property :alternate_link, as: 'alternateLink' - property :course_work_type, as: 'courseWorkType' - property :associated_with_developer, as: 'associatedWithDeveloper' - property :assignment_submission, as: 'assignmentSubmission', class: Google::Apis::ClassroomV1::AssignmentSubmission, decorator: Google::Apis::ClassroomV1::AssignmentSubmission::Representation - - property :short_answer_submission, as: 'shortAnswerSubmission', class: Google::Apis::ClassroomV1::ShortAnswerSubmission, decorator: Google::Apis::ClassroomV1::ShortAnswerSubmission::Representation - - property :multiple_choice_submission, as: 'multipleChoiceSubmission', class: Google::Apis::ClassroomV1::MultipleChoiceSubmission, decorator: Google::Apis::ClassroomV1::MultipleChoiceSubmission::Representation + property :form, as: 'form', class: Google::Apis::ClassroomV1::Form, decorator: Google::Apis::ClassroomV1::Form::Representation end end @@ -662,65 +653,74 @@ module Google end end - class Attachment + class Date # @private class Representation < Google::Apis::Core::JsonRepresentation - property :drive_file, as: 'driveFile', class: Google::Apis::ClassroomV1::DriveFile, decorator: Google::Apis::ClassroomV1::DriveFile::Representation + property :month, as: 'month' + property :year, as: 'year' + property :day, as: 'day' + end + end - property :you_tube_video, as: 'youTubeVideo', class: Google::Apis::ClassroomV1::YouTubeVideo, decorator: Google::Apis::ClassroomV1::YouTubeVideo::Representation - - property :link, as: 'link', class: Google::Apis::ClassroomV1::Link, decorator: Google::Apis::ClassroomV1::Link::Representation - - property :form, as: 'form', class: Google::Apis::ClassroomV1::Form, decorator: Google::Apis::ClassroomV1::Form::Representation + class Assignment + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :student_work_folder, as: 'studentWorkFolder', class: Google::Apis::ClassroomV1::DriveFolder, decorator: Google::Apis::ClassroomV1::DriveFolder::Representation end end - class ShortAnswerSubmission + class ListCoursesResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :answer, as: 'answer' + property :next_page_token, as: 'nextPageToken' + collection :courses, as: 'courses', class: Google::Apis::ClassroomV1::Course, decorator: Google::Apis::ClassroomV1::Course::Representation + end end - class MultipleChoiceSubmission + class Invitation # @private class Representation < Google::Apis::Core::JsonRepresentation - property :answer, as: 'answer' + property :course_id, as: 'courseId' + property :role, as: 'role' + property :user_id, as: 'userId' + property :id, as: 'id' end end class ListStudentSubmissionsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' collection :student_submissions, as: 'studentSubmissions', class: Google::Apis::ClassroomV1::StudentSubmission, decorator: Google::Apis::ClassroomV1::StudentSubmission::Representation + end + end + + class Name + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :given_name, as: 'givenName' + property :family_name, as: 'familyName' + property :full_name, as: 'fullName' + end + end + + class ListInvitationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation property :next_page_token, as: 'nextPageToken' + collection :invitations, as: 'invitations', class: Google::Apis::ClassroomV1::Invitation, decorator: Google::Apis::ClassroomV1::Invitation::Representation + end end - class TurnInStudentSubmissionRequest + class ListStudentsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - end - end - - class ReclaimStudentSubmissionRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - class ReturnStudentSubmissionRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - class ModifyAttachmentsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :add_attachments, as: 'addAttachments', class: Google::Apis::ClassroomV1::Attachment, decorator: Google::Apis::ClassroomV1::Attachment::Representation + property :next_page_token, as: 'nextPageToken' + collection :students, as: 'students', class: Google::Apis::ClassroomV1::Student, decorator: Google::Apis::ClassroomV1::Student::Representation end end diff --git a/generated/google/apis/classroom_v1/service.rb b/generated/google/apis/classroom_v1/service.rb index f7144c225..c4961da3f 100644 --- a/generated/google/apis/classroom_v1/service.rb +++ b/generated/google/apis/classroom_v1/service.rb @@ -46,1717 +46,22 @@ module Google super('https://classroom.googleapis.com/', '') end - # Creates a course. The user specified in `ownerId` is the owner of the created - # course and added as a teacher. This method returns the following error codes: * - # `PERMISSION_DENIED` if the requesting user is not permitted to create courses - # or for access errors. * `NOT_FOUND` if the primary teacher is not a valid user. - # * `FAILED_PRECONDITION` if the course owner's account is disabled or for the - # following request errors: * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` - # if an alias was specified in the `id` and already exists. - # @param [Google::Apis::ClassroomV1::Course] course_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::Course] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::Course] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_course(course_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/courses', options) - command.request_representation = Google::Apis::ClassroomV1::Course::Representation - command.request_object = course_object - command.response_representation = Google::Apis::ClassroomV1::Course::Representation - command.response_class = Google::Apis::ClassroomV1::Course - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Returns a course. This method returns the following error codes: * ` - # PERMISSION_DENIED` if the requesting user is not permitted to access the - # requested course or for access errors. * `NOT_FOUND` if no course exists with - # the requested ID. - # @param [String] id - # Identifier of the course to return. This identifier can be either the - # Classroom-assigned identifier or an alias. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::Course] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::Course] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_course(id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/courses/{id}', options) - command.response_representation = Google::Apis::ClassroomV1::Course::Representation - command.response_class = Google::Apis::ClassroomV1::Course - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Updates a course. This method returns the following error codes: * ` - # PERMISSION_DENIED` if the requesting user is not permitted to modify the - # requested course or for access errors. * `NOT_FOUND` if no course exists with - # the requested ID. * `FAILED_PRECONDITION` for the following request errors: * - # CourseNotModifiable - # @param [String] id - # Identifier of the course to update. This identifier can be either the - # Classroom-assigned identifier or an alias. - # @param [Google::Apis::ClassroomV1::Course] course_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::Course] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::Course] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_course(id, course_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:put, 'v1/courses/{id}', options) - command.request_representation = Google::Apis::ClassroomV1::Course::Representation - command.request_object = course_object - command.response_representation = Google::Apis::ClassroomV1::Course::Representation - command.response_class = Google::Apis::ClassroomV1::Course - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Updates one or more fields in a course. This method returns the following - # error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to - # modify the requested course or for access errors. * `NOT_FOUND` if no course - # exists with the requested ID. * `INVALID_ARGUMENT` if invalid fields are - # specified in the update mask or if no update mask is supplied. * ` - # FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable - # @param [String] id - # Identifier of the course to update. This identifier can be either the - # Classroom-assigned identifier or an alias. - # @param [Google::Apis::ClassroomV1::Course] course_object - # @param [String] update_mask - # Mask that identifies which fields on the course to update. This field is - # required to do an update. The update will fail if invalid fields are specified. - # The following fields are valid: * `name` * `section` * `descriptionHeading` * - # `description` * `room` * `courseState` When set in a query parameter, this - # field should be specified as `updateMask=,,...` - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::Course] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::Course] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def patch_course(id, course_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:patch, 'v1/courses/{id}', options) - command.request_representation = Google::Apis::ClassroomV1::Course::Representation - command.request_object = course_object - command.response_representation = Google::Apis::ClassroomV1::Course::Representation - command.response_class = Google::Apis::ClassroomV1::Course - command.params['id'] = id unless id.nil? - command.query['updateMask'] = update_mask unless update_mask.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a course. This method returns the following error codes: * ` - # PERMISSION_DENIED` if the requesting user is not permitted to delete the - # requested course or for access errors. * `NOT_FOUND` if no course exists with - # the requested ID. - # @param [String] id - # Identifier of the course to delete. This identifier can be either the - # Classroom-assigned identifier or an alias. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_course(id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/courses/{id}', options) - command.response_representation = Google::Apis::ClassroomV1::Empty::Representation - command.response_class = Google::Apis::ClassroomV1::Empty - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Returns a list of courses that the requesting user is permitted to view, - # restricted to those that match the request. This method returns the following - # error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if - # the query argument is malformed. * `NOT_FOUND` if any users specified in the - # query arguments do not exist. - # @param [String] student_id - # Restricts returned courses to those having a student with the specified - # identifier. The identifier can be one of the following: * the numeric - # identifier for the user * the email address of the user * the string literal `" - # me"`, indicating the requesting user - # @param [String] teacher_id - # Restricts returned courses to those having a teacher with the specified - # identifier. The identifier can be one of the following: * the numeric - # identifier for the user * the email address of the user * the string literal `" - # me"`, indicating the requesting user - # @param [Array, String] course_states - # Restricts returned courses to those in one of the specified states - # @param [Fixnum] page_size - # Maximum number of items to return. Zero or unspecified indicates that the - # server may assign a maximum. The server may return fewer than the specified - # number of results. - # @param [String] page_token - # nextPageToken value returned from a previous list call, indicating that the - # subsequent page of results should be returned. The list request must be - # otherwise identical to the one that resulted in this token. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::ListCoursesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::ListCoursesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_courses(student_id: nil, teacher_id: nil, course_states: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/courses', options) - command.response_representation = Google::Apis::ClassroomV1::ListCoursesResponse::Representation - command.response_class = Google::Apis::ClassroomV1::ListCoursesResponse - command.query['studentId'] = student_id unless student_id.nil? - command.query['teacherId'] = teacher_id unless teacher_id.nil? - command.query['courseStates'] = course_states unless course_states.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates an alias for a course. This method returns the following error codes: * - # `PERMISSION_DENIED` if the requesting user is not permitted to create the - # alias or for access errors. * `NOT_FOUND` if the course does not exist. * ` - # ALREADY_EXISTS` if the alias already exists. - # @param [String] course_id - # Identifier of the course to alias. This identifier can be either the Classroom- - # assigned identifier or an alias. - # @param [Google::Apis::ClassroomV1::CourseAlias] course_alias_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::CourseAlias] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::CourseAlias] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_course_alias(course_id, course_alias_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/courses/{courseId}/aliases', options) - command.request_representation = Google::Apis::ClassroomV1::CourseAlias::Representation - command.request_object = course_alias_object - command.response_representation = Google::Apis::ClassroomV1::CourseAlias::Representation - command.response_class = Google::Apis::ClassroomV1::CourseAlias - command.params['courseId'] = course_id unless course_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes an alias of a course. This method returns the following error codes: * - # `PERMISSION_DENIED` if the requesting user is not permitted to remove the - # alias or for access errors. * `NOT_FOUND` if the alias does not exist. - # @param [String] course_id - # Identifier of the course whose alias should be deleted. This identifier can be - # either the Classroom-assigned identifier or an alias. - # @param [String] alias_ - # Alias to delete. This may not be the Classroom-assigned identifier. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_course_alias(course_id, alias_, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/courses/{courseId}/aliases/{alias}', options) - command.response_representation = Google::Apis::ClassroomV1::Empty::Representation - command.response_class = Google::Apis::ClassroomV1::Empty - command.params['courseId'] = course_id unless course_id.nil? - command.params['alias'] = alias_ unless alias_.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Returns a list of aliases for a course. This method returns the following - # error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to - # access the course or for access errors. * `NOT_FOUND` if the course does not - # exist. - # @param [String] course_id - # The identifier of the course. This identifier can be either the Classroom- - # assigned identifier or an alias. - # @param [Fixnum] page_size - # Maximum number of items to return. Zero or unspecified indicates that the - # server may assign a maximum. The server may return fewer than the specified - # number of results. - # @param [String] page_token - # nextPageToken value returned from a previous list call, indicating that the - # subsequent page of results should be returned. The list request must be - # otherwise identical to the one that resulted in this token. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::ListCourseAliasesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::ListCourseAliasesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_course_aliases(course_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/courses/{courseId}/aliases', options) - command.response_representation = Google::Apis::ClassroomV1::ListCourseAliasesResponse::Representation - command.response_class = Google::Apis::ClassroomV1::ListCourseAliasesResponse - command.params['courseId'] = course_id unless course_id.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates a teacher of a course. This method returns the following error codes: * - # `PERMISSION_DENIED` if the requesting user is not permitted to create - # teachers in this course or for access errors. * `NOT_FOUND` if the requested - # course ID does not exist. * `FAILED_PRECONDITION` if the requested user's - # account is disabled, for the following request errors: * - # CourseMemberLimitReached * CourseNotModifiable * CourseTeacherLimitReached * - # UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if the user is already a - # teacher or student in the course. - # @param [String] course_id - # Identifier of the course. This identifier can be either the Classroom-assigned - # identifier or an alias. - # @param [Google::Apis::ClassroomV1::Teacher] teacher_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::Teacher] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::Teacher] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_course_teacher(course_id, teacher_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/courses/{courseId}/teachers', options) - command.request_representation = Google::Apis::ClassroomV1::Teacher::Representation - command.request_object = teacher_object - command.response_representation = Google::Apis::ClassroomV1::Teacher::Representation - command.response_class = Google::Apis::ClassroomV1::Teacher - command.params['courseId'] = course_id unless course_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Returns a teacher of a course. This method returns the following error codes: * - # `PERMISSION_DENIED` if the requesting user is not permitted to view teachers - # of this course or for access errors. * `NOT_FOUND` if no teacher of this - # course has the requested ID or if the course does not exist. - # @param [String] course_id - # Identifier of the course. This identifier can be either the Classroom-assigned - # identifier or an alias. - # @param [String] user_id - # Identifier of the teacher to return. The identifier can be one of the - # following: * the numeric identifier for the user * the email address of the - # user * the string literal `"me"`, indicating the requesting user - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::Teacher] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::Teacher] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_course_teacher(course_id, user_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/courses/{courseId}/teachers/{userId}', options) - command.response_representation = Google::Apis::ClassroomV1::Teacher::Representation - command.response_class = Google::Apis::ClassroomV1::Teacher - command.params['courseId'] = course_id unless course_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a teacher of a course. This method returns the following error codes: * - # `PERMISSION_DENIED` if the requesting user is not permitted to delete - # teachers of this course or for access errors. * `NOT_FOUND` if no teacher of - # this course has the requested ID or if the course does not exist. * ` - # FAILED_PRECONDITION` if the requested ID belongs to the primary teacher of - # this course. - # @param [String] course_id - # Identifier of the course. This identifier can be either the Classroom-assigned - # identifier or an alias. - # @param [String] user_id - # Identifier of the teacher to delete. The identifier can be one of the - # following: * the numeric identifier for the user * the email address of the - # user * the string literal `"me"`, indicating the requesting user - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_course_teacher(course_id, user_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/courses/{courseId}/teachers/{userId}', options) - command.response_representation = Google::Apis::ClassroomV1::Empty::Representation - command.response_class = Google::Apis::ClassroomV1::Empty - command.params['courseId'] = course_id unless course_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Returns a list of teachers of this course that the requester is permitted to - # view. This method returns the following error codes: * `NOT_FOUND` if the - # course does not exist. * `PERMISSION_DENIED` for access errors. - # @param [String] course_id - # Identifier of the course. This identifier can be either the Classroom-assigned - # identifier or an alias. - # @param [Fixnum] page_size - # Maximum number of items to return. Zero means no maximum. The server may - # return fewer than the specified number of results. - # @param [String] page_token - # nextPageToken value returned from a previous list call, indicating that the - # subsequent page of results should be returned. The list request must be - # otherwise identical to the one that resulted in this token. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::ListTeachersResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::ListTeachersResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_course_teachers(course_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/courses/{courseId}/teachers', options) - command.response_representation = Google::Apis::ClassroomV1::ListTeachersResponse::Representation - command.response_class = Google::Apis::ClassroomV1::ListTeachersResponse - command.params['courseId'] = course_id unless course_id.nil? - command.query['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 - - # Adds a user as a student of a course. This method returns the following error - # codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create - # students in this course or for access errors. * `NOT_FOUND` if the requested - # course ID does not exist. * `FAILED_PRECONDITION` if the requested user's - # account is disabled, for the following request errors: * - # CourseMemberLimitReached * CourseNotModifiable * - # UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if the user is already a - # student or teacher in the course. - # @param [String] course_id - # Identifier of the course to create the student in. This identifier can be - # either the Classroom-assigned identifier or an alias. - # @param [Google::Apis::ClassroomV1::Student] student_object - # @param [String] enrollment_code - # Enrollment code of the course to create the student in. This code is required - # if userId corresponds to the requesting user; it may be omitted if the - # requesting user has administrative permissions to create students for any user. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::Student] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::Student] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_course_student(course_id, student_object = nil, enrollment_code: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/courses/{courseId}/students', options) - command.request_representation = Google::Apis::ClassroomV1::Student::Representation - command.request_object = student_object - command.response_representation = Google::Apis::ClassroomV1::Student::Representation - command.response_class = Google::Apis::ClassroomV1::Student - command.params['courseId'] = course_id unless course_id.nil? - command.query['enrollmentCode'] = enrollment_code unless enrollment_code.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Returns a student of a course. This method returns the following error codes: * - # `PERMISSION_DENIED` if the requesting user is not permitted to view students - # of this course or for access errors. * `NOT_FOUND` if no student of this - # course has the requested ID or if the course does not exist. - # @param [String] course_id - # Identifier of the course. This identifier can be either the Classroom-assigned - # identifier or an alias. - # @param [String] user_id - # Identifier of the student to return. The identifier can be one of the - # following: * the numeric identifier for the user * the email address of the - # user * the string literal `"me"`, indicating the requesting user - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::Student] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::Student] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_course_student(course_id, user_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/courses/{courseId}/students/{userId}', options) - command.response_representation = Google::Apis::ClassroomV1::Student::Representation - command.response_class = Google::Apis::ClassroomV1::Student - command.params['courseId'] = course_id unless course_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a student of a course. This method returns the following error codes: * - # `PERMISSION_DENIED` if the requesting user is not permitted to delete - # students of this course or for access errors. * `NOT_FOUND` if no student of - # this course has the requested ID or if the course does not exist. - # @param [String] course_id - # Identifier of the course. This identifier can be either the Classroom-assigned - # identifier or an alias. - # @param [String] user_id - # Identifier of the student to delete. The identifier can be one of the - # following: * the numeric identifier for the user * the email address of the - # user * the string literal `"me"`, indicating the requesting user - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_course_student(course_id, user_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/courses/{courseId}/students/{userId}', options) - command.response_representation = Google::Apis::ClassroomV1::Empty::Representation - command.response_class = Google::Apis::ClassroomV1::Empty - command.params['courseId'] = course_id unless course_id.nil? - command.params['userId'] = user_id unless user_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Returns a list of students of this course that the requester is permitted to - # view. This method returns the following error codes: * `NOT_FOUND` if the - # course does not exist. * `PERMISSION_DENIED` for access errors. - # @param [String] course_id - # Identifier of the course. This identifier can be either the Classroom-assigned - # identifier or an alias. - # @param [Fixnum] page_size - # Maximum number of items to return. Zero means no maximum. The server may - # return fewer than the specified number of results. - # @param [String] page_token - # nextPageToken value returned from a previous list call, indicating that the - # subsequent page of results should be returned. The list request must be - # otherwise identical to the one that resulted in this token. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::ListStudentsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::ListStudentsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_course_students(course_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/courses/{courseId}/students', options) - command.response_representation = Google::Apis::ClassroomV1::ListStudentsResponse::Representation - command.response_class = Google::Apis::ClassroomV1::ListStudentsResponse - command.params['courseId'] = course_id unless course_id.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates course work. The resulting course work (and corresponding student - # submissions) are associated with the Developer Console project of the [OAuth - # client ID](https://support.google.com/cloud/answer/6158849) used to make the - # request. Classroom API requests to modify course work and student submissions - # must be made with an OAuth client ID from the associated Developer Console - # project. This method returns the following error codes: * `PERMISSION_DENIED` - # if the requesting user is not permitted to access the requested course, create - # course work in the requested course, share a Drive attachment, or for access - # errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the - # requested course does not exist. * `FAILED_PRECONDITION` for the following - # request error: * AttachmentNotVisible - # @param [String] course_id - # Identifier of the course. This identifier can be either the Classroom-assigned - # identifier or an alias. - # @param [Google::Apis::ClassroomV1::CourseWork] course_work_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::CourseWork] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::CourseWork] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_course_work(course_id, course_work_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork', options) - command.request_representation = Google::Apis::ClassroomV1::CourseWork::Representation - command.request_object = course_work_object - command.response_representation = Google::Apis::ClassroomV1::CourseWork::Representation - command.response_class = Google::Apis::ClassroomV1::CourseWork - command.params['courseId'] = course_id unless course_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Updates one or more fields of a course work. See google.classroom.v1. - # CourseWork for details of which fields may be updated and who may change them. - # This request must be made by the Developer Console project of the [OAuth - # client ID](https://support.google.com/cloud/answer/6158849) used to create the - # corresponding course work item. This method returns the following error codes: - # * `PERMISSION_DENIED` if the requesting developer project did not create the - # corresponding course work, if the user is not permitted to make the requested - # modification to the student submission, or for access errors. * ` - # INVALID_ARGUMENT` if the request is malformed. * `FAILED_PRECONDITION` if the - # requested course work has already been deleted. * `NOT_FOUND` if the requested - # course, course work, or student submission does not exist. - # @param [String] course_id - # Identifier of the course. This identifier can be either the Classroom-assigned - # identifier or an alias. - # @param [String] id - # Identifier of the course work. - # @param [Google::Apis::ClassroomV1::CourseWork] course_work_object - # @param [String] update_mask - # Mask that identifies which fields on the course work to update. This field is - # required to do an update. The update fails if invalid fields are specified. If - # a field supports empty values, it can be cleared by specifying it in the - # update mask and not in the CourseWork object. If a field that does not support - # empty values is included in the update mask and not set in the CourseWork - # object, an `INVALID_ARGUMENT` error will be returned. The following fields may - # be specified by teachers: * `title` * `description` * `state` * `due_date` * ` - # due_time` * `max_points` * `submission_modification_mode` - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::CourseWork] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::CourseWork] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def patch_course_course_work(course_id, id, course_work_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:patch, 'v1/courses/{courseId}/courseWork/{id}', options) - command.request_representation = Google::Apis::ClassroomV1::CourseWork::Representation - command.request_object = course_work_object - command.response_representation = Google::Apis::ClassroomV1::CourseWork::Representation - command.response_class = Google::Apis::ClassroomV1::CourseWork - command.params['courseId'] = course_id unless course_id.nil? - command.params['id'] = id unless id.nil? - command.query['updateMask'] = update_mask unless update_mask.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a course work. This request must be made by the Developer Console - # project of the [OAuth client ID](https://support.google.com/cloud/answer/ - # 6158849) used to create the corresponding course work item. This method - # returns the following error codes: * `PERMISSION_DENIED` if the requesting - # developer project did not create the corresponding course work, if the - # requesting user is not permitted to delete the requested course or for access - # errors. * `FAILED_PRECONDITION` if the requested course work has already been - # deleted. * `NOT_FOUND` if no course exists with the requested ID. - # @param [String] course_id - # Identifier of the course. This identifier can be either the Classroom-assigned - # identifier or an alias. - # @param [String] id - # Identifier of the course work to delete. This identifier is a Classroom- - # assigned identifier. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_course_course_work(course_id, id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/courses/{courseId}/courseWork/{id}', options) - command.response_representation = Google::Apis::ClassroomV1::Empty::Representation - command.response_class = Google::Apis::ClassroomV1::Empty - command.params['courseId'] = course_id unless course_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Returns course work. This method returns the following error codes: * ` - # PERMISSION_DENIED` if the requesting user is not permitted to access the - # requested course or course work, or for access errors. * `INVALID_ARGUMENT` if - # the request is malformed. * `NOT_FOUND` if the requested course or course work - # does not exist. - # @param [String] course_id - # Identifier of the course. This identifier can be either the Classroom-assigned - # identifier or an alias. - # @param [String] id - # Identifier of the course work. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::CourseWork] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::CourseWork] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_course_work(course_id, id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/courses/{courseId}/courseWork/{id}', options) - command.response_representation = Google::Apis::ClassroomV1::CourseWork::Representation - command.response_class = Google::Apis::ClassroomV1::CourseWork - command.params['courseId'] = course_id unless course_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Returns a list of course work that the requester is permitted to view. Course - # students may only view `PUBLISHED` course work. Course teachers and domain - # administrators may view all course work. This method returns the following - # error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to - # access the requested course or for access errors. * `INVALID_ARGUMENT` if the - # request is malformed. * `NOT_FOUND` if the requested course does not exist. - # @param [String] course_id - # Identifier of the course. This identifier can be either the Classroom-assigned - # identifier or an alias. - # @param [Array, String] course_work_states - # Restriction on the work status to return. Only courseWork that matches is - # returned. If unspecified, items with a work status of `PUBLISHED` is returned. - # @param [String] order_by - # Optional sort ordering for results. A comma-separated list of fields with an - # optional sort direction keyword. Supported fields are `updateTime` and ` - # dueDate`. Supported direction keywords are `asc` and `desc`. If not specified, - # `updateTime desc` is the default behavior. Examples: `dueDate asc,updateTime - # desc`, `updateTime,dueDate desc` - # @param [Fixnum] page_size - # Maximum number of items to return. Zero or unspecified indicates that the - # server may assign a maximum. The server may return fewer than the specified - # number of results. - # @param [String] page_token - # nextPageToken value returned from a previous list call, indicating that the - # subsequent page of results should be returned. The list request must be - # otherwise identical to the one that resulted in this token. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::ListCourseWorkResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::ListCourseWorkResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_course_works(course_id, course_work_states: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/courses/{courseId}/courseWork', options) - command.response_representation = Google::Apis::ClassroomV1::ListCourseWorkResponse::Representation - command.response_class = Google::Apis::ClassroomV1::ListCourseWorkResponse - command.params['courseId'] = course_id unless course_id.nil? - command.query['courseWorkStates'] = course_work_states unless course_work_states.nil? - command.query['orderBy'] = order_by unless order_by.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 - - # Returns a student submission. * `PERMISSION_DENIED` if the requesting user is - # not permitted to access the requested course, course work, or student - # submission or for access errors. * `INVALID_ARGUMENT` if the request is - # malformed. * `NOT_FOUND` if the requested course, course work, or student - # submission does not exist. - # @param [String] course_id - # Identifier of the course. This identifier can be either the Classroom-assigned - # identifier or an alias. - # @param [String] course_work_id - # Identifier of the course work. - # @param [String] id - # Identifier of the student submission. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::StudentSubmission] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::StudentSubmission] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_student_submission(course_id, course_work_id, id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}', options) - command.response_representation = Google::Apis::ClassroomV1::StudentSubmission::Representation - command.response_class = Google::Apis::ClassroomV1::StudentSubmission - command.params['courseId'] = course_id unless course_id.nil? - command.params['courseWorkId'] = course_work_id unless course_work_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Updates one or more fields of a student submission. See google.classroom.v1. - # StudentSubmission for details of which fields may be updated and who may - # change them. This request must be made by the Developer Console project of the - # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to - # create the corresponding course work item. This method returns the following - # error codes: * `PERMISSION_DENIED` if the requesting developer project did not - # create the corresponding course work, if the user is not permitted to make the - # requested modification to the student submission, or for access errors. * ` - # INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested - # course, course work, or student submission does not exist. - # @param [String] course_id - # Identifier of the course. This identifier can be either the Classroom-assigned - # identifier or an alias. - # @param [String] course_work_id - # Identifier of the course work. - # @param [String] id - # Identifier of the student submission. - # @param [Google::Apis::ClassroomV1::StudentSubmission] student_submission_object - # @param [String] update_mask - # Mask that identifies which fields on the student submission to update. This - # field is required to do an update. The update fails if invalid fields are - # specified. The following fields may be specified by teachers: * `draft_grade` * - # `assigned_grade` - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::StudentSubmission] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::StudentSubmission] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def patch_student_submission(course_id, course_work_id, id, student_submission_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:patch, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}', options) - command.request_representation = Google::Apis::ClassroomV1::StudentSubmission::Representation - command.request_object = student_submission_object - command.response_representation = Google::Apis::ClassroomV1::StudentSubmission::Representation - command.response_class = Google::Apis::ClassroomV1::StudentSubmission - command.params['courseId'] = course_id unless course_id.nil? - command.params['courseWorkId'] = course_work_id unless course_work_id.nil? - command.params['id'] = id unless id.nil? - command.query['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 a list of student submissions that the requester is permitted to view, - # factoring in the OAuth scopes of the request. `-` may be specified as the ` - # course_work_id` to include student submissions for multiple course work items. - # Course students may only view their own work. Course teachers and domain - # administrators may view all student submissions. This method returns the - # following error codes: * `PERMISSION_DENIED` if the requesting user is not - # permitted to access the requested course or course work, or for access errors. - # * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the - # requested course does not exist. - # @param [String] course_id - # Identifier of the course. This identifier can be either the Classroom-assigned - # identifier or an alias. - # @param [String] course_work_id - # Identifer of the student work to request. This may be set to the string - # literal `"-"` to request student work for all course work in the specified - # course. - # @param [String] user_id - # Optional argument to restrict returned student work to those owned by the - # student with the specified identifier. The identifier can be one of the - # following: * the numeric identifier for the user * the email address of the - # user * the string literal `"me"`, indicating the requesting user - # @param [Array, String] states - # Requested submission states. If specified, returned student submissions match - # one of the specified submission states. - # @param [String] late - # Requested lateness value. If specified, returned student submissions are - # restricted by the requested value. If unspecified, submissions are returned - # regardless of `late` value. - # @param [Fixnum] page_size - # Maximum number of items to return. Zero or unspecified indicates that the - # server may assign a maximum. The server may return fewer than the specified - # number of results. - # @param [String] page_token - # nextPageToken value returned from a previous list call, indicating that the - # subsequent page of results should be returned. The list request must be - # otherwise identical to the one that resulted in this token. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::ListStudentSubmissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::ListStudentSubmissionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_student_submissions(course_id, course_work_id, user_id: nil, states: nil, late: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions', options) - command.response_representation = Google::Apis::ClassroomV1::ListStudentSubmissionsResponse::Representation - command.response_class = Google::Apis::ClassroomV1::ListStudentSubmissionsResponse - command.params['courseId'] = course_id unless course_id.nil? - command.params['courseWorkId'] = course_work_id unless course_work_id.nil? - command.query['userId'] = user_id unless user_id.nil? - command.query['states'] = states unless states.nil? - command.query['late'] = late unless late.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 - - # Turns in a student submission. Turning in a student submission transfers - # ownership of attached Drive files to the teacher and may also update the - # submission state. This may only be called by the student that owns the - # specified student submission. This request must be made by the Developer - # Console project of the [OAuth client ID](https://support.google.com/cloud/ - # answer/6158849) used to create the corresponding course work item. This method - # returns the following error codes: * `PERMISSION_DENIED` if the requesting - # user is not permitted to access the requested course or course work, turn in - # the requested student submission, or for access errors. * `INVALID_ARGUMENT` - # if the request is malformed. * `NOT_FOUND` if the requested course, course - # work, or student submission does not exist. - # @param [String] course_id - # Identifier of the course. This identifier can be either the Classroom-assigned - # identifier or an alias. - # @param [String] course_work_id - # Identifier of the course work. - # @param [String] id - # Identifier of the student submission. - # @param [Google::Apis::ClassroomV1::TurnInStudentSubmissionRequest] turn_in_student_submission_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def turn_in_student_submission(course_id, course_work_id, id, turn_in_student_submission_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:turnIn', options) - command.request_representation = Google::Apis::ClassroomV1::TurnInStudentSubmissionRequest::Representation - command.request_object = turn_in_student_submission_request_object - command.response_representation = Google::Apis::ClassroomV1::Empty::Representation - command.response_class = Google::Apis::ClassroomV1::Empty - command.params['courseId'] = course_id unless course_id.nil? - command.params['courseWorkId'] = course_work_id unless course_work_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Reclaims a student submission on behalf of the student that owns it. - # Reclaiming a student submission transfers ownership of attached Drive files to - # the student and update the submission state. Only the student that owns the - # requested student submission may call this method, and only for a student - # submission that has been turned in. This request must be made by the Developer - # Console project of the [OAuth client ID](https://support.google.com/cloud/ - # answer/6158849) used to create the corresponding course work item. This method - # returns the following error codes: * `PERMISSION_DENIED` if the requesting - # user is not permitted to access the requested course or course work, unsubmit - # the requested student submission, or for access errors. * `FAILED_PRECONDITION` - # if the student submission has not been turned in. * `INVALID_ARGUMENT` if the - # request is malformed. * `NOT_FOUND` if the requested course, course work, or - # student submission does not exist. - # @param [String] course_id - # Identifier of the course. This identifier can be either the Classroom-assigned - # identifier or an alias. - # @param [String] course_work_id - # Identifier of the course work. - # @param [String] id - # Identifier of the student submission. - # @param [Google::Apis::ClassroomV1::ReclaimStudentSubmissionRequest] reclaim_student_submission_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def reclaim_student_submission(course_id, course_work_id, id, reclaim_student_submission_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:reclaim', options) - command.request_representation = Google::Apis::ClassroomV1::ReclaimStudentSubmissionRequest::Representation - command.request_object = reclaim_student_submission_request_object - command.response_representation = Google::Apis::ClassroomV1::Empty::Representation - command.response_class = Google::Apis::ClassroomV1::Empty - command.params['courseId'] = course_id unless course_id.nil? - command.params['courseWorkId'] = course_work_id unless course_work_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Returns a student submission. Returning a student submission transfers - # ownership of attached Drive files to the student and may also update the - # submission state. Unlike the Classroom application, returning a student - # submission does not set assignedGrade to the draftGrade value. Only a teacher - # of the course that contains the requested student submission may call this - # method. This request must be made by the Developer Console project of the [ - # OAuth client ID](https://support.google.com/cloud/answer/6158849) used to - # create the corresponding course work item. This method returns the following - # error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to - # access the requested course or course work, return the requested student - # submission, or for access errors. * `INVALID_ARGUMENT` if the request is - # malformed. * `NOT_FOUND` if the requested course, course work, or student - # submission does not exist. - # @param [String] course_id - # Identifier of the course. This identifier can be either the Classroom-assigned - # identifier or an alias. - # @param [String] course_work_id - # Identifier of the course work. - # @param [String] id - # Identifier of the student submission. - # @param [Google::Apis::ClassroomV1::ReturnStudentSubmissionRequest] return_student_submission_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def return_student_submission(course_id, course_work_id, id, return_student_submission_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:return', options) - command.request_representation = Google::Apis::ClassroomV1::ReturnStudentSubmissionRequest::Representation - command.request_object = return_student_submission_request_object - command.response_representation = Google::Apis::ClassroomV1::Empty::Representation - command.response_class = Google::Apis::ClassroomV1::Empty - command.params['courseId'] = course_id unless course_id.nil? - command.params['courseWorkId'] = course_work_id unless course_work_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Modifies attachments of student submission. Attachments may only be added to - # student submissions belonging to course work objects with a `workType` of ` - # ASSIGNMENT`. This request must be made by the Developer Console project of the - # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to - # create the corresponding course work item. This method returns the following - # error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to - # access the requested course or course work, if the user is not permitted to - # modify attachments on the requested student submission, or for access errors. * - # `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the - # requested course, course work, or student submission does not exist. - # @param [String] course_id - # Identifier of the course. This identifier can be either the Classroom-assigned - # identifier or an alias. - # @param [String] course_work_id - # Identifier of the course work. - # @param [String] id - # Identifier of the student submission. - # @param [Google::Apis::ClassroomV1::ModifyAttachmentsRequest] modify_attachments_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::StudentSubmission] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::StudentSubmission] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def modify_student_submission_attachments(course_id, course_work_id, id, modify_attachments_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:modifyAttachments', options) - command.request_representation = Google::Apis::ClassroomV1::ModifyAttachmentsRequest::Representation - command.request_object = modify_attachments_request_object - command.response_representation = Google::Apis::ClassroomV1::StudentSubmission::Representation - command.response_class = Google::Apis::ClassroomV1::StudentSubmission - command.params['courseId'] = course_id unless course_id.nil? - command.params['courseWorkId'] = course_work_id unless course_work_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Returns a user profile. This method returns the following error codes: * ` - # PERMISSION_DENIED` if the requesting user is not permitted to access this user - # profile, if no profile exists with the requested ID, or for access errors. - # @param [String] user_id - # Identifier of the profile to return. The identifier can be one of the - # following: * the numeric identifier for the user * the email address of the - # user * the string literal `"me"`, indicating the requesting user - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::UserProfile] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::UserProfile] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_user_profile(user_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/userProfiles/{userId}', options) - command.response_representation = Google::Apis::ClassroomV1::UserProfile::Representation - command.response_class = Google::Apis::ClassroomV1::UserProfile - command.params['userId'] = user_id unless user_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Returns a list of guardian invitations that the requesting user is permitted - # to view, filtered by the parameters provided. This method returns the - # following error codes: * `PERMISSION_DENIED` if a `student_id` is specified, - # and the requesting user is not permitted to view guardian invitations for that - # student, if `"-"` is specified as the `student_id` and the user is not a - # domain administrator, if guardians are not enabled for the domain in question, - # or for other access errors. * `INVALID_ARGUMENT` if a `student_id` is - # specified, but its format cannot be recognized (it is not an email address, - # nor a `student_id` from the API, nor the literal string `me`). May also be - # returned if an invalid `page_token` or `state` is provided. * `NOT_FOUND` if a - # `student_id` is specified, and its format can be recognized, but Classroom has - # no record of that student. - # @param [String] student_id - # The ID of the student whose guardian invitations are to be returned. The - # identifier can be one of the following: * the numeric identifier for the user * - # the email address of the user * the string literal `"me"`, indicating the - # requesting user * the string literal `"-"`, indicating that results should be - # returned for all students that the requesting user is permitted to view - # guardian invitations. - # @param [String] invited_email_address - # If specified, only results with the specified `invited_email_address` will be - # returned. - # @param [Array, String] states - # If specified, only results with the specified `state` values will be returned. - # Otherwise, results with a `state` of `PENDING` will be returned. - # @param [String] page_token - # nextPageToken value returned from a previous list call, indicating that the - # subsequent page of results should be returned. The list request must be - # otherwise identical to the one that resulted in this token. - # @param [Fixnum] page_size - # Maximum number of items to return. Zero or unspecified indicates that the - # server may assign a maximum. The server may return fewer than the specified - # number of results. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::ListGuardianInvitationsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::ListGuardianInvitationsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_user_profile_guardian_invitations(student_id, invited_email_address: nil, states: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardianInvitations', options) - command.response_representation = Google::Apis::ClassroomV1::ListGuardianInvitationsResponse::Representation - command.response_class = Google::Apis::ClassroomV1::ListGuardianInvitationsResponse - command.params['studentId'] = student_id unless student_id.nil? - command.query['invitedEmailAddress'] = invited_email_address unless invited_email_address.nil? - command.query['states'] = states unless states.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Returns a specific guardian invitation. This method returns the following - # error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to - # view guardian invitations for the student identified by the `student_id`, if - # guardians are not enabled for the domain in question, or for other access - # errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format - # cannot be recognized (it is not an email address, nor a `student_id` from the - # API, nor the literal string `me`). * `NOT_FOUND` if Classroom cannot find any - # record of the given student or `invitation_id`. May also be returned if the - # student exists, but the requesting user does not have access to see that - # student. - # @param [String] student_id - # The ID of the student whose guardian invitation is being requested. - # @param [String] invitation_id - # The `id` field of the `GuardianInvitation` being requested. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::GuardianInvitation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::GuardianInvitation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_user_profile_guardian_invitation(student_id, invitation_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardianInvitations/{invitationId}', options) - command.response_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation - command.response_class = Google::Apis::ClassroomV1::GuardianInvitation - command.params['studentId'] = student_id unless student_id.nil? - command.params['invitationId'] = invitation_id unless invitation_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates a guardian invitation, and sends an email to the guardian asking them - # to confirm that they are the student's guardian. Once the guardian accepts the - # invitation, their `state` will change to `COMPLETED` and they will start - # receiving guardian notifications. A `Guardian` resource will also be created - # to represent the active guardian. The request object must have the `student_id` - # and `invited_email_address` fields set. Failing to set these fields, or - # setting any other fields in the request, will result in an error. This method - # returns the following error codes: * `PERMISSION_DENIED` if the current user - # does not have permission to manage guardians, if the guardian in question has - # already rejected too many requests for that student, if guardians are not - # enabled for the domain in question, or for other access errors. * ` - # RESOURCE_EXHAUSTED` if the student or guardian has exceeded the guardian link - # limit. * `INVALID_ARGUMENT` if the guardian email address is not valid (for - # example, if it is too long), or if the format of the student ID provided - # cannot be recognized (it is not an email address, nor a `user_id` from this - # API). This error will also be returned if read-only fields are set, or if the ` - # state` field is set to to a value other than `PENDING`. * `NOT_FOUND` if the - # student ID provided is a valid student ID, but Classroom has no record of that - # student. * `ALREADY_EXISTS` if there is already a pending guardian invitation - # for the student and `invited_email_address` provided, or if the provided ` - # invited_email_address` matches the Google account of an existing `Guardian` - # for this user. - # @param [String] student_id - # ID of the student (in standard format) - # @param [Google::Apis::ClassroomV1::GuardianInvitation] guardian_invitation_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::GuardianInvitation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::GuardianInvitation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_user_profile_guardian_invitation(student_id, guardian_invitation_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/userProfiles/{studentId}/guardianInvitations', options) - command.request_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation - command.request_object = guardian_invitation_object - command.response_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation - command.response_class = Google::Apis::ClassroomV1::GuardianInvitation - command.params['studentId'] = student_id unless student_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Modifies a guardian invitation. Currently, the only valid modification is to - # change the `state` from `PENDING` to `COMPLETE`. This has the effect of - # withdrawing the invitation. This method returns the following error codes: * ` - # PERMISSION_DENIED` if the current user does not have permission to manage - # guardians, if guardians are not enabled for the domain in question or for - # other access errors. * `FAILED_PRECONDITION` if the guardian link is not in - # the `PENDING` state. * `INVALID_ARGUMENT` if the format of the student ID - # provided cannot be recognized (it is not an email address, nor a `user_id` - # from this API), or if the passed `GuardianInvitation` has a `state` other than - # `COMPLETE`, or if it modifies fields other than `state`. * `NOT_FOUND` if the - # student ID provided is a valid student ID, but Classroom has no record of that - # student, or if the `id` field does not refer to a guardian invitation known to - # Classroom. - # @param [String] student_id - # The ID of the student whose guardian invitation is to be modified. - # @param [String] invitation_id - # The `id` field of the `GuardianInvitation` to be modified. - # @param [Google::Apis::ClassroomV1::GuardianInvitation] guardian_invitation_object - # @param [String] update_mask - # Mask that identifies which fields on the course to update. This field is - # required to do an update. The update will fail if invalid fields are specified. - # The following fields are valid: * `state` When set in a query parameter, this - # field should be specified as `updateMask=,,...` - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::GuardianInvitation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::GuardianInvitation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def patch_user_profile_guardian_invitation(student_id, invitation_id, guardian_invitation_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:patch, 'v1/userProfiles/{studentId}/guardianInvitations/{invitationId}', options) - command.request_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation - command.request_object = guardian_invitation_object - command.response_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation - command.response_class = Google::Apis::ClassroomV1::GuardianInvitation - command.params['studentId'] = student_id unless student_id.nil? - command.params['invitationId'] = invitation_id unless invitation_id.nil? - command.query['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 a list of guardians that the requesting user is permitted to view, - # restricted to those that match the request. To list guardians for any student - # that the requesting user may view guardians for, use the literal character `-` - # for the student ID. This method returns the following error codes: * ` - # PERMISSION_DENIED` if a `student_id` is specified, and the requesting user is - # not permitted to view guardian information for that student, if `"-"` is - # specified as the `student_id` and the user is not a domain administrator, if - # guardians are not enabled for the domain in question, if the ` - # invited_email_address` filter is set by a user who is not a domain - # administrator, or for other access errors. * `INVALID_ARGUMENT` if a ` - # student_id` is specified, but its format cannot be recognized (it is not an - # email address, nor a `student_id` from the API, nor the literal string `me`). - # May also be returned if an invalid `page_token` is provided. * `NOT_FOUND` if - # a `student_id` is specified, and its format can be recognized, but Classroom - # has no record of that student. - # @param [String] student_id - # Filter results by the student who the guardian is linked to. The identifier - # can be one of the following: * the numeric identifier for the user * the email - # address of the user * the string literal `"me"`, indicating the requesting - # user * the string literal `"-"`, indicating that results should be returned - # for all students that the requesting user has access to view. - # @param [String] invited_email_address - # Filter results by the email address that the original invitation was sent to, - # resulting in this guardian link. This filter can only be used by domain - # administrators. - # @param [String] page_token - # nextPageToken value returned from a previous list call, indicating that the - # subsequent page of results should be returned. The list request must be - # otherwise identical to the one that resulted in this token. - # @param [Fixnum] page_size - # Maximum number of items to return. Zero or unspecified indicates that the - # server may assign a maximum. The server may return fewer than the specified - # number of results. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::ListGuardiansResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::ListGuardiansResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_user_profile_guardians(student_id, invited_email_address: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardians', options) - command.response_representation = Google::Apis::ClassroomV1::ListGuardiansResponse::Representation - command.response_class = Google::Apis::ClassroomV1::ListGuardiansResponse - command.params['studentId'] = student_id unless student_id.nil? - command.query['invitedEmailAddress'] = invited_email_address unless invited_email_address.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Returns a specific guardian. This method returns the following error codes: * ` - # PERMISSION_DENIED` if no user that matches the provided `student_id` is - # visible to the requesting user, if the requesting user is not permitted to - # view guardian information for the student identified by the `student_id`, if - # guardians are not enabled for the domain in question, or for other access - # errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format - # cannot be recognized (it is not an email address, nor a `student_id` from the - # API, nor the literal string `me`). * `NOT_FOUND` if the requesting user is - # permitted to view guardians for the requested `student_id`, but no `Guardian` - # record exists for that student that matches the provided `guardian_id`. - # @param [String] student_id - # The student whose guardian is being requested. One of the following: * the - # numeric identifier for the user * the email address of the user * the string - # literal `"me"`, indicating the requesting user - # @param [String] guardian_id - # The `id` field from a `Guardian`. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::Guardian] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::Guardian] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_user_profile_guardian(student_id, guardian_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardians/{guardianId}', options) - command.response_representation = Google::Apis::ClassroomV1::Guardian::Representation - command.response_class = Google::Apis::ClassroomV1::Guardian - command.params['studentId'] = student_id unless student_id.nil? - command.params['guardianId'] = guardian_id unless guardian_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a guardian. The guardian will no longer receive guardian notifications - # and the guardian will no longer be accessible via the API. This method returns - # the following error codes: * `PERMISSION_DENIED` if no user that matches the - # provided `student_id` is visible to the requesting user, if the requesting - # user is not permitted to manage guardians for the student identified by the ` - # student_id`, if guardians are not enabled for the domain in question, or for - # other access errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but - # its format cannot be recognized (it is not an email address, nor a `student_id` - # from the API). * `NOT_FOUND` if the requesting user is permitted to modify - # guardians for the requested `student_id`, but no `Guardian` record exists for - # that student with the provided `guardian_id`. - # @param [String] student_id - # The student whose guardian is to be deleted. One of the following: * the - # numeric identifier for the user * the email address of the user * the string - # literal `"me"`, indicating the requesting user - # @param [String] guardian_id - # The `id` field from a `Guardian`. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_user_profile_guardian(student_id, guardian_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/userProfiles/{studentId}/guardians/{guardianId}', options) - command.response_representation = Google::Apis::ClassroomV1::Empty::Representation - command.response_class = Google::Apis::ClassroomV1::Empty - command.params['studentId'] = student_id unless student_id.nil? - command.params['guardianId'] = guardian_id unless guardian_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates an invitation. Only one invitation for a user and course may exist at - # a time. Delete and re-create an invitation to make changes. This method - # returns the following error codes: * `PERMISSION_DENIED` if the requesting - # user is not permitted to create invitations for this course or for access - # errors. * `NOT_FOUND` if the course or the user does not exist. * ` - # FAILED_PRECONDITION` if the requested user's account is disabled or if the - # user already has this role or a role with greater permissions. * ` - # ALREADY_EXISTS` if an invitation for the specified user and course already - # exists. + # Creates an invitation. Only one invitation for a user and course may exist + # at a time. Delete and re-create an invitation to make changes. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to create + # invitations for this course or for access errors. + # * `NOT_FOUND` if the course or the user does not exist. + # * `FAILED_PRECONDITION` if the requested user's account is disabled or if + # the user already has this role or a role with greater permissions. + # * `ALREADY_EXISTS` if an invitation for the specified user and course + # already exists. # @param [Google::Apis::ClassroomV1::Invitation] invitation_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1769,28 +74,29 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_invitation(invitation_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def create_invitation(invitation_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/invitations', options) command.request_representation = Google::Apis::ClassroomV1::Invitation::Representation command.request_object = invitation_object command.response_representation = Google::Apis::ClassroomV1::Invitation::Representation command.response_class = Google::Apis::ClassroomV1::Invitation - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end - # Returns an invitation. This method returns the following error codes: * ` - # PERMISSION_DENIED` if the requesting user is not permitted to view the - # requested invitation or for access errors. * `NOT_FOUND` if no invitation - # exists with the requested ID. + # Returns an invitation. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to view the + # requested invitation or for access errors. + # * `NOT_FOUND` if no invitation exists with the requested ID. # @param [String] id # Identifier of the invitation to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1803,74 +109,46 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_invitation(id, fields: nil, quota_user: nil, options: nil, &block) + def get_invitation(id, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/invitations/{id}', options) command.response_representation = Google::Apis::ClassroomV1::Invitation::Representation command.response_class = Google::Apis::ClassroomV1::Invitation command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end - # Deletes an invitation. This method returns the following error codes: * ` - # PERMISSION_DENIED` if the requesting user is not permitted to delete the - # requested invitation or for access errors. * `NOT_FOUND` if no invitation - # exists with the requested ID. - # @param [String] id - # Identifier of the invitation to delete. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClassroomV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_invitation(id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/invitations/{id}', options) - command.response_representation = Google::Apis::ClassroomV1::Empty::Representation - command.response_class = Google::Apis::ClassroomV1::Empty - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Returns a list of invitations that the requesting user is permitted to view, - # restricted to those that match the list request. *Note:* At least one of ` - # user_id` or `course_id` must be supplied. Both fields can be supplied. This - # method returns the following error codes: * `PERMISSION_DENIED` for access - # errors. - # @param [String] user_id - # Restricts returned invitations to those for a specific user. The identifier - # can be one of the following: * the numeric identifier for the user * the email - # address of the user * the string literal `"me"`, indicating the requesting - # user + # Returns a list of invitations that the requesting user is permitted to + # view, restricted to those that match the list request. + # *Note:* At least one of `user_id` or `course_id` must be supplied. Both + # fields can be supplied. + # This method returns the following error codes: + # * `PERMISSION_DENIED` for access errors. # @param [String] course_id # Restricts returned invitations to those for a course with the specified # identifier. # @param [Fixnum] page_size - # Maximum number of items to return. Zero means no maximum. The server may - # return fewer than the specified number of results. + # Maximum number of items to return. Zero means no maximum. + # The server may return fewer than the specified number of results. + # @param [String] user_id + # Restricts returned invitations to those for a specific user. The identifier + # can be one of the following: + # * the numeric identifier for the user + # * the email address of the user + # * the string literal `"me"`, indicating the requesting user # @param [String] page_token - # nextPageToken value returned from a previous list call, indicating that the - # subsequent page of results should be returned. The list request must be + # nextPageToken + # value returned from a previous + # list call, indicating + # that the subsequent page of results should be returned. + # The list request must be # otherwise identical to the one that resulted in this token. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1883,34 +161,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 list_invitations(user_id: nil, course_id: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_invitations(course_id: nil, page_size: nil, user_id: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/invitations', options) command.response_representation = Google::Apis::ClassroomV1::ListInvitationsResponse::Representation command.response_class = Google::Apis::ClassroomV1::ListInvitationsResponse - command.query['userId'] = user_id unless user_id.nil? command.query['courseId'] = course_id unless course_id.nil? command.query['pageSize'] = page_size unless page_size.nil? + command.query['userId'] = user_id unless user_id.nil? command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end - # Accepts an invitation, removing it and adding the invited user to the teachers - # or students (as appropriate) of the specified course. Only the invited user - # may accept an invitation. This method returns the following error codes: * ` - # PERMISSION_DENIED` if the requesting user is not permitted to accept the - # requested invitation or for access errors. * `FAILED_PRECONDITION` for the - # following request errors: * CourseMemberLimitReached * CourseNotModifiable * - # CourseTeacherLimitReached * UserGroupsMembershipLimitReached * `NOT_FOUND` if - # no invitation exists with the requested ID. + # Deletes an invitation. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to delete the + # requested invitation or for access errors. + # * `NOT_FOUND` if no invitation exists with the requested ID. # @param [String] id - # Identifier of the invitation to accept. - # @param [String] fields - # Selector specifying which fields to include in a partial response. + # Identifier of the invitation to delete. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1923,13 +198,1946 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def accept_invitation(id, fields: nil, quota_user: nil, options: nil, &block) + def delete_invitation(id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/invitations/{id}', options) + command.response_representation = Google::Apis::ClassroomV1::Empty::Representation + command.response_class = Google::Apis::ClassroomV1::Empty + command.params['id'] = id unless id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Accepts an invitation, removing it and adding the invited user to the + # teachers or students (as appropriate) of the specified course. Only the + # invited user may accept an invitation. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to accept the + # requested invitation or for access errors. + # * `FAILED_PRECONDITION` for the following request errors: + # * CourseMemberLimitReached + # * CourseNotModifiable + # * CourseTeacherLimitReached + # * UserGroupsMembershipLimitReached + # * `NOT_FOUND` if no invitation exists with the requested ID. + # @param [String] id + # Identifier of the invitation to accept. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def accept_invitation(id, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/invitations/{id}:accept', options) command.response_representation = Google::Apis::ClassroomV1::Empty::Representation command.response_class = Google::Apis::ClassroomV1::Empty command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Returns a list of courses that the requesting user is permitted to view, + # restricted to those that match the request. + # This method returns the following error codes: + # * `PERMISSION_DENIED` for access errors. + # * `INVALID_ARGUMENT` if the query argument is malformed. + # * `NOT_FOUND` if any users specified in the query arguments do not exist. + # @param [Array, String] course_states + # Restricts returned courses to those in one of the specified states + # The default value is ACTIVE, ARCHIVED, PROVISIONED, DECLINED. + # @param [Fixnum] page_size + # Maximum number of items to return. Zero or unspecified indicates that the + # server may assign a maximum. + # The server may return fewer than the specified number of results. + # @param [String] teacher_id + # Restricts returned courses to those having a teacher with the specified + # identifier. The identifier can be one of the following: + # * the numeric identifier for the user + # * the email address of the user + # * the string literal `"me"`, indicating the requesting user + # @param [String] student_id + # Restricts returned courses to those having a student with the specified + # identifier. The identifier can be one of the following: + # * the numeric identifier for the user + # * the email address of the user + # * the string literal `"me"`, indicating the requesting user + # @param [String] page_token + # nextPageToken + # value returned from a previous + # list call, + # indicating that the subsequent page of results should be returned. + # The list request must be + # otherwise identical to the one that resulted in this token. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::ListCoursesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::ListCoursesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_courses(course_states: nil, page_size: nil, teacher_id: nil, student_id: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/courses', options) + command.response_representation = Google::Apis::ClassroomV1::ListCoursesResponse::Representation + command.response_class = Google::Apis::ClassroomV1::ListCoursesResponse + command.query['courseStates'] = course_states unless course_states.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['teacherId'] = teacher_id unless teacher_id.nil? + command.query['studentId'] = student_id unless student_id.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Returns a course. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to access the + # requested course or for access errors. + # * `NOT_FOUND` if no course exists with the requested ID. + # @param [String] id + # Identifier of the course to return. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::Course] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::Course] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_course(id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/courses/{id}', options) + command.response_representation = Google::Apis::ClassroomV1::Course::Representation + command.response_class = Google::Apis::ClassroomV1::Course + command.params['id'] = id unless id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Creates a course. + # The user specified in `ownerId` is the owner of the created course + # and added as a teacher. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to create + # courses or for access errors. + # * `NOT_FOUND` if the primary teacher is not a valid user. + # * `FAILED_PRECONDITION` if the course owner's account is disabled or for + # the following request errors: + # * UserGroupsMembershipLimitReached + # * `ALREADY_EXISTS` if an alias was specified in the `id` and + # already exists. + # @param [Google::Apis::ClassroomV1::Course] course_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::Course] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::Course] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_course(course_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/courses', options) + command.request_representation = Google::Apis::ClassroomV1::Course::Representation + command.request_object = course_object + command.response_representation = Google::Apis::ClassroomV1::Course::Representation + command.response_class = Google::Apis::ClassroomV1::Course + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Updates a course. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to modify the + # requested course or for access errors. + # * `NOT_FOUND` if no course exists with the requested ID. + # * `FAILED_PRECONDITION` for the following request errors: + # * CourseNotModifiable + # @param [String] id + # Identifier of the course to update. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [Google::Apis::ClassroomV1::Course] course_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::Course] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::Course] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_course(id, course_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:put, 'v1/courses/{id}', options) + command.request_representation = Google::Apis::ClassroomV1::Course::Representation + command.request_object = course_object + command.response_representation = Google::Apis::ClassroomV1::Course::Representation + command.response_class = Google::Apis::ClassroomV1::Course + command.params['id'] = id unless id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Updates one or more fields in a course. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to modify the + # requested course or for access errors. + # * `NOT_FOUND` if no course exists with the requested ID. + # * `INVALID_ARGUMENT` if invalid fields are specified in the update mask or + # if no update mask is supplied. + # * `FAILED_PRECONDITION` for the following request errors: + # * CourseNotModifiable + # @param [String] id + # Identifier of the course to update. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [Google::Apis::ClassroomV1::Course] course_object + # @param [String] update_mask + # Mask that identifies which fields on the course to update. + # This field is required to do an update. The update will fail if invalid + # fields are specified. The following fields are valid: + # * `name` + # * `section` + # * `descriptionHeading` + # * `description` + # * `room` + # * `courseState` + # When set in a query parameter, this field should be specified as + # `updateMask=,,...` + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::Course] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::Course] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_course(id, course_object = nil, update_mask: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/courses/{id}', options) + command.request_representation = Google::Apis::ClassroomV1::Course::Representation + command.request_object = course_object + command.response_representation = Google::Apis::ClassroomV1::Course::Representation + command.response_class = Google::Apis::ClassroomV1::Course + command.params['id'] = id unless id.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a course. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to delete the + # requested course or for access errors. + # * `NOT_FOUND` if no course exists with the requested ID. + # @param [String] id + # Identifier of the course to delete. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_course(id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/courses/{id}', options) + command.response_representation = Google::Apis::ClassroomV1::Empty::Representation + command.response_class = Google::Apis::ClassroomV1::Empty + command.params['id'] = id unless id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Creates a teacher of a course. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to create + # teachers in this course or for access errors. + # * `NOT_FOUND` if the requested course ID does not exist. + # * `FAILED_PRECONDITION` if the requested user's account is disabled, + # for the following request errors: + # * CourseMemberLimitReached + # * CourseNotModifiable + # * CourseTeacherLimitReached + # * UserGroupsMembershipLimitReached + # * `ALREADY_EXISTS` if the user is already a teacher or student in the + # course. + # @param [String] course_id + # Identifier of the course. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [Google::Apis::ClassroomV1::Teacher] teacher_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::Teacher] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::Teacher] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_course_teacher(course_id, teacher_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/courses/{courseId}/teachers', options) + command.request_representation = Google::Apis::ClassroomV1::Teacher::Representation + command.request_object = teacher_object + command.response_representation = Google::Apis::ClassroomV1::Teacher::Representation + command.response_class = Google::Apis::ClassroomV1::Teacher + command.params['courseId'] = course_id unless course_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Returns a teacher of a course. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to view + # teachers of this course or for access errors. + # * `NOT_FOUND` if no teacher of this course has the requested ID or if the + # course does not exist. + # @param [String] course_id + # Identifier of the course. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [String] user_id + # Identifier of the teacher to return. The identifier can be one of the + # following: + # * the numeric identifier for the user + # * the email address of the user + # * the string literal `"me"`, indicating the requesting user + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::Teacher] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::Teacher] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_course_teacher(course_id, user_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/courses/{courseId}/teachers/{userId}', options) + command.response_representation = Google::Apis::ClassroomV1::Teacher::Representation + command.response_class = Google::Apis::ClassroomV1::Teacher + command.params['courseId'] = course_id unless course_id.nil? + command.params['userId'] = user_id unless user_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Returns a list of teachers of this course that the requester + # is permitted to view. + # This method returns the following error codes: + # * `NOT_FOUND` if the course does not exist. + # * `PERMISSION_DENIED` for access errors. + # @param [String] course_id + # Identifier of the course. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [Fixnum] page_size + # Maximum number of items to return. Zero means no maximum. + # The server may return fewer than the specified number of results. + # @param [String] page_token + # nextPageToken + # value returned from a previous + # list call, indicating that + # the subsequent page of results should be returned. + # The list request must be + # otherwise identical to the one that resulted in this token. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::ListTeachersResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::ListTeachersResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_course_teachers(course_id, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/courses/{courseId}/teachers', options) + command.response_representation = Google::Apis::ClassroomV1::ListTeachersResponse::Representation + command.response_class = Google::Apis::ClassroomV1::ListTeachersResponse + command.params['courseId'] = course_id unless course_id.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a teacher of a course. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to delete + # teachers of this course or for access errors. + # * `NOT_FOUND` if no teacher of this course has the requested ID or if the + # course does not exist. + # * `FAILED_PRECONDITION` if the requested ID belongs to the primary teacher + # of this course. + # @param [String] course_id + # Identifier of the course. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [String] user_id + # Identifier of the teacher to delete. The identifier can be one of the + # following: + # * the numeric identifier for the user + # * the email address of the user + # * the string literal `"me"`, indicating the requesting user + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_course_teacher(course_id, user_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/courses/{courseId}/teachers/{userId}', options) + command.response_representation = Google::Apis::ClassroomV1::Empty::Representation + command.response_class = Google::Apis::ClassroomV1::Empty + command.params['courseId'] = course_id unless course_id.nil? + command.params['userId'] = user_id unless user_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Creates an alias for a course. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to create the + # alias or for access errors. + # * `NOT_FOUND` if the course does not exist. + # * `ALREADY_EXISTS` if the alias already exists. + # * `FAILED_PRECONDITION` if the alias requested does not make sense for the + # requesting user or course (for example, if a user not in a domain + # attempts to access a domain-scoped alias). + # @param [String] course_id + # Identifier of the course to alias. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [Google::Apis::ClassroomV1::CourseAlias] course_alias_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::CourseAlias] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::CourseAlias] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_course_alias(course_id, course_alias_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/courses/{courseId}/aliases', options) + command.request_representation = Google::Apis::ClassroomV1::CourseAlias::Representation + command.request_object = course_alias_object + command.response_representation = Google::Apis::ClassroomV1::CourseAlias::Representation + command.response_class = Google::Apis::ClassroomV1::CourseAlias + command.params['courseId'] = course_id unless course_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Returns a list of aliases for a course. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to access the + # course or for access errors. + # * `NOT_FOUND` if the course does not exist. + # @param [String] course_id + # The identifier of the course. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [Fixnum] page_size + # Maximum number of items to return. Zero or unspecified indicates that the + # server may assign a maximum. + # The server may return fewer than the specified number of results. + # @param [String] page_token + # nextPageToken + # value returned from a previous + # list call, + # indicating that the subsequent page of results should be returned. + # The list request + # must be otherwise identical to the one that resulted in this token. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::ListCourseAliasesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::ListCourseAliasesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_course_aliases(course_id, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/courses/{courseId}/aliases', options) + command.response_representation = Google::Apis::ClassroomV1::ListCourseAliasesResponse::Representation + command.response_class = Google::Apis::ClassroomV1::ListCourseAliasesResponse + command.params['courseId'] = course_id unless course_id.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Deletes an alias of a course. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to remove the + # alias or for access errors. + # * `NOT_FOUND` if the alias does not exist. + # * `FAILED_PRECONDITION` if the alias requested does not make sense for the + # requesting user or course (for example, if a user not in a domain + # attempts to delete a domain-scoped alias). + # @param [String] course_id + # Identifier of the course whose alias should be deleted. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [String] alias_ + # Alias to delete. + # This may not be the Classroom-assigned identifier. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_course_alias(course_id, alias_, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/courses/{courseId}/aliases/{alias}', options) + command.response_representation = Google::Apis::ClassroomV1::Empty::Representation + command.response_class = Google::Apis::ClassroomV1::Empty + command.params['courseId'] = course_id unless course_id.nil? + command.params['alias'] = alias_ unless alias_.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Adds a user as a student of a course. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to create + # students in this course or for access errors. + # * `NOT_FOUND` if the requested course ID does not exist. + # * `FAILED_PRECONDITION` if the requested user's account is disabled, + # for the following request errors: + # * CourseMemberLimitReached + # * CourseNotModifiable + # * UserGroupsMembershipLimitReached + # * `ALREADY_EXISTS` if the user is already a student or teacher in the + # course. + # @param [String] course_id + # Identifier of the course to create the student in. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [Google::Apis::ClassroomV1::Student] student_object + # @param [String] enrollment_code + # Enrollment code of the course to create the student in. + # This code is required if userId + # corresponds to the requesting user; it may be omitted if the requesting + # user has administrative permissions to create students for any user. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::Student] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::Student] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_course_student(course_id, student_object = nil, enrollment_code: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/courses/{courseId}/students', options) + command.request_representation = Google::Apis::ClassroomV1::Student::Representation + command.request_object = student_object + command.response_representation = Google::Apis::ClassroomV1::Student::Representation + command.response_class = Google::Apis::ClassroomV1::Student + command.params['courseId'] = course_id unless course_id.nil? + command.query['enrollmentCode'] = enrollment_code unless enrollment_code.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Returns a student of a course. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to view + # students of this course or for access errors. + # * `NOT_FOUND` if no student of this course has the requested ID or if the + # course does not exist. + # @param [String] course_id + # Identifier of the course. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [String] user_id + # Identifier of the student to return. The identifier can be one of the + # following: + # * the numeric identifier for the user + # * the email address of the user + # * the string literal `"me"`, indicating the requesting user + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::Student] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::Student] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_course_student(course_id, user_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/courses/{courseId}/students/{userId}', options) + command.response_representation = Google::Apis::ClassroomV1::Student::Representation + command.response_class = Google::Apis::ClassroomV1::Student + command.params['courseId'] = course_id unless course_id.nil? + command.params['userId'] = user_id unless user_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Returns a list of students of this course that the requester + # is permitted to view. + # This method returns the following error codes: + # * `NOT_FOUND` if the course does not exist. + # * `PERMISSION_DENIED` for access errors. + # @param [String] course_id + # Identifier of the course. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [Fixnum] page_size + # Maximum number of items to return. Zero means no maximum. + # The server may return fewer than the specified number of results. + # @param [String] page_token + # nextPageToken + # value returned from a previous + # list call, indicating that + # the subsequent page of results should be returned. + # The list request must be + # otherwise identical to the one that resulted in this token. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::ListStudentsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::ListStudentsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_course_students(course_id, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/courses/{courseId}/students', options) + command.response_representation = Google::Apis::ClassroomV1::ListStudentsResponse::Representation + command.response_class = Google::Apis::ClassroomV1::ListStudentsResponse + command.params['courseId'] = course_id unless course_id.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a student of a course. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to delete + # students of this course or for access errors. + # * `NOT_FOUND` if no student of this course has the requested ID or if the + # course does not exist. + # @param [String] course_id + # Identifier of the course. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [String] user_id + # Identifier of the student to delete. The identifier can be one of the + # following: + # * the numeric identifier for the user + # * the email address of the user + # * the string literal `"me"`, indicating the requesting user + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_course_student(course_id, user_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/courses/{courseId}/students/{userId}', options) + command.response_representation = Google::Apis::ClassroomV1::Empty::Representation + command.response_class = Google::Apis::ClassroomV1::Empty + command.params['courseId'] = course_id unless course_id.nil? + command.params['userId'] = user_id unless user_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Creates course work. + # The resulting course work (and corresponding student submissions) are + # associated with the Developer Console project of the + # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + # make the request. Classroom API requests to modify course work and student + # submissions must be made with an OAuth client ID from the associated + # Developer Console project. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to access the + # requested course, create course work in the requested course, share a + # Drive attachment, or for access errors. + # * `INVALID_ARGUMENT` if the request is malformed. + # * `NOT_FOUND` if the requested course does not exist. + # * `FAILED_PRECONDITION` for the following request error: + # * AttachmentNotVisible + # @param [String] course_id + # Identifier of the course. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [Google::Apis::ClassroomV1::CourseWork] course_work_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::CourseWork] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::CourseWork] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_course_work(course_id, course_work_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork', options) + command.request_representation = Google::Apis::ClassroomV1::CourseWork::Representation + command.request_object = course_work_object + command.response_representation = Google::Apis::ClassroomV1::CourseWork::Representation + command.response_class = Google::Apis::ClassroomV1::CourseWork + command.params['courseId'] = course_id unless course_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Returns course work. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to access the + # requested course or course work, or for access errors. + # * `INVALID_ARGUMENT` if the request is malformed. + # * `NOT_FOUND` if the requested course or course work does not exist. + # @param [String] course_id + # Identifier of the course. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [String] id + # Identifier of the course work. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::CourseWork] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::CourseWork] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_course_work(course_id, id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/courses/{courseId}/courseWork/{id}', options) + command.response_representation = Google::Apis::ClassroomV1::CourseWork::Representation + command.response_class = Google::Apis::ClassroomV1::CourseWork + command.params['courseId'] = course_id unless course_id.nil? + command.params['id'] = id unless id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Returns a list of course work that the requester is permitted to view. + # Course students may only view `PUBLISHED` course work. Course teachers + # and domain administrators may view all course work. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to access + # the requested course or for access errors. + # * `INVALID_ARGUMENT` if the request is malformed. + # * `NOT_FOUND` if the requested course does not exist. + # @param [String] course_id + # Identifier of the course. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [Array, String] course_work_states + # Restriction on the work status to return. Only courseWork that matches + # is returned. If unspecified, items with a work status of `PUBLISHED` + # is returned. + # @param [Fixnum] page_size + # Maximum number of items to return. Zero or unspecified indicates that the + # server may assign a maximum. + # The server may return fewer than the specified number of results. + # @param [String] order_by + # Optional sort ordering for results. A comma-separated list of fields with + # an optional sort direction keyword. Supported fields are `updateTime` + # and `dueDate`. Supported direction keywords are `asc` and `desc`. + # If not specified, `updateTime desc` is the default behavior. + # Examples: `dueDate asc,updateTime desc`, `updateTime,dueDate desc` + # @param [String] page_token + # nextPageToken + # value returned from a previous + # list call, + # indicating that the subsequent page of results should be returned. + # The list request + # must be otherwise identical to the one that resulted in this token. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::ListCourseWorkResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::ListCourseWorkResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_course_works(course_id, course_work_states: nil, page_size: nil, order_by: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/courses/{courseId}/courseWork', options) + command.response_representation = Google::Apis::ClassroomV1::ListCourseWorkResponse::Representation + command.response_class = Google::Apis::ClassroomV1::ListCourseWorkResponse + command.params['courseId'] = course_id unless course_id.nil? + command.query['courseWorkStates'] = course_work_states unless course_work_states.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['orderBy'] = order_by unless order_by.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Updates one or more fields of a course work. + # See google.classroom.v1.CourseWork for details + # of which fields may be updated and who may change them. + # This request must be made by the Developer Console project of the + # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + # create the corresponding course work item. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting developer project did not create + # the corresponding course work, if the user is not permitted to make the + # requested modification to the student submission, or for + # access errors. + # * `INVALID_ARGUMENT` if the request is malformed. + # * `FAILED_PRECONDITION` if the requested course work has already been + # deleted. + # * `NOT_FOUND` if the requested course, course work, or student submission + # does not exist. + # @param [String] course_id + # Identifier of the course. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [String] id + # Identifier of the course work. + # @param [Google::Apis::ClassroomV1::CourseWork] course_work_object + # @param [String] update_mask + # Mask that identifies which fields on the course work to update. + # This field is required to do an update. The update fails if invalid + # fields are specified. If a field supports empty values, it can be cleared + # by specifying it in the update mask and not in the CourseWork object. If a + # field that does not support empty values is included in the update mask and + # not set in the CourseWork object, an `INVALID_ARGUMENT` error will be + # returned. + # The following fields may be specified by teachers: + # * `title` + # * `description` + # * `state` + # * `due_date` + # * `due_time` + # * `max_points` + # * `submission_modification_mode` + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::CourseWork] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::CourseWork] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_course_course_work(course_id, id, course_work_object = nil, update_mask: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/courses/{courseId}/courseWork/{id}', options) + command.request_representation = Google::Apis::ClassroomV1::CourseWork::Representation + command.request_object = course_work_object + command.response_representation = Google::Apis::ClassroomV1::CourseWork::Representation + command.response_class = Google::Apis::ClassroomV1::CourseWork + command.params['courseId'] = course_id unless course_id.nil? + command.params['id'] = id unless id.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a course work. + # This request must be made by the Developer Console project of the + # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + # create the corresponding course work item. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting developer project did not create + # the corresponding course work, if the requesting user is not permitted + # to delete the requested course or for access errors. + # * `FAILED_PRECONDITION` if the requested course work has already been + # deleted. + # * `NOT_FOUND` if no course exists with the requested ID. + # @param [String] course_id + # Identifier of the course. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [String] id + # Identifier of the course work to delete. + # This identifier is a Classroom-assigned identifier. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_course_course_work(course_id, id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/courses/{courseId}/courseWork/{id}', options) + command.response_representation = Google::Apis::ClassroomV1::Empty::Representation + command.response_class = Google::Apis::ClassroomV1::Empty + command.params['courseId'] = course_id unless course_id.nil? + command.params['id'] = id unless id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Modifies attachments of student submission. + # Attachments may only be added to student submissions belonging to course + # work objects with a `workType` of `ASSIGNMENT`. + # This request must be made by the Developer Console project of the + # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + # create the corresponding course work item. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to access the + # requested course or course work, if the user is not permitted to modify + # attachments on the requested student submission, or for + # access errors. + # * `INVALID_ARGUMENT` if the request is malformed. + # * `NOT_FOUND` if the requested course, course work, or student submission + # does not exist. + # @param [String] course_id + # Identifier of the course. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [String] course_work_id + # Identifier of the course work. + # @param [String] id + # Identifier of the student submission. + # @param [Google::Apis::ClassroomV1::ModifyAttachmentsRequest] modify_attachments_request_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::StudentSubmission] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::StudentSubmission] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def modify_student_submission_attachments(course_id, course_work_id, id, modify_attachments_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:modifyAttachments', options) + command.request_representation = Google::Apis::ClassroomV1::ModifyAttachmentsRequest::Representation + command.request_object = modify_attachments_request_object + command.response_representation = Google::Apis::ClassroomV1::StudentSubmission::Representation + command.response_class = Google::Apis::ClassroomV1::StudentSubmission + command.params['courseId'] = course_id unless course_id.nil? + command.params['courseWorkId'] = course_work_id unless course_work_id.nil? + command.params['id'] = id unless id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Reclaims a student submission on behalf of the student that owns it. + # Reclaiming a student submission transfers ownership of attached Drive + # files to the student and update the submission state. + # Only the student that owns the requested student submission may call this + # method, and only for a student submission that has been turned in. + # This request must be made by the Developer Console project of the + # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + # create the corresponding course work item. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to access the + # requested course or course work, unsubmit the requested student submission, + # or for access errors. + # * `FAILED_PRECONDITION` if the student submission has not been turned in. + # * `INVALID_ARGUMENT` if the request is malformed. + # * `NOT_FOUND` if the requested course, course work, or student submission + # does not exist. + # @param [String] course_id + # Identifier of the course. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [String] course_work_id + # Identifier of the course work. + # @param [String] id + # Identifier of the student submission. + # @param [Google::Apis::ClassroomV1::ReclaimStudentSubmissionRequest] reclaim_student_submission_request_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def reclaim_student_submission(course_id, course_work_id, id, reclaim_student_submission_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:reclaim', options) + command.request_representation = Google::Apis::ClassroomV1::ReclaimStudentSubmissionRequest::Representation + command.request_object = reclaim_student_submission_request_object + command.response_representation = Google::Apis::ClassroomV1::Empty::Representation + command.response_class = Google::Apis::ClassroomV1::Empty + command.params['courseId'] = course_id unless course_id.nil? + command.params['courseWorkId'] = course_work_id unless course_work_id.nil? + command.params['id'] = id unless id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Turns in a student submission. + # Turning in a student submission transfers ownership of attached Drive + # files to the teacher and may also update the submission state. + # This may only be called by the student that owns the specified student + # submission. + # This request must be made by the Developer Console project of the + # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + # create the corresponding course work item. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to access the + # requested course or course work, turn in the requested student submission, + # or for access errors. + # * `INVALID_ARGUMENT` if the request is malformed. + # * `NOT_FOUND` if the requested course, course work, or student submission + # does not exist. + # @param [String] course_id + # Identifier of the course. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [String] course_work_id + # Identifier of the course work. + # @param [String] id + # Identifier of the student submission. + # @param [Google::Apis::ClassroomV1::TurnInStudentSubmissionRequest] turn_in_student_submission_request_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def turn_in_student_submission(course_id, course_work_id, id, turn_in_student_submission_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:turnIn', options) + command.request_representation = Google::Apis::ClassroomV1::TurnInStudentSubmissionRequest::Representation + command.request_object = turn_in_student_submission_request_object + command.response_representation = Google::Apis::ClassroomV1::Empty::Representation + command.response_class = Google::Apis::ClassroomV1::Empty + command.params['courseId'] = course_id unless course_id.nil? + command.params['courseWorkId'] = course_work_id unless course_work_id.nil? + command.params['id'] = id unless id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Returns a list of student submissions that the requester is permitted to + # view, factoring in the OAuth scopes of the request. + # `-` may be specified as the `course_work_id` to include student + # submissions for multiple course work items. + # Course students may only view their own work. Course teachers + # and domain administrators may view all student submissions. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to access the + # requested course or course work, or for access errors. + # * `INVALID_ARGUMENT` if the request is malformed. + # * `NOT_FOUND` if the requested course does not exist. + # @param [String] course_id + # Identifier of the course. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [String] course_work_id + # Identifer of the student work to request. + # This may be set to the string literal `"-"` to request student work for + # all course work in the specified course. + # @param [Array, String] states + # Requested submission states. If specified, returned student submissions + # match one of the specified submission states. + # @param [String] user_id + # Optional argument to restrict returned student work to those owned by the + # student with the specified identifier. The identifier can be one of the + # following: + # * the numeric identifier for the user + # * the email address of the user + # * the string literal `"me"`, indicating the requesting user + # @param [Fixnum] page_size + # Maximum number of items to return. Zero or unspecified indicates that the + # server may assign a maximum. + # The server may return fewer than the specified number of results. + # @param [String] late + # Requested lateness value. If specified, returned student submissions are + # restricted by the requested value. + # If unspecified, submissions are returned regardless of `late` value. + # @param [String] page_token + # nextPageToken + # value returned from a previous + # list call, + # indicating that the subsequent page of results should be returned. + # The list request + # must be otherwise identical to the one that resulted in this token. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::ListStudentSubmissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::ListStudentSubmissionsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_student_submissions(course_id, course_work_id, states: nil, user_id: nil, page_size: nil, late: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions', options) + command.response_representation = Google::Apis::ClassroomV1::ListStudentSubmissionsResponse::Representation + command.response_class = Google::Apis::ClassroomV1::ListStudentSubmissionsResponse + command.params['courseId'] = course_id unless course_id.nil? + command.params['courseWorkId'] = course_work_id unless course_work_id.nil? + command.query['states'] = states unless states.nil? + command.query['userId'] = user_id unless user_id.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['late'] = late unless late.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Returns a student submission. + # * `PERMISSION_DENIED` if the requesting user is not permitted to access the + # requested course, course work, or student submission or for + # access errors. + # * `INVALID_ARGUMENT` if the request is malformed. + # * `NOT_FOUND` if the requested course, course work, or student submission + # does not exist. + # @param [String] course_id + # Identifier of the course. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [String] course_work_id + # Identifier of the course work. + # @param [String] id + # Identifier of the student submission. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::StudentSubmission] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::StudentSubmission] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_student_submission(course_id, course_work_id, id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}', options) + command.response_representation = Google::Apis::ClassroomV1::StudentSubmission::Representation + command.response_class = Google::Apis::ClassroomV1::StudentSubmission + command.params['courseId'] = course_id unless course_id.nil? + command.params['courseWorkId'] = course_work_id unless course_work_id.nil? + command.params['id'] = id unless id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Returns a student submission. + # Returning a student submission transfers ownership of attached Drive + # files to the student and may also update the submission state. + # Unlike the Classroom application, returning a student submission does not + # set assignedGrade to the draftGrade value. + # Only a teacher of the course that contains the requested student submission + # may call this method. + # This request must be made by the Developer Console project of the + # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + # create the corresponding course work item. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to access the + # requested course or course work, return the requested student submission, + # or for access errors. + # * `INVALID_ARGUMENT` if the request is malformed. + # * `NOT_FOUND` if the requested course, course work, or student submission + # does not exist. + # @param [String] course_id + # Identifier of the course. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [String] course_work_id + # Identifier of the course work. + # @param [String] id + # Identifier of the student submission. + # @param [Google::Apis::ClassroomV1::ReturnStudentSubmissionRequest] return_student_submission_request_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def return_student_submission(course_id, course_work_id, id, return_student_submission_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:return', options) + command.request_representation = Google::Apis::ClassroomV1::ReturnStudentSubmissionRequest::Representation + command.request_object = return_student_submission_request_object + command.response_representation = Google::Apis::ClassroomV1::Empty::Representation + command.response_class = Google::Apis::ClassroomV1::Empty + command.params['courseId'] = course_id unless course_id.nil? + command.params['courseWorkId'] = course_work_id unless course_work_id.nil? + command.params['id'] = id unless id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Updates one or more fields of a student submission. + # See google.classroom.v1.StudentSubmission for details + # of which fields may be updated and who may change them. + # This request must be made by the Developer Console project of the + # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to + # create the corresponding course work item. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting developer project did not create + # the corresponding course work, if the user is not permitted to make the + # requested modification to the student submission, or for + # access errors. + # * `INVALID_ARGUMENT` if the request is malformed. + # * `NOT_FOUND` if the requested course, course work, or student submission + # does not exist. + # @param [String] course_id + # Identifier of the course. + # This identifier can be either the Classroom-assigned identifier or an + # alias. + # @param [String] course_work_id + # Identifier of the course work. + # @param [String] id + # Identifier of the student submission. + # @param [Google::Apis::ClassroomV1::StudentSubmission] student_submission_object + # @param [String] update_mask + # Mask that identifies which fields on the student submission to update. + # This field is required to do an update. The update fails if invalid + # fields are specified. + # The following fields may be specified by teachers: + # * `draft_grade` + # * `assigned_grade` + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::StudentSubmission] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::StudentSubmission] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_student_submission(course_id, course_work_id, id, student_submission_object = nil, update_mask: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}', options) + command.request_representation = Google::Apis::ClassroomV1::StudentSubmission::Representation + command.request_object = student_submission_object + command.response_representation = Google::Apis::ClassroomV1::StudentSubmission::Representation + command.response_class = Google::Apis::ClassroomV1::StudentSubmission + command.params['courseId'] = course_id unless course_id.nil? + command.params['courseWorkId'] = course_work_id unless course_work_id.nil? + command.params['id'] = id unless id.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Returns a user profile. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to access + # this user profile, if no profile exists with the requested ID, or for + # access errors. + # @param [String] user_id + # Identifier of the profile to return. The identifier can be one of the + # following: + # * the numeric identifier for the user + # * the email address of the user + # * the string literal `"me"`, indicating the requesting user + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::UserProfile] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::UserProfile] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_user_profile(user_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/userProfiles/{userId}', options) + command.response_representation = Google::Apis::ClassroomV1::UserProfile::Representation + command.response_class = Google::Apis::ClassroomV1::UserProfile + command.params['userId'] = user_id unless user_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Returns a specific guardian. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if no user that matches the provided `student_id` + # is visible to the requesting user, if the requesting user is not + # permitted to view guardian information for the student identified by the + # `student_id`, if guardians are not enabled for the domain in question, + # or for other access errors. + # * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot + # be recognized (it is not an email address, nor a `student_id` from the + # API, nor the literal string `me`). + # * `NOT_FOUND` if the requesting user is permitted to view guardians for + # the requested `student_id`, but no `Guardian` record exists for that + # student that matches the provided `guardian_id`. + # @param [String] student_id + # The student whose guardian is being requested. One of the following: + # * the numeric identifier for the user + # * the email address of the user + # * the string literal `"me"`, indicating the requesting user + # @param [String] guardian_id + # The `id` field from a `Guardian`. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::Guardian] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::Guardian] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_user_profile_guardian(student_id, guardian_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardians/{guardianId}', options) + command.response_representation = Google::Apis::ClassroomV1::Guardian::Representation + command.response_class = Google::Apis::ClassroomV1::Guardian + command.params['studentId'] = student_id unless student_id.nil? + command.params['guardianId'] = guardian_id unless guardian_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Returns a list of guardians that the requesting user is permitted to + # view, restricted to those that match the request. + # To list guardians for any student that the requesting user may view + # guardians for, use the literal character `-` for the student ID. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting + # user is not permitted to view guardian information for that student, if + # `"-"` is specified as the `student_id` and the user is not a domain + # administrator, if guardians are not enabled for the domain in question, + # if the `invited_email_address` filter is set by a user who is not a + # domain administrator, or for other access errors. + # * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot + # be recognized (it is not an email address, nor a `student_id` from the + # API, nor the literal string `me`). May also be returned if an invalid + # `page_token` is provided. + # * `NOT_FOUND` if a `student_id` is specified, and its format can be + # recognized, but Classroom has no record of that student. + # @param [String] student_id + # Filter results by the student who the guardian is linked to. + # The identifier can be one of the following: + # * the numeric identifier for the user + # * the email address of the user + # * the string literal `"me"`, indicating the requesting user + # * the string literal `"-"`, indicating that results should be returned for + # all students that the requesting user has access to view. + # @param [Fixnum] page_size + # Maximum number of items to return. Zero or unspecified indicates that the + # server may assign a maximum. + # The server may return fewer than the specified number of results. + # @param [String] invited_email_address + # Filter results by the email address that the original invitation was sent + # to, resulting in this guardian link. + # This filter can only be used by domain administrators. + # @param [String] page_token + # nextPageToken + # value returned from a previous + # list call, + # indicating that the subsequent page of results should be returned. + # The list request + # must be otherwise identical to the one that resulted in this token. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::ListGuardiansResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::ListGuardiansResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_user_profile_guardians(student_id, page_size: nil, invited_email_address: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardians', options) + command.response_representation = Google::Apis::ClassroomV1::ListGuardiansResponse::Representation + command.response_class = Google::Apis::ClassroomV1::ListGuardiansResponse + command.params['studentId'] = student_id unless student_id.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['invitedEmailAddress'] = invited_email_address unless invited_email_address.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a guardian. + # The guardian will no longer receive guardian notifications and the guardian + # will no longer be accessible via the API. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if no user that matches the provided `student_id` + # is visible to the requesting user, if the requesting user is not + # permitted to manage guardians for the student identified by the + # `student_id`, if guardians are not enabled for the domain in question, + # or for other access errors. + # * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot + # be recognized (it is not an email address, nor a `student_id` from the + # API). + # * `NOT_FOUND` if the requesting user is permitted to modify guardians for + # the requested `student_id`, but no `Guardian` record exists for that + # student with the provided `guardian_id`. + # @param [String] student_id + # The student whose guardian is to be deleted. One of the following: + # * the numeric identifier for the user + # * the email address of the user + # * the string literal `"me"`, indicating the requesting user + # @param [String] guardian_id + # The `id` field from a `Guardian`. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_user_profile_guardian(student_id, guardian_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/userProfiles/{studentId}/guardians/{guardianId}', options) + command.response_representation = Google::Apis::ClassroomV1::Empty::Representation + command.response_class = Google::Apis::ClassroomV1::Empty + command.params['studentId'] = student_id unless student_id.nil? + command.params['guardianId'] = guardian_id unless guardian_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Returns a specific guardian invitation. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the requesting user is not permitted to view + # guardian invitations for the student identified by the `student_id`, if + # guardians are not enabled for the domain in question, or for other + # access errors. + # * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot + # be recognized (it is not an email address, nor a `student_id` from the + # API, nor the literal string `me`). + # * `NOT_FOUND` if Classroom cannot find any record of the given student or + # `invitation_id`. May also be returned if the student exists, but the + # requesting user does not have access to see that student. + # @param [String] student_id + # The ID of the student whose guardian invitation is being requested. + # @param [String] invitation_id + # The `id` field of the `GuardianInvitation` being requested. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::GuardianInvitation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::GuardianInvitation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_user_profile_guardian_invitation(student_id, invitation_id, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardianInvitations/{invitationId}', options) + command.response_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation + command.response_class = Google::Apis::ClassroomV1::GuardianInvitation + command.params['studentId'] = student_id unless student_id.nil? + command.params['invitationId'] = invitation_id unless invitation_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Creates a guardian invitation, and sends an email to the guardian asking + # them to confirm that they are the student's guardian. + # Once the guardian accepts the invitation, their `state` will change to + # `COMPLETED` and they will start receiving guardian notifications. A + # `Guardian` resource will also be created to represent the active guardian. + # The request object must have the `student_id` and + # `invited_email_address` fields set. Failing to set these fields, or + # setting any other fields in the request, will result in an error. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the current user does not have permission to + # manage guardians, if the guardian in question has already rejected + # too many requests for that student, if guardians are not enabled for the + # domain in question, or for other access errors. + # * `RESOURCE_EXHAUSTED` if the student or guardian has exceeded the guardian + # link limit. + # * `INVALID_ARGUMENT` if the guardian email address is not valid (for + # example, if it is too long), or if the format of the student ID provided + # cannot be recognized (it is not an email address, nor a `user_id` from + # this API). This error will also be returned if read-only fields are set, + # or if the `state` field is set to to a value other than `PENDING`. + # * `NOT_FOUND` if the student ID provided is a valid student ID, but + # Classroom has no record of that student. + # * `ALREADY_EXISTS` if there is already a pending guardian invitation for + # the student and `invited_email_address` provided, or if the provided + # `invited_email_address` matches the Google account of an existing + # `Guardian` for this user. + # @param [String] student_id + # ID of the student (in standard format) + # @param [Google::Apis::ClassroomV1::GuardianInvitation] guardian_invitation_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::GuardianInvitation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::GuardianInvitation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_user_profile_guardian_invitation(student_id, guardian_invitation_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/userProfiles/{studentId}/guardianInvitations', options) + command.request_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation + command.request_object = guardian_invitation_object + command.response_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation + command.response_class = Google::Apis::ClassroomV1::GuardianInvitation + command.params['studentId'] = student_id unless student_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Returns a list of guardian invitations that the requesting user is + # permitted to view, filtered by the parameters provided. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting + # user is not permitted to view guardian invitations for that student, if + # `"-"` is specified as the `student_id` and the user is not a domain + # administrator, if guardians are not enabled for the domain in question, + # or for other access errors. + # * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot + # be recognized (it is not an email address, nor a `student_id` from the + # API, nor the literal string `me`). May also be returned if an invalid + # `page_token` or `state` is provided. + # * `NOT_FOUND` if a `student_id` is specified, and its format can be + # recognized, but Classroom has no record of that student. + # @param [String] student_id + # The ID of the student whose guardian invitations are to be returned. + # The identifier can be one of the following: + # * the numeric identifier for the user + # * the email address of the user + # * the string literal `"me"`, indicating the requesting user + # * the string literal `"-"`, indicating that results should be returned for + # all students that the requesting user is permitted to view guardian + # invitations. + # @param [Fixnum] page_size + # Maximum number of items to return. Zero or unspecified indicates that the + # server may assign a maximum. + # The server may return fewer than the specified number of results. + # @param [String] invited_email_address + # If specified, only results with the specified `invited_email_address` + # will be returned. + # @param [Array, String] states + # If specified, only results with the specified `state` values will be + # returned. Otherwise, results with a `state` of `PENDING` will be returned. + # @param [String] page_token + # nextPageToken + # value returned from a previous + # list call, + # indicating that the subsequent page of results should be returned. + # The list request + # must be otherwise identical to the one that resulted in this token. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::ListGuardianInvitationsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::ListGuardianInvitationsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_user_profile_guardian_invitations(student_id, page_size: nil, invited_email_address: nil, states: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardianInvitations', options) + command.response_representation = Google::Apis::ClassroomV1::ListGuardianInvitationsResponse::Representation + command.response_class = Google::Apis::ClassroomV1::ListGuardianInvitationsResponse + command.params['studentId'] = student_id unless student_id.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['invitedEmailAddress'] = invited_email_address unless invited_email_address.nil? + command.query['states'] = states unless states.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Modifies a guardian invitation. + # Currently, the only valid modification is to change the `state` from + # `PENDING` to `COMPLETE`. This has the effect of withdrawing the invitation. + # This method returns the following error codes: + # * `PERMISSION_DENIED` if the current user does not have permission to + # manage guardians, if guardians are not enabled for the domain in question + # or for other access errors. + # * `FAILED_PRECONDITION` if the guardian link is not in the `PENDING` state. + # * `INVALID_ARGUMENT` if the format of the student ID provided + # cannot be recognized (it is not an email address, nor a `user_id` from + # this API), or if the passed `GuardianInvitation` has a `state` other than + # `COMPLETE`, or if it modifies fields other than `state`. + # * `NOT_FOUND` if the student ID provided is a valid student ID, but + # Classroom has no record of that student, or if the `id` field does not + # refer to a guardian invitation known to Classroom. + # @param [String] student_id + # The ID of the student whose guardian invitation is to be modified. + # @param [String] invitation_id + # The `id` field of the `GuardianInvitation` to be modified. + # @param [Google::Apis::ClassroomV1::GuardianInvitation] guardian_invitation_object + # @param [String] update_mask + # Mask that identifies which fields on the course to update. + # This field is required to do an update. The update will fail if invalid + # fields are specified. The following fields are valid: + # * `state` + # When set in a query parameter, this field should be specified as + # `updateMask=,,...` + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClassroomV1::GuardianInvitation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClassroomV1::GuardianInvitation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_user_profile_guardian_invitation(student_id, invitation_id, guardian_invitation_object = nil, update_mask: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/userProfiles/{studentId}/guardianInvitations/{invitationId}', options) + command.request_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation + command.request_object = guardian_invitation_object + command.response_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation + command.response_class = Google::Apis::ClassroomV1::GuardianInvitation + command.params['studentId'] = student_id unless student_id.nil? + command.params['invitationId'] = invitation_id unless invitation_id.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/cloudbuild_v1.rb b/generated/google/apis/cloudbuild_v1.rb index e0e460a3b..11815aba1 100644 --- a/generated/google/apis/cloudbuild_v1.rb +++ b/generated/google/apis/cloudbuild_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/container-builder/docs/ module CloudbuildV1 VERSION = 'V1' - REVISION = '20170306' + REVISION = '20170327' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/cloudbuild_v1/classes.rb b/generated/google/apis/cloudbuild_v1/classes.rb index 99fb5e439..02bbc5346 100644 --- a/generated/google/apis/cloudbuild_v1/classes.rb +++ b/generated/google/apis/cloudbuild_v1/classes.rb @@ -27,14 +27,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 @@ -105,17 +97,25 @@ module Google # @return [Hash] attr_accessor :metadata + # If the value is `false`, it means the operation is still in progress. + # If true, the operation is completed, and either `error` or `response` is + # available. + # Corresponds to the JSON property `done` + # @return [Boolean] + attr_accessor :done + alias_method :done?, :done + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @done = args[:done] if args.key?(:done) @response = args[:response] if args.key?(:response) @name = args[:name] if args.key?(:name) @error = args[:error] if args.key?(:error) @metadata = args[:metadata] if args.key?(:metadata) + @done = args[:done] if args.key?(:done) end end @@ -209,16 +209,60 @@ module Google end end + # Container message for hash values. + class HashProp + include Google::Apis::Core::Hashable + + # The type of hash that was performed. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The hash value. + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type = args[:type] if args.key?(:type) + @value = args[:value] if args.key?(:value) + end + end + # BuildStep describes a step to perform in the build pipeline. class BuildStep include Google::Apis::Core::Hashable + # Optional entrypoint to be used instead of the build step image's default + # If unset, the image's default will be used. + # Corresponds to the JSON property `entrypoint` + # @return [String] + attr_accessor :entrypoint + + # Optional unique identifier for this build step, used in wait_for to + # reference this build step as a dependency. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + # Working directory (relative to project source root) to use when running # this operation's container. # Corresponds to the JSON property `dir` # @return [String] attr_accessor :dir + # A list of environment variable definitions to be used when running a step. + # The elements are of the form "KEY=VALUE" for the environment variable "KEY" + # being given the value "VALUE". + # Corresponds to the JSON property `env` + # @return [Array] + attr_accessor :env + # The ID(s) of the step(s) that this build step depends on. # This build step will not start until all the build steps in wait_for # have completed successfully. If wait_for is empty, this build step will @@ -228,13 +272,6 @@ module Google # @return [Array] attr_accessor :wait_for - # A list of environment variable definitions to be used when running a step. - # The elements are of the form "KEY=VALUE" for the environment variable "KEY" - # being given the value "VALUE". - # Corresponds to the JSON property `env` - # @return [Array] - attr_accessor :env - # A list of arguments that will be presented to the step when it is started. # If the image used to run the step's container has an entrypoint, these args # will be used as arguments to that entrypoint. If the image does not define @@ -250,10 +287,11 @@ module Google # first, using the builder service account's credentials if necessary. # The Docker daemon's cache will already have the latest versions of all of # the officially supported build steps - # (https://github.com/GoogleCloudPlatform/cloud-builders). The Docker daemon - # will also have cached many of the layers for some popular images, like - # "ubuntu", "debian", but they will be refreshed at the time you attempt to - # use them. + # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/ + # GoogleCloudPlatform/cloud-builders)). + # The Docker daemon will also have cached many of the layers for some popular + # images, like "ubuntu", "debian", but they will be refreshed at the time you + # attempt to use them. # If you built an image in a previous build step, it will be stored in the # host's Docker daemon's cache and is available to use as the name for a # later build step. @@ -261,56 +299,19 @@ module Google # @return [String] attr_accessor :name - # Optional entrypoint to be used instead of the build step image's default - # If unset, the image's default will be used. - # Corresponds to the JSON property `entrypoint` - # @return [String] - attr_accessor :entrypoint - - # Optional unique identifier for this build step, used in wait_for to - # reference this build step as a dependency. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @dir = args[:dir] if args.key?(:dir) - @wait_for = args[:wait_for] if args.key?(:wait_for) - @env = args[:env] if args.key?(:env) - @args = args[:args] if args.key?(:args) - @name = args[:name] if args.key?(:name) @entrypoint = args[:entrypoint] if args.key?(:entrypoint) @id = args[:id] if args.key?(:id) - end - end - - # Container message for hash values. - class HashProp - include Google::Apis::Core::Hashable - - # The hash value. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - # The type of hash that was performed. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @value = args[:value] if args.key?(:value) - @type = args[:type] if args.key?(:type) + @dir = args[:dir] if args.key?(:dir) + @env = args[:env] if args.key?(:env) + @wait_for = args[:wait_for] if args.key?(:wait_for) + @args = args[:args] if args.key?(:args) + @name = args[:name] if args.key?(:name) end end @@ -430,11 +431,17 @@ module Google class BuildTrigger include Google::Apis::Core::Hashable - # Path, from the source root, to a file whose contents is used for the - # template. - # Corresponds to the JSON property `filename` + # 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 :filename + attr_accessor :create_time # RepoSource describes the location of the source in a Google Cloud Source # Repository. @@ -442,6 +449,12 @@ module Google # @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` @@ -475,32 +488,20 @@ module Google # @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 - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @filename = args[:filename] if args.key?(:filename) + @disabled = args[:disabled] if args.key?(:disabled) + @create_time = args[:create_time] if args.key?(:create_time) @trigger_template = args[:trigger_template] if args.key?(:trigger_template) + @filename = args[:filename] if args.key?(:filename) @id = args[:id] if args.key?(:id) @build = args[:build] if args.key?(:build) @substitutions = args[:substitutions] if args.key?(:substitutions) @description = args[:description] if args.key?(:description) - @disabled = args[:disabled] if args.key?(:disabled) - @create_time = args[:create_time] if args.key?(:create_time) end end @@ -520,28 +521,58 @@ module Google class Build include Google::Apis::Core::Hashable - # 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 + # Time at which the request to create the build was received. + # @OutputOnly + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Provenance of the source. Ways to find the original source, or verify that + # some source was used for this build. + # Corresponds to the JSON property `sourceProvenance` + # @return [Google::Apis::CloudbuildV1::SourceProvenance] + attr_accessor :source_provenance + + # A list of images to be pushed upon the successful completion of all build + # steps. + # The images will be pushed using the builder service account's credentials. + # The digests of the pushed images will be stored in the Build resource's + # results field. + # If any of the images fail to be pushed, the build is marked FAILURE. + # Corresponds to the JSON property `images` + # @return [Array] + attr_accessor :images + + # ID of the project. + # @OutputOnly. + # Corresponds to the JSON property `projectId` + # @return [String] + attr_accessor :project_id + + # URL to logs for this build in Google Cloud Logging. + # @OutputOnly + # Corresponds to the JSON property `logUrl` + # @return [String] + attr_accessor :log_url + + # Time at which execution of the build was finished. + # The difference between finish_time and start_time is the duration of the + # build's execution. + # @OutputOnly + # Corresponds to the JSON property `finishTime` + # @return [String] + attr_accessor :finish_time # 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 + # 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 # 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 @@ -551,6 +582,18 @@ module Google # @return [String] attr_accessor :timeout + # Status of the build. + # @OutputOnly + # Corresponds to the JSON property `status` + # @return [String] + attr_accessor :status + + # Customer-readable message about the current status. + # @OutputOnly + # Corresponds to the JSON property `statusDetail` + # @return [String] + attr_accessor :status_detail + # Results describes the artifacts created by the build pipeline. # Corresponds to the JSON property `results` # @return [Google::Apis::CloudbuildV1::Results] @@ -583,58 +626,16 @@ module Google # @return [String] attr_accessor :id - # Substitutions data for Build resource. - # Corresponds to the JSON property `substitutions` - # @return [Hash] - attr_accessor :substitutions - # Time at which execution of the build was started. # @OutputOnly # Corresponds to the JSON property `startTime` # @return [String] attr_accessor :start_time - # Provenance of the source. Ways to find the original source, or verify that - # some source was used for this build. - # Corresponds to the JSON property `sourceProvenance` - # @return [Google::Apis::CloudbuildV1::SourceProvenance] - attr_accessor :source_provenance - - # Time at which the request to create the build was received. - # @OutputOnly - # Corresponds to the JSON property `createTime` - # @return [String] - attr_accessor :create_time - - # A list of images to be pushed upon the successful completion of all build - # steps. - # The images will be pushed using the builder service account's credentials. - # The digests of the pushed images will be stored in the Build resource's - # results field. - # If any of the images fail to be pushed, the build is marked FAILURE. - # Corresponds to the JSON property `images` - # @return [Array] - attr_accessor :images - - # ID of the project. - # @OutputOnly. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # 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 - - # URL to logs for this build in Google Cloud Logging. - # @OutputOnly - # Corresponds to the JSON property `logUrl` - # @return [String] - attr_accessor :log_url + # Substitutions data for Build resource. + # Corresponds to the JSON property `substitutions` + # @return [Hash] + attr_accessor :substitutions def initialize(**args) update!(**args) @@ -642,24 +643,24 @@ module Google # Update properties of this object def update!(**args) - @source = args[:source] if args.key?(:source) + @create_time = args[:create_time] if args.key?(:create_time) + @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) @options = args[:options] if args.key?(:options) - @status_detail = args[:status_detail] if args.key?(:status_detail) - @status = args[:status] if args.key?(:status) + @source = args[:source] if args.key?(:source) @timeout = args[:timeout] if args.key?(:timeout) + @status = args[:status] if args.key?(:status) + @status_detail = args[:status_detail] if args.key?(:status_detail) @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) - @substitutions = args[:substitutions] if args.key?(:substitutions) @start_time = args[:start_time] if args.key?(:start_time) - @source_provenance = args[:source_provenance] if args.key?(:source_provenance) - @create_time = args[:create_time] if args.key?(:create_time) - @images = args[:images] if args.key?(:images) - @project_id = args[:project_id] if args.key?(:project_id) - @finish_time = args[:finish_time] if args.key?(:finish_time) - @log_url = args[:log_url] if args.key?(:log_url) + @substitutions = args[:substitutions] if args.key?(:substitutions) end end @@ -821,24 +822,24 @@ module Google class Results include Google::Apis::Core::Hashable - # Images that were built as a part of the build. - # Corresponds to the JSON property `images` - # @return [Array] - attr_accessor :images - # List of build step digests, in order corresponding to build step indices. # Corresponds to the JSON property `buildStepImages` # @return [Array] attr_accessor :build_step_images + # Images that were built as a part of the build. + # Corresponds to the JSON property `images` + # @return [Array] + attr_accessor :images + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @images = args[:images] if args.key?(:images) @build_step_images = args[:build_step_images] if args.key?(:build_step_images) + @images = args[:images] if args.key?(:images) end end @@ -878,12 +879,6 @@ module Google class SourceProvenance include Google::Apis::Core::Hashable - # StorageSource describes the location of the source in an archive file in - # Google Cloud Storage. - # Corresponds to the JSON property `resolvedStorageSource` - # @return [Google::Apis::CloudbuildV1::StorageSource] - attr_accessor :resolved_storage_source - # Hash(es) of the build source, which can be used to verify that the original # source integrity was maintained in the build. Note that FileHashes will # only be populated if BuildOptions has requested a SourceProvenanceHash. @@ -902,15 +897,21 @@ module Google # @return [Google::Apis::CloudbuildV1::RepoSource] attr_accessor :resolved_repo_source + # StorageSource describes the location of the source in an archive file in + # Google Cloud Storage. + # Corresponds to the JSON property `resolvedStorageSource` + # @return [Google::Apis::CloudbuildV1::StorageSource] + attr_accessor :resolved_storage_source + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @resolved_storage_source = args[:resolved_storage_source] if args.key?(:resolved_storage_source) @file_hashes = args[:file_hashes] if args.key?(:file_hashes) @resolved_repo_source = args[:resolved_repo_source] if args.key?(:resolved_repo_source) + @resolved_storage_source = args[:resolved_storage_source] if args.key?(:resolved_storage_source) end end diff --git a/generated/google/apis/cloudbuild_v1/representations.rb b/generated/google/apis/cloudbuild_v1/representations.rb index ba3060c62..ee4a6cafd 100644 --- a/generated/google/apis/cloudbuild_v1/representations.rb +++ b/generated/google/apis/cloudbuild_v1/representations.rb @@ -46,13 +46,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class BuildStep + class HashProp class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class HashProp + class BuildStep class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -151,12 +151,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' end end @@ -187,24 +187,24 @@ module Google end end - class BuildStep - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :dir, as: 'dir' - collection :wait_for, as: 'waitFor' - collection :env, as: 'env' - collection :args, as: 'args' - property :name, as: 'name' - property :entrypoint, as: 'entrypoint' - property :id, as: 'id' - end - end - class HashProp # @private class Representation < Google::Apis::Core::JsonRepresentation - property :value, :base64 => true, as: 'value' property :type, as: 'type' + property :value, :base64 => true, as: 'value' + end + end + + class BuildStep + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :entrypoint, as: 'entrypoint' + property :id, as: 'id' + property :dir, as: 'dir' + collection :env, as: 'env' + collection :wait_for, as: 'waitFor' + collection :args, as: 'args' + property :name, as: 'name' end end @@ -234,29 +234,36 @@ module Google class BuildTrigger # @private class Representation < Google::Apis::Core::JsonRepresentation - property :filename, as: 'filename' + property :disabled, as: 'disabled' + property :create_time, as: 'createTime' property :trigger_template, as: 'triggerTemplate', class: Google::Apis::CloudbuildV1::RepoSource, decorator: Google::Apis::CloudbuildV1::RepoSource::Representation + property :filename, as: 'filename' property :id, as: 'id' property :build, as: 'build', class: Google::Apis::CloudbuildV1::Build, decorator: Google::Apis::CloudbuildV1::Build::Representation hash :substitutions, as: 'substitutions' property :description, as: 'description' - property :disabled, as: 'disabled' - property :create_time, as: 'createTime' end end class Build # @private class Representation < Google::Apis::Core::JsonRepresentation - property :source, as: 'source', class: Google::Apis::CloudbuildV1::Source, decorator: Google::Apis::CloudbuildV1::Source::Representation + 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 :options, as: 'options', class: Google::Apis::CloudbuildV1::BuildOptions, decorator: Google::Apis::CloudbuildV1::BuildOptions::Representation - property :status_detail, as: 'statusDetail' - property :status, as: 'status' + property :source, as: 'source', class: Google::Apis::CloudbuildV1::Source, decorator: Google::Apis::CloudbuildV1::Source::Representation + property :timeout, as: 'timeout' + property :status, as: 'status' + property :status_detail, as: 'statusDetail' property :results, as: 'results', class: Google::Apis::CloudbuildV1::Results, decorator: Google::Apis::CloudbuildV1::Results::Representation property :logs_bucket, as: 'logsBucket' @@ -264,15 +271,8 @@ module Google property :build_trigger_id, as: 'buildTriggerId' property :id, as: 'id' - hash :substitutions, as: 'substitutions' property :start_time, as: 'startTime' - property :source_provenance, as: 'sourceProvenance', class: Google::Apis::CloudbuildV1::SourceProvenance, decorator: Google::Apis::CloudbuildV1::SourceProvenance::Representation - - property :create_time, as: 'createTime' - collection :images, as: 'images' - property :project_id, as: 'projectId' - property :finish_time, as: 'finishTime' - property :log_url, as: 'logUrl' + hash :substitutions, as: 'substitutions' end end @@ -330,9 +330,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 @@ -347,12 +347,12 @@ module Google class SourceProvenance # @private class Representation < Google::Apis::Core::JsonRepresentation - property :resolved_storage_source, as: 'resolvedStorageSource', class: Google::Apis::CloudbuildV1::StorageSource, decorator: Google::Apis::CloudbuildV1::StorageSource::Representation - hash :file_hashes, as: 'fileHashes', class: Google::Apis::CloudbuildV1::FileHashes, decorator: Google::Apis::CloudbuildV1::FileHashes::Representation property :resolved_repo_source, as: 'resolvedRepoSource', class: Google::Apis::CloudbuildV1::RepoSource, decorator: Google::Apis::CloudbuildV1::RepoSource::Representation + property :resolved_storage_source, as: 'resolvedStorageSource', class: Google::Apis::CloudbuildV1::StorageSource, decorator: Google::Apis::CloudbuildV1::StorageSource::Representation + end end diff --git a/generated/google/apis/cloudbuild_v1/service.rb b/generated/google/apis/cloudbuild_v1/service.rb index 1ddd573a9..2b2d4b6c1 100644 --- a/generated/google/apis/cloudbuild_v1/service.rb +++ b/generated/google/apis/cloudbuild_v1/service.rb @@ -46,53 +46,17 @@ 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. # @param [String] id # ID of the build. # @param [Google::Apis::CloudbuildV1::CancelBuildRequest] cancel_build_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 # @@ -105,7 +69,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 cancel_build(project_id, id, cancel_build_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def cancel_build(project_id, id, cancel_build_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/projects/{projectId}/builds/{id}:cancel', options) command.request_representation = Google::Apis::CloudbuildV1::CancelBuildRequest::Representation command.request_object = cancel_build_request_object @@ -113,8 +77,8 @@ module Google command.response_class = Google::Apis::CloudbuildV1::Build command.params['projectId'] = project_id unless project_id.nil? command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -125,11 +89,11 @@ module Google # ID of the project. # @param [String] id # ID of the build. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -142,14 +106,14 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_build(project_id, id, fields: nil, quota_user: nil, options: nil, &block) + def get_project_build(project_id, id, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/projects/{projectId}/builds/{id}', options) command.response_representation = Google::Apis::CloudbuildV1::Build::Representation command.response_class = Google::Apis::CloudbuildV1::Build command.params['projectId'] = project_id unless project_id.nil? command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -158,17 +122,17 @@ 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 # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -181,16 +145,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_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, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/projects/{projectId}/builds', options) command.response_representation = Google::Apis::CloudbuildV1::ListBuildsResponse::Representation command.response_class = Google::Apis::CloudbuildV1::ListBuildsResponse command.params['projectId'] = project_id unless project_id.nil? + command.query['filter'] = filter unless filter.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['filter'] = filter unless filter.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Starts a build with the specified configuration. + # The long-running Operation returned by this method will include the ID of + # the build, which can be passed to GetBuild to determine its status (e.g., + # success or failure). + # @param [String] project_id + # ID of the project. + # @param [Google::Apis::CloudbuildV1::Build] build_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudbuildV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudbuildV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_build(project_id, build_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/projects/{projectId}/builds', options) + command.request_representation = Google::Apis::CloudbuildV1::Build::Representation + command.request_object = build_object + command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation + command.response_class = Google::Apis::CloudbuildV1::Operation + command.params['projectId'] = project_id unless project_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Creates a new BuildTrigger. + # This API is experimental. + # @param [String] project_id + # ID of the project for which to configure automatic builds. + # @param [Google::Apis::CloudbuildV1::BuildTrigger] build_trigger_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudbuildV1::BuildTrigger] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudbuildV1::BuildTrigger] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_trigger(project_id, build_trigger_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/projects/{projectId}/triggers', options) + command.request_representation = Google::Apis::CloudbuildV1::BuildTrigger::Representation + command.request_object = build_trigger_object + command.response_representation = Google::Apis::CloudbuildV1::BuildTrigger::Representation + command.response_class = Google::Apis::CloudbuildV1::BuildTrigger + 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 @@ -200,11 +234,11 @@ module Google # ID of the project that owns the trigger. # @param [String] trigger_id # ID of the BuildTrigger to delete. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -217,14 +251,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 delete_project_trigger(project_id, trigger_id, fields: nil, quota_user: nil, options: nil, &block) + def delete_project_trigger(project_id, trigger_id, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/projects/{projectId}/triggers/{triggerId}', options) command.response_representation = Google::Apis::CloudbuildV1::Empty::Representation command.response_class = Google::Apis::CloudbuildV1::Empty command.params['projectId'] = project_id unless project_id.nil? command.params['triggerId'] = trigger_id unless trigger_id.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -234,11 +268,11 @@ module Google # ID of the project that owns the trigger. # @param [String] trigger_id # ID of the BuildTrigger to get. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -251,14 +285,14 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_trigger(project_id, trigger_id, fields: nil, quota_user: nil, options: nil, &block) + def get_project_trigger(project_id, trigger_id, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/projects/{projectId}/triggers/{triggerId}', options) command.response_representation = Google::Apis::CloudbuildV1::BuildTrigger::Representation command.response_class = Google::Apis::CloudbuildV1::BuildTrigger command.params['projectId'] = project_id unless project_id.nil? command.params['triggerId'] = trigger_id unless trigger_id.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -266,11 +300,11 @@ module Google # This API is experimental. # @param [String] project_id # ID of the project for which to list BuildTriggers. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -283,13 +317,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_project_triggers(project_id, fields: nil, quota_user: nil, options: nil, &block) + def list_project_triggers(project_id, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/projects/{projectId}/triggers', options) command.response_representation = Google::Apis::CloudbuildV1::ListBuildTriggersResponse::Representation command.response_class = Google::Apis::CloudbuildV1::ListBuildTriggersResponse command.params['projectId'] = project_id unless project_id.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -300,11 +334,11 @@ module Google # @param [String] trigger_id # ID of the BuildTrigger to update. # @param [Google::Apis::CloudbuildV1::BuildTrigger] build_trigger_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -317,7 +351,7 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def patch_project_trigger(project_id, trigger_id, build_trigger_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def patch_project_trigger(project_id, trigger_id, build_trigger_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/projects/{projectId}/triggers/{triggerId}', options) command.request_representation = Google::Apis::CloudbuildV1::BuildTrigger::Representation command.request_object = build_trigger_object @@ -325,42 +359,8 @@ module Google command.response_class = Google::Apis::CloudbuildV1::BuildTrigger command.params['projectId'] = project_id unless project_id.nil? command.params['triggerId'] = trigger_id unless trigger_id.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates a new BuildTrigger. - # This API is experimental. - # @param [String] project_id - # ID of the project for which to configure automatic builds. - # @param [Google::Apis::CloudbuildV1::BuildTrigger] build_trigger_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should 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::BuildTrigger] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudbuildV1::BuildTrigger] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_trigger(project_id, build_trigger_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/projects/{projectId}/triggers', options) - command.request_representation = Google::Apis::CloudbuildV1::BuildTrigger::Representation - command.request_object = build_trigger_object - command.response_representation = Google::Apis::CloudbuildV1::BuildTrigger::Representation - command.response_class = Google::Apis::CloudbuildV1::BuildTrigger - 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 @@ -377,11 +377,11 @@ module Google # @param [String] name # The name of the operation resource to be cancelled. # @param [Google::Apis::CloudbuildV1::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 # @@ -394,15 +394,15 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def cancel_operation(name, cancel_operation_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:cancel', options) command.request_representation = Google::Apis::CloudbuildV1::CancelOperationRequest::Representation command.request_object = cancel_operation_request_object command.response_representation = Google::Apis::CloudbuildV1::Empty::Representation command.response_class = Google::Apis::CloudbuildV1::Empty command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -412,17 +412,17 @@ module Google # to use different resource name schemes, such as `users/*/operations`. # @param [String] name # The name of the operation collection. + # @param [String] filter + # The standard list filter. # @param [String] page_token # The standard list page token. # @param [Fixnum] page_size # The standard list page size. - # @param [String] filter - # The standard list filter. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -435,16 +435,16 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_operations(name, page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_operations(name, filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', options) command.response_representation = Google::Apis::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['filter'] = filter unless filter.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -453,11 +453,11 @@ module Google # service. # @param [String] name # The name of the operation resource. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -470,13 +470,13 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_operation(name, fields: nil, quota_user: nil, options: nil, &block) + def get_operation(name, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', options) command.response_representation = Google::Apis::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? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/clouddebugger_v2.rb b/generated/google/apis/clouddebugger_v2.rb index 191445d66..85f11832b 100644 --- a/generated/google/apis/clouddebugger_v2.rb +++ b/generated/google/apis/clouddebugger_v2.rb @@ -26,7 +26,7 @@ module Google # @see http://cloud.google.com/debugger module ClouddebuggerV2 VERSION = 'V2' - REVISION = '20170214' + REVISION = '20170322' # Manage cloud debugger AUTH_CLOUD_DEBUGGER = 'https://www.googleapis.com/auth/cloud_debugger' diff --git a/generated/google/apis/clouddebugger_v2/classes.rb b/generated/google/apis/clouddebugger_v2/classes.rb index edcd1f0c5..9c675cc22 100644 --- a/generated/google/apis/clouddebugger_v2/classes.rb +++ b/generated/google/apis/clouddebugger_v2/classes.rb @@ -22,22 +22,70 @@ module Google module Apis module ClouddebuggerV2 - # A CloudRepoSourceContext denotes a particular revision in a cloud - # repo (a repo hosted by the Google Cloud Platform). - class CloudRepoSourceContext + # A CloudWorkspaceSourceContext denotes a workspace at a particular snapshot. + class CloudWorkspaceSourceContext include Google::Apis::Core::Hashable - # A unique identifier for a cloud repo. - # Corresponds to the JSON property `repoId` - # @return [Google::Apis::ClouddebuggerV2::RepoId] - attr_accessor :repo_id + # The ID of the snapshot. + # An empty snapshot_id refers to the most recent snapshot. + # Corresponds to the JSON property `snapshotId` + # @return [String] + attr_accessor :snapshot_id + + # A CloudWorkspaceId is a unique identifier for a cloud workspace. + # A cloud workspace is a place associated with a repo where modified files + # can be stored before they are committed. + # Corresponds to the JSON property `workspaceId` + # @return [Google::Apis::ClouddebuggerV2::CloudWorkspaceId] + attr_accessor :workspace_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @snapshot_id = args[:snapshot_id] if args.key?(:snapshot_id) + @workspace_id = args[:workspace_id] if args.key?(:workspace_id) + end + end + + # Response for updating an active breakpoint. + # The message is defined to allow future extensions. + class UpdateActiveBreakpointResponse + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # A SourceContext referring to a Gerrit project. + class GerritSourceContext + include Google::Apis::Core::Hashable + + # The full project name within the host. Projects may be nested, so + # "project/subproject" is a valid project name. + # The "repo name" is hostURI/project. + # Corresponds to the JSON property `gerritProject` + # @return [String] + attr_accessor :gerrit_project # An alias to a repo revision. # Corresponds to the JSON property `aliasContext` # @return [Google::Apis::ClouddebuggerV2::AliasContext] attr_accessor :alias_context - # A revision ID. + # The URI of a running Gerrit instance. + # Corresponds to the JSON property `hostUri` + # @return [String] + attr_accessor :host_uri + + # A revision (commit) ID. # Corresponds to the JSON property `revisionId` # @return [String] attr_accessor :revision_id @@ -53,13 +101,332 @@ module Google # Update properties of this object def update!(**args) - @repo_id = args[:repo_id] if args.key?(:repo_id) + @gerrit_project = args[:gerrit_project] if args.key?(:gerrit_project) @alias_context = args[:alias_context] if args.key?(:alias_context) + @host_uri = args[:host_uri] if args.key?(:host_uri) @revision_id = args[:revision_id] if args.key?(:revision_id) @alias_name = args[:alias_name] if args.key?(:alias_name) end end + # A CloudWorkspaceId is a unique identifier for a cloud workspace. + # A cloud workspace is a place associated with a repo where modified files + # can be stored before they are committed. + class CloudWorkspaceId + include Google::Apis::Core::Hashable + + # The unique name of the workspace within the repo. This is the name + # chosen by the client in the Source API's CreateWorkspace method. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # A unique identifier for a cloud repo. + # Corresponds to the JSON property `repoId` + # @return [Google::Apis::ClouddebuggerV2::RepoId] + attr_accessor :repo_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + @repo_id = args[:repo_id] if args.key?(:repo_id) + end + end + + # Response for listing breakpoints. + class ListBreakpointsResponse + include Google::Apis::Core::Hashable + + # List of breakpoints matching the request. + # The fields `id` and `location` are guaranteed to be set on each breakpoint. + # The fields: `stack_frames`, `evaluated_expressions` and `variable_table` + # are cleared on each breakpoint regardless of it's status. + # Corresponds to the JSON property `breakpoints` + # @return [Array] + attr_accessor :breakpoints + + # A wait token that can be used in the next call to `list` (REST) or + # `ListBreakpoints` (RPC) to block until the list of breakpoints has changes. + # Corresponds to the JSON property `nextWaitToken` + # @return [String] + attr_accessor :next_wait_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @breakpoints = args[:breakpoints] if args.key?(:breakpoints) + @next_wait_token = args[:next_wait_token] if args.key?(:next_wait_token) + end + end + + # Represents the breakpoint specification, status and results. + class Breakpoint + include Google::Apis::Core::Hashable + + # List of read-only expressions to evaluate at the breakpoint location. + # The expressions are composed using expressions in the programming language + # at the source location. If the breakpoint action is `LOG`, the evaluated + # expressions are included in log statements. + # Corresponds to the JSON property `expressions` + # @return [Array] + attr_accessor :expressions + + # Values of evaluated expressions at breakpoint time. + # The evaluated expressions appear in exactly the same order they + # are listed in the `expressions` field. + # The `name` field holds the original expression text, the `value` or + # `members` field holds the result of the evaluated expression. + # If the expression cannot be evaluated, the `status` inside the `Variable` + # will indicate an error and contain the error text. + # Corresponds to the JSON property `evaluatedExpressions` + # @return [Array] + attr_accessor :evaluated_expressions + + # When true, indicates that this is a final result and the + # breakpoint state will not change from here on. + # Corresponds to the JSON property `isFinalState` + # @return [Boolean] + attr_accessor :is_final_state + alias_method :is_final_state?, :is_final_state + + # The stack at breakpoint time. + # Corresponds to the JSON property `stackFrames` + # @return [Array] + attr_accessor :stack_frames + + # Condition that triggers the breakpoint. + # The condition is a compound boolean expression composed using expressions + # in a programming language at the source location. + # Corresponds to the JSON property `condition` + # @return [String] + attr_accessor :condition + + # Represents a contextual status message. + # The message can indicate an error or informational status, and refer to + # specific parts of the containing object. + # For example, the `Breakpoint.status` field can indicate an error referring + # to the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`. + # Corresponds to the JSON property `status` + # @return [Google::Apis::ClouddebuggerV2::StatusMessage] + attr_accessor :status + + # E-mail address of the user that created this breakpoint + # Corresponds to the JSON property `userEmail` + # @return [String] + attr_accessor :user_email + + # Action that the agent should perform when the code at the + # breakpoint location is hit. + # Corresponds to the JSON property `action` + # @return [String] + attr_accessor :action + + # Indicates the severity of the log. Only relevant when action is `LOG`. + # Corresponds to the JSON property `logLevel` + # @return [String] + attr_accessor :log_level + + # Breakpoint identifier, unique in the scope of the debuggee. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Represents a location in the source code. + # Corresponds to the JSON property `location` + # @return [Google::Apis::ClouddebuggerV2::SourceLocation] + attr_accessor :location + + # Time this breakpoint was finalized as seen by the server in seconds + # resolution. + # Corresponds to the JSON property `finalTime` + # @return [String] + attr_accessor :final_time + + # The `variable_table` exists to aid with computation, memory and network + # traffic optimization. It enables storing a variable once and reference + # it from multiple variables, including variables stored in the + # `variable_table` itself. + # For example, the same `this` object, which may appear at many levels of + # the stack, can have all of its data stored once in this table. The + # stack frame variables then would hold only a reference to it. + # The variable `var_table_index` field is an index into this repeated field. + # The stored objects are nameless and get their name from the referencing + # variable. The effective variable is a merge of the referencing variable + # and the referenced variable. + # Corresponds to the JSON property `variableTable` + # @return [Array] + attr_accessor :variable_table + + # Time this breakpoint was created by the server in seconds resolution. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Only relevant when action is `LOG`. Defines the message to log when + # the breakpoint hits. The message may include parameter placeholders `$0`, + # `$1`, etc. These placeholders are replaced with the evaluated value + # of the appropriate expression. Expressions not referenced in + # `log_message_format` are not logged. + # Example: `Message received, id = $0, count = $1` with + # `expressions` = `[ message.id, message.count ]`. + # Corresponds to the JSON property `logMessageFormat` + # @return [String] + attr_accessor :log_message_format + + # A set of custom breakpoint properties, populated by the agent, to be + # displayed to the user. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @expressions = args[:expressions] if args.key?(:expressions) + @evaluated_expressions = args[:evaluated_expressions] if args.key?(:evaluated_expressions) + @is_final_state = args[:is_final_state] if args.key?(:is_final_state) + @stack_frames = args[:stack_frames] if args.key?(:stack_frames) + @condition = args[:condition] if args.key?(:condition) + @status = args[:status] if args.key?(:status) + @user_email = args[:user_email] if args.key?(:user_email) + @action = args[:action] if args.key?(:action) + @log_level = args[:log_level] if args.key?(:log_level) + @id = args[:id] if args.key?(:id) + @location = args[:location] if args.key?(:location) + @final_time = args[:final_time] if args.key?(:final_time) + @variable_table = args[:variable_table] if args.key?(:variable_table) + @create_time = args[:create_time] if args.key?(:create_time) + @log_message_format = args[:log_message_format] if args.key?(:log_message_format) + @labels = args[:labels] if args.key?(:labels) + end + end + + # Request to update an active breakpoint. + class UpdateActiveBreakpointRequest + include Google::Apis::Core::Hashable + + # Represents the breakpoint specification, status and results. + # Corresponds to the JSON property `breakpoint` + # @return [Google::Apis::ClouddebuggerV2::Breakpoint] + attr_accessor :breakpoint + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @breakpoint = args[:breakpoint] if args.key?(:breakpoint) + end + end + + # Response for setting a breakpoint. + class SetBreakpointResponse + include Google::Apis::Core::Hashable + + # Represents the breakpoint specification, status and results. + # Corresponds to the JSON property `breakpoint` + # @return [Google::Apis::ClouddebuggerV2::Breakpoint] + attr_accessor :breakpoint + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @breakpoint = args[:breakpoint] if args.key?(:breakpoint) + end + end + + # A SourceContext is a reference to a tree of files. A SourceContext together + # with a path point to a unique revision of a single file or directory. + class SourceContext + include Google::Apis::Core::Hashable + + # A GitSourceContext denotes a particular revision in a third party Git + # repository (e.g. GitHub). + # Corresponds to the JSON property `git` + # @return [Google::Apis::ClouddebuggerV2::GitSourceContext] + attr_accessor :git + + # A SourceContext referring to a Gerrit project. + # Corresponds to the JSON property `gerrit` + # @return [Google::Apis::ClouddebuggerV2::GerritSourceContext] + attr_accessor :gerrit + + # A CloudRepoSourceContext denotes a particular revision in a cloud + # repo (a repo hosted by the Google Cloud Platform). + # Corresponds to the JSON property `cloudRepo` + # @return [Google::Apis::ClouddebuggerV2::CloudRepoSourceContext] + attr_accessor :cloud_repo + + # A CloudWorkspaceSourceContext denotes a workspace at a particular snapshot. + # Corresponds to the JSON property `cloudWorkspace` + # @return [Google::Apis::ClouddebuggerV2::CloudWorkspaceSourceContext] + attr_accessor :cloud_workspace + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @git = args[:git] if args.key?(:git) + @gerrit = args[:gerrit] if args.key?(:gerrit) + @cloud_repo = args[:cloud_repo] if args.key?(:cloud_repo) + @cloud_workspace = args[:cloud_workspace] if args.key?(:cloud_workspace) + end + end + + # A CloudRepoSourceContext denotes a particular revision in a cloud + # repo (a repo hosted by the Google Cloud Platform). + class CloudRepoSourceContext + include Google::Apis::Core::Hashable + + # A revision ID. + # Corresponds to the JSON property `revisionId` + # @return [String] + attr_accessor :revision_id + + # The name of an alias (branch, tag, etc.). + # Corresponds to the JSON property `aliasName` + # @return [String] + attr_accessor :alias_name + + # A unique identifier for a cloud repo. + # Corresponds to the JSON property `repoId` + # @return [Google::Apis::ClouddebuggerV2::RepoId] + attr_accessor :repo_id + + # An alias to a repo revision. + # Corresponds to the JSON property `aliasContext` + # @return [Google::Apis::ClouddebuggerV2::AliasContext] + attr_accessor :alias_context + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @revision_id = args[:revision_id] if args.key?(:revision_id) + @alias_name = args[:alias_name] if args.key?(:alias_name) + @repo_id = args[:repo_id] if args.key?(:repo_id) + @alias_context = args[:alias_context] if args.key?(:alias_context) + end + end + # Request to register a debuggee. class RegisterDebuggeeRequest include Google::Apis::Core::Hashable @@ -273,19 +640,6 @@ module Google class Variable include Google::Apis::Core::Hashable - # Variable type (e.g. `MyClass`). If the variable is split with - # `var_table_index`, `type` goes next to `value`. The interpretation of - # a type is agent specific. It is recommended to include the dynamic type - # rather than a static type of an object. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Simple value of the variable. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - # Reference to a variable in the shared variable table. More than # one variable can reference the same variable in the table. The # `var_table_index` field is an index into `variable_table` in Breakpoint. @@ -293,6 +647,11 @@ module Google # @return [Fixnum] attr_accessor :var_table_index + # Simple value of the variable. + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + # Members contained or pointed to by the variable. # Corresponds to the JSON property `members` # @return [Array] @@ -312,18 +671,26 @@ module Google # @return [String] attr_accessor :name + # Variable type (e.g. `MyClass`). If the variable is split with + # `var_table_index`, `type` goes next to `value`. The interpretation of + # a type is agent specific. It is recommended to include the dynamic type + # rather than a static type of an object. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @type = args[:type] if args.key?(:type) - @value = args[:value] if args.key?(:value) @var_table_index = args[:var_table_index] if args.key?(:var_table_index) + @value = args[:value] if args.key?(:value) @members = args[:members] if args.key?(:members) @status = args[:status] if args.key?(:status) @name = args[:name] if args.key?(:name) + @type = args[:type] if args.key?(:type) end end @@ -331,17 +698,6 @@ module Google class StackFrame include Google::Apis::Core::Hashable - # Set of local variables at the stack frame location. - # Note that this might not be populated for all stack frames. - # Corresponds to the JSON property `locals` - # @return [Array] - attr_accessor :locals - - # Represents a location in the source code. - # Corresponds to the JSON property `location` - # @return [Google::Apis::ClouddebuggerV2::SourceLocation] - attr_accessor :location - # Demangled function name at the call site. # Corresponds to the JSON property `function` # @return [String] @@ -353,16 +709,27 @@ module Google # @return [Array] attr_accessor :arguments + # Set of local variables at the stack frame location. + # Note that this might not be populated for all stack frames. + # Corresponds to the JSON property `locals` + # @return [Array] + attr_accessor :locals + + # Represents a location in the source code. + # Corresponds to the JSON property `location` + # @return [Google::Apis::ClouddebuggerV2::SourceLocation] + attr_accessor :location + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @locals = args[:locals] if args.key?(:locals) - @location = args[:location] if args.key?(:location) @function = args[:function] if args.key?(:function) @arguments = args[:arguments] if args.key?(:arguments) + @locals = args[:locals] if args.key?(:locals) + @location = args[:location] if args.key?(:location) end end @@ -370,25 +737,25 @@ module Google class RepoId include Google::Apis::Core::Hashable + # A server-assigned, globally unique identifier. + # Corresponds to the JSON property `uid` + # @return [String] + attr_accessor :uid + # Selects a repo using a Google Cloud Platform project ID # (e.g. winged-cargo-31) and a repo name within that project. # Corresponds to the JSON property `projectRepoId` # @return [Google::Apis::ClouddebuggerV2::ProjectRepoId] attr_accessor :project_repo_id - # A server-assigned, globally unique identifier. - # Corresponds to the JSON property `uid` - # @return [String] - attr_accessor :uid - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @project_repo_id = args[:project_repo_id] if args.key?(:project_repo_id) @uid = args[:uid] if args.key?(:uid) + @project_repo_id = args[:project_repo_id] if args.key?(:project_repo_id) end end @@ -450,6 +817,29 @@ module Google end end + # Response for listing debuggees. + class ListDebuggeesResponse + include Google::Apis::Core::Hashable + + # List of debuggees accessible to the calling user. + # Note that the `description` field is the only human readable field + # that should be displayed to the user. + # The fields `debuggee.id` and `description` fields are guaranteed to be + # set on each debuggee. + # Corresponds to the JSON property `debuggees` + # @return [Array] + attr_accessor :debuggees + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @debuggees = args[:debuggees] if args.key?(:debuggees) + end + end + # An alias to a repo revision. class AliasContext include Google::Apis::Core::Hashable @@ -475,29 +865,6 @@ module Google end end - # Response for listing debuggees. - class ListDebuggeesResponse - include Google::Apis::Core::Hashable - - # List of debuggees accessible to the calling user. - # Note that the `description` field is the only human readable field - # that should be displayed to the user. - # The fields `debuggee.id` and `description` fields are guaranteed to be - # set on each debuggee. - # Corresponds to the JSON property `debuggees` - # @return [Array] - attr_accessor :debuggees - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @debuggees = args[:debuggees] if args.key?(:debuggees) - 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: @@ -521,24 +888,24 @@ module Google class SourceLocation include Google::Apis::Core::Hashable - # Line inside the file. The first line in the file has the value `1`. - # Corresponds to the JSON property `line` - # @return [Fixnum] - attr_accessor :line - # Path to the source file within the source context of the target binary. # Corresponds to the JSON property `path` # @return [String] attr_accessor :path + # Line inside the file. The first line in the file has the value `1`. + # Corresponds to the JSON property `line` + # @return [Fixnum] + attr_accessor :line + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @line = args[:line] if args.key?(:line) @path = args[:path] if args.key?(:path) + @line = args[:line] if args.key?(:line) end end @@ -550,24 +917,11 @@ module Google class Debuggee include Google::Apis::Core::Hashable - # Project the debuggee is associated with. - # Use the project number when registering a Google Cloud Platform project. - # Corresponds to the JSON property `project` - # @return [String] - attr_accessor :project - # Unique identifier for the debuggee generated by the controller service. # Corresponds to the JSON property `id` # @return [String] attr_accessor :id - # If set to `true`, indicates that the agent should disable itself and - # detach from the debuggee. - # Corresponds to the JSON property `isDisabled` - # @return [Boolean] - attr_accessor :is_disabled - alias_method :is_disabled?, :is_disabled - # Version ID of the agent release. The version ID is structured as # following: `domain/type/vmajor.minor` (for example # `google.com/gcp-java/v1.1`). @@ -575,6 +929,13 @@ module Google # @return [String] attr_accessor :agent_version + # If set to `true`, indicates that the agent should disable itself and + # detach from the debuggee. + # Corresponds to the JSON property `isDisabled` + # @return [Boolean] + attr_accessor :is_disabled + alias_method :is_disabled?, :is_disabled + # Debuggee uniquifier within the project. # Any string that identifies the application within the project can be used. # Including environment and version or build IDs is recommended. @@ -629,16 +990,21 @@ module Google attr_accessor :is_inactive alias_method :is_inactive?, :is_inactive + # Project the debuggee is associated with. + # Use the project number when registering a Google Cloud Platform project. + # Corresponds to the JSON property `project` + # @return [String] + attr_accessor :project + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @project = args[:project] if args.key?(:project) @id = args[:id] if args.key?(:id) - @is_disabled = args[:is_disabled] if args.key?(:is_disabled) @agent_version = args[:agent_version] if args.key?(:agent_version) + @is_disabled = args[:is_disabled] if args.key?(:is_disabled) @uniquifier = args[:uniquifier] if args.key?(:uniquifier) @description = args[:description] if args.key?(:description) @source_contexts = args[:source_contexts] if args.key?(:source_contexts) @@ -646,41 +1012,7 @@ module Google @labels = args[:labels] if args.key?(:labels) @status = args[:status] if args.key?(:status) @is_inactive = args[:is_inactive] if args.key?(:is_inactive) - end - end - - # Response for listing active breakpoints. - class ListActiveBreakpointsResponse - include Google::Apis::Core::Hashable - - # List of all active breakpoints. - # The fields `id` and `location` are guaranteed to be set on each breakpoint. - # Corresponds to the JSON property `breakpoints` - # @return [Array] - attr_accessor :breakpoints - - # The `wait_expired` field is set to true by the server when the - # request times out and the field `success_on_timeout` is set to true. - # Corresponds to the JSON property `waitExpired` - # @return [Boolean] - attr_accessor :wait_expired - alias_method :wait_expired?, :wait_expired - - # A wait token that can be used in the next method call to block until - # the list of breakpoints changes. - # Corresponds to the JSON property `nextWaitToken` - # @return [String] - attr_accessor :next_wait_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @breakpoints = args[:breakpoints] if args.key?(:breakpoints) - @wait_expired = args[:wait_expired] if args.key?(:wait_expired) - @next_wait_token = args[:next_wait_token] if args.key?(:next_wait_token) + @project = args[:project] if args.key?(:project) end end @@ -710,269 +1042,28 @@ module Google end end - # A CloudWorkspaceSourceContext denotes a workspace at a particular snapshot. - class CloudWorkspaceSourceContext + # Response for listing active breakpoints. + class ListActiveBreakpointsResponse include Google::Apis::Core::Hashable - # The ID of the snapshot. - # An empty snapshot_id refers to the most recent snapshot. - # Corresponds to the JSON property `snapshotId` - # @return [String] - attr_accessor :snapshot_id - - # A CloudWorkspaceId is a unique identifier for a cloud workspace. - # A cloud workspace is a place associated with a repo where modified files - # can be stored before they are committed. - # Corresponds to the JSON property `workspaceId` - # @return [Google::Apis::ClouddebuggerV2::CloudWorkspaceId] - attr_accessor :workspace_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @snapshot_id = args[:snapshot_id] if args.key?(:snapshot_id) - @workspace_id = args[:workspace_id] if args.key?(:workspace_id) - end - end - - # A SourceContext referring to a Gerrit project. - class GerritSourceContext - include Google::Apis::Core::Hashable - - # The full project name within the host. Projects may be nested, so - # "project/subproject" is a valid project name. - # The "repo name" is hostURI/project. - # Corresponds to the JSON property `gerritProject` - # @return [String] - attr_accessor :gerrit_project - - # An alias to a repo revision. - # Corresponds to the JSON property `aliasContext` - # @return [Google::Apis::ClouddebuggerV2::AliasContext] - attr_accessor :alias_context - - # The URI of a running Gerrit instance. - # Corresponds to the JSON property `hostUri` - # @return [String] - attr_accessor :host_uri - - # A revision (commit) ID. - # Corresponds to the JSON property `revisionId` - # @return [String] - attr_accessor :revision_id - - # The name of an alias (branch, tag, etc.). - # Corresponds to the JSON property `aliasName` - # @return [String] - attr_accessor :alias_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @gerrit_project = args[:gerrit_project] if args.key?(:gerrit_project) - @alias_context = args[:alias_context] if args.key?(:alias_context) - @host_uri = args[:host_uri] if args.key?(:host_uri) - @revision_id = args[:revision_id] if args.key?(:revision_id) - @alias_name = args[:alias_name] if args.key?(:alias_name) - end - end - - # Response for updating an active breakpoint. - # The message is defined to allow future extensions. - class UpdateActiveBreakpointResponse - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # A CloudWorkspaceId is a unique identifier for a cloud workspace. - # A cloud workspace is a place associated with a repo where modified files - # can be stored before they are committed. - class CloudWorkspaceId - include Google::Apis::Core::Hashable - - # A unique identifier for a cloud repo. - # Corresponds to the JSON property `repoId` - # @return [Google::Apis::ClouddebuggerV2::RepoId] - attr_accessor :repo_id - - # The unique name of the workspace within the repo. This is the name - # chosen by the client in the Source API's CreateWorkspace method. - # 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) - @repo_id = args[:repo_id] if args.key?(:repo_id) - @name = args[:name] if args.key?(:name) - end - end - - # Response for listing breakpoints. - class ListBreakpointsResponse - include Google::Apis::Core::Hashable - - # List of breakpoints matching the request. - # The fields `id` and `location` are guaranteed to be set on each breakpoint. - # The fields: `stack_frames`, `evaluated_expressions` and `variable_table` - # are cleared on each breakpoint regardless of it's status. - # Corresponds to the JSON property `breakpoints` - # @return [Array] - attr_accessor :breakpoints - - # A wait token that can be used in the next call to `list` (REST) or - # `ListBreakpoints` (RPC) to block until the list of breakpoints has changes. + # A wait token that can be used in the next method call to block until + # the list of breakpoints changes. # Corresponds to the JSON property `nextWaitToken` # @return [String] attr_accessor :next_wait_token - def initialize(**args) - update!(**args) - end + # List of all active breakpoints. + # The fields `id` and `location` are guaranteed to be set on each breakpoint. + # Corresponds to the JSON property `breakpoints` + # @return [Array] + attr_accessor :breakpoints - # Update properties of this object - def update!(**args) - @breakpoints = args[:breakpoints] if args.key?(:breakpoints) - @next_wait_token = args[:next_wait_token] if args.key?(:next_wait_token) - end - end - - # Represents the breakpoint specification, status and results. - class Breakpoint - include Google::Apis::Core::Hashable - - # List of read-only expressions to evaluate at the breakpoint location. - # The expressions are composed using expressions in the programming language - # at the source location. If the breakpoint action is `LOG`, the evaluated - # expressions are included in log statements. - # Corresponds to the JSON property `expressions` - # @return [Array] - attr_accessor :expressions - - # Values of evaluated expressions at breakpoint time. - # The evaluated expressions appear in exactly the same order they - # are listed in the `expressions` field. - # The `name` field holds the original expression text, the `value` or - # `members` field holds the result of the evaluated expression. - # If the expression cannot be evaluated, the `status` inside the `Variable` - # will indicate an error and contain the error text. - # Corresponds to the JSON property `evaluatedExpressions` - # @return [Array] - attr_accessor :evaluated_expressions - - # When true, indicates that this is a final result and the - # breakpoint state will not change from here on. - # Corresponds to the JSON property `isFinalState` + # The `wait_expired` field is set to true by the server when the + # request times out and the field `success_on_timeout` is set to true. + # Corresponds to the JSON property `waitExpired` # @return [Boolean] - attr_accessor :is_final_state - alias_method :is_final_state?, :is_final_state - - # The stack at breakpoint time. - # Corresponds to the JSON property `stackFrames` - # @return [Array] - attr_accessor :stack_frames - - # Condition that triggers the breakpoint. - # The condition is a compound boolean expression composed using expressions - # in a programming language at the source location. - # Corresponds to the JSON property `condition` - # @return [String] - attr_accessor :condition - - # Represents a contextual status message. - # The message can indicate an error or informational status, and refer to - # specific parts of the containing object. - # For example, the `Breakpoint.status` field can indicate an error referring - # to the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`. - # Corresponds to the JSON property `status` - # @return [Google::Apis::ClouddebuggerV2::StatusMessage] - attr_accessor :status - - # E-mail address of the user that created this breakpoint - # Corresponds to the JSON property `userEmail` - # @return [String] - attr_accessor :user_email - - # Action that the agent should perform when the code at the - # breakpoint location is hit. - # Corresponds to the JSON property `action` - # @return [String] - attr_accessor :action - - # Indicates the severity of the log. Only relevant when action is `LOG`. - # Corresponds to the JSON property `logLevel` - # @return [String] - attr_accessor :log_level - - # Breakpoint identifier, unique in the scope of the debuggee. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Represents a location in the source code. - # Corresponds to the JSON property `location` - # @return [Google::Apis::ClouddebuggerV2::SourceLocation] - attr_accessor :location - - # Time this breakpoint was finalized as seen by the server in seconds - # resolution. - # Corresponds to the JSON property `finalTime` - # @return [String] - attr_accessor :final_time - - # The `variable_table` exists to aid with computation, memory and network - # traffic optimization. It enables storing a variable once and reference - # it from multiple variables, including variables stored in the - # `variable_table` itself. - # For example, the same `this` object, which may appear at many levels of - # the stack, can have all of its data stored once in this table. The - # stack frame variables then would hold only a reference to it. - # The variable `var_table_index` field is an index into this repeated field. - # The stored objects are nameless and get their name from the referencing - # variable. The effective variable is a merge of the referencing variable - # and the referenced variable. - # Corresponds to the JSON property `variableTable` - # @return [Array] - attr_accessor :variable_table - - # A set of custom breakpoint properties, populated by the agent, to be - # displayed to the user. - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels - - # Only relevant when action is `LOG`. Defines the message to log when - # the breakpoint hits. The message may include parameter placeholders `$0`, - # `$1`, etc. These placeholders are replaced with the evaluated value - # of the appropriate expression. Expressions not referenced in - # `log_message_format` are not logged. - # Example: `Message received, id = $0, count = $1` with - # `expressions` = `[ message.id, message.count ]`. - # Corresponds to the JSON property `logMessageFormat` - # @return [String] - attr_accessor :log_message_format - - # Time this breakpoint was created by the server in seconds resolution. - # Corresponds to the JSON property `createTime` - # @return [String] - attr_accessor :create_time + attr_accessor :wait_expired + alias_method :wait_expired?, :wait_expired def initialize(**args) update!(**args) @@ -980,100 +1071,9 @@ module Google # Update properties of this object def update!(**args) - @expressions = args[:expressions] if args.key?(:expressions) - @evaluated_expressions = args[:evaluated_expressions] if args.key?(:evaluated_expressions) - @is_final_state = args[:is_final_state] if args.key?(:is_final_state) - @stack_frames = args[:stack_frames] if args.key?(:stack_frames) - @condition = args[:condition] if args.key?(:condition) - @status = args[:status] if args.key?(:status) - @user_email = args[:user_email] if args.key?(:user_email) - @action = args[:action] if args.key?(:action) - @log_level = args[:log_level] if args.key?(:log_level) - @id = args[:id] if args.key?(:id) - @location = args[:location] if args.key?(:location) - @final_time = args[:final_time] if args.key?(:final_time) - @variable_table = args[:variable_table] if args.key?(:variable_table) - @labels = args[:labels] if args.key?(:labels) - @log_message_format = args[:log_message_format] if args.key?(:log_message_format) - @create_time = args[:create_time] if args.key?(:create_time) - end - end - - # Request to update an active breakpoint. - class UpdateActiveBreakpointRequest - include Google::Apis::Core::Hashable - - # Represents the breakpoint specification, status and results. - # Corresponds to the JSON property `breakpoint` - # @return [Google::Apis::ClouddebuggerV2::Breakpoint] - attr_accessor :breakpoint - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @breakpoint = args[:breakpoint] if args.key?(:breakpoint) - end - end - - # Response for setting a breakpoint. - class SetBreakpointResponse - include Google::Apis::Core::Hashable - - # Represents the breakpoint specification, status and results. - # Corresponds to the JSON property `breakpoint` - # @return [Google::Apis::ClouddebuggerV2::Breakpoint] - attr_accessor :breakpoint - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @breakpoint = args[:breakpoint] if args.key?(:breakpoint) - end - end - - # A SourceContext is a reference to a tree of files. A SourceContext together - # with a path point to a unique revision of a single file or directory. - class SourceContext - include Google::Apis::Core::Hashable - - # A GitSourceContext denotes a particular revision in a third party Git - # repository (e.g. GitHub). - # Corresponds to the JSON property `git` - # @return [Google::Apis::ClouddebuggerV2::GitSourceContext] - attr_accessor :git - - # A SourceContext referring to a Gerrit project. - # Corresponds to the JSON property `gerrit` - # @return [Google::Apis::ClouddebuggerV2::GerritSourceContext] - attr_accessor :gerrit - - # A CloudRepoSourceContext denotes a particular revision in a cloud - # repo (a repo hosted by the Google Cloud Platform). - # Corresponds to the JSON property `cloudRepo` - # @return [Google::Apis::ClouddebuggerV2::CloudRepoSourceContext] - attr_accessor :cloud_repo - - # A CloudWorkspaceSourceContext denotes a workspace at a particular snapshot. - # Corresponds to the JSON property `cloudWorkspace` - # @return [Google::Apis::ClouddebuggerV2::CloudWorkspaceSourceContext] - attr_accessor :cloud_workspace - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @git = args[:git] if args.key?(:git) - @gerrit = args[:gerrit] if args.key?(:gerrit) - @cloud_repo = args[:cloud_repo] if args.key?(:cloud_repo) - @cloud_workspace = args[:cloud_workspace] if args.key?(:cloud_workspace) + @next_wait_token = args[:next_wait_token] if args.key?(:next_wait_token) + @breakpoints = args[:breakpoints] if args.key?(:breakpoints) + @wait_expired = args[:wait_expired] if args.key?(:wait_expired) end end end diff --git a/generated/google/apis/clouddebugger_v2/representations.rb b/generated/google/apis/clouddebugger_v2/representations.rb index 38aa87abb..989ac0a30 100644 --- a/generated/google/apis/clouddebugger_v2/representations.rb +++ b/generated/google/apis/clouddebugger_v2/representations.rb @@ -22,6 +22,60 @@ module Google module Apis module ClouddebuggerV2 + class CloudWorkspaceSourceContext + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpdateActiveBreakpointResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GerritSourceContext + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CloudWorkspaceId + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListBreakpointsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Breakpoint + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpdateActiveBreakpointRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SetBreakpointResponse + 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 CloudRepoSourceContext class Representation < Google::Apis::Core::JsonRepresentation; end @@ -88,13 +142,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class AliasContext + class ListDebuggeesResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ListDebuggeesResponse + class AliasContext class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -118,81 +172,129 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class ListActiveBreakpointsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class ProjectRepoId class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class CloudWorkspaceSourceContext + class ListActiveBreakpointsResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class GerritSourceContext - class Representation < Google::Apis::Core::JsonRepresentation; end + class CloudWorkspaceSourceContext + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :snapshot_id, as: 'snapshotId' + property :workspace_id, as: 'workspaceId', class: Google::Apis::ClouddebuggerV2::CloudWorkspaceId, decorator: Google::Apis::ClouddebuggerV2::CloudWorkspaceId::Representation - include Google::Apis::Core::JsonObjectSupport + end end class UpdateActiveBreakpointResponse - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end - include Google::Apis::Core::JsonObjectSupport + class GerritSourceContext + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :gerrit_project, as: 'gerritProject' + property :alias_context, as: 'aliasContext', class: Google::Apis::ClouddebuggerV2::AliasContext, decorator: Google::Apis::ClouddebuggerV2::AliasContext::Representation + + property :host_uri, as: 'hostUri' + property :revision_id, as: 'revisionId' + property :alias_name, as: 'aliasName' + end end class CloudWorkspaceId - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + property :repo_id, as: 'repoId', class: Google::Apis::ClouddebuggerV2::RepoId, decorator: Google::Apis::ClouddebuggerV2::RepoId::Representation - include Google::Apis::Core::JsonObjectSupport + end end class ListBreakpointsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :breakpoints, as: 'breakpoints', class: Google::Apis::ClouddebuggerV2::Breakpoint, decorator: Google::Apis::ClouddebuggerV2::Breakpoint::Representation - include Google::Apis::Core::JsonObjectSupport + property :next_wait_token, as: 'nextWaitToken' + end end class Breakpoint - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :expressions, as: 'expressions' + collection :evaluated_expressions, as: 'evaluatedExpressions', class: Google::Apis::ClouddebuggerV2::Variable, decorator: Google::Apis::ClouddebuggerV2::Variable::Representation - include Google::Apis::Core::JsonObjectSupport + property :is_final_state, as: 'isFinalState' + collection :stack_frames, as: 'stackFrames', class: Google::Apis::ClouddebuggerV2::StackFrame, decorator: Google::Apis::ClouddebuggerV2::StackFrame::Representation + + property :condition, as: 'condition' + property :status, as: 'status', class: Google::Apis::ClouddebuggerV2::StatusMessage, decorator: Google::Apis::ClouddebuggerV2::StatusMessage::Representation + + property :user_email, as: 'userEmail' + property :action, as: 'action' + property :log_level, as: 'logLevel' + property :id, as: 'id' + property :location, as: 'location', class: Google::Apis::ClouddebuggerV2::SourceLocation, decorator: Google::Apis::ClouddebuggerV2::SourceLocation::Representation + + property :final_time, as: 'finalTime' + collection :variable_table, as: 'variableTable', class: Google::Apis::ClouddebuggerV2::Variable, decorator: Google::Apis::ClouddebuggerV2::Variable::Representation + + property :create_time, as: 'createTime' + property :log_message_format, as: 'logMessageFormat' + hash :labels, as: 'labels' + end end class UpdateActiveBreakpointRequest - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :breakpoint, as: 'breakpoint', class: Google::Apis::ClouddebuggerV2::Breakpoint, decorator: Google::Apis::ClouddebuggerV2::Breakpoint::Representation - include Google::Apis::Core::JsonObjectSupport + end end class SetBreakpointResponse - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :breakpoint, as: 'breakpoint', class: Google::Apis::ClouddebuggerV2::Breakpoint, decorator: Google::Apis::ClouddebuggerV2::Breakpoint::Representation - include Google::Apis::Core::JsonObjectSupport + end end class SourceContext - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :git, as: 'git', class: Google::Apis::ClouddebuggerV2::GitSourceContext, decorator: Google::Apis::ClouddebuggerV2::GitSourceContext::Representation - include Google::Apis::Core::JsonObjectSupport + property :gerrit, as: 'gerrit', class: Google::Apis::ClouddebuggerV2::GerritSourceContext, decorator: Google::Apis::ClouddebuggerV2::GerritSourceContext::Representation + + property :cloud_repo, as: 'cloudRepo', class: Google::Apis::ClouddebuggerV2::CloudRepoSourceContext, decorator: Google::Apis::ClouddebuggerV2::CloudRepoSourceContext::Representation + + property :cloud_workspace, as: 'cloudWorkspace', class: Google::Apis::ClouddebuggerV2::CloudWorkspaceSourceContext, decorator: Google::Apis::ClouddebuggerV2::CloudWorkspaceSourceContext::Representation + + end end class CloudRepoSourceContext # @private class Representation < Google::Apis::Core::JsonRepresentation + property :revision_id, as: 'revisionId' + property :alias_name, as: 'aliasName' property :repo_id, as: 'repoId', class: Google::Apis::ClouddebuggerV2::RepoId, decorator: Google::Apis::ClouddebuggerV2::RepoId::Representation property :alias_context, as: 'aliasContext', class: Google::Apis::ClouddebuggerV2::AliasContext, decorator: Google::Apis::ClouddebuggerV2::AliasContext::Representation - property :revision_id, as: 'revisionId' - property :alias_name, as: 'aliasName' end end @@ -241,36 +343,36 @@ module Google class Variable # @private class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - property :value, as: 'value' property :var_table_index, as: 'varTableIndex' + property :value, as: 'value' collection :members, as: 'members', class: Google::Apis::ClouddebuggerV2::Variable, decorator: Google::Apis::ClouddebuggerV2::Variable::Representation property :status, as: 'status', class: Google::Apis::ClouddebuggerV2::StatusMessage, decorator: Google::Apis::ClouddebuggerV2::StatusMessage::Representation property :name, as: 'name' + property :type, as: 'type' end end class StackFrame # @private class Representation < Google::Apis::Core::JsonRepresentation + property :function, as: 'function' + collection :arguments, as: 'arguments', class: Google::Apis::ClouddebuggerV2::Variable, decorator: Google::Apis::ClouddebuggerV2::Variable::Representation + collection :locals, as: 'locals', class: Google::Apis::ClouddebuggerV2::Variable, decorator: Google::Apis::ClouddebuggerV2::Variable::Representation property :location, as: 'location', class: Google::Apis::ClouddebuggerV2::SourceLocation, decorator: Google::Apis::ClouddebuggerV2::SourceLocation::Representation - property :function, as: 'function' - collection :arguments, as: 'arguments', class: Google::Apis::ClouddebuggerV2::Variable, decorator: Google::Apis::ClouddebuggerV2::Variable::Representation - end end class RepoId # @private class Representation < Google::Apis::Core::JsonRepresentation + property :uid, as: 'uid' property :project_repo_id, as: 'projectRepoId', class: Google::Apis::ClouddebuggerV2::ProjectRepoId, decorator: Google::Apis::ClouddebuggerV2::ProjectRepoId::Representation - property :uid, as: 'uid' end end @@ -291,14 +393,6 @@ module Google end end - class AliasContext - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :kind, as: 'kind' - end - end - class ListDebuggeesResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -307,6 +401,14 @@ module Google end end + class AliasContext + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + property :kind, as: 'kind' + end + end + class Empty # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -316,18 +418,17 @@ module Google class SourceLocation # @private class Representation < Google::Apis::Core::JsonRepresentation - property :line, as: 'line' property :path, as: 'path' + property :line, as: 'line' end end class Debuggee # @private class Representation < Google::Apis::Core::JsonRepresentation - property :project, as: 'project' property :id, as: 'id' - property :is_disabled, as: 'isDisabled' property :agent_version, as: 'agentVersion' + property :is_disabled, as: 'isDisabled' property :uniquifier, as: 'uniquifier' property :description, as: 'description' collection :source_contexts, as: 'sourceContexts', class: Google::Apis::ClouddebuggerV2::SourceContext, decorator: Google::Apis::ClouddebuggerV2::SourceContext::Representation @@ -338,16 +439,7 @@ module Google property :status, as: 'status', class: Google::Apis::ClouddebuggerV2::StatusMessage, decorator: Google::Apis::ClouddebuggerV2::StatusMessage::Representation property :is_inactive, as: 'isInactive' - end - end - - class ListActiveBreakpointsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :breakpoints, as: 'breakpoints', class: Google::Apis::ClouddebuggerV2::Breakpoint, decorator: Google::Apis::ClouddebuggerV2::Breakpoint::Representation - - property :wait_expired, as: 'waitExpired' - property :next_wait_token, as: 'nextWaitToken' + property :project, as: 'project' end end @@ -359,105 +451,13 @@ module Google end end - class CloudWorkspaceSourceContext - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :snapshot_id, as: 'snapshotId' - property :workspace_id, as: 'workspaceId', class: Google::Apis::ClouddebuggerV2::CloudWorkspaceId, decorator: Google::Apis::ClouddebuggerV2::CloudWorkspaceId::Representation - - end - end - - class GerritSourceContext - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :gerrit_project, as: 'gerritProject' - property :alias_context, as: 'aliasContext', class: Google::Apis::ClouddebuggerV2::AliasContext, decorator: Google::Apis::ClouddebuggerV2::AliasContext::Representation - - property :host_uri, as: 'hostUri' - property :revision_id, as: 'revisionId' - property :alias_name, as: 'aliasName' - end - end - - class UpdateActiveBreakpointResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - class CloudWorkspaceId - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :repo_id, as: 'repoId', class: Google::Apis::ClouddebuggerV2::RepoId, decorator: Google::Apis::ClouddebuggerV2::RepoId::Representation - - property :name, as: 'name' - end - end - - class ListBreakpointsResponse + class ListActiveBreakpointsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation + property :next_wait_token, as: 'nextWaitToken' collection :breakpoints, as: 'breakpoints', class: Google::Apis::ClouddebuggerV2::Breakpoint, decorator: Google::Apis::ClouddebuggerV2::Breakpoint::Representation - property :next_wait_token, as: 'nextWaitToken' - end - end - - class Breakpoint - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :expressions, as: 'expressions' - collection :evaluated_expressions, as: 'evaluatedExpressions', class: Google::Apis::ClouddebuggerV2::Variable, decorator: Google::Apis::ClouddebuggerV2::Variable::Representation - - property :is_final_state, as: 'isFinalState' - collection :stack_frames, as: 'stackFrames', class: Google::Apis::ClouddebuggerV2::StackFrame, decorator: Google::Apis::ClouddebuggerV2::StackFrame::Representation - - property :condition, as: 'condition' - property :status, as: 'status', class: Google::Apis::ClouddebuggerV2::StatusMessage, decorator: Google::Apis::ClouddebuggerV2::StatusMessage::Representation - - property :user_email, as: 'userEmail' - property :action, as: 'action' - property :log_level, as: 'logLevel' - property :id, as: 'id' - property :location, as: 'location', class: Google::Apis::ClouddebuggerV2::SourceLocation, decorator: Google::Apis::ClouddebuggerV2::SourceLocation::Representation - - property :final_time, as: 'finalTime' - collection :variable_table, as: 'variableTable', class: Google::Apis::ClouddebuggerV2::Variable, decorator: Google::Apis::ClouddebuggerV2::Variable::Representation - - hash :labels, as: 'labels' - property :log_message_format, as: 'logMessageFormat' - property :create_time, as: 'createTime' - end - end - - class UpdateActiveBreakpointRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :breakpoint, as: 'breakpoint', class: Google::Apis::ClouddebuggerV2::Breakpoint, decorator: Google::Apis::ClouddebuggerV2::Breakpoint::Representation - - end - end - - class SetBreakpointResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :breakpoint, as: 'breakpoint', class: Google::Apis::ClouddebuggerV2::Breakpoint, decorator: Google::Apis::ClouddebuggerV2::Breakpoint::Representation - - end - end - - class SourceContext - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :git, as: 'git', class: Google::Apis::ClouddebuggerV2::GitSourceContext, decorator: Google::Apis::ClouddebuggerV2::GitSourceContext::Representation - - property :gerrit, as: 'gerrit', class: Google::Apis::ClouddebuggerV2::GerritSourceContext, decorator: Google::Apis::ClouddebuggerV2::GerritSourceContext::Representation - - property :cloud_repo, as: 'cloudRepo', class: Google::Apis::ClouddebuggerV2::CloudRepoSourceContext, decorator: Google::Apis::ClouddebuggerV2::CloudRepoSourceContext::Representation - - property :cloud_workspace, as: 'cloudWorkspace', class: Google::Apis::ClouddebuggerV2::CloudWorkspaceSourceContext, decorator: Google::Apis::ClouddebuggerV2::CloudWorkspaceSourceContext::Representation - + property :wait_expired, as: 'waitExpired' end end end diff --git a/generated/google/apis/clouddebugger_v2/service.rb b/generated/google/apis/clouddebugger_v2/service.rb index f9fea1397..8ea9a6c56 100644 --- a/generated/google/apis/clouddebugger_v2/service.rb +++ b/generated/google/apis/clouddebugger_v2/service.rb @@ -47,138 +47,6 @@ module Google super('https://clouddebugger.googleapis.com/', '') end - # Registers the debuggee with the controller service. - # All agents attached to the same application should call this method with - # the same request content to get back the same stable `debuggee_id`. Agents - # should call this method again whenever `google.rpc.Code.NOT_FOUND` is - # returned from any controller method. - # This allows the controller service to disable the agent or recover from any - # data loss. If the debuggee is disabled by the server, the response will - # have `is_disabled` set to `true`. - # @param [Google::Apis::ClouddebuggerV2::RegisterDebuggeeRequest] register_debuggee_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClouddebuggerV2::RegisterDebuggeeResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClouddebuggerV2::RegisterDebuggeeResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def register_debuggee(register_debuggee_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v2/controller/debuggees/register', options) - command.request_representation = Google::Apis::ClouddebuggerV2::RegisterDebuggeeRequest::Representation - command.request_object = register_debuggee_request_object - command.response_representation = Google::Apis::ClouddebuggerV2::RegisterDebuggeeResponse::Representation - command.response_class = Google::Apis::ClouddebuggerV2::RegisterDebuggeeResponse - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Returns the list of all active breakpoints for the debuggee. - # The breakpoint specification (location, condition, and expression - # fields) is semantically immutable, although the field values may - # change. For example, an agent may update the location line number - # to reflect the actual line where the breakpoint was set, but this - # doesn't change the breakpoint semantics. - # This means that an agent does not need to check if a breakpoint has changed - # when it encounters the same breakpoint on a successive call. - # Moreover, an agent should remember the breakpoints that are completed - # until the controller removes them from the active list to avoid - # setting those breakpoints again. - # @param [String] debuggee_id - # Identifies the debuggee. - # @param [Boolean] success_on_timeout - # If set to `true`, returns `google.rpc.Code.OK` status and sets the - # `wait_expired` response field to `true` when the server-selected timeout - # has expired (recommended). - # If set to `false`, returns `google.rpc.Code.ABORTED` status when the - # server-selected timeout has expired (deprecated). - # @param [String] wait_token - # A wait token that, if specified, blocks the method call until the list - # of active breakpoints has changed, or a server selected timeout has - # expired. The value should be set from the last returned response. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClouddebuggerV2::ListActiveBreakpointsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClouddebuggerV2::ListActiveBreakpointsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_controller_debuggee_breakpoints(debuggee_id, success_on_timeout: nil, wait_token: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v2/controller/debuggees/{debuggeeId}/breakpoints', options) - command.response_representation = Google::Apis::ClouddebuggerV2::ListActiveBreakpointsResponse::Representation - command.response_class = Google::Apis::ClouddebuggerV2::ListActiveBreakpointsResponse - command.params['debuggeeId'] = debuggee_id unless debuggee_id.nil? - command.query['successOnTimeout'] = success_on_timeout unless success_on_timeout.nil? - command.query['waitToken'] = wait_token unless wait_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Updates the breakpoint state or mutable fields. - # The entire Breakpoint message must be sent back to the controller - # service. - # Updates to active breakpoint fields are only allowed if the new value - # does not change the breakpoint specification. Updates to the `location`, - # `condition` and `expression` fields should not alter the breakpoint - # semantics. These may only make changes such as canonicalizing a value - # or snapping the location to the correct line of code. - # @param [String] debuggee_id - # Identifies the debuggee being debugged. - # @param [String] id - # Breakpoint identifier, unique in the scope of the debuggee. - # @param [Google::Apis::ClouddebuggerV2::UpdateActiveBreakpointRequest] update_active_breakpoint_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ClouddebuggerV2::UpdateActiveBreakpointResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ClouddebuggerV2::UpdateActiveBreakpointResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_active_breakpoint(debuggee_id, id, update_active_breakpoint_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:put, 'v2/controller/debuggees/{debuggeeId}/breakpoints/{id}', options) - command.request_representation = Google::Apis::ClouddebuggerV2::UpdateActiveBreakpointRequest::Representation - command.request_object = update_active_breakpoint_request_object - command.response_representation = Google::Apis::ClouddebuggerV2::UpdateActiveBreakpointResponse::Representation - command.response_class = Google::Apis::ClouddebuggerV2::UpdateActiveBreakpointResponse - command.params['debuggeeId'] = debuggee_id unless debuggee_id.nil? - command.params['id'] = id unless id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - # Lists all the debuggees that the user can set breakpoints to. # @param [String] client_version # The client version making the call. @@ -383,6 +251,138 @@ module Google command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end + + # Registers the debuggee with the controller service. + # All agents attached to the same application should call this method with + # the same request content to get back the same stable `debuggee_id`. Agents + # should call this method again whenever `google.rpc.Code.NOT_FOUND` is + # returned from any controller method. + # This allows the controller service to disable the agent or recover from any + # data loss. If the debuggee is disabled by the server, the response will + # have `is_disabled` set to `true`. + # @param [Google::Apis::ClouddebuggerV2::RegisterDebuggeeRequest] register_debuggee_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClouddebuggerV2::RegisterDebuggeeResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClouddebuggerV2::RegisterDebuggeeResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def register_debuggee(register_debuggee_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2/controller/debuggees/register', options) + command.request_representation = Google::Apis::ClouddebuggerV2::RegisterDebuggeeRequest::Representation + command.request_object = register_debuggee_request_object + command.response_representation = Google::Apis::ClouddebuggerV2::RegisterDebuggeeResponse::Representation + command.response_class = Google::Apis::ClouddebuggerV2::RegisterDebuggeeResponse + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates the breakpoint state or mutable fields. + # The entire Breakpoint message must be sent back to the controller + # service. + # Updates to active breakpoint fields are only allowed if the new value + # does not change the breakpoint specification. Updates to the `location`, + # `condition` and `expression` fields should not alter the breakpoint + # semantics. These may only make changes such as canonicalizing a value + # or snapping the location to the correct line of code. + # @param [String] debuggee_id + # Identifies the debuggee being debugged. + # @param [String] id + # Breakpoint identifier, unique in the scope of the debuggee. + # @param [Google::Apis::ClouddebuggerV2::UpdateActiveBreakpointRequest] update_active_breakpoint_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClouddebuggerV2::UpdateActiveBreakpointResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClouddebuggerV2::UpdateActiveBreakpointResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_active_breakpoint(debuggee_id, id, update_active_breakpoint_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'v2/controller/debuggees/{debuggeeId}/breakpoints/{id}', options) + command.request_representation = Google::Apis::ClouddebuggerV2::UpdateActiveBreakpointRequest::Representation + command.request_object = update_active_breakpoint_request_object + command.response_representation = Google::Apis::ClouddebuggerV2::UpdateActiveBreakpointResponse::Representation + command.response_class = Google::Apis::ClouddebuggerV2::UpdateActiveBreakpointResponse + command.params['debuggeeId'] = debuggee_id unless debuggee_id.nil? + command.params['id'] = id unless id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Returns the list of all active breakpoints for the debuggee. + # The breakpoint specification (location, condition, and expression + # fields) is semantically immutable, although the field values may + # change. For example, an agent may update the location line number + # to reflect the actual line where the breakpoint was set, but this + # doesn't change the breakpoint semantics. + # This means that an agent does not need to check if a breakpoint has changed + # when it encounters the same breakpoint on a successive call. + # Moreover, an agent should remember the breakpoints that are completed + # until the controller removes them from the active list to avoid + # setting those breakpoints again. + # @param [String] debuggee_id + # Identifies the debuggee. + # @param [String] wait_token + # A wait token that, if specified, blocks the method call until the list + # of active breakpoints has changed, or a server selected timeout has + # expired. The value should be set from the last returned response. + # @param [Boolean] success_on_timeout + # If set to `true`, returns `google.rpc.Code.OK` status and sets the + # `wait_expired` response field to `true` when the server-selected timeout + # has expired (recommended). + # If set to `false`, returns `google.rpc.Code.ABORTED` status when the + # server-selected timeout has expired (deprecated). + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ClouddebuggerV2::ListActiveBreakpointsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ClouddebuggerV2::ListActiveBreakpointsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_controller_debuggee_breakpoints(debuggee_id, wait_token: nil, success_on_timeout: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/controller/debuggees/{debuggeeId}/breakpoints', options) + command.response_representation = Google::Apis::ClouddebuggerV2::ListActiveBreakpointsResponse::Representation + command.response_class = Google::Apis::ClouddebuggerV2::ListActiveBreakpointsResponse + command.params['debuggeeId'] = debuggee_id unless debuggee_id.nil? + command.query['waitToken'] = wait_token unless wait_token.nil? + command.query['successOnTimeout'] = success_on_timeout unless success_on_timeout.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end protected diff --git a/generated/google/apis/cloudkms_v1.rb b/generated/google/apis/cloudkms_v1.rb index 27d091e8a..a75f275b8 100644 --- a/generated/google/apis/cloudkms_v1.rb +++ b/generated/google/apis/cloudkms_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/kms/ module CloudkmsV1 VERSION = 'V1' - REVISION = '20170301' + REVISION = '20170320' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/cloudkms_v1/classes.rb b/generated/google/apis/cloudkms_v1/classes.rb index 17b4d04df..7ea3c2715 100644 --- a/generated/google/apis/cloudkms_v1/classes.rb +++ b/generated/google/apis/cloudkms_v1/classes.rb @@ -22,6 +22,78 @@ module Google module Apis module CloudkmsV1 + # A resource that represents Google Cloud Platform location. + class Location + include Google::Apis::Core::Hashable + + # Resource name for the location, which may vary between implementations. + # For example: `"projects/example-project/locations/us-east1"` + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The canonical id for this location. For example: `"us-east1"`. + # Corresponds to the JSON property `locationId` + # @return [String] + attr_accessor :location_id + + # Service-specific metadata. For example the available capacity at the given + # location. + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # Cross-service attributes for the location. For example + # `"cloud.googleapis.com/region": "us-east1"` + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + @location_id = args[:location_id] if args.key?(:location_id) + @metadata = args[:metadata] if args.key?(:metadata) + @labels = args[:labels] if args.key?(:labels) + end + end + + # Response message for KeyManagementService.ListCryptoKeys. + class ListCryptoKeysResponse + include Google::Apis::Core::Hashable + + # A token to retrieve next page of results. Pass this value in + # ListCryptoKeysRequest.page_token to retrieve the next page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The list of CryptoKeys. + # Corresponds to the JSON property `cryptoKeys` + # @return [Array] + attr_accessor :crypto_keys + + # The total number of CryptoKeys that matched the query. + # Corresponds to the JSON property `totalSize` + # @return [Fixnum] + attr_accessor :total_size + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @crypto_keys = args[:crypto_keys] if args.key?(:crypto_keys) + @total_size = args[:total_size] if args.key?(:total_size) + end + end + # A condition to be met. class Condition include Google::Apis::Core::Hashable @@ -36,27 +108,27 @@ module Google # @return [String] attr_accessor :svc + # DEPRECATED. Use 'values' instead. + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + # Trusted attributes supplied by any service that owns resources and uses # the IAM system for access control. # Corresponds to the JSON property `sys` # @return [String] attr_accessor :sys - # DEPRECATED. Use 'values' instead. - # Corresponds to the JSON property `value` + # Trusted attributes supplied by the IAM system. + # Corresponds to the JSON property `iam` # @return [String] - attr_accessor :value + attr_accessor :iam # The objects of the condition. This is mutually exclusive with 'value'. # Corresponds to the JSON property `values` # @return [Array] attr_accessor :values - # Trusted attributes supplied by the IAM system. - # Corresponds to the JSON property `iam` - # @return [String] - attr_accessor :iam - def initialize(**args) update!(**args) end @@ -65,10 +137,10 @@ module Google def update!(**args) @op = args[:op] if args.key?(:op) @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) + @sys = args[:sys] if args.key?(:sys) @iam = args[:iam] if args.key?(:iam) + @values = args[:values] if args.key?(:values) end end @@ -181,31 +253,6 @@ module Google end end - # The response message for Locations.ListLocations. - class ListLocationsResponse - include Google::Apis::Core::Hashable - - # A list of locations that matches the specified filter in the request. - # Corresponds to the JSON property `locations` - # @return [Array] - attr_accessor :locations - - # The standard List next-page token. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @locations = args[:locations] if args.key?(:locations) - @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 @@ -299,19 +346,19 @@ module Google end end - # Response message for KeyManagementService.Encrypt. - class EncryptResponse + # The response message for Locations.ListLocations. + class ListLocationsResponse include Google::Apis::Core::Hashable - # The encrypted data. - # Corresponds to the JSON property `ciphertext` - # @return [String] - attr_accessor :ciphertext + # A list of locations that matches the specified filter in the request. + # Corresponds to the JSON property `locations` + # @return [Array] + attr_accessor :locations - # The resource name of the CryptoKeyVersion used in encryption. - # Corresponds to the JSON property `name` + # The standard List next-page token. + # Corresponds to the JSON property `nextPageToken` # @return [String] - attr_accessor :name + attr_accessor :next_page_token def initialize(**args) update!(**args) @@ -319,8 +366,8 @@ module Google # Update properties of this object def update!(**args) - @ciphertext = args[:ciphertext] if args.key?(:ciphertext) - @name = args[:name] if args.key?(:name) + @locations = args[:locations] if args.key?(:locations) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) end end @@ -328,25 +375,63 @@ module Google 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 + # Output only. The time at which this KeyRing was created. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @create_time = args[:create_time] if args.key?(:create_time) @name = args[:name] if args.key?(:name) + @create_time = args[:create_time] if args.key?(:create_time) + end + end + + # Response message for KeyManagementService.Encrypt. + class EncryptResponse + include Google::Apis::Core::Hashable + + # The resource name of the CryptoKeyVersion used in encryption. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The encrypted data. + # Corresponds to the JSON property `ciphertext` + # @return [String] + attr_accessor :ciphertext + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + @ciphertext = args[:ciphertext] if args.key?(:ciphertext) + 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 @@ -369,32 +454,6 @@ module Google 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 @@ -427,9 +486,22 @@ module Google end end + # Write a Data Access (Gin) log + class DataAccessOptions + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + # Specifies the audit configuration for a service. - # It consists of which permission types are logged, and what identities, if - # any, are exempted from logging. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. # An AuditConifg must have one or more AuditLogConfigs. # If there are AuditConfigs for both `allServices` and a specific service, # the union of the two AuditConfigs is used for that service: the log_types @@ -477,13 +549,8 @@ module Google class AuditConfig include Google::Apis::Core::Hashable - # - # Corresponds to the JSON property `exemptedMembers` - # @return [Array] - attr_accessor :exempted_members - # Specifies a service that will be enabled for audit logging. - # For example, `resourcemanager`, `storage`, `compute`. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. # `allServices` is a special value that covers all services. # Corresponds to the JSON property `service` # @return [String] @@ -495,15 +562,20 @@ module Google # @return [Array] attr_accessor :audit_log_configs + # + # Corresponds to the JSON property `exemptedMembers` + # @return [Array] + attr_accessor :exempted_members + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @exempted_members = args[:exempted_members] if args.key?(:exempted_members) @service = args[:service] if args.key?(:service) @audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs) + @exempted_members = args[:exempted_members] if args.key?(:exempted_members) end end @@ -515,6 +587,18 @@ module Google class CryptoKeyVersion include Google::Apis::Core::Hashable + # 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 + + # 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] @@ -533,29 +617,17 @@ module Google # @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 - - # Output only. The time at which this CryptoKeyVersion was created. - # Corresponds to the JSON property `createTime` - # @return [String] - attr_accessor :create_time - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @destroy_time = args[:destroy_time] if args.key?(:destroy_time) + @create_time = args[:create_time] if args.key?(:create_time) @state = args[:state] if args.key?(:state) @name = args[:name] if args.key?(:name) @destroy_event_time = args[:destroy_event_time] if args.key?(:destroy_event_time) - @destroy_time = args[:destroy_time] if args.key?(:destroy_time) - @create_time = args[:create_time] if args.key?(:create_time) end end @@ -616,11 +688,6 @@ module Google 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. @@ -628,14 +695,19 @@ module Google # @return [String] attr_accessor :additional_authenticated_data + # Required. The data to encrypt. Must be no larger than 64KiB. + # 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) @additional_authenticated_data = args[:additional_authenticated_data] if args.key?(:additional_authenticated_data) + @plaintext = args[:plaintext] if args.key?(:plaintext) end end @@ -706,68 +778,6 @@ module Google end end - # A rule to be applied in a Policy. - class Rule - include Google::Apis::Core::Hashable - - # If one or more 'not_in' clauses are specified, the rule matches - # if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. - # The format for in and not_in entries is the same as for members in a - # Binding (see google/iam/v1/policy.proto). - # Corresponds to the JSON property `notIn` - # @return [Array] - attr_accessor :not_in - - # Human-readable description of the rule. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Additional restrictions that must be met - # Corresponds to the JSON property `conditions` - # @return [Array] - attr_accessor :conditions - - # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries - # that match the LOG action. - # Corresponds to the JSON property `logConfig` - # @return [Array] - attr_accessor :log_config - - # If one or more 'in' clauses are specified, the rule matches if - # the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. - # Corresponds to the JSON property `in` - # @return [Array] - attr_accessor :in - - # A permission is a string of form '..' - # (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, - # and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. - # Corresponds to the JSON property `permissions` - # @return [Array] - attr_accessor :permissions - - # Required - # Corresponds to the JSON property `action` - # @return [String] - attr_accessor :action - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @not_in = args[:not_in] if args.key?(:not_in) - @description = args[:description] if args.key?(:description) - @conditions = args[:conditions] if args.key?(:conditions) - @log_config = args[:log_config] if args.key?(:log_config) - @in = args[:in] if args.key?(:in) - @permissions = args[:permissions] if args.key?(:permissions) - @action = args[:action] if args.key?(:action) - end - end - # A CryptoKey represents a logical key that can be used for cryptographic # operations. # A CryptoKey is made up of one or more versions, which @@ -834,27 +844,77 @@ module Google end end + # A rule to be applied in a Policy. + class Rule + include Google::Apis::Core::Hashable + + # The config returned to callers of tech.iam.IAM.CheckPolicy for any entries + # that match the LOG action. + # Corresponds to the JSON property `logConfig` + # @return [Array] + attr_accessor :log_config + + # If one or more 'in' clauses are specified, the rule matches if + # the PRINCIPAL/AUTHORITY_SELECTOR is in at least one of these entries. + # Corresponds to the JSON property `in` + # @return [Array] + attr_accessor :in + + # A permission is a string of form '..' + # (e.g., 'storage.buckets.list'). A value of '*' matches all permissions, + # and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs. + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + # Required + # Corresponds to the JSON property `action` + # @return [String] + attr_accessor :action + + # If one or more 'not_in' clauses are specified, the rule matches + # if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. + # The format for in and not_in entries is the same as for members in a + # Binding (see google/iam/v1/policy.proto). + # Corresponds to the JSON property `notIn` + # @return [Array] + attr_accessor :not_in + + # Human-readable description of the rule. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Additional restrictions that must be met + # Corresponds to the JSON property `conditions` + # @return [Array] + attr_accessor :conditions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @log_config = args[:log_config] if args.key?(:log_config) + @in = args[:in] if args.key?(:in) + @permissions = args[:permissions] if args.key?(:permissions) + @action = args[:action] if args.key?(:action) + @not_in = args[:not_in] if args.key?(:not_in) + @description = args[:description] if args.key?(:description) + @conditions = args[:conditions] if args.key?(:conditions) + end + end + # Specifies what kind of log the caller must write - # Increment a streamz counter with the specified metric and field names. - # Metric names should start with a '/', generally be lowercase-only, - # and end in "_count". Field names should not contain an initial slash. - # The actual exported metric names will have "/iam/policy" prepended. - # Field names correspond to IAM request parameters and field values are - # their respective values. - # At present the only supported field names are - # - "iam_principal", corresponding to IAMContext.principal; - # - "" (empty string), resulting in one aggretated counter with no field. - # Examples: - # counter ` metric: "/debug_access_count" field: "iam_principal" ` - # ==> increment counter /iam/policy/backend_debug_access_count - # `iam_principal=[value of IAMContext.principal]` - # At this time we do not support: - # * multiple field names (though this may be supported in the future) - # * decrementing the counter - # * incrementing it by anything other than 1 class LogConfig include Google::Apis::Core::Hashable + # Write a Cloud Audit log + # Corresponds to the JSON property `cloudAudit` + # @return [Google::Apis::CloudkmsV1::CloudAuditOptions] + attr_accessor :cloud_audit + # Options for counters # Corresponds to the JSON property `counter` # @return [Google::Apis::CloudkmsV1::CounterOptions] @@ -865,20 +925,15 @@ module Google # @return [Google::Apis::CloudkmsV1::DataAccessOptions] attr_accessor :data_access - # Write a Cloud Audit log - # Corresponds to the JSON property `cloudAudit` - # @return [Google::Apis::CloudkmsV1::CloudAuditOptions] - attr_accessor :cloud_audit - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @cloud_audit = args[:cloud_audit] if args.key?(:cloud_audit) @counter = args[:counter] if args.key?(:counter) @data_access = args[:data_access] if args.key?(:data_access) - @cloud_audit = args[:cloud_audit] if args.key?(:cloud_audit) end end @@ -887,8 +942,8 @@ module Google 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: + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: # paths: "bindings, etag" # This field is only used by Cloud IAM. # Corresponds to the JSON property `updateMask` @@ -962,78 +1017,6 @@ module Google @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 - - # Resource name for the location, which may vary between implementations. - # For example: `"projects/example-project/locations/us-east1"` - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The canonical id for this location. For example: `"us-east1"`. - # Corresponds to the JSON property `locationId` - # @return [String] - attr_accessor :location_id - - # Service-specific metadata. For example the available capacity at the given - # location. - # Corresponds to the JSON property `metadata` - # @return [Hash] - attr_accessor :metadata - - # Cross-service attributes for the location. For example - # `"cloud.googleapis.com/region": "us-east1"` - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - @location_id = args[:location_id] if args.key?(:location_id) - @metadata = args[:metadata] if args.key?(:metadata) - @labels = args[:labels] if args.key?(:labels) - end - end - - # Response message for KeyManagementService.ListCryptoKeys. - class ListCryptoKeysResponse - include Google::Apis::Core::Hashable - - # A token to retrieve next page of results. Pass this value in - # ListCryptoKeysRequest.page_token to retrieve the next page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The list of CryptoKeys. - # Corresponds to the JSON property `cryptoKeys` - # @return [Array] - attr_accessor :crypto_keys - - # The total number of CryptoKeys that matched the query. - # Corresponds to the JSON property `totalSize` - # @return [Fixnum] - attr_accessor :total_size - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @crypto_keys = args[:crypto_keys] if args.key?(:crypto_keys) - @total_size = args[:total_size] if args.key?(:total_size) - end - end end end end diff --git a/generated/google/apis/cloudkms_v1/representations.rb b/generated/google/apis/cloudkms_v1/representations.rb index e20352442..5457f9642 100644 --- a/generated/google/apis/cloudkms_v1/representations.rb +++ b/generated/google/apis/cloudkms_v1/representations.rb @@ -22,6 +22,18 @@ module Google module Apis module CloudkmsV1 + 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 @@ -52,19 +64,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class ListLocationsResponse - 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 ListLocationsResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -76,7 +82,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class UpdateCryptoKeyPrimaryVersionRequest + class EncryptResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -88,7 +94,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class DataAccessOptions + class UpdateCryptoKeyPrimaryVersionRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -100,6 +106,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class DataAccessOptions + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class AuditConfig class Representation < Google::Apis::Core::JsonRepresentation; end @@ -148,13 +160,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Rule + class CryptoKey class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class CryptoKey + class Rule class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -179,15 +191,23 @@ module Google end class Location - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + property :location_id, as: 'locationId' + hash :metadata, as: 'metadata' + hash :labels, as: 'labels' + end end class ListCryptoKeysResponse - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :crypto_keys, as: 'cryptoKeys', class: Google::Apis::CloudkmsV1::CryptoKey, decorator: Google::Apis::CloudkmsV1::CryptoKey::Representation - include Google::Apis::Core::JsonObjectSupport + property :total_size, as: 'totalSize' + end end class Condition @@ -195,10 +215,10 @@ module Google class Representation < Google::Apis::Core::JsonRepresentation property :op, as: 'op' property :svc, as: 'svc' - property :sys, as: 'sys' property :value, as: 'value' - collection :values, as: 'values' + property :sys, as: 'sys' property :iam, as: 'iam' + collection :values, as: 'values' end end @@ -232,15 +252,6 @@ module Google end end - class ListLocationsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :locations, as: 'locations', class: Google::Apis::CloudkmsV1::Location, decorator: Google::Apis::CloudkmsV1::Location::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - class Policy # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -256,26 +267,28 @@ module Google end end - class EncryptResponse + class ListLocationsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :ciphertext, :base64 => true, as: 'ciphertext' - property :name, as: 'name' + collection :locations, as: 'locations', class: Google::Apis::CloudkmsV1::Location, decorator: Google::Apis::CloudkmsV1::Location::Representation + + property :next_page_token, as: 'nextPageToken' end end class KeyRing # @private class Representation < Google::Apis::Core::JsonRepresentation - property :create_time, as: 'createTime' property :name, as: 'name' + property :create_time, as: 'createTime' end end - class UpdateCryptoKeyPrimaryVersionRequest + class EncryptResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :crypto_key_version_id, as: 'cryptoKeyVersionId' + property :name, as: 'name' + property :ciphertext, :base64 => true, as: 'ciphertext' end end @@ -285,9 +298,10 @@ module Google end end - class DataAccessOptions + class UpdateCryptoKeyPrimaryVersionRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + property :crypto_key_version_id, as: 'cryptoKeyVersionId' end end @@ -301,24 +315,30 @@ module Google end end + class DataAccessOptions + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + class AuditConfig # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :exempted_members, as: 'exemptedMembers' property :service, as: 'service' collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::CloudkmsV1::AuditLogConfig, decorator: Google::Apis::CloudkmsV1::AuditLogConfig::Representation + collection :exempted_members, as: 'exemptedMembers' end end class CryptoKeyVersion # @private class Representation < Google::Apis::Core::JsonRepresentation + property :destroy_time, as: 'destroyTime' + property :create_time, as: 'createTime' property :state, as: 'state' property :name, as: 'name' property :destroy_event_time, as: 'destroyEventTime' - property :destroy_time, as: 'destroyTime' - property :create_time, as: 'createTime' end end @@ -339,8 +359,8 @@ module Google class EncryptRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :plaintext, :base64 => true, as: 'plaintext' property :additional_authenticated_data, :base64 => true, as: 'additionalAuthenticatedData' + property :plaintext, :base64 => true, as: 'plaintext' end end @@ -367,21 +387,6 @@ module Google end end - class Rule - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :not_in, as: 'notIn' - property :description, as: 'description' - collection :conditions, as: 'conditions', class: Google::Apis::CloudkmsV1::Condition, decorator: Google::Apis::CloudkmsV1::Condition::Representation - - collection :log_config, as: 'logConfig', class: Google::Apis::CloudkmsV1::LogConfig, decorator: Google::Apis::CloudkmsV1::LogConfig::Representation - - collection :in, as: 'in' - collection :permissions, as: 'permissions' - property :action, as: 'action' - end - end - class CryptoKey # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -395,15 +400,30 @@ module Google end end + class Rule + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :log_config, as: 'logConfig', class: Google::Apis::CloudkmsV1::LogConfig, decorator: Google::Apis::CloudkmsV1::LogConfig::Representation + + collection :in, as: 'in' + collection :permissions, as: 'permissions' + property :action, as: 'action' + collection :not_in, as: 'notIn' + property :description, as: 'description' + collection :conditions, as: 'conditions', class: Google::Apis::CloudkmsV1::Condition, decorator: Google::Apis::CloudkmsV1::Condition::Representation + + end + end + class LogConfig # @private class Representation < Google::Apis::Core::JsonRepresentation + property :cloud_audit, as: 'cloudAudit', class: Google::Apis::CloudkmsV1::CloudAuditOptions, decorator: Google::Apis::CloudkmsV1::CloudAuditOptions::Representation + property :counter, as: 'counter', class: Google::Apis::CloudkmsV1::CounterOptions, decorator: Google::Apis::CloudkmsV1::CounterOptions::Representation property :data_access, as: 'dataAccess', class: Google::Apis::CloudkmsV1::DataAccessOptions, decorator: Google::Apis::CloudkmsV1::DataAccessOptions::Representation - property :cloud_audit, as: 'cloudAudit', class: Google::Apis::CloudkmsV1::CloudAuditOptions, decorator: Google::Apis::CloudkmsV1::CloudAuditOptions::Representation - end end @@ -423,26 +443,6 @@ module Google property :additional_authenticated_data, :base64 => true, as: 'additionalAuthenticatedData' end end - - class Location - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :location_id, as: 'locationId' - hash :metadata, as: 'metadata' - hash :labels, as: 'labels' - end - end - - class ListCryptoKeysResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :crypto_keys, as: 'cryptoKeys', class: Google::Apis::CloudkmsV1::CryptoKey, decorator: Google::Apis::CloudkmsV1::CryptoKey::Representation - - property :total_size, as: 'totalSize' - end - end end end end diff --git a/generated/google/apis/cloudkms_v1/service.rb b/generated/google/apis/cloudkms_v1/service.rb index 9b4b3cc12..4986a2ded 100644 --- a/generated/google/apis/cloudkms_v1/service.rb +++ b/generated/google/apis/cloudkms_v1/service.rb @@ -33,16 +33,16 @@ module Google # # @see https://cloud.google.com/kms/ class CloudKMSService < 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://cloudkms.googleapis.com/', '') end @@ -50,12 +50,12 @@ module Google # 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] filter + # The standard list filter. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. @@ -73,14 +73,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_locations(name, filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_project_locations(name, page_token: nil, page_size: nil, filter: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}/locations', options) command.response_representation = Google::Apis::CloudkmsV1::ListLocationsResponse::Representation command.response_class = Google::Apis::CloudkmsV1::ListLocationsResponse command.params['name'] = name unless name.nil? - command.query['filter'] = filter unless filter.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? + command.query['filter'] = filter unless filter.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) @@ -116,6 +116,79 @@ module Google execute_or_queue_command(command, &block) end + # Create a new KeyRing in a given Project and Location. + # @param [String] parent + # Required. The resource name of the location associated with the + # KeyRings, in the format `projects/*/locations/*`. + # @param [Google::Apis::CloudkmsV1::KeyRing] key_ring_object + # @param [String] key_ring_id + # Required. It must be unique within a location and match the regular + # expression `[a-zA-Z0-9_-]`1,63`` + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudkmsV1::KeyRing] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1::KeyRing] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_location_key_ring(parent, key_ring_object = nil, key_ring_id: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+parent}/keyRings', options) + command.request_representation = Google::Apis::CloudkmsV1::KeyRing::Representation + command.request_object = key_ring_object + command.response_representation = Google::Apis::CloudkmsV1::KeyRing::Representation + command.response_class = Google::Apis::CloudkmsV1::KeyRing + command.params['parent'] = parent unless parent.nil? + command.query['keyRingId'] = key_ring_id unless key_ring_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Sets the access control policy on the specified resource. Replaces any + # existing policy. + # @param [String] resource + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param [Google::Apis::CloudkmsV1::SetIamPolicyRequest] set_iam_policy_request_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudkmsV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1::Policy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def set_key_ring_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options) + command.request_representation = Google::Apis::CloudkmsV1::SetIamPolicyRequest::Representation + command.request_object = set_iam_policy_request_object + command.response_representation = Google::Apis::CloudkmsV1::Policy::Representation + command.response_class = Google::Apis::CloudkmsV1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + # Gets the access control policy for a resource. # Returns an empty policy if the resource exists and does not have a policy # set. @@ -259,120 +332,6 @@ module Google execute_or_queue_command(command, &block) end - # Create a new KeyRing in a given Project and Location. - # @param [String] parent - # Required. The resource name of the location associated with the - # KeyRings, in the format `projects/*/locations/*`. - # @param [Google::Apis::CloudkmsV1::KeyRing] key_ring_object - # @param [String] key_ring_id - # Required. It must be unique within a location and match the regular - # expression `[a-zA-Z0-9_-]`1,63`` - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudkmsV1::KeyRing] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudkmsV1::KeyRing] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_project_location_key_ring(parent, key_ring_object = nil, key_ring_id: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+parent}/keyRings', options) - command.request_representation = Google::Apis::CloudkmsV1::KeyRing::Representation - command.request_object = key_ring_object - command.response_representation = Google::Apis::CloudkmsV1::KeyRing::Representation - command.response_class = Google::Apis::CloudkmsV1::KeyRing - command.params['parent'] = parent unless parent.nil? - command.query['keyRingId'] = key_ring_id unless key_ring_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Sets the access control policy on the specified resource. Replaces any - # existing policy. - # @param [String] resource - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param [Google::Apis::CloudkmsV1::SetIamPolicyRequest] set_iam_policy_request_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudkmsV1::Policy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudkmsV1::Policy] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_key_ring_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options) - command.request_representation = Google::Apis::CloudkmsV1::SetIamPolicyRequest::Representation - command.request_object = set_iam_policy_request_object - command.response_representation = Google::Apis::CloudkmsV1::Policy::Representation - command.response_class = Google::Apis::CloudkmsV1::Policy - command.params['resource'] = resource unless resource.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # 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] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudkmsV1::ListCryptoKeysResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudkmsV1::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, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+parent}/cryptoKeys', options) - command.response_representation = Google::Apis::CloudkmsV1::ListCryptoKeysResponse::Representation - command.response_class = Google::Apis::CloudkmsV1::ListCryptoKeysResponse - command.params['parent'] = parent unless parent.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - 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 @@ -549,37 +508,6 @@ module Google 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] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudkmsV1::CryptoKey] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudkmsV1::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, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+name}', options) - command.response_representation = Google::Apis::CloudkmsV1::CryptoKey::Representation - command.response_class = Google::Apis::CloudkmsV1::CryptoKey - command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - # Update a CryptoKey. # @param [String] name # Output only. The resource name for this CryptoKey in the format @@ -617,6 +545,37 @@ module Google 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] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudkmsV1::CryptoKey] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1::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, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::CloudkmsV1::CryptoKey::Representation + command.response_class = Google::Apis::CloudkmsV1::CryptoKey + command.params['name'] = name unless name.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + 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. @@ -690,15 +649,18 @@ module Google 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::CloudkmsV1::RestoreCryptoKeyVersionRequest] restore_crypto_key_version_request_object + # 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] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. @@ -708,93 +670,21 @@ module Google # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudkmsV1::CryptoKeyVersion] parsed result object + # @yieldparam result [Google::Apis::CloudkmsV1::ListCryptoKeysResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::CloudkmsV1::CryptoKeyVersion] + # @return [Google::Apis::CloudkmsV1::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 restore_crypto_key_version(name, restore_crypto_key_version_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+name}:restore', options) - command.request_representation = Google::Apis::CloudkmsV1::RestoreCryptoKeyVersionRequest::Representation - command.request_object = restore_crypto_key_version_request_object - command.response_representation = Google::Apis::CloudkmsV1::CryptoKeyVersion::Representation - command.response_class = Google::Apis::CloudkmsV1::CryptoKeyVersion - command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - 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] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudkmsV1::CryptoKeyVersion] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudkmsV1::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, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+name}', options) - command.response_representation = Google::Apis::CloudkmsV1::CryptoKeyVersion::Representation - command.response_class = Google::Apis::CloudkmsV1::CryptoKeyVersion - command.params['name'] = name unless name.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - 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::CloudkmsV1::CryptoKeyVersion] crypto_key_version_object - # @param [String] update_mask - # Required list of fields to be updated in this 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::CloudkmsV1::CryptoKeyVersion] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudkmsV1::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, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:patch, 'v1/{+name}', options) - command.request_representation = Google::Apis::CloudkmsV1::CryptoKeyVersion::Representation - command.request_object = crypto_key_version_object - command.response_representation = Google::Apis::CloudkmsV1::CryptoKeyVersion::Representation - command.response_class = Google::Apis::CloudkmsV1::CryptoKeyVersion - command.params['name'] = name unless name.nil? - command.query['updateMask'] = update_mask unless update_mask.nil? + def list_project_location_key_ring_crypto_keys(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+parent}/cryptoKeys', options) + command.response_representation = Google::Apis::CloudkmsV1::ListCryptoKeysResponse::Representation + command.response_class = Google::Apis::CloudkmsV1::ListCryptoKeysResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) @@ -920,12 +810,122 @@ module Google command.query['fields'] = fields unless fields.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::CloudkmsV1::RestoreCryptoKeyVersionRequest] restore_crypto_key_version_request_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudkmsV1::CryptoKeyVersion] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1::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, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+name}:restore', options) + command.request_representation = Google::Apis::CloudkmsV1::RestoreCryptoKeyVersionRequest::Representation + command.request_object = restore_crypto_key_version_request_object + command.response_representation = Google::Apis::CloudkmsV1::CryptoKeyVersion::Representation + command.response_class = Google::Apis::CloudkmsV1::CryptoKeyVersion + command.params['name'] = name unless name.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + 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::CloudkmsV1::CryptoKeyVersion] crypto_key_version_object + # @param [String] update_mask + # Required list of fields to be updated in this 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::CloudkmsV1::CryptoKeyVersion] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1::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, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/{+name}', options) + command.request_representation = Google::Apis::CloudkmsV1::CryptoKeyVersion::Representation + command.request_object = crypto_key_version_object + command.response_representation = Google::Apis::CloudkmsV1::CryptoKeyVersion::Representation + command.response_class = Google::Apis::CloudkmsV1::CryptoKeyVersion + command.params['name'] = name unless name.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + 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] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudkmsV1::CryptoKeyVersion] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudkmsV1::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, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::CloudkmsV1::CryptoKeyVersion::Representation + command.response_class = Google::Apis::CloudkmsV1::CryptoKeyVersion + command.params['name'] = name unless name.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end protected def apply_command_defaults(command) - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? end end end diff --git a/generated/google/apis/cloudmonitoring_v2beta2.rb b/generated/google/apis/cloudmonitoring_v2beta2.rb index 567861e38..0044e906f 100644 --- a/generated/google/apis/cloudmonitoring_v2beta2.rb +++ b/generated/google/apis/cloudmonitoring_v2beta2.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/monitoring/v2beta2/ module CloudmonitoringV2beta2 VERSION = 'V2beta2' - REVISION = '20170219' + REVISION = '20170323' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/cloudresourcemanager_v1.rb b/generated/google/apis/cloudresourcemanager_v1.rb index 85fc6d62a..ead620e2f 100644 --- a/generated/google/apis/cloudresourcemanager_v1.rb +++ b/generated/google/apis/cloudresourcemanager_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/resource-manager module CloudresourcemanagerV1 VERSION = 'V1' - REVISION = '20170301' + REVISION = '20170324' # View your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only' diff --git a/generated/google/apis/cloudresourcemanager_v1/classes.rb b/generated/google/apis/cloudresourcemanager_v1/classes.rb index 030be5433..d4b79a244 100644 --- a/generated/google/apis/cloudresourcemanager_v1/classes.rb +++ b/generated/google/apis/cloudresourcemanager_v1/classes.rb @@ -22,6 +22,123 @@ module Google module Apis module CloudresourcemanagerV1 + # Identifying information for a single ancestor of a project. + class Ancestor + include Google::Apis::Core::Hashable + + # A container to reference an id for any resource type. A `resource` in Google + # Cloud Platform is a generic term for something you (a developer) may want to + # interact with through one of our API's. Some examples are an App Engine app, + # a Compute Engine instance, a Cloud SQL database, and so on. + # Corresponds to the JSON property `resourceId` + # @return [Google::Apis::CloudresourcemanagerV1::ResourceId] + attr_accessor :resource_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @resource_id = args[:resource_id] if args.key?(:resource_id) + end + end + + # A `Constraint` that allows or disallows a list of string values, which are + # configured by an Organization's policy administrator with a `Policy`. + class ListConstraint + include Google::Apis::Core::Hashable + + # Optional. The Google Cloud Console will try to default to a configuration + # that matches the value specified in this `Constraint`. + # Corresponds to the JSON property `suggestedValue` + # @return [String] + attr_accessor :suggested_value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @suggested_value = args[:suggested_value] if args.key?(:suggested_value) + end + end + + # The request sent to the SetOrgPolicyRequest method. + class SetOrgPolicyRequest + include Google::Apis::Core::Hashable + + # Defines a Cloud Organization `Policy` which is used to specify `Constraints` + # for configurations of Cloud Platform resources. + # Corresponds to the JSON property `policy` + # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy] + 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 + + # Request message for `SetIamPolicy` method. + class SetIamPolicyRequest + include Google::Apis::Core::Hashable + + # Defines an Identity and Access Management (IAM) policy. It is used to + # specify access control policies for Cloud Platform resources. + # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of + # `members` to a `role`, where the members can be user accounts, Google groups, + # Google domains, and service accounts. A `role` is a named list of permissions + # defined by IAM. + # **Example** + # ` + # "bindings": [ + # ` + # "role": "roles/owner", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-other-app@appspot.gserviceaccount.com", + # ] + # `, + # ` + # "role": "roles/viewer", + # "members": ["user:sean@example.com"] + # ` + # ] + # ` + # For a description of IAM and its features, see the + # [IAM developer's guide](https://cloud.google.com/iam). + # Corresponds to the JSON property `policy` + # @return [Google::Apis::CloudresourcemanagerV1::Policy] + attr_accessor :policy + + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # paths: "bindings, etag" + # This field is only used by Cloud IAM. + # Corresponds to the JSON property `updateMask` + # @return [String] + attr_accessor :update_mask + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @policy = args[:policy] if args.key?(:policy) + @update_mask = args[:update_mask] if args.key?(:update_mask) + end + end + # 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: @@ -46,6 +163,12 @@ module Google class Organization include Google::Apis::Core::Hashable + # Timestamp when the Organization was created. Assigned by the server. + # @OutputOnly + # Corresponds to the JSON property `creationTime` + # @return [String] + attr_accessor :creation_time + # The entity that owns an Organization. The lifetime of the Organization and # all of its descendants are bound to the `OrganizationOwner`. If the # `OrganizationOwner` is deleted, the Organization and all its descendants will @@ -75,11 +198,36 @@ module Google # @return [String] attr_accessor :display_name - # Timestamp when the Organization was created. Assigned by the server. - # @OutputOnly - # Corresponds to the JSON property `creationTime` + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @creation_time = args[:creation_time] if args.key?(:creation_time) + @owner = args[:owner] if args.key?(:owner) + @lifecycle_state = args[:lifecycle_state] if args.key?(:lifecycle_state) + @name = args[:name] if args.key?(:name) + @display_name = args[:display_name] if args.key?(:display_name) + end + end + + # The response returned from the ListAvailableOrgPolicyConstraints method. + # Returns all `Constraints` that could be set at this level of the hierarchy + # (contrast with the response from `ListPolicies`, which returns all policies + # which are set). + class ListAvailableOrgPolicyConstraintsResponse + include Google::Apis::Core::Hashable + + # Page token used to retrieve the next page. This is currently not used. + # Corresponds to the JSON property `nextPageToken` # @return [String] - attr_accessor :creation_time + attr_accessor :next_page_token + + # The collection of constraints that are settable on the request resource. + # Corresponds to the JSON property `constraints` + # @return [Array] + attr_accessor :constraints def initialize(**args) update!(**args) @@ -87,11 +235,137 @@ module Google # Update properties of this object def update!(**args) - @owner = args[:owner] if args.key?(:owner) - @lifecycle_state = args[:lifecycle_state] if args.key?(:lifecycle_state) - @name = args[:name] if args.key?(:name) - @display_name = args[:display_name] if args.key?(:display_name) - @creation_time = args[:creation_time] if args.key?(:creation_time) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @constraints = args[:constraints] if args.key?(:constraints) + end + end + + # Used in `policy_type` to specify how `list_policy` behaves at this + # resource. + # A `ListPolicy` can define specific values that are allowed or denied by + # setting either the `allowed_values` or `denied_values` fields. It can also + # be used to allow or deny all values, by setting the `all_values` field. If + # `all_values` is `ALL_VALUES_UNSPECIFIED`, exactly one of `allowed_values` + # or `denied_values` must be set (attempting to set both or neither will + # result in a failed request). If `all_values` is set to either `ALLOW` or + # `DENY`, `allowed_values` and `denied_values` must be unset. + class ListPolicy + include Google::Apis::Core::Hashable + + # List of values allowed at this resource. an only be set if no values are + # set for `denied_values` and `all_values` is set to + # `ALL_VALUES_UNSPECIFIED`. + # Corresponds to the JSON property `allowedValues` + # @return [Array] + attr_accessor :allowed_values + + # Optional. The Google Cloud Console will try to default to a configuration + # that matches the value specified in this `Policy`. If `suggested_value` + # is not set, it will inherit the value specified higher in the hierarchy, + # unless `inherit_from_parent` is `false`. + # Corresponds to the JSON property `suggestedValue` + # @return [String] + attr_accessor :suggested_value + + # Determines the inheritance behavior for this `Policy`. + # By default, a `ListPolicy` set at a resource supercedes any `Policy` set + # anywhere up the resource hierarchy. However, if `inherit_from_parent` is + # set to `true`, then the values from the effective `Policy` of the parent + # resource are inherited, meaning the values set in this `Policy` are + # added to the values inherited up the hierarchy. + # Setting `Policy` hierarchies that inherit both allowed values and denied + # values isn't recommended in most circumstances to keep the configuration + # simple and understandable. However, it is possible to set a `Policy` with + # `allowed_values` set that inherits a `Policy` with `denied_values` set. + # In this case, the values that are allowed must be in `allowed_values` and + # not present in `denied_values`. + # For example, suppose you have a `Constraint` + # `constraints/serviceuser.services`, which has a `constraint_type` of + # `list_constraint`, and with `constraint_default` set to `ALLOW`. + # Suppose that at the Organization level, a `Policy` is applied that + # restricts the allowed API activations to ``E1`, `E2``. Then, if a + # `Policy` is applied to a project below the Organization that has + # `inherit_from_parent` set to `false` and field all_values set to DENY, + # then an attempt to activate any API will be denied. + # The following examples demonstrate different possible layerings: + # Example 1 (no inherited values): + # `organizations/foo` has a `Policy` with values: + # `allowed_values: “E1” allowed_values:”E2”` + # ``projects/bar`` has `inherit_from_parent` `false` and values: + # `allowed_values: "E3" allowed_values: "E4"` + # The accepted values at `organizations/foo` are `E1`, `E2`. + # The accepted values at `projects/bar` are `E3`, and `E4`. + # Example 2 (inherited values): + # `organizations/foo` has a `Policy` with values: + # `allowed_values: “E1” allowed_values:”E2”` + # `projects/bar` has a `Policy` with values: + # `value: “E3” value: ”E4” inherit_from_parent: true` + # The accepted values at `organizations/foo` are `E1`, `E2`. + # The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`. + # Example 3 (inheriting both allowed and denied values): + # `organizations/foo` has a `Policy` with values: + # `allowed_values: "E1" allowed_values: "E2"` + # `projects/bar` has a `Policy` with: + # `denied_values: "E1"` + # The accepted values at `organizations/foo` are `E1`, `E2`. + # The value accepted at `projects/bar` is `E2`. + # Example 4 (RestoreDefault): + # `organizations/foo` has a `Policy` with values: + # `allowed_values: “E1” allowed_values:”E2”` + # `projects/bar` has a `Policy` with values: + # `RestoreDefault: ``` + # The accepted values at `organizations/foo` are `E1`, `E2`. + # The accepted values at `projects/bar` are either all or none depending on + # the value of `constraint_default` (if `ALLOW`, all; if + # `DENY`, none). + # Example 5 (no policy inherits parent policy): + # `organizations/foo` has no `Policy` set. + # `projects/bar` has no `Policy` set. + # The accepted values at both levels are either all or none depending on + # the value of `constraint_default` (if `ALLOW`, all; if + # `DENY`, none). + # Example 6 (ListConstraint allowing all): + # `organizations/foo` has a `Policy` with values: + # `allowed_values: “E1” allowed_values: ”E2”` + # `projects/bar` has a `Policy` with: + # `all: ALLOW` + # The accepted values at `organizations/foo` are `E1`, E2`. + # Any value is accepted at `projects/bar`. + # Example 7 (ListConstraint allowing none): + # `organizations/foo` has a `Policy` with values: + # `allowed_values: “E1” allowed_values: ”E2”` + # `projects/bar` has a `Policy` with: + # `all: DENY` + # The accepted values at `organizations/foo` are `E1`, E2`. + # No value is accepted at `projects/bar`. + # Corresponds to the JSON property `inheritFromParent` + # @return [Boolean] + attr_accessor :inherit_from_parent + alias_method :inherit_from_parent?, :inherit_from_parent + + # List of values denied at this resource. Can only be set if no values are + # set for `allowed_values` and `all_values` is set to + # `ALL_VALUES_UNSPECIFIED`. + # Corresponds to the JSON property `deniedValues` + # @return [Array] + attr_accessor :denied_values + + # The policy all_values state. + # Corresponds to the JSON property `allValues` + # @return [String] + attr_accessor :all_values + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @allowed_values = args[:allowed_values] if args.key?(:allowed_values) + @suggested_value = args[:suggested_value] if args.key?(:suggested_value) + @inherit_from_parent = args[:inherit_from_parent] if args.key?(:inherit_from_parent) + @denied_values = args[:denied_values] if args.key?(:denied_values) + @all_values = args[:all_values] if args.key?(:all_values) end end @@ -163,6 +437,19 @@ module Google class SearchOrganizationsRequest include Google::Apis::Core::Hashable + # A pagination token returned from a previous call to `SearchOrganizations` + # that indicates from where listing should continue. + # This field is optional. + # Corresponds to the JSON property `pageToken` + # @return [String] + attr_accessor :page_token + + # The maximum number of Organizations to return in the response. + # This field is optional. + # Corresponds to the JSON property `pageSize` + # @return [Fixnum] + attr_accessor :page_size + # 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 @@ -177,28 +464,15 @@ module Google # @return [String] attr_accessor :filter - # A pagination token returned from a previous call to `SearchOrganizations` - # that indicates from where listing should continue. - # This field is optional. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # The maximum number of Organizations to return in the response. - # This field is optional. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @filter = args[:filter] if args.key?(:filter) @page_token = args[:page_token] if args.key?(:page_token) @page_size = args[:page_size] if args.key?(:page_size) + @filter = args[:filter] if args.key?(:filter) end end @@ -350,24 +624,53 @@ module Google end end - # A container to reference an id for any resource type. A `resource` in Google - # Cloud Platform is a generic term for something you (a developer) may want to - # interact with through one of our API's. Some examples are an App Engine app, - # a Compute Engine instance, a Cloud SQL database, and so on. - class ResourceId + # The request sent to the [ListAvailableOrgPolicyConstraints] + # google.cloud.OrgPolicy.v1.ListAvailableOrgPolicyConstraints] method. + class ListAvailableOrgPolicyConstraintsRequest include Google::Apis::Core::Hashable - # Required field for the type-specific id. This should correspond to the id - # used in the type-specific API's. - # Corresponds to the JSON property `id` + # Page token used to retrieve the next page. This is currently unsupported + # and will be ignored. The server may at any point start using this field. + # Corresponds to the JSON property `pageToken` # @return [String] - attr_accessor :id + attr_accessor :page_token - # Required field representing the resource type this id is for. - # At present, the valid types are: "organization" - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type + # Size of the pages to be returned. This is currently unsupported and will + # be ignored. The server may at any point start using this field to limit + # page size. + # Corresponds to the JSON property `pageSize` + # @return [Fixnum] + attr_accessor :page_size + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @page_token = args[:page_token] if args.key?(:page_token) + @page_size = args[:page_size] if args.key?(:page_size) + end + end + + # A container to reference an id for any resource type. A `resource` in Google + # Cloud Platform is a generic term for something you (a developer) may want to + # interact with through one of our API's. Some examples are an App Engine app, + # a Compute Engine instance, a Cloud SQL database, and so on. + class ResourceId + include Google::Apis::Core::Hashable + + # Required field representing the resource type this id is for. + # At present, the valid types are: "organization" + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # Required field for the type-specific id. This should correspond to the id + # used in the type-specific API's. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id def initialize(**args) update!(**args) @@ -375,14 +678,61 @@ module Google # Update properties of this object def update!(**args) - @id = args[:id] if args.key?(:id) @type = args[:type] if args.key?(:type) + @id = args[:id] if args.key?(:id) + end + end + + # The request sent to the GetEffectiveOrgPolicy method. + class GetEffectiveOrgPolicyRequest + include Google::Apis::Core::Hashable + + # The name of the `Constraint` to compute the effective `Policy`. + # Corresponds to the JSON property `constraint` + # @return [String] + attr_accessor :constraint + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @constraint = args[:constraint] if args.key?(:constraint) + end + end + + # The request sent to the ListOrgPolicies method. + class ListOrgPoliciesRequest + include Google::Apis::Core::Hashable + + # Page token used to retrieve the next page. This is currently unsupported + # and will be ignored. The server may at any point start using this field. + # Corresponds to the JSON property `pageToken` + # @return [String] + attr_accessor :page_token + + # Size of the pages to be returned. This is currently unsupported and will + # be ignored. The server may at any point start using this field to limit + # page size. + # Corresponds to the JSON property `pageSize` + # @return [Fixnum] + attr_accessor :page_size + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @page_token = args[:page_token] if args.key?(:page_token) + @page_size = args[:page_size] if args.key?(:page_size) end end # Specifies the audit configuration for a service. - # It consists of which permission types are logged, and what identities, if - # any, are exempted from logging. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. # An AuditConifg must have one or more AuditLogConfigs. # If there are AuditConfigs for both `allServices` and a specific service, # the union of the two AuditConfigs is used for that service: the log_types @@ -431,7 +781,7 @@ module Google include Google::Apis::Core::Hashable # Specifies a service that will be enabled for audit logging. - # For example, `resourcemanager`, `storage`, `compute`. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. # `allServices` is a special value that covers all services. # Corresponds to the JSON property `service` # @return [String] @@ -593,13 +943,6 @@ module Google class Status include Google::Apis::Core::Hashable - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # google.rpc.Status.details field, or localized by the client. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - # A list of messages that carry the error details. There will be a # common set of message types for APIs to use. # Corresponds to the JSON property `details` @@ -611,15 +954,22 @@ module Google # @return [Fixnum] attr_accessor :code + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # google.rpc.Status.details field, or localized by the client. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @message = args[:message] if args.key?(:message) @details = args[:details] if args.key?(:details) @code = args[:code] if args.key?(:code) + @message = args[:message] if args.key?(:message) end end @@ -649,6 +999,81 @@ module Google end end + # A `Constraint` describes a way in which a resource's configuration can be + # restricted. For example, it controls which cloud services can be activated + # across an organization, or whether a Compute Engine instance can have + # serial port connections established. `Constraints` can be configured by the + # organization's policy adminstrator to fit the needs of the organzation by + # setting Policies for `Constraints` at different locations in the + # organization's resource hierarchy. Policies are inherited down the resource + # hierarchy from higher levels, but can also be overridden. For details about + # the inheritance rules please read about + # Policies. + # `Constraints` have a default behavior determined by the `constraint_default` + # field, which is the enforcement behavior that is used in the absence of a + # `Policy` being defined or inherited for the resource in question. + class Constraint + include Google::Apis::Core::Hashable + + # Version of the `Constraint`. Default version is 0; + # Corresponds to the JSON property `version` + # @return [Fixnum] + attr_accessor :version + + # A `Constraint` that allows or disallows a list of string values, which are + # configured by an Organization's policy administrator with a `Policy`. + # Corresponds to the JSON property `listConstraint` + # @return [Google::Apis::CloudresourcemanagerV1::ListConstraint] + attr_accessor :list_constraint + + # The human readable name. + # Mutable. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Detailed description of what this `Constraint` controls as well as how and + # where it is enforced. + # Mutable. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # A `Constraint` that is either enforced or not. + # For example a constraint `constraints/compute.disableSerialPortAccess`. + # If it is enforced on a VM instance, serial port connections will not be + # opened to that instance. + # Corresponds to the JSON property `booleanConstraint` + # @return [Google::Apis::CloudresourcemanagerV1::BooleanConstraint] + attr_accessor :boolean_constraint + + # The evaluation behavior of this constraint in the absense of 'Policy'. + # Corresponds to the JSON property `constraintDefault` + # @return [String] + attr_accessor :constraint_default + + # Immutable value, required to globally be unique. For example, + # `constraints/serviceuser.services` + # 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) + @version = args[:version] if args.key?(:version) + @list_constraint = args[:list_constraint] if args.key?(:list_constraint) + @display_name = args[:display_name] if args.key?(:display_name) + @description = args[:description] if args.key?(:description) + @boolean_constraint = args[:boolean_constraint] if args.key?(:boolean_constraint) + @constraint_default = args[:constraint_default] if args.key?(:constraint_default) + @name = args[:name] if args.key?(:name) + end + end + # Associates `members` with a `role`. class Binding include Google::Apis::Core::Hashable @@ -689,6 +1114,74 @@ module Google end end + # Ignores policies set above this resource and restores the + # `constraint_default` enforcement behavior of the specific `Constraint` at + # this resource. + # Suppose that `constraint_default` is set to `ALLOW` for the + # `Constraint` `constraints/serviceuser.services`. Suppose that organization + # foo.com sets a `Policy` at their Organization resource node that restricts + # the allowed service activations to deny all service activations. They + # could then set a `Policy` with the `policy_type` `restore_default` on + # several experimental projects, restoring the `constraint_default` + # enforcement of the `Constraint` for only those projects, allowing those + # projects to have all services activated. + class RestoreDefault + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # The request sent to the GetOrgPolicy method. + class GetOrgPolicyRequest + include Google::Apis::Core::Hashable + + # Name of the `Constraint` to get the `Policy`. + # Corresponds to the JSON property `constraint` + # @return [String] + attr_accessor :constraint + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @constraint = args[:constraint] if args.key?(:constraint) + end + end + + # The request sent to the ClearOrgPolicy method. + class ClearOrgPolicyRequest + include Google::Apis::Core::Hashable + + # The current version, for concurrency control. Not sending an `etag` + # will cause the `Policy` to be cleared blindly. + # Corresponds to the JSON property `etag` + # @return [String] + attr_accessor :etag + + # Name of the `Constraint` of the `Policy` to clear. + # Corresponds to the JSON property `constraint` + # @return [String] + attr_accessor :constraint + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @etag = args[:etag] if args.key?(:etag) + @constraint = args[:constraint] if args.key?(:constraint) + end + end + # The request sent to the UndeleteProject # method. class UndeleteProjectRequest @@ -740,6 +1233,22 @@ module Google end end + # A `Constraint` that is either enforced or not. + # For example a constraint `constraints/compute.disableSerialPortAccess`. + # If it is enforced on a VM instance, serial port connections will not be + # opened to that instance. + class BooleanConstraint + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + # Response message for `TestIamPermissions` method. class TestIamPermissionsResponse include Google::Apis::Core::Hashable @@ -804,12 +1313,6 @@ module Google class ListProjectsResponse include Google::Apis::Core::Hashable - # The list of Projects that matched the list filter. This list can - # be paginated. - # Corresponds to the JSON property `projects` - # @return [Array] - attr_accessor :projects - # Pagination token. # If the result set is too large to fit in a single response, this token # is returned. It encodes the position of the current result cursor. @@ -822,14 +1325,20 @@ module Google # @return [String] attr_accessor :next_page_token + # The list of Projects that matched the list filter. This list can + # be paginated. + # Corresponds to the JSON property `projects` + # @return [Array] + attr_accessor :projects + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @projects = args[:projects] if args.key?(:projects) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @projects = args[:projects] if args.key?(:projects) end end @@ -860,12 +1369,6 @@ module Google # @return [Google::Apis::CloudresourcemanagerV1::ResourceId] attr_accessor :parent - # Creation time. - # Read-only. - # Corresponds to the JSON property `createTime` - # @return [String] - attr_accessor :create_time - # The labels associated with this Project. # Label keys must be between 1 and 63 characters long and must conform # to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. @@ -880,6 +1383,12 @@ module Google # @return [Hash] attr_accessor :labels + # Creation time. + # Read-only. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + # The user-assigned display name of the Project. # It must be 4 to 30 characters. # Allowed characters are: lowercase and uppercase letters, numbers, @@ -909,8 +1418,8 @@ module Google @lifecycle_state = args[:lifecycle_state] if args.key?(:lifecycle_state) @project_number = args[:project_number] if args.key?(:project_number) @parent = args[:parent] if args.key?(:parent) - @create_time = args[:create_time] if args.key?(:create_time) @labels = args[:labels] if args.key?(:labels) + @create_time = args[:create_time] if args.key?(:create_time) @name = args[:name] if args.key?(:name) @project_id = args[:project_id] if args.key?(:project_id) end @@ -946,6 +1455,34 @@ module Google end end + # The response returned from the ListOrgPolicies method. It will be empty + # if no `Policies` are set on the resource. + class ListOrgPoliciesResponse + include Google::Apis::Core::Hashable + + # Page token used to retrieve the next page. This is currently not used, but + # the server may at any point start supplying a valid token. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The `Policies` that are set on the resource. It will be empty if no + # `Policies` are set. + # Corresponds to the JSON property `policies` + # @return [Array] + attr_accessor :policies + + 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) + @policies = args[:policies] if args.key?(:policies) + end + end + # A classification of the Folder Operation error. class FolderOperationError include Google::Apis::Core::Hashable @@ -965,6 +1502,155 @@ module Google end end + # Defines a Cloud Organization `Policy` which is used to specify `Constraints` + # for configurations of Cloud Platform resources. + class OrgPolicy + include Google::Apis::Core::Hashable + + # An opaque tag indicating the current version of the `Policy`, used for + # concurrency control. + # When the `Policy` is returned from either a `GetPolicy` or a + # `ListOrgPolicy` request, this `etag` indicates the version of the current + # `Policy` to use when executing a read-modify-write loop. + # When the `Policy` is returned from a `GetEffectivePolicy` request, the + # `etag` will be unset. + # When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value + # that was returned from a `GetOrgPolicy` request as part of a + # read-modify-write loop for concurrency control. Not setting the `etag`in a + # `SetOrgPolicy` request will result in an unconditional write of the + # `Policy`. + # Corresponds to the JSON property `etag` + # @return [String] + attr_accessor :etag + + # Used in `policy_type` to specify how `boolean_policy` will behave at this + # resource. + # Corresponds to the JSON property `booleanPolicy` + # @return [Google::Apis::CloudresourcemanagerV1::BooleanPolicy] + attr_accessor :boolean_policy + + # The name of the `Constraint` the `Policy` is configuring, for example, + # `constraints/serviceuser.services`. + # Immutable after creation. + # Corresponds to the JSON property `constraint` + # @return [String] + attr_accessor :constraint + + # The time stamp the `Policy` was previously updated. This is set by the + # server, not specified by the caller, and represents the last time a call to + # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will + # be ignored. + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + # Version of the `Policy`. Default version is 0; + # Corresponds to the JSON property `version` + # @return [Fixnum] + attr_accessor :version + + # Ignores policies set above this resource and restores the + # `constraint_default` enforcement behavior of the specific `Constraint` at + # this resource. + # Suppose that `constraint_default` is set to `ALLOW` for the + # `Constraint` `constraints/serviceuser.services`. Suppose that organization + # foo.com sets a `Policy` at their Organization resource node that restricts + # the allowed service activations to deny all service activations. They + # could then set a `Policy` with the `policy_type` `restore_default` on + # several experimental projects, restoring the `constraint_default` + # enforcement of the `Constraint` for only those projects, allowing those + # projects to have all services activated. + # Corresponds to the JSON property `restoreDefault` + # @return [Google::Apis::CloudresourcemanagerV1::RestoreDefault] + attr_accessor :restore_default + + # Used in `policy_type` to specify how `list_policy` behaves at this + # resource. + # A `ListPolicy` can define specific values that are allowed or denied by + # setting either the `allowed_values` or `denied_values` fields. It can also + # be used to allow or deny all values, by setting the `all_values` field. If + # `all_values` is `ALL_VALUES_UNSPECIFIED`, exactly one of `allowed_values` + # or `denied_values` must be set (attempting to set both or neither will + # result in a failed request). If `all_values` is set to either `ALLOW` or + # `DENY`, `allowed_values` and `denied_values` must be unset. + # Corresponds to the JSON property `listPolicy` + # @return [Google::Apis::CloudresourcemanagerV1::ListPolicy] + attr_accessor :list_policy + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @etag = args[:etag] if args.key?(:etag) + @boolean_policy = args[:boolean_policy] if args.key?(:boolean_policy) + @constraint = args[:constraint] if args.key?(:constraint) + @update_time = args[:update_time] if args.key?(:update_time) + @version = args[:version] if args.key?(:version) + @restore_default = args[:restore_default] if args.key?(:restore_default) + @list_policy = args[:list_policy] if args.key?(:list_policy) + end + end + + # Used in `policy_type` to specify how `boolean_policy` will behave at this + # resource. + class BooleanPolicy + include Google::Apis::Core::Hashable + + # If `true`, then the `Policy` is enforced. If `false`, then any + # configuration is acceptable. + # Suppose you have a `Constraint` `constraints/compute.disableSerialPortAccess` + # with `constraint_default` set to `ALLOW`. A `Policy` for that + # `Constraint` exhibits the following behavior: + # - If the `Policy` at this resource has enforced set to `false`, serial + # port connection attempts will be allowed. + # - If the `Policy` at this resource has enforced set to `true`, serial + # port connection attempts will be refused. + # - If the `Policy` at this resource is `RestoreDefault`, serial port + # connection attempts will be allowed. + # - If no `Policy` is set at this resource or anywhere higher in the + # resource hierarchy, serial port connection attempts will be allowed. + # - If no `Policy` is set at this resource, but one exists higher in the + # resource hierarchy, the behavior is as if the`Policy` were set at + # this resource. + # The following examples demonstrate the different possible layerings: + # Example 1 (nearest `Constraint` wins): + # `organizations/foo` has a `Policy` with: + # `enforced: false` + # `projects/bar` has no `Policy` set. + # The constraint at `projects/bar` and `organizations/foo` will not be + # enforced. + # Example 2 (enforcement gets replaced): + # `organizations/foo` has a `Policy` with: + # `enforced: false` + # `projects/bar` has a `Policy` with: + # `enforced: true` + # The constraint at `organizations/foo` is not enforced. + # The constraint at `projects/bar` is enforced. + # Example 3 (RestoreDefault): + # `organizations/foo` has a `Policy` with: + # `enforced: true` + # `projects/bar` has a `Policy` with: + # `RestoreDefault: ``` + # The constraint at `organizations/foo` is enforced. + # The constraint at `projects/bar` is not enforced, because + # `constraint_default` for the `Constraint` is `ALLOW`. + # Corresponds to the JSON property `enforced` + # @return [Boolean] + attr_accessor :enforced + alias_method :enforced?, :enforced + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @enforced = args[:enforced] if args.key?(:enforced) + end + end + # A Lien represents an encumbrance on the actions that can be performed on a # resource. class Lien @@ -1026,82 +1712,6 @@ module Google @restrictions = args[:restrictions] if args.key?(:restrictions) end end - - # Identifying information for a single ancestor of a project. - class Ancestor - include Google::Apis::Core::Hashable - - # A container to reference an id for any resource type. A `resource` in Google - # Cloud Platform is a generic term for something you (a developer) may want to - # interact with through one of our API's. Some examples are an App Engine app, - # a Compute Engine instance, a Cloud SQL database, and so on. - # Corresponds to the JSON property `resourceId` - # @return [Google::Apis::CloudresourcemanagerV1::ResourceId] - attr_accessor :resource_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @resource_id = args[:resource_id] if args.key?(:resource_id) - end - end - - # Request message for `SetIamPolicy` method. - class SetIamPolicyRequest - include Google::Apis::Core::Hashable - - # 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::CloudresourcemanagerV1::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 end end end diff --git a/generated/google/apis/cloudresourcemanager_v1/representations.rb b/generated/google/apis/cloudresourcemanager_v1/representations.rb index 821fd4b4a..b6c2f58a2 100644 --- a/generated/google/apis/cloudresourcemanager_v1/representations.rb +++ b/generated/google/apis/cloudresourcemanager_v1/representations.rb @@ -22,6 +22,30 @@ module Google module Apis module CloudresourcemanagerV1 + class Ancestor + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListConstraint + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SetOrgPolicyRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SetIamPolicyRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Empty class Representation < Google::Apis::Core::JsonRepresentation; end @@ -34,6 +58,18 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class ListAvailableOrgPolicyConstraintsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListPolicy + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class GetAncestryResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -76,12 +112,30 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class ListAvailableOrgPolicyConstraintsRequest + 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 GetEffectiveOrgPolicyRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListOrgPoliciesRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class AuditConfig class Representation < Google::Apis::Core::JsonRepresentation; end @@ -106,12 +160,36 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class Constraint + 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 RestoreDefault + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GetOrgPolicyRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ClearOrgPolicyRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class UndeleteProjectRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -124,6 +202,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class BooleanConstraint + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class TestIamPermissionsResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -160,12 +244,30 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class ListOrgPoliciesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class FolderOperationError class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class OrgPolicy + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BooleanPolicy + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Lien class Representation < Google::Apis::Core::JsonRepresentation; end @@ -173,15 +275,35 @@ module Google end class Ancestor - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :resource_id, as: 'resourceId', class: Google::Apis::CloudresourcemanagerV1::ResourceId, decorator: Google::Apis::CloudresourcemanagerV1::ResourceId::Representation - include Google::Apis::Core::JsonObjectSupport + end + end + + class ListConstraint + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :suggested_value, as: 'suggestedValue' + end + end + + class SetOrgPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :policy, as: 'policy', class: Google::Apis::CloudresourcemanagerV1::OrgPolicy, decorator: Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation + + end end class SetIamPolicyRequest - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :policy, as: 'policy', class: Google::Apis::CloudresourcemanagerV1::Policy, decorator: Google::Apis::CloudresourcemanagerV1::Policy::Representation - include Google::Apis::Core::JsonObjectSupport + property :update_mask, as: 'updateMask' + end end class Empty @@ -193,12 +315,32 @@ module Google class Organization # @private class Representation < Google::Apis::Core::JsonRepresentation + property :creation_time, as: 'creationTime' property :owner, as: 'owner', class: Google::Apis::CloudresourcemanagerV1::OrganizationOwner, decorator: Google::Apis::CloudresourcemanagerV1::OrganizationOwner::Representation property :lifecycle_state, as: 'lifecycleState' property :name, as: 'name' property :display_name, as: 'displayName' - property :creation_time, as: 'creationTime' + end + end + + class ListAvailableOrgPolicyConstraintsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :constraints, as: 'constraints', class: Google::Apis::CloudresourcemanagerV1::Constraint, decorator: Google::Apis::CloudresourcemanagerV1::Constraint::Representation + + end + end + + class ListPolicy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :allowed_values, as: 'allowedValues' + property :suggested_value, as: 'suggestedValue' + property :inherit_from_parent, as: 'inheritFromParent' + collection :denied_values, as: 'deniedValues' + property :all_values, as: 'allValues' end end @@ -221,9 +363,9 @@ module Google class SearchOrganizationsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :filter, as: 'filter' property :page_token, as: 'pageToken' property :page_size, as: 'pageSize' + property :filter, as: 'filter' end end @@ -262,11 +404,34 @@ module Google end end + class ListAvailableOrgPolicyConstraintsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :page_token, as: 'pageToken' + property :page_size, as: 'pageSize' + end + end + class ResourceId # @private class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' property :type, as: 'type' + property :id, as: 'id' + end + end + + class GetEffectiveOrgPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :constraint, as: 'constraint' + end + end + + class ListOrgPoliciesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :page_token, as: 'pageToken' + property :page_size, as: 'pageSize' end end @@ -294,9 +459,9 @@ module Google class Status # @private class Representation < Google::Apis::Core::JsonRepresentation - property :message, as: 'message' collection :details, as: 'details' property :code, as: 'code' + property :message, as: 'message' end end @@ -309,6 +474,21 @@ module Google end end + class Constraint + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :version, as: 'version' + property :list_constraint, as: 'listConstraint', class: Google::Apis::CloudresourcemanagerV1::ListConstraint, decorator: Google::Apis::CloudresourcemanagerV1::ListConstraint::Representation + + property :display_name, as: 'displayName' + property :description, as: 'description' + property :boolean_constraint, as: 'booleanConstraint', class: Google::Apis::CloudresourcemanagerV1::BooleanConstraint, decorator: Google::Apis::CloudresourcemanagerV1::BooleanConstraint::Representation + + property :constraint_default, as: 'constraintDefault' + property :name, as: 'name' + end + end + class Binding # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -317,6 +497,27 @@ module Google end end + class RestoreDefault + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class GetOrgPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :constraint, as: 'constraint' + end + end + + class ClearOrgPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :etag, :base64 => true, as: 'etag' + property :constraint, as: 'constraint' + end + end + class UndeleteProjectRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -332,6 +533,12 @@ module Google end end + class BooleanConstraint + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + class TestIamPermissionsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -355,9 +562,9 @@ module Google class ListProjectsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' collection :projects, as: 'projects', class: Google::Apis::CloudresourcemanagerV1::Project, decorator: Google::Apis::CloudresourcemanagerV1::Project::Representation - property :next_page_token, as: 'nextPageToken' end end @@ -368,8 +575,8 @@ module Google 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 :create_time, as: 'createTime' property :name, as: 'name' property :project_id, as: 'projectId' end @@ -384,6 +591,15 @@ module Google end end + class ListOrgPoliciesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :policies, as: 'policies', class: Google::Apis::CloudresourcemanagerV1::OrgPolicy, decorator: Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation + + end + end + class FolderOperationError # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -391,6 +607,29 @@ module Google end end + class OrgPolicy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :etag, :base64 => true, as: 'etag' + property :boolean_policy, as: 'booleanPolicy', class: Google::Apis::CloudresourcemanagerV1::BooleanPolicy, decorator: Google::Apis::CloudresourcemanagerV1::BooleanPolicy::Representation + + property :constraint, as: 'constraint' + property :update_time, as: 'updateTime' + property :version, as: 'version' + property :restore_default, as: 'restoreDefault', class: Google::Apis::CloudresourcemanagerV1::RestoreDefault, decorator: Google::Apis::CloudresourcemanagerV1::RestoreDefault::Representation + + property :list_policy, as: 'listPolicy', class: Google::Apis::CloudresourcemanagerV1::ListPolicy, decorator: Google::Apis::CloudresourcemanagerV1::ListPolicy::Representation + + end + end + + class BooleanPolicy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :enforced, as: 'enforced' + end + end + class Lien # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -402,23 +641,6 @@ module Google collection :restrictions, as: 'restrictions' 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 SetIamPolicyRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :update_mask, as: 'updateMask' - property :policy, as: 'policy', class: Google::Apis::CloudresourcemanagerV1::Policy, decorator: Google::Apis::CloudresourcemanagerV1::Policy::Representation - - end - end end end end diff --git a/generated/google/apis/cloudresourcemanager_v1/service.rb b/generated/google/apis/cloudresourcemanager_v1/service.rb index 68504d8c5..deaf27280 100644 --- a/generated/google/apis/cloudresourcemanager_v1/service.rb +++ b/generated/google/apis/cloudresourcemanager_v1/service.rb @@ -47,38 +47,13 @@ module Google super('https://cloudresourcemanager.googleapis.com/', '') 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. + # Updates the specified `Policy` on the resource. Creates a new `Policy` for + # that `Constraint` on the resource if one does not exist. + # Not supplying an `etag` on the request `Policy` results in an unconditional + # write of the `Policy`. # @param [String] resource - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param [Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest] set_iam_policy_request_object + # Resource name of the resource to attach the `Policy`. + # @param [Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest] set_org_policy_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -88,34 +63,32 @@ module Google # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Policy] parsed result object + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::CloudresourcemanagerV1::Policy] + # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_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 + def set_folder_org_policy_v1(resource, set_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:setOrgPolicyV1', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest::Representation + command.request_object = set_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - # 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 + # Gets the effective `Policy` on a resource. This is the result of merging + # `Policies` in the resource hierarchy. The returned `Policy` will not have + # an `etag`set because it is a computed `Policy` across multiple resources. + # @param [String] resource + # The name of the resource to start computing the effective `Policy`. + # @param [Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest] get_effective_org_policy_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -125,20 +98,331 @@ module Google # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Operation] parsed result object + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::CloudresourcemanagerV1::Operation] + # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def 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 + def get_folder_effective_org_policy_v1(resource, get_effective_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:getEffectiveOrgPolicyV1', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest::Representation + command.request_object = get_effective_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Clears a `Policy` from a resource. + # @param [String] resource + # Name of the resource for the `Policy` to clear. + # @param [Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest] clear_org_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def clear_folder_org_policy(resource, clear_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:clearOrgPolicy', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest::Representation + command.request_object = clear_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::Empty + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates the specified `Policy` on the resource. Creates a new `Policy` for + # that `Constraint` on the resource if one does not exist. + # Not supplying an `etag` on the request `Policy` results in an unconditional + # write of the `Policy`. + # @param [String] resource + # Resource name of the resource to attach the `Policy`. + # @param [Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest] set_org_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def set_folder_org_policy(resource, set_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:setOrgPolicy', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest::Representation + command.request_object = set_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Clears a `Policy` from a resource. + # @param [String] resource + # Name of the resource for the `Policy` to clear. + # @param [Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest] clear_org_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def clear_folder_org_policy_v1(resource, clear_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:clearOrgPolicyV1', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest::Representation + command.request_object = clear_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::Empty + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists all the `Policies` set for a particular resource. + # @param [String] resource + # Name of the resource to list Policies for. + # @param [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesRequest] list_org_policies_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_folder_org_policies(resource, list_org_policies_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:listOrgPolicies', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesRequest::Representation + command.request_object = list_org_policies_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists `Constraints` that could be applied on the specified resource. + # @param [String] resource + # Name of the resource to list `Constraints` for. + # @param [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsRequest] list_available_org_policy_constraints_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_folder_available_org_policy_constraints(resource, list_available_org_policy_constraints_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:listAvailableOrgPolicyConstraints', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsRequest::Representation + command.request_object = list_available_org_policy_constraints_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a `Policy` on a resource. + # If no `Policy` is set on the resource, a `Policy` is returned with default + # values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The + # `etag` value can be used with `SetOrgPolicy()` to create or update a + # `Policy` during read-modify-write. + # @param [String] resource + # Name of the resource the `Policy` is set on. + # @param [Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest] get_org_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_folder_org_policy(resource, get_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:getOrgPolicy', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest::Representation + command.request_object = get_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the effective `Policy` on a resource. This is the result of merging + # `Policies` in the resource hierarchy. The returned `Policy` will not have + # an `etag`set because it is a computed `Policy` across multiple resources. + # @param [String] resource + # The name of the resource to start computing the effective `Policy`. + # @param [Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest] get_effective_org_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_folder_effective_org_policy(resource, get_effective_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:getEffectiveOrgPolicy', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest::Representation + command.request_object = get_effective_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a `Policy` on a resource. + # If no `Policy` is set on the resource, a `Policy` is returned with default + # values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The + # `etag` value can be used with `SetOrgPolicy()` to create or update a + # `Policy` during read-modify-write. + # @param [String] resource + # Name of the resource the `Policy` is set on. + # @param [Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest] get_org_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_folder_org_policy_v1(resource, get_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:getOrgPolicyV1', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest::Representation + command.request_object = get_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists `Constraints` that could be applied on the specified resource. + # @param [String] resource + # Name of the resource to list `Constraints` for. + # @param [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsRequest] list_available_org_policy_constraints_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_available_org_policy_constraints(resource, list_available_org_policy_constraints_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:listAvailableOrgPolicyConstraints', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsRequest::Representation + command.request_object = list_available_org_policy_constraints_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse + command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) @@ -179,12 +463,14 @@ module Google 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. + # Gets a `Policy` on a resource. + # If no `Policy` is set on the resource, a `Policy` is returned with default + # values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The + # `etag` value can be used with `SetOrgPolicy()` to create or update a + # `Policy` during read-modify-write. + # @param [String] resource + # Name of the resource the `Policy` is set on. + # @param [Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest] get_org_policy_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -194,19 +480,93 @@ module Google # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Project] parsed result object + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::CloudresourcemanagerV1::Project] + # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_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? + def get_project_org_policy(resource, get_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:getOrgPolicy', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest::Representation + command.request_object = get_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the effective `Policy` on a resource. This is the result of merging + # `Policies` in the resource hierarchy. The returned `Policy` will not have + # an `etag`set because it is a computed `Policy` across multiple resources. + # @param [String] resource + # The name of the resource to start computing the effective `Policy`. + # @param [Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest] get_effective_org_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_effective_org_policy(resource, get_effective_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:getEffectiveOrgPolicy', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest::Representation + command.request_object = get_effective_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a `Policy` on a resource. + # If no `Policy` is set on the resource, a `Policy` is returned with default + # values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The + # `etag` value can be used with `SetOrgPolicy()` to create or update a + # `Policy` during read-modify-write. + # @param [String] resource + # Name of the resource the `Policy` is set on. + # @param [Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest] get_org_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_org_policy_v1(resource, get_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:getOrgPolicyV1', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest::Representation + command.request_object = get_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy + command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) @@ -287,6 +647,272 @@ module Google execute_or_queue_command(command, &block) end + # Updates the specified `Policy` on the resource. Creates a new `Policy` for + # that `Constraint` on the resource if one does not exist. + # Not supplying an `etag` on the request `Policy` results in an unconditional + # write of the `Policy`. + # @param [String] resource + # Resource name of the resource to attach the `Policy`. + # @param [Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest] set_org_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def set_project_org_policy_v1(resource, set_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:setOrgPolicyV1', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest::Representation + command.request_object = set_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # 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 [String] page_token + # A pagination token returned from a previous call to ListProjects + # that indicates from where listing should continue. + # Optional. + # @param [Fixnum] page_size + # The maximum number of Projects to return in the response. + # The server can return fewer Projects than requested. + # If unspecified, server picks an appropriate default. + # Optional. + # @param [String] filter + # An expression for filtering the results of the request. Filter rules are + # case insensitive. The fields eligible for filtering are: + # + `name` + # + `id` + # + labels.key where *key* is the name of a label + # Some examples of using labels as filters: + # |Filter|Description| + # |------|-----------| + # |name:*|The project has a name.| + # |name:Howl|The project's name is `Howl` or `howl`.| + # |name:HOWL|Equivalent to above.| + # |NAME:howl|Equivalent to above.| + # |labels.color:*|The project has the label `color`.| + # |labels.color:red|The project's label `color` has the value `red`.| + # |labels.color:red labels.size:big|The project's label `color` has the + # value `red` and its label `size` has the value `big`. + # Optional. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListProjectsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::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_token: nil, page_size: nil, filter: 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['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 + + # Updates the specified `Policy` on the resource. Creates a new `Policy` for + # that `Constraint` on the resource if one does not exist. + # Not supplying an `etag` on the request `Policy` results in an unconditional + # write of the `Policy`. + # @param [String] resource + # Resource name of the resource to attach the `Policy`. + # @param [Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest] set_org_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def set_project_org_policy(resource, set_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:setOrgPolicy', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest::Representation + command.request_object = set_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Clears a `Policy` from a resource. + # @param [String] resource + # Name of the resource for the `Policy` to clear. + # @param [Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest] clear_org_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def clear_project_org_policy_v1(resource, clear_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:clearOrgPolicyV1', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest::Representation + command.request_object = clear_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::Empty + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # 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 [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, 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 + + # Lists all the `Policies` set for a particular resource. + # @param [String] resource + # Name of the resource to list Policies for. + # @param [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesRequest] list_org_policies_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_org_policies(resource, list_org_policies_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:listOrgPolicies', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesRequest::Representation + command.request_object = list_org_policies_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Retrieves the Project identified by the specified + # `project_id` (for example, `my-project-123`). + # The caller must have read permissions for this Project. + # @param [String] project_id + # The Project ID (for example, `my-project-123`). + # Required. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Project] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::Project] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project(project_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/projects/{projectId}', options) + command.response_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::Project + command.params['projectId'] = project_id unless project_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Gets a list of ancestors in the resource hierarchy for the Project # identified by the specified `project_id` (for example, `my-project-123`). # The caller must have read permissions for this Project. @@ -357,6 +983,41 @@ module Google execute_or_queue_command(command, &block) end + # Gets the effective `Policy` on a resource. This is the result of merging + # `Policies` in the resource hierarchy. The returned `Policy` will not have + # an `etag`set because it is a computed `Policy` across multiple resources. + # @param [String] resource + # The name of the resource to start computing the effective `Policy`. + # @param [Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest] get_effective_org_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_effective_org_policy_v1(resource, get_effective_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:getEffectiveOrgPolicyV1', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest::Representation + command.request_object = get_effective_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # 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: @@ -406,36 +1067,10 @@ module Google 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 [String] page_token - # A pagination token returned from a previous call to ListProjects - # that indicates from where listing should continue. - # Optional. - # @param [Fixnum] page_size - # The maximum number of Projects to return in the response. - # The server can return fewer Projects than requested. - # If unspecified, server picks an appropriate default. - # Optional. - # @param [String] filter - # An expression for filtering the results of the request. Filter rules are - # case insensitive. The fields eligible for filtering are: - # + `name` - # + `id` - # + labels.key where *key* is the name of a label - # Some examples of using labels as filters: - # |Filter|Description| - # |------|-----------| - # |name:*|The project has a name.| - # |name:Howl|The project's name is `Howl` or `howl`.| - # |name:HOWL|Equivalent to above.| - # |NAME:howl|Equivalent to above.| - # |labels.color:*|The project has the label `color`.| - # |labels.color:red|The project's label `color` has the value `red`.| - # |labels.color:red label.size:big|The project's label `color` has the - # value `red` and its label `size` has the value `big`. - # Optional. + # Clears a `Policy` from a resource. + # @param [String] resource + # Name of the resource for the `Policy` to clear. + # @param [Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest] clear_org_policy_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -445,33 +1080,58 @@ module Google # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListProjectsResponse] parsed result object + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::CloudresourcemanagerV1::ListProjectsResponse] + # @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 list_projects(page_token: nil, page_size: nil, filter: 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['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['filter'] = filter unless filter.nil? + def clear_project_org_policy(resource, clear_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:clearOrgPolicy', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest::Representation + command.request_object = clear_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::Empty + command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - # 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". + # Sets the IAM access control policy for the specified Project. Replaces + # any existing policy. + # The following constraints apply when using `setIamPolicy()`: + # + Project does not support `allUsers` and `allAuthenticatedUsers` as + # `members` in a `Binding` of a `Policy`. + # + The owner role can be granted only to `user` and `serviceAccount`. + # + Service accounts can be made owners of a project directly + # without any restrictions. However, to be added as an owner, a user must be + # invited via Cloud Platform console and must accept the invitation. + # + A user cannot be granted the owner role using `setIamPolicy()`. The user + # must be granted the owner role using the Cloud Platform Console and must + # explicitly accept the invitation. + # + Invitations to grant the owner role cannot be sent using + # `setIamPolicy()`; + # they must be sent only using the Cloud Platform Console. + # + Membership changes that leave the project without any owners that have + # accepted the Terms of Service (ToS) will be rejected. + # + There must be at least one owner who has accepted the Terms of + # Service (ToS) agreement in the policy. Calling `setIamPolicy()` to + # remove the last ToS-accepted owner from the policy will fail. This + # restriction also applies to legacy projects that no longer have owners + # who have accepted the ToS. Edits to IAM policies will be rejected until + # the lack of a ToS-accepting owner is rectified. + # + Calling this method requires enabling the App Engine Admin API. + # Note: Removing service accounts from policies or changing their roles + # can render services completely inoperable. It is important to understand + # how the service account is being used before removing or updating its + # roles. # @param [String] resource - # REQUIRED: The resource for which the policy is being requested. + # REQUIRED: The resource for which the policy is being specified. # See the operation documentation for the appropriate value for this field. - # @param [Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest] get_iam_policy_request_object + # @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 @@ -489,10 +1149,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 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 + 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? @@ -501,6 +1161,39 @@ module Google execute_or_queue_command(command, &block) end + # Lists all the `Policies` set for a particular resource. + # @param [String] resource + # Name of the resource to list Policies for. + # @param [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesRequest] list_org_policies_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_organization_org_policies(resource, list_org_policies_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:listOrgPolicies', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesRequest::Representation + command.request_object = list_org_policies_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # 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 @@ -564,13 +1257,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". + # Gets the effective `Policy` on a resource. This is the result of merging + # `Policies` in the resource hierarchy. The returned `Policy` will not have + # an `etag`set because it is a computed `Policy` across multiple resources. # @param [String] resource - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param [Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest] set_iam_policy_request_object + # The name of the resource to start computing the effective `Policy`. + # @param [Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest] get_effective_org_policy_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -580,20 +1272,20 @@ module Google # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Policy] parsed result object + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::CloudresourcemanagerV1::Policy] + # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_organization_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 + def get_organization_effective_org_policy_v1(resource, get_effective_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:getEffectiveOrgPolicyV1', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest::Representation + command.request_object = get_effective_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy command.params['resource'] = resource unless resource.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? @@ -636,6 +1328,358 @@ module Google execute_or_queue_command(command, &block) end + # Clears a `Policy` from a resource. + # @param [String] resource + # Name of the resource for the `Policy` to clear. + # @param [Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest] clear_org_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def clear_organization_org_policy(resource, clear_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:clearOrgPolicy', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest::Representation + command.request_object = clear_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::Empty + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Sets the access control policy on an Organization resource. Replaces any + # existing policy. The `resource` field should be the organization's resource + # name, e.g. "organizations/123". + # @param [String] resource + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param [Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest] set_iam_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::Policy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def set_organization_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest::Representation + command.request_object = set_iam_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists `Constraints` that could be applied on the specified resource. + # @param [String] resource + # Name of the resource to list `Constraints` for. + # @param [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsRequest] list_available_org_policy_constraints_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_organization_available_org_policy_constraints(resource, list_available_org_policy_constraints_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:listAvailableOrgPolicyConstraints', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsRequest::Representation + command.request_object = list_available_org_policy_constraints_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the access control policy for an Organization resource. May be empty + # if no such policy or resource exists. The `resource` field should be the + # organization's resource name, e.g. "organizations/123". + # @param [String] resource + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param [Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest] get_iam_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::Policy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_organization_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest::Representation + command.request_object = get_iam_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a `Policy` on a resource. + # If no `Policy` is set on the resource, a `Policy` is returned with default + # values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The + # `etag` value can be used with `SetOrgPolicy()` to create or update a + # `Policy` during read-modify-write. + # @param [String] resource + # Name of the resource the `Policy` is set on. + # @param [Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest] get_org_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_organization_org_policy(resource, get_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:getOrgPolicy', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest::Representation + command.request_object = get_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the effective `Policy` on a resource. This is the result of merging + # `Policies` in the resource hierarchy. The returned `Policy` will not have + # an `etag`set because it is a computed `Policy` across multiple resources. + # @param [String] resource + # The name of the resource to start computing the effective `Policy`. + # @param [Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest] get_effective_org_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_organization_effective_org_policy(resource, get_effective_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:getEffectiveOrgPolicy', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest::Representation + command.request_object = get_effective_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a `Policy` on a resource. + # If no `Policy` is set on the resource, a `Policy` is returned with default + # values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The + # `etag` value can be used with `SetOrgPolicy()` to create or update a + # `Policy` during read-modify-write. + # @param [String] resource + # Name of the resource the `Policy` is set on. + # @param [Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest] get_org_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_organization_org_policy_v1(resource, get_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:getOrgPolicyV1', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest::Representation + command.request_object = get_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates the specified `Policy` on the resource. Creates a new `Policy` for + # that `Constraint` on the resource if one does not exist. + # Not supplying an `etag` on the request `Policy` results in an unconditional + # write of the `Policy`. + # @param [String] resource + # Resource name of the resource to attach the `Policy`. + # @param [Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest] set_org_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def set_organization_org_policy_v1(resource, set_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:setOrgPolicyV1', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest::Representation + command.request_object = set_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates the specified `Policy` on the resource. Creates a new `Policy` for + # that `Constraint` on the resource if one does not exist. + # Not supplying an `etag` on the request `Policy` results in an unconditional + # write of the `Policy`. + # @param [String] resource + # Resource name of the resource to attach the `Policy`. + # @param [Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest] set_org_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def set_organization_org_policy(resource, set_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:setOrgPolicy', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest::Representation + command.request_object = set_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Clears a `Policy` from a resource. + # @param [String] resource + # Name of the resource for the `Policy` to clear. + # @param [Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest] clear_org_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def clear_organization_org_policy_v1(resource, clear_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:clearOrgPolicyV1', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest::Representation + command.request_object = clear_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1::Empty + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Create a Lien which applies to the resource denoted by the `parent` field. # Callers of this method will require permission on the `parent` resource. # For example, applying to `projects/1234` requires permission @@ -707,13 +1751,13 @@ module Google # Callers of this method will require permission on the `parent` resource. # For example, a Lien with a `parent` of `projects/1234` requires permission # `resourcemanager.projects.get`. + # @param [String] parent + # The name of the resource to list all attached Liens. + # For example, `projects/1234`. # @param [String] page_token # The `next_page_token` value returned from a previous List request, if any. # @param [Fixnum] page_size # The maximum number of items to return. This is a suggestion for the server. - # @param [String] parent - # The name of the resource to list all attached Liens. - # For example, `projects/1234`. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -731,13 +1775,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_liens(page_token: nil, page_size: nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_liens(parent: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/liens', options) command.response_representation = Google::Apis::CloudresourcemanagerV1::ListLiensResponse::Representation command.response_class = Google::Apis::CloudresourcemanagerV1::ListLiensResponse + command.query['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['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) diff --git a/generated/google/apis/cloudresourcemanager_v1beta1.rb b/generated/google/apis/cloudresourcemanager_v1beta1.rb index bd6158dae..aaebe60bb 100644 --- a/generated/google/apis/cloudresourcemanager_v1beta1.rb +++ b/generated/google/apis/cloudresourcemanager_v1beta1.rb @@ -26,13 +26,13 @@ module Google # @see https://cloud.google.com/resource-manager module CloudresourcemanagerV1beta1 VERSION = 'V1beta1' - REVISION = '20170301' - - # View your data across Google Cloud Platform services - AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only' + REVISION = '20170324' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' + + # View your data across Google Cloud Platform services + AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only' end end end diff --git a/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb b/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb index db3d34f11..45f8dba47 100644 --- a/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +++ b/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb @@ -22,6 +22,99 @@ module Google module Apis module CloudresourcemanagerV1beta1 + # The request sent to the UndeleteProject + # method. + class UndeleteProjectRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # The request sent to the ClearOrgPolicy method. + class ClearOrgPolicyRequest + include Google::Apis::Core::Hashable + + # The current version, for concurrency control. Not sending an `etag` + # will cause the `Policy` to be cleared blindly. + # Corresponds to the JSON property `etag` + # @return [String] + attr_accessor :etag + + # Name of the `Constraint` of the `Policy` to clear. + # Corresponds to the JSON property `constraint` + # @return [String] + attr_accessor :constraint + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @etag = args[:etag] if args.key?(:etag) + @constraint = args[:constraint] if args.key?(:constraint) + end + end + + # A status object which is used as the `metadata` field for the Operation + # returned by CreateProject. It provides insight for when significant phases of + # Project creation have completed. + class ProjectCreationStatus + include Google::Apis::Core::Hashable + + # True if the project creation process is complete. + # Corresponds to the JSON property `ready` + # @return [Boolean] + attr_accessor :ready + alias_method :ready?, :ready + + # Creation time of the project creation workflow. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # True if the project can be retrieved using GetProject. No other operations + # on the project are guaranteed to work until the project creation is + # complete. + # Corresponds to the JSON property `gettable` + # @return [Boolean] + attr_accessor :gettable + alias_method :gettable?, :gettable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @ready = args[:ready] if args.key?(:ready) + @create_time = args[:create_time] if args.key?(:create_time) + @gettable = args[:gettable] if args.key?(:gettable) + end + end + + # A `Constraint` that is either enforced or not. + # For example a constraint `constraints/compute.disableSerialPortAccess`. + # If it is enforced on a VM instance, serial port connections will not be + # opened to that instance. + class BooleanConstraint + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + # Response message for `TestIamPermissions` method. class TestIamPermissionsResponse include Google::Apis::Core::Hashable @@ -77,6 +170,679 @@ module Google end end + # A page of the response received from the + # ListProjects + # method. + # A paginated response where more pages are available has + # `next_page_token` set. This token can be used in a subsequent request to + # retrieve the next request page. + class ListProjectsResponse + include Google::Apis::Core::Hashable + + # Pagination token. + # If the result set is too large to fit in a single response, this token + # is returned. It encodes the position of the current result cursor. + # Feeding this value into a new list request with the `page_token` parameter + # gives the next page of the results. + # When `next_page_token` is not filled in, there is no next page and + # the list returned is the last page in the result set. + # Pagination tokens have a limited lifetime. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The list of Projects that matched the list filter. This list can + # be paginated. + # Corresponds to the JSON property `projects` + # @return [Array] + attr_accessor :projects + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @projects = args[:projects] if args.key?(:projects) + end + end + + # A Project is a high-level Google Cloud Platform entity. It is a + # container for ACLs, APIs, App Engine Apps, VMs, and other + # Google Cloud Platform resources. + class Project + include Google::Apis::Core::Hashable + + # The number uniquely identifying the project. + # Example: 415104041262 + # Read-only. + # Corresponds to the JSON property `projectNumber` + # @return [String] + attr_accessor :project_number + + # A container to reference an id for any resource type. A `resource` in Google + # Cloud Platform is a generic term for something you (a developer) may want to + # interact with through one of our API's. Some examples are an App Engine app, + # a Compute Engine instance, a Cloud SQL database, and so on. + # Corresponds to the JSON property `parent` + # @return [Google::Apis::CloudresourcemanagerV1beta1::ResourceId] + attr_accessor :parent + + # Creation time. + # Read-only. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # The labels associated with this Project. + # Label keys must be between 1 and 63 characters long and must conform + # to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. + # Label values must be between 0 and 63 characters long and must conform + # to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. + # No more than 256 labels can be associated with a given resource. + # Clients should store labels in a representation such as JSON that does not + # depend on specific characters being disallowed. + # Example: "environment" : "dev" + # Read-write. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # The user-assigned display name of the Project. + # It must be 4 to 30 characters. + # Allowed characters are: lowercase and uppercase letters, numbers, + # hyphen, single-quote, double-quote, space, and exclamation point. + # Example: My Project + # Read-write. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The unique, user-assigned ID of the Project. + # It must be 6 to 30 lowercase letters, digits, or hyphens. + # It must start with a letter. + # Trailing hyphens are prohibited. + # Example: tokyo-rain-123 + # Read-only after creation. + # Corresponds to the JSON property `projectId` + # @return [String] + attr_accessor :project_id + + # The Project lifecycle state. + # Read-only. + # Corresponds to the JSON property `lifecycleState` + # @return [String] + attr_accessor :lifecycle_state + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @project_number = args[:project_number] if args.key?(:project_number) + @parent = args[:parent] if args.key?(:parent) + @create_time = args[:create_time] if args.key?(:create_time) + @labels = args[:labels] if args.key?(:labels) + @name = args[:name] if args.key?(:name) + @project_id = args[:project_id] if args.key?(:project_id) + @lifecycle_state = args[:lifecycle_state] if args.key?(:lifecycle_state) + end + end + + # The response returned from the ListOrgPolicies method. It will be empty + # if no `Policies` are set on the resource. + class ListOrgPoliciesResponse + include Google::Apis::Core::Hashable + + # The `Policies` that are set on the resource. It will be empty if no + # `Policies` are set. + # Corresponds to the JSON property `policies` + # @return [Array] + attr_accessor :policies + + # Page token used to retrieve the next page. This is currently not used, but + # the server may at any point start supplying a valid token. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @policies = args[:policies] if args.key?(:policies) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # A classification of the Folder Operation error. + class FolderOperationError + include Google::Apis::Core::Hashable + + # The type of operation error experienced. + # Corresponds to the JSON property `errorMessageId` + # @return [String] + attr_accessor :error_message_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @error_message_id = args[:error_message_id] if args.key?(:error_message_id) + end + end + + # Defines a Cloud Organization `Policy` which is used to specify `Constraints` + # for configurations of Cloud Platform resources. + class OrgPolicy + include Google::Apis::Core::Hashable + + # Version of the `Policy`. Default version is 0; + # Corresponds to the JSON property `version` + # @return [Fixnum] + attr_accessor :version + + # Ignores policies set above this resource and restores the + # `constraint_default` enforcement behavior of the specific `Constraint` at + # this resource. + # Suppose that `constraint_default` is set to `ALLOW` for the + # `Constraint` `constraints/serviceuser.services`. Suppose that organization + # foo.com sets a `Policy` at their Organization resource node that restricts + # the allowed service activations to deny all service activations. They + # could then set a `Policy` with the `policy_type` `restore_default` on + # several experimental projects, restoring the `constraint_default` + # enforcement of the `Constraint` for only those projects, allowing those + # projects to have all services activated. + # Corresponds to the JSON property `restoreDefault` + # @return [Google::Apis::CloudresourcemanagerV1beta1::RestoreDefault] + attr_accessor :restore_default + + # Used in `policy_type` to specify how `list_policy` behaves at this + # resource. + # A `ListPolicy` can define specific values that are allowed or denied by + # setting either the `allowed_values` or `denied_values` fields. It can also + # be used to allow or deny all values, by setting the `all_values` field. If + # `all_values` is `ALL_VALUES_UNSPECIFIED`, exactly one of `allowed_values` + # or `denied_values` must be set (attempting to set both or neither will + # result in a failed request). If `all_values` is set to either `ALLOW` or + # `DENY`, `allowed_values` and `denied_values` must be unset. + # Corresponds to the JSON property `listPolicy` + # @return [Google::Apis::CloudresourcemanagerV1beta1::ListPolicy] + attr_accessor :list_policy + + # An opaque tag indicating the current version of the `Policy`, used for + # concurrency control. + # When the `Policy` is returned from either a `GetPolicy` or a + # `ListOrgPolicy` request, this `etag` indicates the version of the current + # `Policy` to use when executing a read-modify-write loop. + # When the `Policy` is returned from a `GetEffectivePolicy` request, the + # `etag` will be unset. + # When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value + # that was returned from a `GetOrgPolicy` request as part of a + # read-modify-write loop for concurrency control. Not setting the `etag`in a + # `SetOrgPolicy` request will result in an unconditional write of the + # `Policy`. + # Corresponds to the JSON property `etag` + # @return [String] + attr_accessor :etag + + # The name of the `Constraint` the `Policy` is configuring, for example, + # `constraints/serviceuser.services`. + # Immutable after creation. + # Corresponds to the JSON property `constraint` + # @return [String] + attr_accessor :constraint + + # Used in `policy_type` to specify how `boolean_policy` will behave at this + # resource. + # Corresponds to the JSON property `booleanPolicy` + # @return [Google::Apis::CloudresourcemanagerV1beta1::BooleanPolicy] + attr_accessor :boolean_policy + + # The time stamp the `Policy` was previously updated. This is set by the + # server, not specified by the caller, and represents the last time a call to + # `SetOrgPolicy` was made for that `Policy`. Any value set by the client will + # be ignored. + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @version = args[:version] if args.key?(:version) + @restore_default = args[:restore_default] if args.key?(:restore_default) + @list_policy = args[:list_policy] if args.key?(:list_policy) + @etag = args[:etag] if args.key?(:etag) + @constraint = args[:constraint] if args.key?(:constraint) + @boolean_policy = args[:boolean_policy] if args.key?(:boolean_policy) + @update_time = args[:update_time] if args.key?(:update_time) + end + end + + # Used in `policy_type` to specify how `boolean_policy` will behave at this + # resource. + class BooleanPolicy + include Google::Apis::Core::Hashable + + # If `true`, then the `Policy` is enforced. If `false`, then any + # configuration is acceptable. + # Suppose you have a `Constraint` `constraints/compute.disableSerialPortAccess` + # with `constraint_default` set to `ALLOW`. A `Policy` for that + # `Constraint` exhibits the following behavior: + # - If the `Policy` at this resource has enforced set to `false`, serial + # port connection attempts will be allowed. + # - If the `Policy` at this resource has enforced set to `true`, serial + # port connection attempts will be refused. + # - If the `Policy` at this resource is `RestoreDefault`, serial port + # connection attempts will be allowed. + # - If no `Policy` is set at this resource or anywhere higher in the + # resource hierarchy, serial port connection attempts will be allowed. + # - If no `Policy` is set at this resource, but one exists higher in the + # resource hierarchy, the behavior is as if the`Policy` were set at + # this resource. + # The following examples demonstrate the different possible layerings: + # Example 1 (nearest `Constraint` wins): + # `organizations/foo` has a `Policy` with: + # `enforced: false` + # `projects/bar` has no `Policy` set. + # The constraint at `projects/bar` and `organizations/foo` will not be + # enforced. + # Example 2 (enforcement gets replaced): + # `organizations/foo` has a `Policy` with: + # `enforced: false` + # `projects/bar` has a `Policy` with: + # `enforced: true` + # The constraint at `organizations/foo` is not enforced. + # The constraint at `projects/bar` is enforced. + # Example 3 (RestoreDefault): + # `organizations/foo` has a `Policy` with: + # `enforced: true` + # `projects/bar` has a `Policy` with: + # `RestoreDefault: ``` + # The constraint at `organizations/foo` is enforced. + # The constraint at `projects/bar` is not enforced, because + # `constraint_default` for the `Constraint` is `ALLOW`. + # Corresponds to the JSON property `enforced` + # @return [Boolean] + attr_accessor :enforced + alias_method :enforced?, :enforced + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @enforced = args[:enforced] if args.key?(:enforced) + end + end + + # Identifying information for a single ancestor of a project. + class Ancestor + include Google::Apis::Core::Hashable + + # A container to reference an id for any resource type. A `resource` in Google + # Cloud Platform is a generic term for something you (a developer) may want to + # interact with through one of our API's. Some examples are an App Engine app, + # a Compute Engine instance, a Cloud SQL database, and so on. + # Corresponds to the JSON property `resourceId` + # @return [Google::Apis::CloudresourcemanagerV1beta1::ResourceId] + attr_accessor :resource_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @resource_id = args[:resource_id] if args.key?(:resource_id) + end + end + + # A `Constraint` that allows or disallows a list of string values, which are + # configured by an Organization's policy administrator with a `Policy`. + class ListConstraint + include Google::Apis::Core::Hashable + + # Optional. The Google Cloud Console will try to default to a configuration + # that matches the value specified in this `Constraint`. + # Corresponds to the JSON property `suggestedValue` + # @return [String] + attr_accessor :suggested_value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @suggested_value = args[:suggested_value] if args.key?(:suggested_value) + end + end + + # The request sent to the SetOrgPolicyRequest method. + class SetOrgPolicyRequest + include Google::Apis::Core::Hashable + + # Defines a Cloud Organization `Policy` which is used to specify `Constraints` + # for configurations of Cloud Platform resources. + # Corresponds to the JSON property `policy` + # @return [Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy] + 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 + + # 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::CloudresourcemanagerV1beta1::Policy] + attr_accessor :policy + + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # paths: "bindings, etag" + # This field is only used by Cloud IAM. + # Corresponds to the JSON property `updateMask` + # @return [String] + attr_accessor :update_mask + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @policy = args[:policy] if args.key?(:policy) + @update_mask = args[:update_mask] if args.key?(:update_mask) + end + end + + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # service Foo ` + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # ` + # The JSON representation for `Empty` is empty JSON object ````. + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # The root node in the resource hierarchy to which a particular entity's + # (e.g., company) resources belong. + class Organization + include Google::Apis::Core::Hashable + + # The organization's current lifecycle state. Assigned by the server. + # @OutputOnly + # Corresponds to the JSON property `lifecycleState` + # @return [String] + attr_accessor :lifecycle_state + + # A friendly string to be used to refer to the Organization in the UI. + # Assigned by the server, set to the primary domain of the G Suite + # customer that owns the organization. + # @OutputOnly + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Timestamp when the Organization was created. Assigned by the server. + # @OutputOnly + # Corresponds to the JSON property `creationTime` + # @return [String] + attr_accessor :creation_time + + # The entity that owns an Organization. The lifetime of the Organization and + # all of its descendants are bound to the `OrganizationOwner`. If the + # `OrganizationOwner` is deleted, the Organization and all its descendants will + # be deleted. + # Corresponds to the JSON property `owner` + # @return [Google::Apis::CloudresourcemanagerV1beta1::OrganizationOwner] + attr_accessor :owner + + # Output Only. The resource name of the organization. This is the + # organization's relative path in the API. Its format is + # "organizations/[organization_id]". For example, "organizations/1234". + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # An immutable id for the Organization that is assigned on creation. This + # should be omitted when creating a new Organization. + # This field is read-only. + # This field is deprecated and will be removed in v1. Use name instead. + # Corresponds to the JSON property `organizationId` + # @return [String] + attr_accessor :organization_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @lifecycle_state = args[:lifecycle_state] if args.key?(:lifecycle_state) + @display_name = args[:display_name] if args.key?(:display_name) + @creation_time = args[:creation_time] if args.key?(:creation_time) + @owner = args[:owner] if args.key?(:owner) + @name = args[:name] if args.key?(:name) + @organization_id = args[:organization_id] if args.key?(:organization_id) + end + end + + # The response returned from the ListAvailableOrgPolicyConstraints method. + # Returns all `Constraints` that could be set at this level of the hierarchy + # (contrast with the response from `ListPolicies`, which returns all policies + # which are set). + class ListAvailableOrgPolicyConstraintsResponse + include Google::Apis::Core::Hashable + + # Page token used to retrieve the next page. This is currently not used. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The collection of constraints that are settable on the request resource. + # Corresponds to the JSON property `constraints` + # @return [Array] + attr_accessor :constraints + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @constraints = args[:constraints] if args.key?(:constraints) + end + end + + # Used in `policy_type` to specify how `list_policy` behaves at this + # resource. + # A `ListPolicy` can define specific values that are allowed or denied by + # setting either the `allowed_values` or `denied_values` fields. It can also + # be used to allow or deny all values, by setting the `all_values` field. If + # `all_values` is `ALL_VALUES_UNSPECIFIED`, exactly one of `allowed_values` + # or `denied_values` must be set (attempting to set both or neither will + # result in a failed request). If `all_values` is set to either `ALLOW` or + # `DENY`, `allowed_values` and `denied_values` must be unset. + class ListPolicy + include Google::Apis::Core::Hashable + + # The policy all_values state. + # Corresponds to the JSON property `allValues` + # @return [String] + attr_accessor :all_values + + # List of values allowed at this resource. an only be set if no values are + # set for `denied_values` and `all_values` is set to + # `ALL_VALUES_UNSPECIFIED`. + # Corresponds to the JSON property `allowedValues` + # @return [Array] + attr_accessor :allowed_values + + # Optional. The Google Cloud Console will try to default to a configuration + # that matches the value specified in this `Policy`. If `suggested_value` + # is not set, it will inherit the value specified higher in the hierarchy, + # unless `inherit_from_parent` is `false`. + # Corresponds to the JSON property `suggestedValue` + # @return [String] + attr_accessor :suggested_value + + # Determines the inheritance behavior for this `Policy`. + # By default, a `ListPolicy` set at a resource supercedes any `Policy` set + # anywhere up the resource hierarchy. However, if `inherit_from_parent` is + # set to `true`, then the values from the effective `Policy` of the parent + # resource are inherited, meaning the values set in this `Policy` are + # added to the values inherited up the hierarchy. + # Setting `Policy` hierarchies that inherit both allowed values and denied + # values isn't recommended in most circumstances to keep the configuration + # simple and understandable. However, it is possible to set a `Policy` with + # `allowed_values` set that inherits a `Policy` with `denied_values` set. + # In this case, the values that are allowed must be in `allowed_values` and + # not present in `denied_values`. + # For example, suppose you have a `Constraint` + # `constraints/serviceuser.services`, which has a `constraint_type` of + # `list_constraint`, and with `constraint_default` set to `ALLOW`. + # Suppose that at the Organization level, a `Policy` is applied that + # restricts the allowed API activations to ``E1`, `E2``. Then, if a + # `Policy` is applied to a project below the Organization that has + # `inherit_from_parent` set to `false` and field all_values set to DENY, + # then an attempt to activate any API will be denied. + # The following examples demonstrate different possible layerings: + # Example 1 (no inherited values): + # `organizations/foo` has a `Policy` with values: + # `allowed_values: “E1” allowed_values:”E2”` + # ``projects/bar`` has `inherit_from_parent` `false` and values: + # `allowed_values: "E3" allowed_values: "E4"` + # The accepted values at `organizations/foo` are `E1`, `E2`. + # The accepted values at `projects/bar` are `E3`, and `E4`. + # Example 2 (inherited values): + # `organizations/foo` has a `Policy` with values: + # `allowed_values: “E1” allowed_values:”E2”` + # `projects/bar` has a `Policy` with values: + # `value: “E3” value: ”E4” inherit_from_parent: true` + # The accepted values at `organizations/foo` are `E1`, `E2`. + # The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`. + # Example 3 (inheriting both allowed and denied values): + # `organizations/foo` has a `Policy` with values: + # `allowed_values: "E1" allowed_values: "E2"` + # `projects/bar` has a `Policy` with: + # `denied_values: "E1"` + # The accepted values at `organizations/foo` are `E1`, `E2`. + # The value accepted at `projects/bar` is `E2`. + # Example 4 (RestoreDefault): + # `organizations/foo` has a `Policy` with values: + # `allowed_values: “E1” allowed_values:”E2”` + # `projects/bar` has a `Policy` with values: + # `RestoreDefault: ``` + # The accepted values at `organizations/foo` are `E1`, `E2`. + # The accepted values at `projects/bar` are either all or none depending on + # the value of `constraint_default` (if `ALLOW`, all; if + # `DENY`, none). + # Example 5 (no policy inherits parent policy): + # `organizations/foo` has no `Policy` set. + # `projects/bar` has no `Policy` set. + # The accepted values at both levels are either all or none depending on + # the value of `constraint_default` (if `ALLOW`, all; if + # `DENY`, none). + # Example 6 (ListConstraint allowing all): + # `organizations/foo` has a `Policy` with values: + # `allowed_values: “E1” allowed_values: ”E2”` + # `projects/bar` has a `Policy` with: + # `all: ALLOW` + # The accepted values at `organizations/foo` are `E1`, E2`. + # Any value is accepted at `projects/bar`. + # Example 7 (ListConstraint allowing none): + # `organizations/foo` has a `Policy` with values: + # `allowed_values: “E1” allowed_values: ”E2”` + # `projects/bar` has a `Policy` with: + # `all: DENY` + # The accepted values at `organizations/foo` are `E1`, E2`. + # No value is accepted at `projects/bar`. + # Corresponds to the JSON property `inheritFromParent` + # @return [Boolean] + attr_accessor :inherit_from_parent + alias_method :inherit_from_parent?, :inherit_from_parent + + # List of values denied at this resource. Can only be set if no values are + # set for `allowed_values` and `all_values` is set to + # `ALL_VALUES_UNSPECIFIED`. + # Corresponds to the JSON property `deniedValues` + # @return [Array] + attr_accessor :denied_values + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @all_values = args[:all_values] if args.key?(:all_values) + @allowed_values = args[:allowed_values] if args.key?(:allowed_values) + @suggested_value = args[:suggested_value] if args.key?(:suggested_value) + @inherit_from_parent = args[:inherit_from_parent] if args.key?(:inherit_from_parent) + @denied_values = args[:denied_values] if args.key?(:denied_values) + end + end + # Response from the GetAncestry method. class GetAncestryResponse include Google::Apis::Core::Hashable @@ -98,44 +864,6 @@ module Google end end - # A page of the response received from the - # ListProjects - # method. - # A paginated response where more pages are available has - # `next_page_token` set. This token can be used in a subsequent request to - # retrieve the next request page. - class ListProjectsResponse - include Google::Apis::Core::Hashable - - # The list of Projects that matched the list filter. This list can - # be paginated. - # Corresponds to the JSON property `projects` - # @return [Array] - attr_accessor :projects - - # Pagination token. - # If the result set is too large to fit in a single response, this token - # is returned. It encodes the position of the current result cursor. - # Feeding this value into a new list request with the `page_token` parameter - # gives the next page of the results. - # When `next_page_token` is not filled in, there is no next page and - # the list returned is the last page in the result set. - # Pagination tokens have a limited lifetime. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @projects = args[:projects] if args.key?(:projects) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - # Provides the configuration for logging a type of permissions. # Example: # ` @@ -194,89 +922,6 @@ module Google end end - # A Project is a high-level Google Cloud Platform entity. It is a - # container for ACLs, APIs, App Engine Apps, VMs, and other - # Google Cloud Platform resources. - class Project - include Google::Apis::Core::Hashable - - # The unique, user-assigned ID of the Project. - # It must be 6 to 30 lowercase letters, digits, or hyphens. - # It must start with a letter. - # Trailing hyphens are prohibited. - # Example: tokyo-rain-123 - # Read-only after creation. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # The Project lifecycle state. - # Read-only. - # Corresponds to the JSON property `lifecycleState` - # @return [String] - attr_accessor :lifecycle_state - - # The number uniquely identifying the project. - # Example: 415104041262 - # Read-only. - # Corresponds to the JSON property `projectNumber` - # @return [String] - attr_accessor :project_number - - # A container to reference an id for any resource type. A `resource` in Google - # Cloud Platform is a generic term for something you (a developer) may want to - # interact with through one of our API's. Some examples are an App Engine app, - # a Compute Engine instance, a Cloud SQL database, and so on. - # Corresponds to the JSON property `parent` - # @return [Google::Apis::CloudresourcemanagerV1beta1::ResourceId] - attr_accessor :parent - - # Creation time. - # Read-only. - # Corresponds to the JSON property `createTime` - # @return [String] - attr_accessor :create_time - - # The labels associated with this Project. - # Label keys must be between 1 and 63 characters long and must conform - # to the following regular expression: \[a-z\](\[-a-z0-9\]*\[a-z0-9\])?. - # Label values must be between 0 and 63 characters long and must conform - # to the regular expression (\[a-z\](\[-a-z0-9\]*\[a-z0-9\])?)?. - # No more than 256 labels can be associated with a given resource. - # Clients should store labels in a representation such as JSON that does not - # depend on specific characters being disallowed. - # Example: "environment" : "dev" - # Read-write. - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels - - # The user-assigned display name of the Project. - # It must be 4 to 30 characters. - # Allowed characters are: lowercase and uppercase letters, numbers, - # hyphen, single-quote, double-quote, space, and exclamation point. - # Example: My Project - # Read-write. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @project_id = args[:project_id] if args.key?(:project_id) - @lifecycle_state = args[:lifecycle_state] if args.key?(:lifecycle_state) - @project_number = args[:project_number] if args.key?(:project_number) - @parent = args[:parent] if args.key?(:parent) - @create_time = args[:create_time] if args.key?(:create_time) - @labels = args[:labels] if args.key?(:labels) - @name = args[:name] if args.key?(:name) - end - end - # Request message for `TestIamPermissions` method. class TestIamPermissionsRequest include Google::Apis::Core::Hashable @@ -299,6 +944,35 @@ module Google end end + # The request sent to the [ListAvailableOrgPolicyConstraints] + # google.cloud.OrgPolicy.v1.ListAvailableOrgPolicyConstraints] method. + class ListAvailableOrgPolicyConstraintsRequest + include Google::Apis::Core::Hashable + + # Page token used to retrieve the next page. This is currently unsupported + # and will be ignored. The server may at any point start using this field. + # Corresponds to the JSON property `pageToken` + # @return [String] + attr_accessor :page_token + + # Size of the pages to be returned. This is currently unsupported and will + # be ignored. The server may at any point start using this field to limit + # page size. + # Corresponds to the JSON property `pageSize` + # @return [Fixnum] + attr_accessor :page_size + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @page_token = args[:page_token] if args.key?(:page_token) + @page_size = args[:page_size] if args.key?(:page_size) + end + end + # Defines an Identity and Access Management (IAM) policy. It is used to # specify access control policies for Cloud Platform resources. # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of @@ -328,18 +1002,6 @@ module Google class Policy include Google::Apis::Core::Hashable - # Specifies cloud audit logging configuration for this policy. - # Corresponds to the JSON property `auditConfigs` - # @return [Array] - attr_accessor :audit_configs - - # Associates a list of `members` to a `role`. - # Multiple `bindings` must not be specified for the same `role`. - # `bindings` with no members will result in an error. - # Corresponds to the JSON property `bindings` - # @return [Array] - attr_accessor :bindings - # `etag` is used for optimistic concurrency control as a way to help # prevent simultaneous updates of a policy from overwriting each other. # It is strongly suggested that systems make use of the `etag` in the @@ -358,16 +1020,28 @@ module Google # @return [Fixnum] attr_accessor :version + # Specifies cloud audit logging configuration for this policy. + # Corresponds to the JSON property `auditConfigs` + # @return [Array] + attr_accessor :audit_configs + + # Associates a list of `members` to a `role`. + # Multiple `bindings` must not be specified for the same `role`. + # `bindings` with no members will result in an error. + # Corresponds to the JSON property `bindings` + # @return [Array] + attr_accessor :bindings + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @audit_configs = args[:audit_configs] if args.key?(:audit_configs) - @bindings = args[:bindings] if args.key?(:bindings) @etag = args[:etag] if args.key?(:etag) @version = args[:version] if args.key?(:version) + @audit_configs = args[:audit_configs] if args.key?(:audit_configs) + @bindings = args[:bindings] if args.key?(:bindings) end end @@ -375,6 +1049,11 @@ module Google class FolderOperation include Google::Apis::Core::Hashable + # The type of this operation. + # Corresponds to the JSON property `operationType` + # @return [String] + attr_accessor :operation_type + # The display name of the folder. # Corresponds to the JSON property `displayName` # @return [String] @@ -392,40 +1071,16 @@ module Google # @return [String] attr_accessor :destination_parent - # The type of this operation. - # Corresponds to the JSON property `operationType` - # @return [String] - attr_accessor :operation_type - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @operation_type = args[:operation_type] if args.key?(:operation_type) @display_name = args[:display_name] if args.key?(:display_name) @source_parent = args[:source_parent] if args.key?(:source_parent) @destination_parent = args[:destination_parent] if args.key?(:destination_parent) - @operation_type = args[:operation_type] if args.key?(:operation_type) - end - end - - # A classification of the Folder Operation error. - class FolderOperationError - include Google::Apis::Core::Hashable - - # The type of operation error experienced. - # Corresponds to the JSON property `errorMessageId` - # @return [String] - attr_accessor :error_message_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @error_message_id = args[:error_message_id] if args.key?(:error_message_id) end end @@ -459,9 +1114,56 @@ module Google end end + # The request sent to the GetEffectiveOrgPolicy method. + class GetEffectiveOrgPolicyRequest + include Google::Apis::Core::Hashable + + # The name of the `Constraint` to compute the effective `Policy`. + # Corresponds to the JSON property `constraint` + # @return [String] + attr_accessor :constraint + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @constraint = args[:constraint] if args.key?(:constraint) + end + end + + # The request sent to the ListOrgPolicies method. + class ListOrgPoliciesRequest + include Google::Apis::Core::Hashable + + # Page token used to retrieve the next page. This is currently unsupported + # and will be ignored. The server may at any point start using this field. + # Corresponds to the JSON property `pageToken` + # @return [String] + attr_accessor :page_token + + # Size of the pages to be returned. This is currently unsupported and will + # be ignored. The server may at any point start using this field to limit + # page size. + # Corresponds to the JSON property `pageSize` + # @return [Fixnum] + attr_accessor :page_size + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @page_token = args[:page_token] if args.key?(:page_token) + @page_size = args[:page_size] if args.key?(:page_size) + end + end + # Specifies the audit configuration for a service. - # It consists of which permission types are logged, and what identities, if - # any, are exempted from logging. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. # An AuditConifg must have one or more AuditLogConfigs. # If there are AuditConfigs for both `allServices` and a specific service, # the union of the two AuditConfigs is used for that service: the log_types @@ -510,7 +1212,7 @@ module Google include Google::Apis::Core::Hashable # Specifies a service that will be enabled for audit logging. - # For example, `resourcemanager`, `storage`, `compute`. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. # `allServices` is a special value that covers all services. # Corresponds to the JSON property `service` # @return [String] @@ -533,82 +1235,6 @@ module Google end end - # Identifying information for a single ancestor of a project. - class Ancestor - include Google::Apis::Core::Hashable - - # A container to reference an id for any resource type. A `resource` in Google - # Cloud Platform is a generic term for something you (a developer) may want to - # interact with through one of our API's. Some examples are an App Engine app, - # a Compute Engine instance, a Cloud SQL database, and so on. - # Corresponds to the JSON property `resourceId` - # @return [Google::Apis::CloudresourcemanagerV1beta1::ResourceId] - attr_accessor :resource_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @resource_id = args[:resource_id] if args.key?(:resource_id) - end - end - - # 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::CloudresourcemanagerV1beta1::Policy] - attr_accessor :policy - - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, 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 - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @policy = args[:policy] if args.key?(:policy) - @update_mask = args[:update_mask] if args.key?(:update_mask) - end - end - # The response returned from the `ListOrganizations` method. class ListOrganizationsResponse include Google::Apis::Core::Hashable @@ -638,6 +1264,81 @@ module Google end end + # A `Constraint` describes a way in which a resource's configuration can be + # restricted. For example, it controls which cloud services can be activated + # across an organization, or whether a Compute Engine instance can have + # serial port connections established. `Constraints` can be configured by the + # organization's policy adminstrator to fit the needs of the organzation by + # setting Policies for `Constraints` at different locations in the + # organization's resource hierarchy. Policies are inherited down the resource + # hierarchy from higher levels, but can also be overridden. For details about + # the inheritance rules please read about + # Policies. + # `Constraints` have a default behavior determined by the `constraint_default` + # field, which is the enforcement behavior that is used in the absence of a + # `Policy` being defined or inherited for the resource in question. + class Constraint + include Google::Apis::Core::Hashable + + # Detailed description of what this `Constraint` controls as well as how and + # where it is enforced. + # Mutable. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The human readable name. + # Mutable. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # A `Constraint` that is either enforced or not. + # For example a constraint `constraints/compute.disableSerialPortAccess`. + # If it is enforced on a VM instance, serial port connections will not be + # opened to that instance. + # Corresponds to the JSON property `booleanConstraint` + # @return [Google::Apis::CloudresourcemanagerV1beta1::BooleanConstraint] + attr_accessor :boolean_constraint + + # The evaluation behavior of this constraint in the absense of 'Policy'. + # Corresponds to the JSON property `constraintDefault` + # @return [String] + attr_accessor :constraint_default + + # Immutable value, required to globally be unique. For example, + # `constraints/serviceuser.services` + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # A `Constraint` that allows or disallows a list of string values, which are + # configured by an Organization's policy administrator with a `Policy`. + # Corresponds to the JSON property `listConstraint` + # @return [Google::Apis::CloudresourcemanagerV1beta1::ListConstraint] + attr_accessor :list_constraint + + # Version of the `Constraint`. Default version is 0; + # Corresponds to the JSON property `version` + # @return [Fixnum] + attr_accessor :version + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @description = args[:description] if args.key?(:description) + @display_name = args[:display_name] if args.key?(:display_name) + @boolean_constraint = args[:boolean_constraint] if args.key?(:boolean_constraint) + @constraint_default = args[:constraint_default] if args.key?(:constraint_default) + @name = args[:name] if args.key?(:name) + @list_constraint = args[:list_constraint] if args.key?(:list_constraint) + @version = args[:version] if args.key?(:version) + end + end + # Associates `members` with a `role`. class Binding include Google::Apis::Core::Hashable @@ -678,14 +1379,18 @@ 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 + # Ignores policies set above this resource and restores the + # `constraint_default` enforcement behavior of the specific `Constraint` at + # this resource. + # Suppose that `constraint_default` is set to `ALLOW` for the + # `Constraint` `constraints/serviceuser.services`. Suppose that organization + # foo.com sets a `Policy` at their Organization resource node that restricts + # the allowed service activations to deny all service activations. They + # could then set a `Policy` with the `policy_type` `restore_default` on + # several experimental projects, restoring the `constraint_default` + # enforcement of the `Constraint` for only those projects, allowing those + # projects to have all services activated. + class RestoreDefault include Google::Apis::Core::Hashable def initialize(**args) @@ -697,53 +1402,14 @@ module Google end end - # The root node in the resource hierarchy to which a particular entity's - # (e.g., company) resources belong. - class Organization + # The request sent to the GetOrgPolicy method. + class GetOrgPolicyRequest include Google::Apis::Core::Hashable - # The entity that owns an Organization. The lifetime of the Organization and - # all of its descendants are bound to the `OrganizationOwner`. If the - # `OrganizationOwner` is deleted, the Organization and all its descendants will - # be deleted. - # Corresponds to the JSON property `owner` - # @return [Google::Apis::CloudresourcemanagerV1beta1::OrganizationOwner] - attr_accessor :owner - - # Output Only. The resource name of the organization. This is the - # organization's relative path in the API. Its format is - # "organizations/[organization_id]". For example, "organizations/1234". - # Corresponds to the JSON property `name` + # Name of the `Constraint` to get the `Policy`. + # Corresponds to the JSON property `constraint` # @return [String] - attr_accessor :name - - # An immutable id for the Organization that is assigned on creation. This - # should be omitted when creating a new Organization. - # This field is read-only. - # This field is deprecated and will be removed in v1. Use name instead. - # Corresponds to the JSON property `organizationId` - # @return [String] - attr_accessor :organization_id - - # The organization's current lifecycle state. Assigned by the server. - # @OutputOnly - # Corresponds to the JSON property `lifecycleState` - # @return [String] - attr_accessor :lifecycle_state - - # A friendly string to be used to refer to the Organization in the UI. - # Assigned by the server, set to the primary domain of the G Suite - # customer that owns the organization. - # @OutputOnly - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # Timestamp when the Organization was created. Assigned by the server. - # @OutputOnly - # Corresponds to the JSON property `creationTime` - # @return [String] - attr_accessor :creation_time + attr_accessor :constraint def initialize(**args) update!(**args) @@ -751,63 +1417,7 @@ module Google # Update properties of this object def update!(**args) - @owner = args[:owner] if args.key?(:owner) - @name = args[:name] if args.key?(:name) - @organization_id = args[:organization_id] if args.key?(:organization_id) - @lifecycle_state = args[:lifecycle_state] if args.key?(:lifecycle_state) - @display_name = args[:display_name] if args.key?(:display_name) - @creation_time = args[:creation_time] if args.key?(:creation_time) - end - end - - # The request sent to the UndeleteProject - # method. - class UndeleteProjectRequest - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # A status object which is used as the `metadata` field for the Operation - # returned by CreateProject. It provides insight for when significant phases of - # Project creation have completed. - class ProjectCreationStatus - include Google::Apis::Core::Hashable - - # Creation time of the project creation workflow. - # Corresponds to the JSON property `createTime` - # @return [String] - attr_accessor :create_time - - # True if the project can be retrieved using GetProject. No other operations - # on the project are guaranteed to work until the project creation is - # complete. - # Corresponds to the JSON property `gettable` - # @return [Boolean] - attr_accessor :gettable - alias_method :gettable?, :gettable - - # True if the project creation process is complete. - # Corresponds to the JSON property `ready` - # @return [Boolean] - attr_accessor :ready - alias_method :ready?, :ready - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @create_time = args[:create_time] if args.key?(:create_time) - @gettable = args[:gettable] if args.key?(:gettable) - @ready = args[:ready] if args.key?(:ready) + @constraint = args[:constraint] if args.key?(:constraint) end end end diff --git a/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb b/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb index fc0574677..6c4f37d04 100644 --- a/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +++ b/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb @@ -22,6 +22,30 @@ module Google module Apis module CloudresourcemanagerV1beta1 + class UndeleteProjectRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ClearOrgPolicyRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ProjectCreationStatus + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BooleanConstraint + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class TestIamPermissionsResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -40,49 +64,19 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class GetAncestryResponse - 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 AuditLogConfig - 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 Project class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class TestIamPermissionsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Policy - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class FolderOperation + class ListOrgPoliciesResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -94,13 +88,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class ResourceId + class OrgPolicy class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class AuditConfig + class BooleanPolicy class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -112,24 +106,24 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class ListConstraint + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SetOrgPolicyRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class SetIamPolicyRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ListOrganizationsResponse - 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 @@ -142,18 +136,143 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class UndeleteProjectRequest + class ListAvailableOrgPolicyConstraintsResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ProjectCreationStatus + class ListPolicy class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class GetAncestryResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AuditLogConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GetAncestryRequest + 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 ListAvailableOrgPolicyConstraintsRequest + 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 ResourceId + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GetEffectiveOrgPolicyRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListOrgPoliciesRequest + 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 ListOrganizationsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Constraint + 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 RestoreDefault + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GetOrgPolicyRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UndeleteProjectRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class ClearOrgPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :etag, :base64 => true, as: 'etag' + property :constraint, as: 'constraint' + end + end + + class ProjectCreationStatus + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :ready, as: 'ready' + property :create_time, as: 'createTime' + property :gettable, as: 'gettable' + end + end + + class BooleanConstraint + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + class TestIamPermissionsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -174,6 +293,139 @@ module Google end end + class ListProjectsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :projects, as: 'projects', class: Google::Apis::CloudresourcemanagerV1beta1::Project, decorator: Google::Apis::CloudresourcemanagerV1beta1::Project::Representation + + end + end + + class Project + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :project_number, as: 'projectNumber' + property :parent, as: 'parent', class: Google::Apis::CloudresourcemanagerV1beta1::ResourceId, decorator: Google::Apis::CloudresourcemanagerV1beta1::ResourceId::Representation + + property :create_time, as: 'createTime' + hash :labels, as: 'labels' + property :name, as: 'name' + property :project_id, as: 'projectId' + property :lifecycle_state, as: 'lifecycleState' + end + end + + class ListOrgPoliciesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :policies, as: 'policies', class: Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy, decorator: Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class FolderOperationError + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :error_message_id, as: 'errorMessageId' + end + end + + class OrgPolicy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :version, as: 'version' + property :restore_default, as: 'restoreDefault', class: Google::Apis::CloudresourcemanagerV1beta1::RestoreDefault, decorator: Google::Apis::CloudresourcemanagerV1beta1::RestoreDefault::Representation + + property :list_policy, as: 'listPolicy', class: Google::Apis::CloudresourcemanagerV1beta1::ListPolicy, decorator: Google::Apis::CloudresourcemanagerV1beta1::ListPolicy::Representation + + property :etag, :base64 => true, as: 'etag' + property :constraint, as: 'constraint' + property :boolean_policy, as: 'booleanPolicy', class: Google::Apis::CloudresourcemanagerV1beta1::BooleanPolicy, decorator: Google::Apis::CloudresourcemanagerV1beta1::BooleanPolicy::Representation + + property :update_time, as: 'updateTime' + end + end + + class BooleanPolicy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :enforced, as: 'enforced' + end + 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 + + class ListConstraint + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :suggested_value, as: 'suggestedValue' + end + end + + class SetOrgPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :policy, as: 'policy', class: Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy, decorator: Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy::Representation + + end + end + + class SetIamPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :policy, as: 'policy', class: Google::Apis::CloudresourcemanagerV1beta1::Policy, decorator: Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation + + property :update_mask, as: 'updateMask' + end + end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class Organization + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :lifecycle_state, as: 'lifecycleState' + property :display_name, as: 'displayName' + property :creation_time, as: 'creationTime' + property :owner, as: 'owner', class: Google::Apis::CloudresourcemanagerV1beta1::OrganizationOwner, decorator: Google::Apis::CloudresourcemanagerV1beta1::OrganizationOwner::Representation + + property :name, as: 'name' + property :organization_id, as: 'organizationId' + end + end + + class ListAvailableOrgPolicyConstraintsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :constraints, as: 'constraints', class: Google::Apis::CloudresourcemanagerV1beta1::Constraint, decorator: Google::Apis::CloudresourcemanagerV1beta1::Constraint::Representation + + end + end + + class ListPolicy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :all_values, as: 'allValues' + collection :allowed_values, as: 'allowedValues' + property :suggested_value, as: 'suggestedValue' + property :inherit_from_parent, as: 'inheritFromParent' + collection :denied_values, as: 'deniedValues' + end + end + class GetAncestryResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -182,15 +434,6 @@ module Google 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 AuditLogConfig # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -205,20 +448,6 @@ module Google end end - class Project - # @private - class Representation < Google::Apis::Core::JsonRepresentation - 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 - - property :create_time, as: 'createTime' - hash :labels, as: 'labels' - property :name, as: 'name' - end - end - class TestIamPermissionsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -226,32 +455,33 @@ module Google end end + class ListAvailableOrgPolicyConstraintsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :page_token, as: 'pageToken' + property :page_size, as: 'pageSize' + end + end + class Policy # @private class Representation < Google::Apis::Core::JsonRepresentation + property :etag, :base64 => true, as: 'etag' + property :version, as: 'version' collection :audit_configs, as: 'auditConfigs', class: Google::Apis::CloudresourcemanagerV1beta1::AuditConfig, decorator: Google::Apis::CloudresourcemanagerV1beta1::AuditConfig::Representation 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 FolderOperation # @private class Representation < Google::Apis::Core::JsonRepresentation + property :operation_type, as: 'operationType' property :display_name, as: 'displayName' property :source_parent, as: 'sourceParent' property :destination_parent, as: 'destinationParent' - property :operation_type, as: 'operationType' - end - end - - class FolderOperationError - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :error_message_id, as: 'errorMessageId' end end @@ -263,6 +493,21 @@ module Google end end + class GetEffectiveOrgPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :constraint, as: 'constraint' + end + end + + class ListOrgPoliciesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :page_token, as: 'pageToken' + property :page_size, as: 'pageSize' + end + end + class AuditConfig # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -272,23 +517,6 @@ module Google end 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 - - class SetIamPolicyRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :policy, as: 'policy', class: Google::Apis::CloudresourcemanagerV1beta1::Policy, decorator: Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation - - property :update_mask, as: 'updateMask' - end - end - class ListOrganizationsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -298,6 +526,21 @@ module Google end end + class Constraint + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :description, as: 'description' + property :display_name, as: 'displayName' + property :boolean_constraint, as: 'booleanConstraint', class: Google::Apis::CloudresourcemanagerV1beta1::BooleanConstraint, decorator: Google::Apis::CloudresourcemanagerV1beta1::BooleanConstraint::Representation + + property :constraint_default, as: 'constraintDefault' + property :name, as: 'name' + property :list_constraint, as: 'listConstraint', class: Google::Apis::CloudresourcemanagerV1beta1::ListConstraint, decorator: Google::Apis::CloudresourcemanagerV1beta1::ListConstraint::Representation + + property :version, as: 'version' + end + end + class Binding # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -306,37 +549,16 @@ module Google end end - class Empty + class RestoreDefault # @private class Representation < Google::Apis::Core::JsonRepresentation end end - class Organization + class GetOrgPolicyRequest # @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 UndeleteProjectRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - class ProjectCreationStatus - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :create_time, as: 'createTime' - property :gettable, as: 'gettable' - property :ready, as: 'ready' + property :constraint, as: 'constraint' end end end diff --git a/generated/google/apis/cloudresourcemanager_v1beta1/service.rb b/generated/google/apis/cloudresourcemanager_v1beta1/service.rb index b2e47aea7..bb561fbfe 100644 --- a/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +++ b/generated/google/apis/cloudresourcemanager_v1beta1/service.rb @@ -47,12 +47,590 @@ module Google super('https://cloudresourcemanager.googleapis.com/', '') 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. + # Clears a `Policy` from a resource. + # @param [String] resource + # Name of the resource for the `Policy` to clear. + # @param [Google::Apis::CloudresourcemanagerV1beta1::ClearOrgPolicyRequest] clear_org_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::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 clear_organization_org_policy(resource, clear_org_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+resource}:clearOrgPolicy', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::ClearOrgPolicyRequest::Representation + command.request_object = clear_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Empty::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Empty + 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 an Organization resource. Replaces any + # existing policy. The `resource` field should be the organization's resource + # name, e.g. "organizations/123". + # @param [String] resource + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param [Google::Apis::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 + + # Lists `Constraints` that could be applied on the specified resource. + # @param [String] resource + # Name of the resource to list `Constraints` for. + # @param [Google::Apis::CloudresourcemanagerV1beta1::ListAvailableOrgPolicyConstraintsRequest] list_available_org_policy_constraints_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::ListAvailableOrgPolicyConstraintsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1beta1::ListAvailableOrgPolicyConstraintsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_organization_available_org_policy_constraints(resource, list_available_org_policy_constraints_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+resource}:listAvailableOrgPolicyConstraints', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::ListAvailableOrgPolicyConstraintsRequest::Representation + command.request_object = list_available_org_policy_constraints_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::ListAvailableOrgPolicyConstraintsResponse::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1beta1::ListAvailableOrgPolicyConstraintsResponse + 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. + # See the operation documentation for the appropriate value for this field. + # @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_organization_iam_policy(resource, get_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+resource}:getIamPolicy', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::GetIamPolicyRequest::Representation + command.request_object = get_iam_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets a `Policy` on a resource. + # If no `Policy` is set on the resource, a `Policy` is returned with default + # values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The + # `etag` value can be used with `SetOrgPolicy()` to create or update a + # `Policy` during read-modify-write. + # @param [String] resource + # Name of the resource the `Policy` is set on. + # @param [Google::Apis::CloudresourcemanagerV1beta1::GetOrgPolicyRequest] get_org_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::OrgPolicy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_organization_org_policy(resource, get_org_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+resource}:getOrgPolicy', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::GetOrgPolicyRequest::Representation + command.request_object = get_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy + 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 `Policy` on a resource. + # If no `Policy` is set on the resource, a `Policy` is returned with default + # values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The + # `etag` value can be used with `SetOrgPolicy()` to create or update a + # `Policy` during read-modify-write. + # @param [String] resource + # Name of the resource the `Policy` is set on. + # @param [Google::Apis::CloudresourcemanagerV1beta1::GetOrgPolicyRequest] get_org_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::OrgPolicy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_organization_org_policy_v1(resource, get_org_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+resource}:getOrgPolicyV1', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::GetOrgPolicyRequest::Representation + command.request_object = get_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy + 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 effective `Policy` on a resource. This is the result of merging + # `Policies` in the resource hierarchy. The returned `Policy` will not have + # an `etag`set because it is a computed `Policy` across multiple resources. + # @param [String] resource + # The name of the resource to start computing the effective `Policy`. + # @param [Google::Apis::CloudresourcemanagerV1beta1::GetEffectiveOrgPolicyRequest] get_effective_org_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::OrgPolicy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_organization_effective_org_policy(resource, get_effective_org_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+resource}:getEffectiveOrgPolicy', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::GetEffectiveOrgPolicyRequest::Representation + command.request_object = get_effective_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy + command.params['resource'] = resource unless resource.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Updates an Organization resource identified by the specified resource name. + # @param [String] name + # Output Only. The resource name of the organization. This is the + # organization's relative path in the API. Its format is + # "organizations/[organization_id]". For example, "organizations/1234". + # @param [Google::Apis::CloudresourcemanagerV1beta1::Organization] organization_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::Organization] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1beta1::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 update_organization(name, organization_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:put, 'v1beta1/{+name}', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::Organization::Representation + command.request_object = organization_object + command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Organization::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Organization + command.params['name'] = name unless name.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Updates the specified `Policy` on the resource. Creates a new `Policy` for + # that `Constraint` on the resource if one does not exist. + # Not supplying an `etag` on the request `Policy` results in an unconditional + # write of the `Policy`. + # @param [String] resource + # Resource name of the resource to attach the `Policy`. + # @param [Google::Apis::CloudresourcemanagerV1beta1::SetOrgPolicyRequest] set_org_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::OrgPolicy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def set_organization_org_policy_v1(resource, set_org_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+resource}:setOrgPolicyV1', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::SetOrgPolicyRequest::Representation + command.request_object = set_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy + command.params['resource'] = resource unless resource.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Lists 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 + + # Updates the specified `Policy` on the resource. Creates a new `Policy` for + # that `Constraint` on the resource if one does not exist. + # Not supplying an `etag` on the request `Policy` results in an unconditional + # write of the `Policy`. + # @param [String] resource + # Resource name of the resource to attach the `Policy`. + # @param [Google::Apis::CloudresourcemanagerV1beta1::SetOrgPolicyRequest] set_org_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::OrgPolicy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def set_organization_org_policy(resource, set_org_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+resource}:setOrgPolicy', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::SetOrgPolicyRequest::Representation + command.request_object = set_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy + 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 + + # Clears a `Policy` from a resource. + # @param [String] resource + # Name of the resource for the `Policy` to clear. + # @param [Google::Apis::CloudresourcemanagerV1beta1::ClearOrgPolicyRequest] clear_org_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::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 clear_organization_org_policy_v1(resource, clear_org_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+resource}:clearOrgPolicyV1', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::ClearOrgPolicyRequest::Representation + command.request_object = clear_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Empty::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Empty + command.params['resource'] = resource unless resource.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Lists all the `Policies` set for a particular resource. + # @param [String] resource + # Name of the resource to list Policies for. + # @param [Google::Apis::CloudresourcemanagerV1beta1::ListOrgPoliciesRequest] list_org_policies_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::ListOrgPoliciesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1beta1::ListOrgPoliciesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_organization_org_policies(resource, list_org_policies_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+resource}:listOrgPolicies', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::ListOrgPoliciesRequest::Representation + command.request_object = list_org_policies_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::ListOrgPoliciesResponse::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1beta1::ListOrgPoliciesResponse + 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 + + # 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] organization_id + # The id of the Organization resource to fetch. + # This field is deprecated and will be removed in v1. Use name instead. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include 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::Organization] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1beta1::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, organization_id: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Organization::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Organization + command.params['name'] = name unless name.nil? + command.query['organizationId'] = organization_id unless organization_id.nil? + command.query['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. + # See the operation documentation for the appropriate value for this field. + # @param [Google::Apis::CloudresourcemanagerV1beta1::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::CloudresourcemanagerV1beta1::TestIamPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1beta1::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, 'v1beta1/{+resource}:testIamPermissions', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsRequest::Representation + command.request_object = test_iam_permissions_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsResponse::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsResponse + command.params['resource'] = resource unless resource.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets the effective `Policy` on a resource. This is the result of merging + # `Policies` in the resource hierarchy. The returned `Policy` will not have + # an `etag`set because it is a computed `Policy` across multiple resources. + # @param [String] resource + # The name of the resource to start computing the effective `Policy`. + # @param [Google::Apis::CloudresourcemanagerV1beta1::GetEffectiveOrgPolicyRequest] get_effective_org_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::OrgPolicy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_organization_effective_org_policy_v1(resource, get_effective_org_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+resource}:getEffectiveOrgPolicyV1', options) + command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::GetEffectiveOrgPolicyRequest::Representation + command.request_object = get_effective_org_policy_request_object + command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy::Representation + command.response_class = Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy + 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. @@ -70,11 +648,108 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @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) + 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.params['projectId'] = project_id unless project_id.nil? + 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 + # remove the last ToS-accepted owner from the policy will fail. This + # restriction also applies to legacy projects that no longer have owners + # who have accepted the ToS. Edits to IAM policies will be rejected until + # the lack of a ToS-accepting owner is rectified. + # + Calling this method requires enabling the App Engine Admin API. + # Note: Removing service accounts from policies or changing their roles + # can render services completely inoperable. It is important to understand + # how the service account is being used before removing or updating its + # roles. + # @param [String] resource + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param [Google::Apis::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 + + # 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. + # See the operation documentation for the appropriate value for this field. + # @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) @@ -119,13 +794,12 @@ module Google execute_or_queue_command(command, &block) end - # Updates the attributes of the Project identified by the specified + # Retrieves the Project identified by the specified # `project_id` (for example, `my-project-123`). - # The caller must have modify permissions for this Project. + # The caller must have read permissions for this Project. # @param [String] project_id - # The project ID (for example, `my-project-123`). + # 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. @@ -143,10 +817,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 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 + 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? @@ -191,6 +863,42 @@ module Google 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 + # Returns permissions that a caller has on the specified Project. # @param [String] resource # REQUIRED: The resource for which the policy detail is being requested. @@ -277,6 +985,10 @@ module Google # 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 [String] page_token + # A pagination token returned from a previous call to ListProjects + # that indicates from where listing should continue. + # Optional. # @param [Fixnum] page_size # The maximum number of Projects to return in the response. # The server can return fewer Projects than requested. @@ -297,13 +1009,9 @@ module Google # |NAME:howl|Equivalent to above.| # |labels.color:*|The project has the label `color`.| # |labels.color:red|The project's label `color` has the value `red`.| - # |labels.color:red label.size:big|The project's label `color` has the + # |labels.color:red labels.size:big|The project's label `color` has the # value `red` and its label `size` has the value `big`. # Optional. - # @param [String] 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. @@ -321,372 +1029,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_projects(page_size: nil, filter: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_projects(page_token: nil, page_size: nil, filter: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta1/projects', options) command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::ListProjectsResponse::Representation command.response_class = Google::Apis::CloudresourcemanagerV1beta1::ListProjectsResponse + command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['filter'] = filter unless filter.nil? - command.query['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. - # See the operation documentation for the appropriate value for this field. - # @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. - # See the operation documentation for the appropriate value for this field. - # @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 - - # 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] organization_id - # The id of the Organization resource to fetch. - # This field is deprecated and will be removed in v1. Use name instead. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include 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::Organization] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1beta1::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, organization_id: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1beta1/{+name}', options) - command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Organization::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Organization - command.params['name'] = name unless name.nil? - command.query['organizationId'] = organization_id unless organization_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Updates an Organization resource identified by the specified resource name. - # @param [String] name - # Output Only. The resource name of the organization. This is the - # organization's relative path in the API. Its format is - # "organizations/[organization_id]". For example, "organizations/1234". - # @param [Google::Apis::CloudresourcemanagerV1beta1::Organization] organization_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::Organization] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1beta1::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 update_organization(name, organization_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:put, 'v1beta1/{+name}', options) - command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::Organization::Representation - command.request_object = organization_object - command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Organization::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Organization - command.params['name'] = name unless name.nil? - command.query['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. - # See the operation documentation for the appropriate value for this field. - # @param [Google::Apis::CloudresourcemanagerV1beta1::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::CloudresourcemanagerV1beta1::TestIamPermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::CloudresourcemanagerV1beta1::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, 'v1beta1/{+resource}:testIamPermissions', options) - command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsRequest::Representation - command.request_object = test_iam_permissions_request_object - command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsResponse::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsResponse - command.params['resource'] = resource unless resource.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - 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 - - # Sets the access control policy on an Organization resource. Replaces any - # existing policy. The `resource` field should be the organization's resource - # name, e.g. "organizations/123". - # @param [String] resource - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param [Google::Apis::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". - # @param [String] resource - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param [Google::Apis::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_organization_iam_policy(resource, get_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1beta1/{+resource}:getIamPolicy', options) - command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::GetIamPolicyRequest::Representation - command.request_object = get_iam_policy_request_object - command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation - command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Policy - command.params['resource'] = resource unless resource.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) diff --git a/generated/google/apis/cloudtrace_v1.rb b/generated/google/apis/cloudtrace_v1.rb index ba8125a27..0974eed65 100644 --- a/generated/google/apis/cloudtrace_v1.rb +++ b/generated/google/apis/cloudtrace_v1.rb @@ -28,7 +28,7 @@ module Google # @see https://cloud.google.com/trace module CloudtraceV1 VERSION = 'V1' - REVISION = '20170225' + REVISION = '20170320' # Read Trace data for a project or application AUTH_TRACE_READONLY = 'https://www.googleapis.com/auth/trace.readonly' diff --git a/generated/google/apis/cloudtrace_v1/classes.rb b/generated/google/apis/cloudtrace_v1/classes.rb index 24d0c8dd4..e1419804f 100644 --- a/generated/google/apis/cloudtrace_v1/classes.rb +++ b/generated/google/apis/cloudtrace_v1/classes.rb @@ -30,23 +30,6 @@ module Google class TraceSpan include Google::Apis::Core::Hashable - # Collection of labels associated with the span. Label keys must be less than - # 128 bytes. Label values must be less than 16 kilobytes. - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels - - # Name of the span. Must be less than 128 bytes. The span name is sanitized - # and displayed in the Stackdriver Trace tool in the - # `% dynamic print site_values.console_name %`. - # The name may be a method name or some other per-call site name. - # For the same executable and the same call point, a best practice is - # to use a consistent name, which makes it easier to correlate - # cross-trace spans. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - # Identifier for the span. Must be a 64-bit integer other than 0 and # unique within a trace. # Corresponds to the JSON property `spanId` @@ -75,19 +58,36 @@ module Google # @return [String] attr_accessor :kind + # Collection of labels associated with the span. Label keys must be less than + # 128 bytes. Label values must be less than 16 kilobytes. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # Name of the span. Must be less than 128 bytes. The span name is sanitized + # and displayed in the Stackdriver Trace tool in the + # `% dynamic print site_values.console_name %`. + # The name may be a method name or some other per-call site name. + # For the same executable and the same call point, a best practice is + # to use a consistent name, which makes it easier to correlate + # cross-trace spans. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @labels = args[:labels] if args.key?(:labels) - @name = args[:name] if args.key?(:name) @span_id = args[:span_id] if args.key?(:span_id) @parent_span_id = args[:parent_span_id] if args.key?(:parent_span_id) @end_time = args[:end_time] if args.key?(:end_time) @start_time = args[:start_time] if args.key?(:start_time) @kind = args[:kind] if args.key?(:kind) + @labels = args[:labels] if args.key?(:labels) + @name = args[:name] if args.key?(:name) end end diff --git a/generated/google/apis/cloudtrace_v1/representations.rb b/generated/google/apis/cloudtrace_v1/representations.rb index a181326b2..d67ac53cf 100644 --- a/generated/google/apis/cloudtrace_v1/representations.rb +++ b/generated/google/apis/cloudtrace_v1/representations.rb @@ -55,13 +55,13 @@ module Google class TraceSpan # @private class Representation < Google::Apis::Core::JsonRepresentation - hash :labels, as: 'labels' - property :name, as: 'name' property :span_id, as: 'spanId' property :parent_span_id, as: 'parentSpanId' property :end_time, as: 'endTime' property :start_time, as: 'startTime' property :kind, as: 'kind' + hash :labels, as: 'labels' + property :name, as: 'name' end end diff --git a/generated/google/apis/cloudtrace_v1/service.rb b/generated/google/apis/cloudtrace_v1/service.rb index 2cc4e2949..5b1463916 100644 --- a/generated/google/apis/cloudtrace_v1/service.rb +++ b/generated/google/apis/cloudtrace_v1/service.rb @@ -35,16 +35,16 @@ module Google # # @see https://cloud.google.com/trace class CloudTraceService < 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://cloudtrace.googleapis.com/', '') end @@ -57,11 +57,11 @@ module Google # @param [String] project_id # ID of the Cloud project where the trace data is stored. # @param [Google::Apis::CloudtraceV1::Traces] traces_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -74,21 +74,32 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_traces(project_id, traces_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def patch_project_traces(project_id, traces_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/projects/{projectId}/traces', options) command.request_representation = Google::Apis::CloudtraceV1::Traces::Representation command.request_object = traces_object command.response_representation = Google::Apis::CloudtraceV1::Empty::Representation command.response_class = Google::Apis::CloudtraceV1::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 # Returns of a list of traces that match the specified filter conditions. # @param [String] project_id # ID of the Cloud project where the trace data is stored. + # @param [String] order_by + # Field used to sort the returned traces. Optional. + # Can be one of the following: + # * `trace_id` + # * `name` (`name` field of root span in the trace) + # * `duration` (difference between `end_time` and `start_time` fields of + # the root span) + # * `start` (`start_time` field of the root span) + # Descending order can be specified by appending `desc` to the sort field + # (for example, `name desc`). + # Only one sort field is permitted. # @param [String] filter # An optional filter for the request. # @param [String] end_time @@ -107,22 +118,11 @@ module Google # @param [String] view # Type of data returned for traces in the list. Optional. Default is # `MINIMAL`. - # @param [String] order_by - # Field used to sort the returned traces. Optional. - # Can be one of the following: - # * `trace_id` - # * `name` (`name` field of root span in the trace) - # * `duration` (difference between `end_time` and `start_time` fields of - # the root span) - # * `start` (`start_time` field of the root span) - # Descending order can be specified by appending `desc` to the sort field - # (for example, `name desc`). - # Only one sort field is permitted. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -135,20 +135,20 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_project_traces(project_id, filter: nil, end_time: nil, start_time: nil, page_token: nil, page_size: nil, view: nil, order_by: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_project_traces(project_id, order_by: nil, filter: nil, end_time: nil, start_time: nil, page_token: nil, page_size: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/projects/{projectId}/traces', options) command.response_representation = Google::Apis::CloudtraceV1::ListTracesResponse::Representation command.response_class = Google::Apis::CloudtraceV1::ListTracesResponse command.params['projectId'] = project_id unless project_id.nil? + command.query['orderBy'] = order_by unless order_by.nil? command.query['filter'] = filter unless filter.nil? command.query['endTime'] = end_time unless end_time.nil? command.query['startTime'] = start_time unless start_time.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['view'] = view unless view.nil? - command.query['orderBy'] = order_by unless order_by.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 @@ -157,11 +157,11 @@ module Google # ID of the Cloud project where the trace data is stored. # @param [String] trace_id # ID of the trace to return. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -174,22 +174,22 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_trace(project_id, trace_id, quota_user: nil, fields: nil, options: nil, &block) + def get_project_trace(project_id, trace_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/projects/{projectId}/traces/{traceId}', options) command.response_representation = Google::Apis::CloudtraceV1::Trace::Representation command.response_class = Google::Apis::CloudtraceV1::Trace command.params['projectId'] = project_id unless project_id.nil? command.params['traceId'] = trace_id unless trace_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 protected def apply_command_defaults(command) - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? end end end diff --git a/generated/google/apis/compute_beta.rb b/generated/google/apis/compute_beta.rb index f3fd22427..66c2dad31 100644 --- a/generated/google/apis/compute_beta.rb +++ b/generated/google/apis/compute_beta.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/compute/docs/reference/latest/ module ComputeBeta VERSION = 'Beta' - REVISION = '20170224' + REVISION = '20170302' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/compute_beta/classes.rb b/generated/google/apis/compute_beta/classes.rb index b1377f622..d44c4ca4c 100644 --- a/generated/google/apis/compute_beta/classes.rb +++ b/generated/google/apis/compute_beta/classes.rb @@ -3374,12 +3374,32 @@ module Google # @return [String] attr_accessor :creation_timestamp + # The list of DENY rules specified by this firewall. Each rule specifies a + # protocol and port-range tuple that describes a permitted connection. + # Corresponds to the JSON property `denied` + # @return [Array] + attr_accessor :denied + # An optional description of this resource. Provide this property when you # create the resource. # Corresponds to the JSON property `description` # @return [String] attr_accessor :description + # If destination ranges are specified, the firewall will apply only to traffic + # that has destination IP address in these ranges. These ranges must be + # expressed in CIDR format. Only IPv4 is supported. + # Corresponds to the JSON property `destinationRanges` + # @return [Array] + attr_accessor :destination_ranges + + # Direction of traffic to which this firewall applies; default is INGRESS. Note: + # For INGRESS traffic, it is NOT supported to specify destinationRanges; For + # EGRESS traffic, it is NOT supported to specify sourceRanges OR sourceTags. + # Corresponds to the JSON property `direction` + # @return [String] + attr_accessor :direction + # [Output Only] The unique identifier for the resource. This identifier is # defined by the server. # Corresponds to the JSON property `id` @@ -3414,6 +3434,15 @@ module Google # @return [String] attr_accessor :network + # Priority for this rule. This is an integer between 0 and 65535, both inclusive. + # When not specified, the value assumed is 1000. Relative priorities determine + # precedence of conflicting rules. Lower value of priority implies higher + # precedence (eg, a rule with priority 0 has higher precedence than a rule with + # priority 1). DENY rules take precedence over ALLOW rules having equal priority. + # Corresponds to the JSON property `priority` + # @return [Fixnum] + attr_accessor :priority + # [Output Only] Server-defined URL for the resource. # Corresponds to the JSON property `selfLink` # @return [String] @@ -3458,11 +3487,15 @@ module Google def update!(**args) @allowed = args[:allowed] if args.key?(:allowed) @creation_timestamp = args[:creation_timestamp] if args.key?(:creation_timestamp) + @denied = args[:denied] if args.key?(:denied) @description = args[:description] if args.key?(:description) + @destination_ranges = args[:destination_ranges] if args.key?(:destination_ranges) + @direction = args[:direction] if args.key?(:direction) @id = args[:id] if args.key?(:id) @kind = args[:kind] if args.key?(:kind) @name = args[:name] if args.key?(:name) @network = args[:network] if args.key?(:network) + @priority = args[:priority] if args.key?(:priority) @self_link = args[:self_link] if args.key?(:self_link) @source_ranges = args[:source_ranges] if args.key?(:source_ranges) @source_tags = args[:source_tags] if args.key?(:source_tags) @@ -3499,6 +3532,37 @@ module Google @ports = args[:ports] if args.key?(:ports) end end + + # + class Denied + include Google::Apis::Core::Hashable + + # The IP protocol to which this rule applies. The protocol type is required when + # creating a firewall rule. This value can either be one of the following well + # known protocol strings (tcp, udp, icmp, esp, ah, sctp), or the IP protocol + # number. + # Corresponds to the JSON property `IPProtocol` + # @return [String] + attr_accessor :ip_protocol + + # An optional list of ports to which this rule applies. This field is only + # applicable for UDP or TCP protocol. Each entry must be either an integer or a + # range. If not specified, this rule applies to connections through any port. + # Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. + # Corresponds to the JSON property `ports` + # @return [Array] + attr_accessor :ports + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @ip_protocol = args[:ip_protocol] if args.key?(:ip_protocol) + @ports = args[:ports] if args.key?(:ports) + end + end end # Contains a list of firewalls. @@ -7142,6 +7206,11 @@ module Google # @return [Google::Apis::ComputeBeta::ManagedInstanceLastAttempt] attr_accessor :last_attempt + # [Output Only] Intended version of this instance. + # Corresponds to the JSON property `version` + # @return [Google::Apis::ComputeBeta::ManagedInstanceVersion] + attr_accessor :version + def initialize(**args) update!(**args) end @@ -7153,6 +7222,7 @@ module Google @instance = args[:instance] if args.key?(:instance) @instance_status = args[:instance_status] if args.key?(:instance_status) @last_attempt = args[:last_attempt] if args.key?(:last_attempt) + @version = args[:version] if args.key?(:version) end end @@ -7228,6 +7298,32 @@ module Google end end + # + class ManagedInstanceVersion + include Google::Apis::Core::Hashable + + # [Output Only] The intended template of the instance. This field is empty when + # current_action is one of ` DELETING, ABANDONING `. + # Corresponds to the JSON property `instanceTemplate` + # @return [String] + attr_accessor :instance_template + + # [Output Only] Name of the version. + # 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) + @instance_template = args[:instance_template] if args.key?(:instance_template) + @name = args[:name] if args.key?(:name) + end + end + # A metadata key/value entry. class Metadata include Google::Apis::Core::Hashable @@ -10729,6 +10825,26 @@ module Google end end + # + class SubnetworksSetPrivateIpGoogleAccessRequest + include Google::Apis::Core::Hashable + + # + # Corresponds to the JSON property `privateIpGoogleAccess` + # @return [Boolean] + attr_accessor :private_ip_google_access + alias_method :private_ip_google_access?, :private_ip_google_access + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @private_ip_google_access = args[:private_ip_google_access] if args.key?(:private_ip_google_access) + end + end + # class TcpHealthCheck include Google::Apis::Core::Hashable diff --git a/generated/google/apis/compute_beta/representations.rb b/generated/google/apis/compute_beta/representations.rb index 252f49dca..c39115458 100644 --- a/generated/google/apis/compute_beta/representations.rb +++ b/generated/google/apis/compute_beta/representations.rb @@ -450,6 +450,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + + class Denied + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end include Google::Apis::Core::JsonObjectSupport end @@ -934,6 +940,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class ManagedInstanceVersion + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Metadata class Representation < Google::Apis::Core::JsonRepresentation; end @@ -1408,6 +1420,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class SubnetworksSetPrivateIpGoogleAccessRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class TcpHealthCheck class Representation < Google::Apis::Core::JsonRepresentation; end @@ -2591,11 +2609,16 @@ module Google collection :allowed, as: 'allowed', class: Google::Apis::ComputeBeta::Firewall::Allowed, decorator: Google::Apis::ComputeBeta::Firewall::Allowed::Representation property :creation_timestamp, as: 'creationTimestamp' + collection :denied, as: 'denied', class: Google::Apis::ComputeBeta::Firewall::Denied, decorator: Google::Apis::ComputeBeta::Firewall::Denied::Representation + property :description, as: 'description' + collection :destination_ranges, as: 'destinationRanges' + property :direction, as: 'direction' property :id, as: 'id' property :kind, as: 'kind' property :name, as: 'name' property :network, as: 'network' + property :priority, as: 'priority' property :self_link, as: 'selfLink' collection :source_ranges, as: 'sourceRanges' collection :source_tags, as: 'sourceTags' @@ -2609,6 +2632,14 @@ module Google collection :ports, as: 'ports' end end + + class Denied + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :ip_protocol, as: 'IPProtocol' + collection :ports, as: 'ports' + end + end end class FirewallList @@ -3497,6 +3528,8 @@ module Google property :instance_status, as: 'instanceStatus' property :last_attempt, as: 'lastAttempt', class: Google::Apis::ComputeBeta::ManagedInstanceLastAttempt, decorator: Google::Apis::ComputeBeta::ManagedInstanceLastAttempt::Representation + property :version, as: 'version', class: Google::Apis::ComputeBeta::ManagedInstanceVersion, decorator: Google::Apis::ComputeBeta::ManagedInstanceVersion::Representation + end end @@ -3525,6 +3558,14 @@ module Google end end + class ManagedInstanceVersion + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :instance_template, as: 'instanceTemplate' + property :name, as: 'name' + end + end + class Metadata # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -4402,6 +4443,13 @@ module Google end end + class SubnetworksSetPrivateIpGoogleAccessRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :private_ip_google_access, as: 'privateIpGoogleAccess' + end + end + class TcpHealthCheck # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/compute_beta/service.rb b/generated/google/apis/compute_beta/service.rb index f35bca611..6f9f7406b 100644 --- a/generated/google/apis/compute_beta/service.rb +++ b/generated/google/apis/compute_beta/service.rb @@ -2654,7 +2654,7 @@ module Google # @param [String] project # Project ID for this request. # @param [String] firewall - # Name of the firewall rule to update. + # Name of the firewall rule to patch. # @param [Google::Apis::ComputeBeta::Firewall] firewall_object # @param [String] fields # Selector specifying which fields to include in a partial response. @@ -12838,6 +12838,51 @@ module Google execute_or_queue_command(command, &block) end + # Set whether VMs in this subnet can access Google services without assigning + # external IP addresses through Cloudpath. + # @param [String] project + # Project ID for this request. + # @param [String] region + # Name of the region scoping this request. + # @param [String] subnetwork + # Name of the Subnetwork resource. + # @param [Google::Apis::ComputeBeta::SubnetworksSetPrivateIpGoogleAccessRequest] subnetworks_set_private_ip_google_access_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # Overrides userIp if both are provided. + # @param [String] user_ip + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ComputeBeta::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ComputeBeta::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def set_subnetwork_private_ip_google_access(project, region, subnetwork, subnetworks_set_private_ip_google_access_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, '{project}/regions/{region}/subnetworks/{subnetwork}/setPrivateIpGoogleAccess', options) + command.request_representation = Google::Apis::ComputeBeta::SubnetworksSetPrivateIpGoogleAccessRequest::Representation + command.request_object = subnetworks_set_private_ip_google_access_request_object + command.response_representation = Google::Apis::ComputeBeta::Operation::Representation + command.response_class = Google::Apis::ComputeBeta::Operation + command.params['project'] = project unless project.nil? + command.params['region'] = region unless region.nil? + command.params['subnetwork'] = subnetwork unless subnetwork.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + # Returns permissions that a caller has on the specified resource. # @param [String] project # Project ID for this request. diff --git a/generated/google/apis/compute_v1.rb b/generated/google/apis/compute_v1.rb index c9b65748b..fafa8d5a2 100644 --- a/generated/google/apis/compute_v1.rb +++ b/generated/google/apis/compute_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/compute/docs/reference/latest/ module ComputeV1 VERSION = 'V1' - REVISION = '20170224' + REVISION = '20170302' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/dataflow_v1b3.rb b/generated/google/apis/dataflow_v1b3.rb index bb3cd3de6..d3971bdbd 100644 --- a/generated/google/apis/dataflow_v1b3.rb +++ b/generated/google/apis/dataflow_v1b3.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/dataflow module DataflowV1b3 VERSION = 'V1b3' - REVISION = '20170303' + REVISION = '20170318' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/dataflow_v1b3/classes.rb b/generated/google/apis/dataflow_v1b3/classes.rb index 476df4ab7..f709aed4e 100644 --- a/generated/google/apis/dataflow_v1b3/classes.rb +++ b/generated/google/apis/dataflow_v1b3/classes.rb @@ -22,6 +22,1966 @@ module Google module Apis module DataflowV1b3 + # A source that records can be read and decoded from. + class Source + include Google::Apis::Core::Hashable + + # Metadata about a Source useful for automatically optimizing + # and tuning the pipeline, etc. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::DataflowV1b3::SourceMetadata] + attr_accessor :metadata + + # While splitting, sources may specify the produced bundles + # as differences against another source, in order to save backend-side + # memory and allow bigger jobs. For details, see SourceSplitRequest. + # To support this use case, the full set of parameters of the source + # is logically obtained by taking the latest explicitly specified value + # of each parameter in the order: + # base_specs (later items win), spec (overrides anything in base_specs). + # Corresponds to the JSON property `baseSpecs` + # @return [Array>] + attr_accessor :base_specs + + # The codec to use to decode data read from the source. + # Corresponds to the JSON property `codec` + # @return [Hash] + attr_accessor :codec + + # Setting this value to true hints to the framework that the source + # doesn't need splitting, and using SourceSplitRequest on it would + # yield SOURCE_SPLIT_OUTCOME_USE_CURRENT. + # E.g. a file splitter may set this to true when splitting a single file + # into a set of byte ranges of appropriate size, and set this + # to false when splitting a filepattern into individual files. + # However, for efficiency, a file splitter may decide to produce + # file subranges directly from the filepattern to avoid a splitting + # round-trip. + # See SourceSplitRequest for an overview of the splitting process. + # This field is meaningful only in the Source objects populated + # by the user (e.g. when filling in a DerivedSource). + # Source objects supplied by the framework to the user don't have + # this field populated. + # Corresponds to the JSON property `doesNotNeedSplitting` + # @return [Boolean] + attr_accessor :does_not_need_splitting + alias_method :does_not_need_splitting?, :does_not_need_splitting + + # The source to read from, plus its parameters. + # Corresponds to the JSON property `spec` + # @return [Hash] + attr_accessor :spec + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @metadata = args[:metadata] if args.key?(:metadata) + @base_specs = args[:base_specs] if args.key?(:base_specs) + @codec = args[:codec] if args.key?(:codec) + @does_not_need_splitting = args[:does_not_need_splitting] if args.key?(:does_not_need_splitting) + @spec = args[:spec] if args.key?(:spec) + end + end + + # A representation of an int64, n, that is immune to precision loss when + # encoded in JSON. + class SplitInt64 + include Google::Apis::Core::Hashable + + # The low order bits: n & 0xffffffff. + # Corresponds to the JSON property `lowBits` + # @return [Fixnum] + attr_accessor :low_bits + + # The high order bits, including the sign: n >> 32. + # Corresponds to the JSON property `highBits` + # @return [Fixnum] + attr_accessor :high_bits + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @low_bits = args[:low_bits] if args.key?(:low_bits) + @high_bits = args[:high_bits] if args.key?(:high_bits) + end + end + + # Describes one particular pool of Cloud Dataflow workers to be + # instantiated by the Cloud Dataflow service in order to perform the + # computations required by a job. Note that a workflow job may use + # multiple pools, in order to match the various computational + # requirements of the various stages of the job. + class WorkerPool + include Google::Apis::Core::Hashable + + # Required. Docker container image that executes the Cloud Dataflow worker + # harness, residing in Google Container Registry. + # Corresponds to the JSON property `workerHarnessContainerImage` + # @return [String] + attr_accessor :worker_harness_container_image + + # Machine type (e.g. "n1-standard-1"). If empty or unspecified, the + # service will attempt to choose a reasonable default. + # Corresponds to the JSON property `machineType` + # @return [String] + attr_accessor :machine_type + + # Type of root disk for VMs. If empty or unspecified, the service will + # attempt to choose a reasonable default. + # Corresponds to the JSON property `diskType` + # @return [String] + attr_accessor :disk_type + + # The kind of the worker pool; currently only `harness` and `shuffle` + # are supported. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # Data disks that are used by a VM in this workflow. + # Corresponds to the JSON property `dataDisks` + # @return [Array] + attr_accessor :data_disks + + # Subnetwork to which VMs will be assigned, if desired. Expected to be of + # the form "regions/REGION/subnetworks/SUBNETWORK". + # Corresponds to the JSON property `subnetwork` + # @return [String] + attr_accessor :subnetwork + + # Configuration for VM IPs. + # Corresponds to the JSON property `ipConfiguration` + # @return [String] + attr_accessor :ip_configuration + + # Settings for WorkerPool autoscaling. + # Corresponds to the JSON property `autoscalingSettings` + # @return [Google::Apis::DataflowV1b3::AutoscalingSettings] + attr_accessor :autoscaling_settings + + # Taskrunner configuration settings. + # Corresponds to the JSON property `taskrunnerSettings` + # @return [Google::Apis::DataflowV1b3::TaskRunnerSettings] + attr_accessor :taskrunner_settings + + # Metadata to set on the Google Compute Engine VMs. + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # The default package set to install. This allows the service to + # select a default set of packages which are useful to worker + # harnesses written in a particular language. + # Corresponds to the JSON property `defaultPackageSet` + # @return [String] + attr_accessor :default_package_set + + # Network to which VMs will be assigned. If empty or unspecified, + # the service will use the network "default". + # Corresponds to the JSON property `network` + # @return [String] + attr_accessor :network + + # Zone to run the worker pools in. If empty or unspecified, the service + # will attempt to choose a reasonable default. + # Corresponds to the JSON property `zone` + # @return [String] + attr_accessor :zone + + # Number of Google Compute Engine workers in this pool needed to + # execute the job. If zero or unspecified, the service will + # attempt to choose a reasonable default. + # Corresponds to the JSON property `numWorkers` + # @return [Fixnum] + attr_accessor :num_workers + + # The number of threads per worker harness. If empty or unspecified, the + # service will choose a number of threads (according to the number of cores + # on the selected machine type for batch, or 1 by convention for streaming). + # Corresponds to the JSON property `numThreadsPerWorker` + # @return [Fixnum] + attr_accessor :num_threads_per_worker + + # Fully qualified source image for disks. + # Corresponds to the JSON property `diskSourceImage` + # @return [String] + attr_accessor :disk_source_image + + # Packages to be installed on workers. + # Corresponds to the JSON property `packages` + # @return [Array] + attr_accessor :packages + + # Sets the policy for determining when to turndown worker pool. + # Allowed values are: `TEARDOWN_ALWAYS`, `TEARDOWN_ON_SUCCESS`, and + # `TEARDOWN_NEVER`. + # `TEARDOWN_ALWAYS` means workers are always torn down regardless of whether + # the job succeeds. `TEARDOWN_ON_SUCCESS` means workers are torn down + # if the job succeeds. `TEARDOWN_NEVER` means the workers are never torn + # down. + # If the workers are not torn down by the service, they will + # continue to run and use Google Compute Engine VM resources in the + # user's project until they are explicitly terminated by the user. + # Because of this, Google recommends using the `TEARDOWN_ALWAYS` + # policy except for small, manually supervised test jobs. + # If unknown or unspecified, the service will attempt to choose a reasonable + # default. + # Corresponds to the JSON property `teardownPolicy` + # @return [String] + attr_accessor :teardown_policy + + # The action to take on host maintenance, as defined by the Google + # Compute Engine API. + # Corresponds to the JSON property `onHostMaintenance` + # @return [String] + attr_accessor :on_host_maintenance + + # Extra arguments for this worker pool. + # Corresponds to the JSON property `poolArgs` + # @return [Hash] + attr_accessor :pool_args + + # Size of root disk for VMs, in GB. If zero or unspecified, the service will + # attempt to choose a reasonable default. + # Corresponds to the JSON property `diskSizeGb` + # @return [Fixnum] + attr_accessor :disk_size_gb + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @worker_harness_container_image = args[:worker_harness_container_image] if args.key?(:worker_harness_container_image) + @machine_type = args[:machine_type] if args.key?(:machine_type) + @disk_type = args[:disk_type] if args.key?(:disk_type) + @kind = args[:kind] if args.key?(:kind) + @data_disks = args[:data_disks] if args.key?(:data_disks) + @subnetwork = args[:subnetwork] if args.key?(:subnetwork) + @ip_configuration = args[:ip_configuration] if args.key?(:ip_configuration) + @autoscaling_settings = args[:autoscaling_settings] if args.key?(:autoscaling_settings) + @taskrunner_settings = args[:taskrunner_settings] if args.key?(:taskrunner_settings) + @metadata = args[:metadata] if args.key?(:metadata) + @default_package_set = args[:default_package_set] if args.key?(:default_package_set) + @network = args[:network] if args.key?(:network) + @zone = args[:zone] if args.key?(:zone) + @num_workers = args[:num_workers] if args.key?(:num_workers) + @num_threads_per_worker = args[:num_threads_per_worker] if args.key?(:num_threads_per_worker) + @disk_source_image = args[:disk_source_image] if args.key?(:disk_source_image) + @packages = args[:packages] if args.key?(:packages) + @teardown_policy = args[:teardown_policy] if args.key?(:teardown_policy) + @on_host_maintenance = args[:on_host_maintenance] if args.key?(:on_host_maintenance) + @pool_args = args[:pool_args] if args.key?(:pool_args) + @disk_size_gb = args[:disk_size_gb] if args.key?(:disk_size_gb) + end + end + + # A work item that represents the different operations that can be + # performed on a user-defined Source specification. + class SourceOperationRequest + include Google::Apis::Core::Hashable + + # A request to compute the SourceMetadata of a Source. + # Corresponds to the JSON property `getMetadata` + # @return [Google::Apis::DataflowV1b3::SourceGetMetadataRequest] + attr_accessor :get_metadata + + # Represents the operation to split a high-level Source specification + # into bundles (parts for parallel processing). + # At a high level, splitting of a source into bundles happens as follows: + # SourceSplitRequest is applied to the source. If it returns + # SOURCE_SPLIT_OUTCOME_USE_CURRENT, no further splitting happens and the source + # is used "as is". Otherwise, splitting is applied recursively to each + # produced DerivedSource. + # As an optimization, for any Source, if its does_not_need_splitting is + # true, the framework assumes that splitting this source would return + # SOURCE_SPLIT_OUTCOME_USE_CURRENT, and doesn't initiate a SourceSplitRequest. + # This applies both to the initial source being split and to bundles + # produced from it. + # Corresponds to the JSON property `split` + # @return [Google::Apis::DataflowV1b3::SourceSplitRequest] + attr_accessor :split + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @get_metadata = args[:get_metadata] if args.key?(:get_metadata) + @split = args[:split] if args.key?(:split) + end + end + + # WorkItem represents basic information about a WorkItem to be executed + # in the cloud. + class WorkItem + include Google::Apis::Core::Hashable + + # Identifies the workflow job this WorkItem belongs to. + # Corresponds to the JSON property `jobId` + # @return [String] + attr_accessor :job_id + + # Identifies this WorkItem. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Work item-specific configuration as an opaque blob. + # Corresponds to the JSON property `configuration` + # @return [String] + attr_accessor :configuration + + # MapTask consists of an ordered set of instructions, each of which + # describes one particular low-level operation for the worker to + # perform in order to accomplish the MapTask's WorkItem. + # Each instruction must appear in the list before any instructions which + # depends on its output. + # Corresponds to the JSON property `mapTask` + # @return [Google::Apis::DataflowV1b3::MapTask] + attr_accessor :map_task + + # Describes a particular function to invoke. + # Corresponds to the JSON property `seqMapTask` + # @return [Google::Apis::DataflowV1b3::SeqMapTask] + attr_accessor :seq_map_task + + # Any required packages that need to be fetched in order to execute + # this WorkItem. + # Corresponds to the JSON property `packages` + # @return [Array] + attr_accessor :packages + + # Identifies the cloud project this WorkItem belongs to. + # Corresponds to the JSON property `projectId` + # @return [String] + attr_accessor :project_id + + # Recommended reporting interval. + # Corresponds to the JSON property `reportStatusInterval` + # @return [String] + attr_accessor :report_status_interval + + # A task which initializes part of a streaming Dataflow job. + # Corresponds to the JSON property `streamingSetupTask` + # @return [Google::Apis::DataflowV1b3::StreamingSetupTask] + attr_accessor :streaming_setup_task + + # A work item that represents the different operations that can be + # performed on a user-defined Source specification. + # Corresponds to the JSON property `sourceOperationTask` + # @return [Google::Apis::DataflowV1b3::SourceOperationRequest] + attr_accessor :source_operation_task + + # A task that carries configuration information for streaming computations. + # Corresponds to the JSON property `streamingConfigTask` + # @return [Google::Apis::DataflowV1b3::StreamingConfigTask] + attr_accessor :streaming_config_task + + # Time when the lease on this Work will expire. + # Corresponds to the JSON property `leaseExpireTime` + # @return [String] + attr_accessor :lease_expire_time + + # The initial index to use when reporting the status of the WorkItem. + # Corresponds to the JSON property `initialReportIndex` + # @return [String] + attr_accessor :initial_report_index + + # A task which consists of a shell command for the worker to execute. + # Corresponds to the JSON property `shellTask` + # @return [Google::Apis::DataflowV1b3::ShellTask] + attr_accessor :shell_task + + # A task which describes what action should be performed for the specified + # streaming computation ranges. + # Corresponds to the JSON property `streamingComputationTask` + # @return [Google::Apis::DataflowV1b3::StreamingComputationTask] + attr_accessor :streaming_computation_task + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @job_id = args[:job_id] if args.key?(:job_id) + @id = args[:id] if args.key?(:id) + @configuration = args[:configuration] if args.key?(:configuration) + @map_task = args[:map_task] if args.key?(:map_task) + @seq_map_task = args[:seq_map_task] if args.key?(:seq_map_task) + @packages = args[:packages] if args.key?(:packages) + @project_id = args[:project_id] if args.key?(:project_id) + @report_status_interval = args[:report_status_interval] if args.key?(:report_status_interval) + @streaming_setup_task = args[:streaming_setup_task] if args.key?(:streaming_setup_task) + @source_operation_task = args[:source_operation_task] if args.key?(:source_operation_task) + @streaming_config_task = args[:streaming_config_task] if args.key?(:streaming_config_task) + @lease_expire_time = args[:lease_expire_time] if args.key?(:lease_expire_time) + @initial_report_index = args[:initial_report_index] if args.key?(:initial_report_index) + @shell_task = args[:shell_task] if args.key?(:shell_task) + @streaming_computation_task = args[:streaming_computation_task] if args.key?(:streaming_computation_task) + end + end + + # Worker metrics exported from workers. This contains resource utilization + # metrics accumulated from a variety of sources. For more information, see + # go/df-resource-signals. + class ResourceUtilizationReport + include Google::Apis::Core::Hashable + + # CPU utilization samples. + # Corresponds to the JSON property `cpuTime` + # @return [Array] + attr_accessor :cpu_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @cpu_time = args[:cpu_time] if args.key?(:cpu_time) + end + end + + # Represents the level of parallelism in a WorkItem's input, + # reported by the worker. + class ReportedParallelism + include Google::Apis::Core::Hashable + + # Specifies whether the parallelism is infinite. If true, "value" is + # ignored. + # Infinite parallelism means the service will assume that the work item + # can always be split into more non-empty work items by dynamic splitting. + # This is a work-around for lack of support for infinity by the current + # JSON-based Java RPC stack. + # Corresponds to the JSON property `isInfinite` + # @return [Boolean] + attr_accessor :is_infinite + alias_method :is_infinite?, :is_infinite + + # Specifies the level of parallelism in case it is finite. + # Corresponds to the JSON property `value` + # @return [Float] + attr_accessor :value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @is_infinite = args[:is_infinite] if args.key?(:is_infinite) + @value = args[:value] if args.key?(:value) + end + end + + # Global topology of the streaming Dataflow job, including all + # computations and their sharded locations. + class TopologyConfig + include Google::Apis::Core::Hashable + + # The size (in bits) of keys that will be assigned to source messages. + # Corresponds to the JSON property `forwardingKeyBits` + # @return [Fixnum] + attr_accessor :forwarding_key_bits + + # Maps user stage names to stable computation names. + # Corresponds to the JSON property `userStageToComputationNameMap` + # @return [Hash] + attr_accessor :user_stage_to_computation_name_map + + # The computations associated with a streaming Dataflow job. + # Corresponds to the JSON property `computations` + # @return [Array] + attr_accessor :computations + + # The disks assigned to a streaming Dataflow job. + # Corresponds to the JSON property `dataDiskAssignments` + # @return [Array] + attr_accessor :data_disk_assignments + + # Version number for persistent state. + # Corresponds to the JSON property `persistentStateVersion` + # @return [Fixnum] + attr_accessor :persistent_state_version + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @forwarding_key_bits = args[:forwarding_key_bits] if args.key?(:forwarding_key_bits) + @user_stage_to_computation_name_map = args[:user_stage_to_computation_name_map] if args.key?(:user_stage_to_computation_name_map) + @computations = args[:computations] if args.key?(:computations) + @data_disk_assignments = args[:data_disk_assignments] if args.key?(:data_disk_assignments) + @persistent_state_version = args[:persistent_state_version] if args.key?(:persistent_state_version) + end + end + + # Hints for splitting a Source into bundles (parts for parallel + # processing) using SourceSplitRequest. + class SourceSplitOptions + include Google::Apis::Core::Hashable + + # The source should be split into a set of bundles where the estimated size + # of each is approximately this many bytes. + # Corresponds to the JSON property `desiredBundleSizeBytes` + # @return [String] + attr_accessor :desired_bundle_size_bytes + + # DEPRECATED in favor of desired_bundle_size_bytes. + # Corresponds to the JSON property `desiredShardSizeBytes` + # @return [String] + attr_accessor :desired_shard_size_bytes + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @desired_bundle_size_bytes = args[:desired_bundle_size_bytes] if args.key?(:desired_bundle_size_bytes) + @desired_shard_size_bytes = args[:desired_shard_size_bytes] if args.key?(:desired_shard_size_bytes) + end + end + + # An instruction that reads records. + # Takes no inputs, produces one output. + class ReadInstruction + include Google::Apis::Core::Hashable + + # A source that records can be read and decoded from. + # Corresponds to the JSON property `source` + # @return [Google::Apis::DataflowV1b3::Source] + attr_accessor :source + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @source = args[:source] if args.key?(:source) + end + end + + # Provides data to pass through to the worker harness. + class WorkerSettings + include Google::Apis::Core::Hashable + + # The Cloud Dataflow service path relative to the root URL, for example, + # "dataflow/v1b3/projects". + # Corresponds to the JSON property `servicePath` + # @return [String] + attr_accessor :service_path + + # The Shuffle service path relative to the root URL, for example, + # "shuffle/v1beta1". + # Corresponds to the JSON property `shuffleServicePath` + # @return [String] + attr_accessor :shuffle_service_path + + # The ID of the worker running this pipeline. + # Corresponds to the JSON property `workerId` + # @return [String] + attr_accessor :worker_id + + # The prefix of the resources the system should use for temporary + # storage. + # The supported resource type is: + # Google Cloud Storage: + # storage.googleapis.com/`bucket`/`object` + # bucket.storage.googleapis.com/`object` + # Corresponds to the JSON property `tempStoragePrefix` + # @return [String] + attr_accessor :temp_storage_prefix + + # The base URL for accessing Google Cloud APIs. + # When workers access Google Cloud APIs, they logically do so via + # relative URLs. If this field is specified, it supplies the base + # URL to use for resolving these relative URLs. The normative + # algorithm used is defined by RFC 1808, "Relative Uniform Resource + # Locators". + # If not specified, the default value is "http://www.googleapis.com/" + # Corresponds to the JSON property `baseUrl` + # @return [String] + attr_accessor :base_url + + # Whether to send work progress updates to the service. + # Corresponds to the JSON property `reportingEnabled` + # @return [Boolean] + attr_accessor :reporting_enabled + alias_method :reporting_enabled?, :reporting_enabled + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @service_path = args[:service_path] if args.key?(:service_path) + @shuffle_service_path = args[:shuffle_service_path] if args.key?(:shuffle_service_path) + @worker_id = args[:worker_id] if args.key?(:worker_id) + @temp_storage_prefix = args[:temp_storage_prefix] if args.key?(:temp_storage_prefix) + @base_url = args[:base_url] if args.key?(:base_url) + @reporting_enabled = args[:reporting_enabled] if args.key?(:reporting_enabled) + end + end + + # Identifies the location of a streaming computation stage, for + # stage-to-stage communication. + class StreamingStageLocation + include Google::Apis::Core::Hashable + + # Identifies the particular stream within the streaming Dataflow + # job. + # Corresponds to the JSON property `streamId` + # @return [String] + attr_accessor :stream_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @stream_id = args[:stream_id] if args.key?(:stream_id) + end + end + + # Data disk assignment for a given VM instance. + class DataDiskAssignment + include Google::Apis::Core::Hashable + + # VM instance name the data disks mounted to, for example + # "myproject-1014-104817-4c2-harness-0". + # Corresponds to the JSON property `vmInstance` + # @return [String] + attr_accessor :vm_instance + + # Mounted data disks. The order is important a data disk's 0-based index in + # this list defines which persistent directory the disk is mounted to, for + # example the list of ` "myproject-1014-104817-4c2-harness-0-disk-0" `, + # ` "myproject-1014-104817-4c2-harness-0-disk-1" `. + # Corresponds to the JSON property `dataDisks` + # @return [Array] + attr_accessor :data_disks + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @vm_instance = args[:vm_instance] if args.key?(:vm_instance) + @data_disks = args[:data_disks] if args.key?(:data_disks) + end + end + + # A suggestion by the service to the worker to dynamically split the WorkItem. + class ApproximateSplitRequest + include Google::Apis::Core::Hashable + + # Position defines a position within a collection of data. The value + # can be either the end position, a key (used with ordered + # collections), a byte offset, or a record index. + # Corresponds to the JSON property `position` + # @return [Google::Apis::DataflowV1b3::Position] + attr_accessor :position + + # A fraction at which to split the work item, from 0.0 (beginning of the + # input) to 1.0 (end of the input). + # Corresponds to the JSON property `fractionConsumed` + # @return [Float] + attr_accessor :fraction_consumed + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @position = args[:position] if args.key?(:position) + @fraction_consumed = args[:fraction_consumed] if args.key?(:fraction_consumed) + end + end + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` which can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting purpose. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + class Status + include Google::Apis::Core::Hashable + + # A list of messages that carry the error details. There will be a + # common set of message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # google.rpc.Status.details field, or localized by the client. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @details = args[:details] if args.key?(:details) + @code = args[:code] if args.key?(:code) + @message = args[:message] if args.key?(:message) + end + end + + # Describes a stream of data, either as input to be processed or as + # output of a streaming Dataflow job. + class StreamLocation + include Google::Apis::Core::Hashable + + # Identifies the location of a custom souce. + # Corresponds to the JSON property `customSourceLocation` + # @return [Google::Apis::DataflowV1b3::CustomSourceLocation] + attr_accessor :custom_source_location + + # Identifies the location of a streaming computation stage, for + # stage-to-stage communication. + # Corresponds to the JSON property `streamingStageLocation` + # @return [Google::Apis::DataflowV1b3::StreamingStageLocation] + attr_accessor :streaming_stage_location + + # Identifies a pubsub location to use for transferring data into or + # out of a streaming Dataflow job. + # Corresponds to the JSON property `pubsubLocation` + # @return [Google::Apis::DataflowV1b3::PubsubLocation] + attr_accessor :pubsub_location + + # Identifies the location of a streaming side input. + # Corresponds to the JSON property `sideInputLocation` + # @return [Google::Apis::DataflowV1b3::StreamingSideInputLocation] + attr_accessor :side_input_location + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @custom_source_location = args[:custom_source_location] if args.key?(:custom_source_location) + @streaming_stage_location = args[:streaming_stage_location] if args.key?(:streaming_stage_location) + @pubsub_location = args[:pubsub_location] if args.key?(:pubsub_location) + @side_input_location = args[:side_input_location] if args.key?(:side_input_location) + end + end + + # The response to the worker messages. + class SendWorkerMessagesResponse + include Google::Apis::Core::Hashable + + # The servers response to the worker messages. + # Corresponds to the JSON property `workerMessageResponses` + # @return [Array] + attr_accessor :worker_message_responses + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @worker_message_responses = args[:worker_message_responses] if args.key?(:worker_message_responses) + end + end + + # Response to a request to lease WorkItems. + class LeaseWorkItemResponse + include Google::Apis::Core::Hashable + + # A list of the leased WorkItems. + # Corresponds to the JSON property `workItems` + # @return [Array] + attr_accessor :work_items + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @work_items = args[:work_items] if args.key?(:work_items) + end + end + + # Configuration information for a single streaming computation. + class StreamingComputationConfig + include Google::Apis::Core::Hashable + + # Unique identifier for this computation. + # Corresponds to the JSON property `computationId` + # @return [String] + attr_accessor :computation_id + + # System defined name for this computation. + # Corresponds to the JSON property `systemName` + # @return [String] + attr_accessor :system_name + + # Stage name of this computation. + # Corresponds to the JSON property `stageName` + # @return [String] + attr_accessor :stage_name + + # Instructions that comprise the computation. + # Corresponds to the JSON property `instructions` + # @return [Array] + attr_accessor :instructions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @computation_id = args[:computation_id] if args.key?(:computation_id) + @system_name = args[:system_name] if args.key?(:system_name) + @stage_name = args[:stage_name] if args.key?(:stage_name) + @instructions = args[:instructions] if args.key?(:instructions) + end + end + + # Description of the type, names/ids, and input/outputs for a transform. + class TransformSummary + include Google::Apis::Core::Hashable + + # User names for all collection inputs to this transform. + # Corresponds to the JSON property `inputCollectionName` + # @return [Array] + attr_accessor :input_collection_name + + # User provided name for this transform instance. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # SDK generated id of this transform instance. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Transform-specific display data. + # Corresponds to the JSON property `displayData` + # @return [Array] + attr_accessor :display_data + + # User names for all collection outputs to this transform. + # Corresponds to the JSON property `outputCollectionName` + # @return [Array] + attr_accessor :output_collection_name + + # Type of transform. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @input_collection_name = args[:input_collection_name] if args.key?(:input_collection_name) + @name = args[:name] if args.key?(:name) + @id = args[:id] if args.key?(:id) + @display_data = args[:display_data] if args.key?(:display_data) + @output_collection_name = args[:output_collection_name] if args.key?(:output_collection_name) + @kind = args[:kind] if args.key?(:kind) + end + end + + # A sink that records can be encoded and written to. + class Sink + include Google::Apis::Core::Hashable + + # The codec to use to encode data written to the sink. + # Corresponds to the JSON property `codec` + # @return [Hash] + attr_accessor :codec + + # The sink to write to, plus its parameters. + # Corresponds to the JSON property `spec` + # @return [Hash] + attr_accessor :spec + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @codec = args[:codec] if args.key?(:codec) + @spec = args[:spec] if args.key?(:spec) + end + end + + # Parameters to provide to the template being launched. + class LaunchTemplateParameters + include Google::Apis::Core::Hashable + + # The runtime parameters to pass to the job. + # Corresponds to the JSON property `parameters` + # @return [Hash] + attr_accessor :parameters + + # Required. The job name to use for the created job. + # Corresponds to the JSON property `jobName` + # @return [String] + attr_accessor :job_name + + # The environment values to set at runtime. + # Corresponds to the JSON property `environment` + # @return [Google::Apis::DataflowV1b3::RuntimeEnvironment] + attr_accessor :environment + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @parameters = args[:parameters] if args.key?(:parameters) + @job_name = args[:job_name] if args.key?(:job_name) + @environment = args[:environment] if args.key?(:environment) + end + end + + # An instruction that copies its inputs (zero or more) to its (single) output. + class FlattenInstruction + include Google::Apis::Core::Hashable + + # Describes the inputs to the flatten instruction. + # Corresponds to the JSON property `inputs` + # @return [Array] + attr_accessor :inputs + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @inputs = args[:inputs] if args.key?(:inputs) + end + end + + # An instruction that does a partial group-by-key. + # One input and one output. + class PartialGroupByKeyInstruction + include Google::Apis::Core::Hashable + + # The codec to use for interpreting an element in the input PTable. + # Corresponds to the JSON property `inputElementCodec` + # @return [Hash] + attr_accessor :input_element_codec + + # The value combining function to invoke. + # Corresponds to the JSON property `valueCombiningFn` + # @return [Hash] + attr_accessor :value_combining_fn + + # If this instruction includes a combining function this is the name of the + # intermediate store between the GBK and the CombineValues. + # Corresponds to the JSON property `originalCombineValuesInputStoreName` + # @return [String] + attr_accessor :original_combine_values_input_store_name + + # Zero or more side inputs. + # Corresponds to the JSON property `sideInputs` + # @return [Array] + attr_accessor :side_inputs + + # If this instruction includes a combining function, this is the name of the + # CombineValues instruction lifted into this instruction. + # Corresponds to the JSON property `originalCombineValuesStepName` + # @return [String] + attr_accessor :original_combine_values_step_name + + # An input of an instruction, as a reference to an output of a + # producer instruction. + # Corresponds to the JSON property `input` + # @return [Google::Apis::DataflowV1b3::InstructionInput] + attr_accessor :input + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @input_element_codec = args[:input_element_codec] if args.key?(:input_element_codec) + @value_combining_fn = args[:value_combining_fn] if args.key?(:value_combining_fn) + @original_combine_values_input_store_name = args[:original_combine_values_input_store_name] if args.key?(:original_combine_values_input_store_name) + @side_inputs = args[:side_inputs] if args.key?(:side_inputs) + @original_combine_values_step_name = args[:original_combine_values_step_name] if args.key?(:original_combine_values_step_name) + @input = args[:input] if args.key?(:input) + end + end + + # An input of an instruction, as a reference to an output of a + # producer instruction. + class InstructionInput + include Google::Apis::Core::Hashable + + # The index (origin zero) of the parallel instruction that produces + # the output to be consumed by this input. This index is relative + # to the list of instructions in this input's instruction's + # containing MapTask. + # Corresponds to the JSON property `producerInstructionIndex` + # @return [Fixnum] + attr_accessor :producer_instruction_index + + # The output index (origin zero) within the producer. + # Corresponds to the JSON property `outputNum` + # @return [Fixnum] + attr_accessor :output_num + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @producer_instruction_index = args[:producer_instruction_index] if args.key?(:producer_instruction_index) + @output_num = args[:output_num] if args.key?(:output_num) + end + end + + # Description of an input or output of an execution stage. + class StageSource + include Google::Apis::Core::Hashable + + # Dataflow service generated name for this source. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Size of the source, if measurable. + # Corresponds to the JSON property `sizeBytes` + # @return [String] + attr_accessor :size_bytes + + # Human-readable name for this source; may be user or system generated. + # Corresponds to the JSON property `userName` + # @return [String] + attr_accessor :user_name + + # User name for the original user transform or collection with which this + # source is most closely associated. + # Corresponds to the JSON property `originalTransformOrCollection` + # @return [String] + attr_accessor :original_transform_or_collection + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + @size_bytes = args[:size_bytes] if args.key?(:size_bytes) + @user_name = args[:user_name] if args.key?(:user_name) + @original_transform_or_collection = args[:original_transform_or_collection] if args.key?(:original_transform_or_collection) + end + end + + # A metric value representing a list of strings. + class StringList + include Google::Apis::Core::Hashable + + # Elements of the list. + # Corresponds to the JSON property `elements` + # @return [Array] + attr_accessor :elements + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @elements = args[:elements] if args.key?(:elements) + end + end + + # Data provided with a pipeline or transform to provide descriptive info. + class DisplayData + include Google::Apis::Core::Hashable + + # Contains value if the data is of string type. + # Corresponds to the JSON property `strValue` + # @return [String] + attr_accessor :str_value + + # Contains value if the data is of int64 type. + # Corresponds to the JSON property `int64Value` + # @return [String] + attr_accessor :int64_value + + # Contains value if the data is of duration type. + # Corresponds to the JSON property `durationValue` + # @return [String] + attr_accessor :duration_value + + # The namespace for the key. This is usually a class name or programming + # language namespace (i.e. python module) which defines the display data. + # This allows a dax monitoring system to specially handle the data + # and perform custom rendering. + # Corresponds to the JSON property `namespace` + # @return [String] + attr_accessor :namespace + + # Contains value if the data is of float type. + # Corresponds to the JSON property `floatValue` + # @return [Float] + attr_accessor :float_value + + # The key identifying the display data. + # This is intended to be used as a label for the display data + # when viewed in a dax monitoring system. + # Corresponds to the JSON property `key` + # @return [String] + attr_accessor :key + + # A possible additional shorter value to display. + # For example a java_class_name_value of com.mypackage.MyDoFn + # will be stored with MyDoFn as the short_str_value and + # com.mypackage.MyDoFn as the java_class_name value. + # short_str_value can be displayed and java_class_name_value + # will be displayed as a tooltip. + # Corresponds to the JSON property `shortStrValue` + # @return [String] + attr_accessor :short_str_value + + # An optional full URL. + # Corresponds to the JSON property `url` + # @return [String] + attr_accessor :url + + # An optional label to display in a dax UI for the element. + # Corresponds to the JSON property `label` + # @return [String] + attr_accessor :label + + # Contains value if the data is of timestamp type. + # Corresponds to the JSON property `timestampValue` + # @return [String] + attr_accessor :timestamp_value + + # Contains value if the data is of java class type. + # Corresponds to the JSON property `javaClassValue` + # @return [String] + attr_accessor :java_class_value + + # Contains value if the data is of a boolean type. + # Corresponds to the JSON property `boolValue` + # @return [Boolean] + attr_accessor :bool_value + alias_method :bool_value?, :bool_value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @str_value = args[:str_value] if args.key?(:str_value) + @int64_value = args[:int64_value] if args.key?(:int64_value) + @duration_value = args[:duration_value] if args.key?(:duration_value) + @namespace = args[:namespace] if args.key?(:namespace) + @float_value = args[:float_value] if args.key?(:float_value) + @key = args[:key] if args.key?(:key) + @short_str_value = args[:short_str_value] if args.key?(:short_str_value) + @url = args[:url] if args.key?(:url) + @label = args[:label] if args.key?(:label) + @timestamp_value = args[:timestamp_value] if args.key?(:timestamp_value) + @java_class_value = args[:java_class_value] if args.key?(:java_class_value) + @bool_value = args[:bool_value] if args.key?(:bool_value) + end + end + + # Request to lease WorkItems. + class LeaseWorkItemRequest + include Google::Apis::Core::Hashable + + # Worker capabilities. WorkItems might be limited to workers with specific + # capabilities. + # Corresponds to the JSON property `workerCapabilities` + # @return [Array] + attr_accessor :worker_capabilities + + # Identifies the worker leasing work -- typically the ID of the + # virtual machine running the worker. + # Corresponds to the JSON property `workerId` + # @return [String] + attr_accessor :worker_id + + # The initial lease period. + # Corresponds to the JSON property `requestedLeaseDuration` + # @return [String] + attr_accessor :requested_lease_duration + + # The current timestamp at the worker. + # Corresponds to the JSON property `currentWorkerTime` + # @return [String] + attr_accessor :current_worker_time + + # The location which contains the WorkItem's job. + # Corresponds to the JSON property `location` + # @return [String] + attr_accessor :location + + # Filter for WorkItem type. + # Corresponds to the JSON property `workItemTypes` + # @return [Array] + attr_accessor :work_item_types + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @worker_capabilities = args[:worker_capabilities] if args.key?(:worker_capabilities) + @worker_id = args[:worker_id] if args.key?(:worker_id) + @requested_lease_duration = args[:requested_lease_duration] if args.key?(:requested_lease_duration) + @current_worker_time = args[:current_worker_time] if args.key?(:current_worker_time) + @location = args[:location] if args.key?(:location) + @work_item_types = args[:work_item_types] if args.key?(:work_item_types) + end + end + + # Request to get updated debug configuration for component. + class GetDebugConfigRequest + include Google::Apis::Core::Hashable + + # The internal component id for which debug configuration is + # requested. + # Corresponds to the JSON property `componentId` + # @return [String] + attr_accessor :component_id + + # The worker id, i.e., VM hostname. + # Corresponds to the JSON property `workerId` + # @return [String] + attr_accessor :worker_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @component_id = args[:component_id] if args.key?(:component_id) + @worker_id = args[:worker_id] if args.key?(:worker_id) + end + end + + # The response to a GetTemplate request. + class GetTemplateResponse + include Google::Apis::Core::Hashable + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` which can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting purpose. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + # Corresponds to the JSON property `status` + # @return [Google::Apis::DataflowV1b3::Status] + attr_accessor :status + + # Metadata describing a template. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::DataflowV1b3::TemplateMetadata] + attr_accessor :metadata + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @status = args[:status] if args.key?(:status) + @metadata = args[:metadata] if args.key?(:metadata) + end + end + + # Request to report the status of WorkItems. + class ReportWorkItemStatusRequest + include Google::Apis::Core::Hashable + + # The ID of the worker reporting the WorkItem status. If this + # does not match the ID of the worker which the Dataflow service + # believes currently has the lease on the WorkItem, the report + # will be dropped (with an error response). + # Corresponds to the JSON property `workerId` + # @return [String] + attr_accessor :worker_id + + # The current timestamp at the worker. + # Corresponds to the JSON property `currentWorkerTime` + # @return [String] + attr_accessor :current_worker_time + + # The location which contains the WorkItem's job. + # Corresponds to the JSON property `location` + # @return [String] + attr_accessor :location + + # The order is unimportant, except that the order of the + # WorkItemServiceState messages in the ReportWorkItemStatusResponse + # corresponds to the order of WorkItemStatus messages here. + # Corresponds to the JSON property `workItemStatuses` + # @return [Array] + attr_accessor :work_item_statuses + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @worker_id = args[:worker_id] if args.key?(:worker_id) + @current_worker_time = args[:current_worker_time] if args.key?(:current_worker_time) + @location = args[:location] if args.key?(:location) + @work_item_statuses = args[:work_item_statuses] if args.key?(:work_item_statuses) + end + end + + # A descriptive representation of submitted pipeline as well as the executed + # form. This data is provided by the Dataflow service for ease of visualizing + # the pipeline and interpretting Dataflow provided metrics. + class PipelineDescription + include Google::Apis::Core::Hashable + + # Description of each transform in the pipeline and collections between them. + # Corresponds to the JSON property `originalPipelineTransform` + # @return [Array] + attr_accessor :original_pipeline_transform + + # Pipeline level display data. + # Corresponds to the JSON property `displayData` + # @return [Array] + attr_accessor :display_data + + # Description of each stage of execution of the pipeline. + # Corresponds to the JSON property `executionPipelineStage` + # @return [Array] + attr_accessor :execution_pipeline_stage + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @original_pipeline_transform = args[:original_pipeline_transform] if args.key?(:original_pipeline_transform) + @display_data = args[:display_data] if args.key?(:display_data) + @execution_pipeline_stage = args[:execution_pipeline_stage] if args.key?(:execution_pipeline_stage) + end + end + + # A task that carries configuration information for streaming computations. + class StreamingConfigTask + include Google::Apis::Core::Hashable + + # Set of computation configuration information. + # Corresponds to the JSON property `streamingComputationConfigs` + # @return [Array] + attr_accessor :streaming_computation_configs + + # Map from user step names to state families. + # Corresponds to the JSON property `userStepToStateFamilyNameMap` + # @return [Hash] + attr_accessor :user_step_to_state_family_name_map + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @streaming_computation_configs = args[:streaming_computation_configs] if args.key?(:streaming_computation_configs) + @user_step_to_state_family_name_map = args[:user_step_to_state_family_name_map] if args.key?(:user_step_to_state_family_name_map) + end + end + + # Additional information about how a Cloud Dataflow job will be executed that + # isn't contained in the submitted job. + class JobExecutionInfo + include Google::Apis::Core::Hashable + + # A mapping from each stage to the information about that stage. + # Corresponds to the JSON property `stages` + # @return [Hash] + attr_accessor :stages + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @stages = args[:stages] if args.key?(:stages) + end + end + + # Defines a particular step within a Cloud Dataflow job. + # A job consists of multiple steps, each of which performs some + # specific operation as part of the overall job. Data is typically + # passed from one step to another as part of the job. + # Here's an example of a sequence of steps which together implement a + # Map-Reduce job: + # * Read a collection of data from some source, parsing the + # collection's elements. + # * Validate the elements. + # * Apply a user-defined function to map each element to some value + # and extract an element-specific key value. + # * Group elements with the same key into a single element with + # that key, transforming a multiply-keyed collection into a + # uniquely-keyed collection. + # * Write the elements out to some data sink. + # Note that the Cloud Dataflow service may be used to run many different + # types of jobs, not just Map-Reduce. + class Step + include Google::Apis::Core::Hashable + + # The name that identifies the step. This must be unique for each + # step with respect to all other steps in the Cloud Dataflow job. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The kind of step in the Cloud Dataflow job. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # Named properties associated with the step. Each kind of + # predefined step has its own required set of properties. + # Must be provided on Create. Only retrieved with JOB_VIEW_ALL. + # Corresponds to the JSON property `properties` + # @return [Hash] + attr_accessor :properties + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + @kind = args[:kind] if args.key?(:kind) + @properties = args[:properties] if args.key?(:properties) + end + end + + # Indicates which location failed to respond to a request for data. + class FailedLocation + include Google::Apis::Core::Hashable + + # The name of the failed location. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + end + end + + # Describes the data disk used by a workflow job. + class Disk + include Google::Apis::Core::Hashable + + # Size of disk in GB. If zero or unspecified, the service will + # attempt to choose a reasonable default. + # Corresponds to the JSON property `sizeGb` + # @return [Fixnum] + attr_accessor :size_gb + + # Disk storage type, as defined by Google Compute Engine. This + # must be a disk type appropriate to the project and zone in which + # the workers will run. If unknown or unspecified, the service + # will attempt to choose a reasonable default. + # For example, the standard persistent disk type is a resource name + # typically ending in "pd-standard". If SSD persistent disks are + # available, the resource name typically ends with "pd-ssd". The + # actual valid values are defined the Google Compute Engine API, + # not by the Cloud Dataflow API; consult the Google Compute Engine + # documentation for more information about determining the set of + # available disk types for a particular project and zone. + # Google Compute Engine Disk types are local to a particular + # project in a particular zone, and so the resource name will + # typically look something like this: + # compute.googleapis.com/projects/project-id/zones/zone/diskTypes/pd-standard + # Corresponds to the JSON property `diskType` + # @return [String] + attr_accessor :disk_type + + # Directory in a VM where disk is mounted. + # Corresponds to the JSON property `mountPoint` + # @return [String] + attr_accessor :mount_point + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @size_gb = args[:size_gb] if args.key?(:size_gb) + @disk_type = args[:disk_type] if args.key?(:disk_type) + @mount_point = args[:mount_point] if args.key?(:mount_point) + end + end + + # CounterMetadata includes all static non-name non-value counter attributes. + class CounterMetadata + include Google::Apis::Core::Hashable + + # Counter aggregation kind. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # Human-readable description of the counter semantics. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # System defined Units, see above enum. + # Corresponds to the JSON property `standardUnits` + # @return [String] + attr_accessor :standard_units + + # A string referring to the unit type. + # Corresponds to the JSON property `otherUnits` + # @return [String] + attr_accessor :other_units + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @kind = args[:kind] if args.key?(:kind) + @description = args[:description] if args.key?(:description) + @standard_units = args[:standard_units] if args.key?(:standard_units) + @other_units = args[:other_units] if args.key?(:other_units) + end + end + + # Response to a request to list job messages. + class ListJobMessagesResponse + include Google::Apis::Core::Hashable + + # The token to obtain the next page of results if there are more. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # Messages in ascending timestamp order. + # Corresponds to the JSON property `jobMessages` + # @return [Array] + attr_accessor :job_messages + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @job_messages = args[:job_messages] if args.key?(:job_messages) + end + end + + # A progress measurement of a WorkItem by a worker. + class ApproximateReportedProgress + include Google::Apis::Core::Hashable + + # Position defines a position within a collection of data. The value + # can be either the end position, a key (used with ordered + # collections), a byte offset, or a record index. + # Corresponds to the JSON property `position` + # @return [Google::Apis::DataflowV1b3::Position] + attr_accessor :position + + # Completion as fraction of the input consumed, from 0.0 (beginning, nothing + # consumed), to 1.0 (end of the input, entire input consumed). + # Corresponds to the JSON property `fractionConsumed` + # @return [Float] + attr_accessor :fraction_consumed + + # Represents the level of parallelism in a WorkItem's input, + # reported by the worker. + # Corresponds to the JSON property `consumedParallelism` + # @return [Google::Apis::DataflowV1b3::ReportedParallelism] + attr_accessor :consumed_parallelism + + # Represents the level of parallelism in a WorkItem's input, + # reported by the worker. + # Corresponds to the JSON property `remainingParallelism` + # @return [Google::Apis::DataflowV1b3::ReportedParallelism] + attr_accessor :remaining_parallelism + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @position = args[:position] if args.key?(:position) + @fraction_consumed = args[:fraction_consumed] if args.key?(:fraction_consumed) + @consumed_parallelism = args[:consumed_parallelism] if args.key?(:consumed_parallelism) + @remaining_parallelism = args[:remaining_parallelism] if args.key?(:remaining_parallelism) + end + end + + # A metric value representing a list of integers. + class IntegerList + include Google::Apis::Core::Hashable + + # Elements of the list. + # Corresponds to the JSON property `elements` + # @return [Array] + attr_accessor :elements + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @elements = args[:elements] if args.key?(:elements) + end + end + + # State family configuration. + class StateFamilyConfig + include Google::Apis::Core::Hashable + + # The state family value. + # Corresponds to the JSON property `stateFamily` + # @return [String] + attr_accessor :state_family + + # If true, this family corresponds to a read operation. + # Corresponds to the JSON property `isRead` + # @return [Boolean] + attr_accessor :is_read + alias_method :is_read?, :is_read + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @state_family = args[:state_family] if args.key?(:state_family) + @is_read = args[:is_read] if args.key?(:is_read) + end + end + + # Service-side response to WorkerMessage reporting resource utilization. + class ResourceUtilizationReportResponse + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # The response to a SourceSplitRequest. + class SourceSplitResponse + include Google::Apis::Core::Hashable + + # Indicates whether splitting happened and produced a list of bundles. + # If this is USE_CURRENT_SOURCE_AS_IS, the current source should + # be processed "as is" without splitting. "bundles" is ignored in this case. + # If this is SPLITTING_HAPPENED, then "bundles" contains a list of + # bundles into which the source was split. + # Corresponds to the JSON property `outcome` + # @return [String] + attr_accessor :outcome + + # If outcome is SPLITTING_HAPPENED, then this is a list of bundles + # into which the source was split. Otherwise this field is ignored. + # This list can be empty, which means the source represents an empty input. + # Corresponds to the JSON property `bundles` + # @return [Array] + attr_accessor :bundles + + # DEPRECATED in favor of bundles. + # Corresponds to the JSON property `shards` + # @return [Array] + attr_accessor :shards + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @outcome = args[:outcome] if args.key?(:outcome) + @bundles = args[:bundles] if args.key?(:bundles) + @shards = args[:shards] if args.key?(:shards) + end + end + + # Describes a particular operation comprising a MapTask. + class ParallelInstruction + include Google::Apis::Core::Hashable + + # An instruction that does a ParDo operation. + # Takes one main input and zero or more side inputs, and produces + # zero or more outputs. + # Runs user code. + # Corresponds to the JSON property `parDo` + # @return [Google::Apis::DataflowV1b3::ParDoInstruction] + attr_accessor :par_do + + # An instruction that reads records. + # Takes no inputs, produces one output. + # Corresponds to the JSON property `read` + # @return [Google::Apis::DataflowV1b3::ReadInstruction] + attr_accessor :read + + # An instruction that copies its inputs (zero or more) to its (single) output. + # Corresponds to the JSON property `flatten` + # @return [Google::Apis::DataflowV1b3::FlattenInstruction] + attr_accessor :flatten + + # System-defined name for the operation in the original workflow graph. + # Corresponds to the JSON property `originalName` + # @return [String] + attr_accessor :original_name + + # An instruction that writes records. + # Takes one input, produces no outputs. + # Corresponds to the JSON property `write` + # @return [Google::Apis::DataflowV1b3::WriteInstruction] + attr_accessor :write + + # System-defined name of this operation. + # Unique across the workflow. + # Corresponds to the JSON property `systemName` + # @return [String] + attr_accessor :system_name + + # An instruction that does a partial group-by-key. + # One input and one output. + # Corresponds to the JSON property `partialGroupByKey` + # @return [Google::Apis::DataflowV1b3::PartialGroupByKeyInstruction] + attr_accessor :partial_group_by_key + + # Describes the outputs of the instruction. + # Corresponds to the JSON property `outputs` + # @return [Array] + attr_accessor :outputs + + # User-provided name of this operation. + # 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) + @par_do = args[:par_do] if args.key?(:par_do) + @read = args[:read] if args.key?(:read) + @flatten = args[:flatten] if args.key?(:flatten) + @original_name = args[:original_name] if args.key?(:original_name) + @write = args[:write] if args.key?(:write) + @system_name = args[:system_name] if args.key?(:system_name) + @partial_group_by_key = args[:partial_group_by_key] if args.key?(:partial_group_by_key) + @outputs = args[:outputs] if args.key?(:outputs) + @name = args[:name] if args.key?(:name) + end + end + + # The packages that must be installed in order for a worker to run the + # steps of the Cloud Dataflow job that will be assigned to its worker + # pool. + # This is the mechanism by which the Cloud Dataflow SDK causes code to + # be loaded onto the workers. For example, the Cloud Dataflow Java SDK + # might use this to install jars containing the user's code and all of the + # various dependencies (libraries, data files, etc.) required in order + # for that code to run. + class Package + include Google::Apis::Core::Hashable + + # The resource to read the package from. The supported resource type is: + # Google Cloud Storage: + # storage.googleapis.com/`bucket` + # bucket.storage.googleapis.com/ + # Corresponds to the JSON property `location` + # @return [String] + attr_accessor :location + + # The name of the package. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @location = args[:location] if args.key?(:location) + @name = args[:name] if args.key?(:name) + end + end + + # Data disk assignment information for a specific key-range of a sharded + # computation. + # Currently we only support UTF-8 character splits to simplify encoding into + # JSON. + class KeyRangeDataDiskAssignment + include Google::Apis::Core::Hashable + + # The start (inclusive) of the key range. + # Corresponds to the JSON property `start` + # @return [String] + attr_accessor :start + + # The name of the data disk where data for this range is stored. + # This name is local to the Google Cloud Platform project and uniquely + # identifies the disk within that project, for example + # "myproject-1014-104817-4c2-harness-0-disk-1". + # Corresponds to the JSON property `dataDisk` + # @return [String] + attr_accessor :data_disk + + # The end (exclusive) of the key range. + # Corresponds to the JSON property `end` + # @return [String] + attr_accessor :end + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @start = args[:start] if args.key?(:start) + @data_disk = args[:data_disk] if args.key?(:data_disk) + @end = args[:end] if args.key?(:end) + end + end + # An instruction that does a ParDo operation. # Takes one main input and zero or more side inputs, and produces # zero or more outputs. @@ -29,11 +1989,6 @@ module Google class ParDoInstruction include Google::Apis::Core::Hashable - # Information about each of the outputs, if user_fn is a MultiDoFn. - # Corresponds to the JSON property `multiOutputInfos` - # @return [Array] - attr_accessor :multi_output_infos - # The user function to invoke. # Corresponds to the JSON property `userFn` # @return [Hash] @@ -55,17 +2010,22 @@ module Google # @return [Array] attr_accessor :side_inputs + # Information about each of the outputs, if user_fn is a MultiDoFn. + # Corresponds to the JSON property `multiOutputInfos` + # @return [Array] + attr_accessor :multi_output_infos + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @multi_output_infos = args[:multi_output_infos] if args.key?(:multi_output_infos) @user_fn = args[:user_fn] if args.key?(:user_fn) @input = args[:input] if args.key?(:input) @num_outputs = args[:num_outputs] if args.key?(:num_outputs) @side_inputs = args[:side_inputs] if args.key?(:side_inputs) + @multi_output_infos = args[:multi_output_infos] if args.key?(:multi_output_infos) end end @@ -73,6 +2033,19 @@ module Google class MetricUpdate include Google::Apis::Core::Hashable + # Timestamp associated with the metric value. Optional when workers are + # reporting work progress; it will be filled in responses from the + # metrics API. + # Corresponds to the JSON property `updateTime` + # @return [String] + attr_accessor :update_time + + # Identifies a metric, by describing the source which generated the + # metric. + # Corresponds to the JSON property `name` + # @return [Google::Apis::DataflowV1b3::MetricStructuredName] + attr_accessor :name + # Worker-computed aggregate value for the "Set" aggregation kind. The only # possible value type is a list of Values whose type can be Long, Double, # or String, according to the metric's type. All Values in the list must @@ -127,25 +2100,14 @@ module Google # @return [Object] attr_accessor :mean_sum - # Timestamp associated with the metric value. Optional when workers are - # reporting work progress; it will be filled in responses from the - # metrics API. - # Corresponds to the JSON property `updateTime` - # @return [String] - attr_accessor :update_time - - # Identifies a metric, by describing the source which generated the - # metric. - # Corresponds to the JSON property `name` - # @return [Google::Apis::DataflowV1b3::MetricStructuredName] - attr_accessor :name - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @update_time = args[:update_time] if args.key?(:update_time) + @name = args[:name] if args.key?(:name) @set = args[:set] if args.key?(:set) @cumulative = args[:cumulative] if args.key?(:cumulative) @internal = args[:internal] if args.key?(:internal) @@ -153,8 +2115,6 @@ module Google @scalar = args[:scalar] if args.key?(:scalar) @mean_count = args[:mean_count] if args.key?(:mean_count) @mean_sum = args[:mean_sum] if args.key?(:mean_sum) - @update_time = args[:update_time] if args.key?(:update_time) - @name = args[:name] if args.key?(:name) end end @@ -189,11 +2149,6 @@ module Google # @return [String] attr_accessor :origin_namespace - # One of the standard Origins defined above. - # Corresponds to the JSON property `origin` - # @return [String] - attr_accessor :origin - # Counter name. Not necessarily globally-unique, but unique within the # context of the other fields. # Required. @@ -206,6 +2161,11 @@ module Google # @return [String] attr_accessor :execution_step_name + # One of the standard Origins defined above. + # Corresponds to the JSON property `origin` + # @return [String] + attr_accessor :origin + def initialize(**args) update!(**args) end @@ -217,9 +2177,9 @@ module Google @original_step_name = args[:original_step_name] if args.key?(:original_step_name) @worker_id = args[:worker_id] if args.key?(:worker_id) @origin_namespace = args[:origin_namespace] if args.key?(:origin_namespace) - @origin = args[:origin] if args.key?(:origin) @name = args[:name] if args.key?(:name) @execution_step_name = args[:execution_step_name] if args.key?(:execution_step_name) + @origin = args[:origin] if args.key?(:origin) end end @@ -287,15 +2247,6 @@ module Google class TemplateMetadata include Google::Apis::Core::Hashable - # If true, will bypass the validation that the temp directory is - # writable. This should only be used with templates for pipelines - # that are guaranteed not to need to write to the temp directory, - # which is subject to change based on the optimizer. - # Corresponds to the JSON property `bypassTempDirValidation` - # @return [Boolean] - attr_accessor :bypass_temp_dir_validation - alias_method :bypass_temp_dir_validation?, :bypass_temp_dir_validation - # Required. The name of the template. # Corresponds to the JSON property `name` # @return [String] @@ -311,16 +2262,25 @@ module Google # @return [String] attr_accessor :description + # If true, will bypass the validation that the temp directory is + # writable. This should only be used with templates for pipelines + # that are guaranteed not to need to write to the temp directory, + # which is subject to change based on the optimizer. + # Corresponds to the JSON property `bypassTempDirValidation` + # @return [Boolean] + attr_accessor :bypass_temp_dir_validation + alias_method :bypass_temp_dir_validation?, :bypass_temp_dir_validation + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @bypass_temp_dir_validation = args[:bypass_temp_dir_validation] if args.key?(:bypass_temp_dir_validation) @name = args[:name] if args.key?(:name) @parameters = args[:parameters] if args.key?(:parameters) @description = args[:description] if args.key?(:description) + @bypass_temp_dir_validation = args[:bypass_temp_dir_validation] if args.key?(:bypass_temp_dir_validation) end end @@ -462,15 +2422,20 @@ module Google # @return [Google::Apis::DataflowV1b3::CounterStructuredNameAndMetadata] attr_accessor :structured_name_and_metadata + # A representation of an integer mean metric contribution. + # Corresponds to the JSON property `integerMean` + # @return [Google::Apis::DataflowV1b3::IntegerMean] + attr_accessor :integer_mean + # Floating point value for Sum, Max, Min. # Corresponds to the JSON property `floatingPoint` # @return [Float] attr_accessor :floating_point - # A representation of an integer mean metric contribution. - # Corresponds to the JSON property `integerMean` - # @return [Google::Apis::DataflowV1b3::IntegerMean] - attr_accessor :integer_mean + # Value for internally-defined counters used by the Dataflow service. + # Corresponds to the JSON property `internal` + # @return [Object] + attr_accessor :internal # True if this counter is reported as the total cumulative aggregate # value accumulated since the worker started working on this WorkItem. @@ -481,11 +2446,6 @@ module Google attr_accessor :cumulative alias_method :cumulative?, :cumulative - # Value for internally-defined counters used by the Dataflow service. - # Corresponds to the JSON property `internal` - # @return [Object] - attr_accessor :internal - # A representation of a floating point mean metric contribution. # Corresponds to the JSON property `floatingPointMean` # @return [Google::Apis::DataflowV1b3::FloatingPointMean] @@ -502,16 +2462,16 @@ module Google # @return [Google::Apis::DataflowV1b3::NameAndKind] attr_accessor :name_and_kind - # A metric value representing a distribution. - # Corresponds to the JSON property `distribution` - # @return [Google::Apis::DataflowV1b3::DistributionUpdate] - attr_accessor :distribution - # A metric value representing a list of strings. # Corresponds to the JSON property `stringList` # @return [Google::Apis::DataflowV1b3::StringList] attr_accessor :string_list + # A metric value representing a distribution. + # Corresponds to the JSON property `distribution` + # @return [Google::Apis::DataflowV1b3::DistributionUpdate] + attr_accessor :distribution + # The service-generated short identifier for this counter. # The short_id -> (name, metadata) mapping is constant for the lifetime of # a job. @@ -529,15 +2489,15 @@ module Google @integer = args[:integer] if args.key?(:integer) @integer_list = args[:integer_list] if args.key?(:integer_list) @structured_name_and_metadata = args[:structured_name_and_metadata] if args.key?(:structured_name_and_metadata) - @floating_point = args[:floating_point] if args.key?(:floating_point) @integer_mean = args[:integer_mean] if args.key?(:integer_mean) - @cumulative = args[:cumulative] if args.key?(:cumulative) + @floating_point = args[:floating_point] if args.key?(:floating_point) @internal = args[:internal] if args.key?(:internal) + @cumulative = args[:cumulative] if args.key?(:cumulative) @floating_point_mean = args[:floating_point_mean] if args.key?(:floating_point_mean) @boolean = args[:boolean] if args.key?(:boolean) @name_and_kind = args[:name_and_kind] if args.key?(:name_and_kind) - @distribution = args[:distribution] if args.key?(:distribution) @string_list = args[:string_list] if args.key?(:string_list) + @distribution = args[:distribution] if args.key?(:distribution) @short_id = args[:short_id] if args.key?(:short_id) end end @@ -631,19 +2591,6 @@ module Google class SourceFork include Google::Apis::Core::Hashable - # Specification of one of the bundles produced as a result of splitting - # a Source (e.g. when executing a SourceSplitRequest, or when - # splitting an active task using WorkItemStatus.dynamic_source_split), - # relative to the source being split. - # Corresponds to the JSON property `primarySource` - # @return [Google::Apis::DataflowV1b3::DerivedSource] - attr_accessor :primary_source - - # DEPRECATED in favor of DerivedSource. - # Corresponds to the JSON property `residual` - # @return [Google::Apis::DataflowV1b3::SourceSplitShard] - attr_accessor :residual - # Specification of one of the bundles produced as a result of splitting # a Source (e.g. when executing a SourceSplitRequest, or when # splitting an active task using WorkItemStatus.dynamic_source_split), @@ -657,16 +2604,29 @@ module Google # @return [Google::Apis::DataflowV1b3::SourceSplitShard] attr_accessor :primary + # Specification of one of the bundles produced as a result of splitting + # a Source (e.g. when executing a SourceSplitRequest, or when + # splitting an active task using WorkItemStatus.dynamic_source_split), + # relative to the source being split. + # Corresponds to the JSON property `primarySource` + # @return [Google::Apis::DataflowV1b3::DerivedSource] + attr_accessor :primary_source + + # DEPRECATED in favor of DerivedSource. + # Corresponds to the JSON property `residual` + # @return [Google::Apis::DataflowV1b3::SourceSplitShard] + attr_accessor :residual + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @primary_source = args[:primary_source] if args.key?(:primary_source) - @residual = args[:residual] if args.key?(:residual) @residual_source = args[:residual_source] if args.key?(:residual_source) @primary = args[:primary] if args.key?(:primary) + @primary_source = args[:primary_source] if args.key?(:primary_source) + @residual = args[:residual] if args.key?(:residual) end end @@ -707,11 +2667,6 @@ module Google # @return [String] attr_accessor :work_item_id - # DEPRECATED in favor of counter_updates. - # Corresponds to the JSON property `metricUpdates` - # @return [Array] - attr_accessor :metric_updates - # Specifies errors which occurred during processing. If errors are # provided, and completed = true, then the WorkItem is considered # to have failed. @@ -719,6 +2674,11 @@ module Google # @return [Array] attr_accessor :errors + # DEPRECATED in favor of counter_updates. + # Corresponds to the JSON property `metricUpdates` + # @return [Array] + attr_accessor :metric_updates + # When a task splits using WorkItemStatus.dynamic_source_split, this # message describes the two parts of the split relative to the # description of the current task's input. @@ -789,8 +2749,8 @@ module Google def update!(**args) @counter_updates = args[:counter_updates] if args.key?(:counter_updates) @work_item_id = args[:work_item_id] if args.key?(:work_item_id) - @metric_updates = args[:metric_updates] if args.key?(:metric_updates) @errors = args[:errors] if args.key?(:errors) + @metric_updates = args[:metric_updates] if args.key?(:metric_updates) @dynamic_source_split = args[:dynamic_source_split] if args.key?(:dynamic_source_split) @source_operation_response = args[:source_operation_response] if args.key?(:source_operation_response) @progress = args[:progress] if args.key?(:progress) @@ -841,6 +2801,11 @@ module Google class WorkItemServiceState include Google::Apis::Core::Hashable + # A suggestion by the service to the worker to dynamically split the WorkItem. + # Corresponds to the JSON property `splitRequest` + # @return [Google::Apis::DataflowV1b3::ApproximateSplitRequest] + attr_accessor :split_request + # New recommended reporting interval. # Corresponds to the JSON property `reportStatusInterval` # @return [String] @@ -886,17 +2851,13 @@ module Google # @return [Google::Apis::DataflowV1b3::ApproximateProgress] attr_accessor :suggested_stop_point - # A suggestion by the service to the worker to dynamically split the WorkItem. - # Corresponds to the JSON property `splitRequest` - # @return [Google::Apis::DataflowV1b3::ApproximateSplitRequest] - attr_accessor :split_request - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @split_request = args[:split_request] if args.key?(:split_request) @report_status_interval = args[:report_status_interval] if args.key?(:report_status_interval) @suggested_stop_position = args[:suggested_stop_position] if args.key?(:suggested_stop_position) @harness_data = args[:harness_data] if args.key?(:harness_data) @@ -904,7 +2865,6 @@ module Google @metric_short_id = args[:metric_short_id] if args.key?(:metric_short_id) @next_report_index = args[:next_report_index] if args.key?(:next_report_index) @suggested_stop_point = args[:suggested_stop_point] if args.key?(:suggested_stop_point) - @split_request = args[:split_request] if args.key?(:split_request) end end @@ -998,6 +2958,12 @@ module Google class KeyRangeLocation include Google::Apis::Core::Hashable + # DEPRECATED. The location of the persistent state for this range, as a + # persistent directory in the worker local filesystem. + # Corresponds to the JSON property `deprecatedPersistentDirectory` + # @return [String] + attr_accessor :deprecated_persistent_directory + # The physical location of this range assignment to be used for # streaming computation cross-worker message delivery. # Corresponds to the JSON property `deliveryEndpoint` @@ -1017,12 +2983,6 @@ module Google # @return [String] attr_accessor :data_disk - # The location of the persistent state for this range, as a - # persistent directory in the worker local filesystem. - # Corresponds to the JSON property `persistentDirectory` - # @return [String] - attr_accessor :persistent_directory - # The end (exclusive) of the key range. # Corresponds to the JSON property `end` # @return [String] @@ -1034,10 +2994,10 @@ module Google # Update properties of this object def update!(**args) + @deprecated_persistent_directory = args[:deprecated_persistent_directory] if args.key?(:deprecated_persistent_directory) @delivery_endpoint = args[:delivery_endpoint] if args.key?(:delivery_endpoint) @start = args[:start] if args.key?(:start) @data_disk = args[:data_disk] if args.key?(:data_disk) - @persistent_directory = args[:persistent_directory] if args.key?(:persistent_directory) @end = args[:end] if args.key?(:end) end end @@ -1061,57 +3021,6 @@ module Google end end - # Describes a particular function to invoke. - class SeqMapTask - include Google::Apis::Core::Hashable - - # The user-provided name of the SeqDo operation. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Information about each of the outputs. - # Corresponds to the JSON property `outputInfos` - # @return [Array] - attr_accessor :output_infos - - # Information about each of the inputs. - # Corresponds to the JSON property `inputs` - # @return [Array] - attr_accessor :inputs - - # System-defined name of the stage containing the SeqDo operation. - # Unique across the workflow. - # Corresponds to the JSON property `stageName` - # @return [String] - attr_accessor :stage_name - - # System-defined name of the SeqDo operation. - # Unique across the workflow. - # Corresponds to the JSON property `systemName` - # @return [String] - attr_accessor :system_name - - # The user function to invoke. - # Corresponds to the JSON property `userFn` - # @return [Hash] - attr_accessor :user_fn - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - @output_infos = args[:output_infos] if args.key?(:output_infos) - @inputs = args[:inputs] if args.key?(:inputs) - @stage_name = args[:stage_name] if args.key?(:stage_name) - @system_name = args[:system_name] if args.key?(:system_name) - @user_fn = args[:user_fn] if args.key?(:user_fn) - end - end - # Basic metadata about a counter. class NameAndKind include Google::Apis::Core::Hashable @@ -1137,6 +3046,57 @@ module Google end end + # Describes a particular function to invoke. + class SeqMapTask + include Google::Apis::Core::Hashable + + # Information about each of the inputs. + # Corresponds to the JSON property `inputs` + # @return [Array] + attr_accessor :inputs + + # System-defined name of the stage containing the SeqDo operation. + # Unique across the workflow. + # Corresponds to the JSON property `stageName` + # @return [String] + attr_accessor :stage_name + + # System-defined name of the SeqDo operation. + # Unique across the workflow. + # Corresponds to the JSON property `systemName` + # @return [String] + attr_accessor :system_name + + # The user function to invoke. + # Corresponds to the JSON property `userFn` + # @return [Hash] + attr_accessor :user_fn + + # The user-provided name of the SeqDo operation. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Information about each of the outputs. + # Corresponds to the JSON property `outputInfos` + # @return [Array] + attr_accessor :output_infos + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @inputs = args[:inputs] if args.key?(:inputs) + @stage_name = args[:stage_name] if args.key?(:stage_name) + @system_name = args[:system_name] if args.key?(:system_name) + @user_fn = args[:user_fn] if args.key?(:user_fn) + @name = args[:name] if args.key?(:name) + @output_infos = args[:output_infos] if args.key?(:output_infos) + end + end + # A message code is used to report status and error messages to the service. # The message codes are intended to be machine readable. The service will # take care of translating these into user understandable messages if @@ -1148,6 +3108,19 @@ module Google class WorkerMessageCode include Google::Apis::Core::Hashable + # The code is a string intended for consumption by a machine that identifies + # the type of message being sent. + # Examples: + # 1. "HARNESS_STARTED" might be used to indicate the worker harness has + # started. + # 2. "GCS_DOWNLOAD_ERROR" might be used to indicate an error downloading + # a GCS file as part of the boot process of one of the worker containers. + # This is a string and not an enum to make it easy to add new codes without + # waiting for an API change. + # Corresponds to the JSON property `code` + # @return [String] + attr_accessor :code + # Parameters contains specific information about the code. # This is a struct to allow parameters of different types. # Examples: @@ -1168,27 +3141,14 @@ module Google # @return [Hash] attr_accessor :parameters - # The code is a string intended for consumption by a machine that identifies - # the type of message being sent. - # Examples: - # 1. "HARNESS_STARTED" might be used to indicate the worker harness has - # started. - # 2. "GCS_DOWNLOAD_ERROR" might be used to indicate an error downloading - # a GCS file as part of the boot process of one of the worker containers. - # This is a string and not an enum to make it easy to add new codes without - # waiting for an API change. - # Corresponds to the JSON property `code` - # @return [String] - attr_accessor :code - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @parameters = args[:parameters] if args.key?(:parameters) @code = args[:code] if args.key?(:code) + @parameters = args[:parameters] if args.key?(:parameters) end end @@ -1220,11 +3180,6 @@ module Google class MapTask include Google::Apis::Core::Hashable - # The instructions in the MapTask. - # Corresponds to the JSON property `instructions` - # @return [Array] - attr_accessor :instructions - # System-defined name of this MapTask. # Unique across the workflow. # Corresponds to the JSON property `systemName` @@ -1237,15 +3192,20 @@ module Google # @return [String] attr_accessor :stage_name + # The instructions in the MapTask. + # Corresponds to the JSON property `instructions` + # @return [Array] + attr_accessor :instructions + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @instructions = args[:instructions] if args.key?(:instructions) @system_name = args[:system_name] if args.key?(:system_name) @stage_name = args[:stage_name] if args.key?(:stage_name) + @instructions = args[:instructions] if args.key?(:instructions) end end @@ -1253,25 +3213,25 @@ module Google class FloatingPointMean include Google::Apis::Core::Hashable - # The sum of all values being aggregated. - # Corresponds to the JSON property `sum` - # @return [Float] - attr_accessor :sum - # A representation of an int64, n, that is immune to precision loss when # encoded in JSON. # Corresponds to the JSON property `count` # @return [Google::Apis::DataflowV1b3::SplitInt64] attr_accessor :count + # The sum of all values being aggregated. + # Corresponds to the JSON property `sum` + # @return [Float] + attr_accessor :sum + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @sum = args[:sum] if args.key?(:sum) @count = args[:count] if args.key?(:count) + @sum = args[:sum] if args.key?(:sum) end end @@ -1301,6 +3261,22 @@ module Google class InstructionOutput include Google::Apis::Core::Hashable + # The codec to use to encode data being written via this output. + # Corresponds to the JSON property `codec` + # @return [Hash] + attr_accessor :codec + + # The user-provided name of this output. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # System-defined name for this output in the original workflow graph. + # Outputs that do not contribute to an original instruction do not set this. + # Corresponds to the JSON property `originalName` + # @return [String] + attr_accessor :original_name + # System-defined name of this output. # Unique across the workflow. # Corresponds to the JSON property `systemName` @@ -1321,34 +3297,18 @@ module Google attr_accessor :only_count_value_bytes alias_method :only_count_value_bytes?, :only_count_value_bytes - # The codec to use to encode data being written via this output. - # Corresponds to the JSON property `codec` - # @return [Hash] - attr_accessor :codec - - # The user-provided name of this output. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # System-defined name for this output in the original workflow graph. - # Outputs that do not contribute to an original instruction do not set this. - # Corresponds to the JSON property `originalName` - # @return [String] - attr_accessor :original_name - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @system_name = args[:system_name] if args.key?(:system_name) - @only_count_key_bytes = args[:only_count_key_bytes] if args.key?(:only_count_key_bytes) - @only_count_value_bytes = args[:only_count_value_bytes] if args.key?(:only_count_value_bytes) @codec = args[:codec] if args.key?(:codec) @name = args[:name] if args.key?(:name) @original_name = args[:original_name] if args.key?(:original_name) + @system_name = args[:system_name] if args.key?(:system_name) + @only_count_key_bytes = args[:only_count_key_bytes] if args.key?(:only_count_key_bytes) + @only_count_value_bytes = args[:only_count_value_bytes] if args.key?(:only_count_value_bytes) end end @@ -1356,6 +3316,16 @@ module Google class CreateJobFromTemplateRequest include Google::Apis::Core::Hashable + # The runtime parameters to pass to the job. + # Corresponds to the JSON property `parameters` + # @return [Hash] + attr_accessor :parameters + + # Required. The job name to use for the created job. + # Corresponds to the JSON property `jobName` + # @return [String] + attr_accessor :job_name + # Required. A Cloud Storage path to the template from which to # create the job. # Must be a valid Cloud Storage URL, beginning with `gs://`. @@ -1368,26 +3338,16 @@ module Google # @return [Google::Apis::DataflowV1b3::RuntimeEnvironment] attr_accessor :environment - # The runtime parameters to pass to the job. - # Corresponds to the JSON property `parameters` - # @return [Hash] - attr_accessor :parameters - - # Required. The job name to use for the created job. - # Corresponds to the JSON property `jobName` - # @return [String] - attr_accessor :job_name - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @gcs_path = args[:gcs_path] if args.key?(:gcs_path) - @environment = args[:environment] if args.key?(:environment) @parameters = args[:parameters] if args.key?(:parameters) @job_name = args[:job_name] if args.key?(:job_name) + @gcs_path = args[:gcs_path] if args.key?(:gcs_path) + @environment = args[:environment] if args.key?(:environment) end end @@ -1610,49 +3570,6 @@ module Google # @return [Google::Apis::DataflowV1b3::Job] attr_accessor :job - # The `Status` type defines a logical error model that is suitable for different - # programming environments, including REST APIs and RPC APIs. It is used by - # [gRPC](https://github.com/grpc). The error model is designed to be: - # - Simple to use and understand for most users - # - Flexible enough to meet unexpected needs - # # Overview - # The `Status` message contains three pieces of data: error code, error message, - # and error details. The error code should be an enum value of - # google.rpc.Code, but it may accept additional error codes if needed. The - # error message should be a developer-facing English message that helps - # developers *understand* and *resolve* the error. If a localized user-facing - # error message is needed, put the localized message in the error details or - # localize it in the client. The optional error details may contain arbitrary - # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. - # # Language mapping - # The `Status` message is the logical representation of the error model, but it - # is not necessarily the actual wire format. When the `Status` message is - # exposed in different client libraries and different wire protocols, it can be - # mapped differently. For example, it will likely be mapped to some exceptions - # in Java, but more likely mapped to some error codes in C. - # # Other uses - # The error model and the `Status` message can be used in a variety of - # environments, either with or without APIs, to provide a - # consistent developer experience across different environments. - # Example uses of this error model include: - # - Partial errors. If a service needs to return partial errors to the client, - # it may embed the `Status` in the normal response to indicate the partial - # errors. - # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. - # - Batch operations. If a client uses batch request and batch response, the - # `Status` message should be used directly inside batch response, one for - # each error sub-response. - # - Asynchronous operations. If an API call embeds asynchronous operation - # results in its response, the status of those operations should be - # represented directly using the `Status` message. - # - Logging. If some API errors are stored in logs, the message `Status` could - # be used directly after any stripping needed for security/privacy reasons. - # Corresponds to the JSON property `status` - # @return [Google::Apis::DataflowV1b3::Status] - attr_accessor :status - def initialize(**args) update!(**args) end @@ -1660,68 +3577,6 @@ module Google # Update properties of this object def update!(**args) @job = args[:job] if args.key?(:job) - @status = args[:status] if args.key?(:status) - end - end - - # Specification of one of the bundles produced as a result of splitting - # a Source (e.g. when executing a SourceSplitRequest, or when - # splitting an active task using WorkItemStatus.dynamic_source_split), - # relative to the source being split. - class DerivedSource - include Google::Apis::Core::Hashable - - # What source to base the produced source on (if any). - # Corresponds to the JSON property `derivationMode` - # @return [String] - attr_accessor :derivation_mode - - # A source that records can be read and decoded from. - # Corresponds to the JSON property `source` - # @return [Google::Apis::DataflowV1b3::Source] - attr_accessor :source - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @derivation_mode = args[:derivation_mode] if args.key?(:derivation_mode) - @source = args[:source] if args.key?(:source) - end - end - - # When a task splits using WorkItemStatus.dynamic_source_split, this - # message describes the two parts of the split relative to the - # description of the current task's input. - class DynamicSourceSplit - include Google::Apis::Core::Hashable - - # Specification of one of the bundles produced as a result of splitting - # a Source (e.g. when executing a SourceSplitRequest, or when - # splitting an active task using WorkItemStatus.dynamic_source_split), - # relative to the source being split. - # Corresponds to the JSON property `primary` - # @return [Google::Apis::DataflowV1b3::DerivedSource] - attr_accessor :primary - - # Specification of one of the bundles produced as a result of splitting - # a Source (e.g. when executing a SourceSplitRequest, or when - # splitting an active task using WorkItemStatus.dynamic_source_split), - # relative to the source being split. - # Corresponds to the JSON property `residual` - # @return [Google::Apis::DataflowV1b3::DerivedSource] - attr_accessor :residual - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @primary = args[:primary] if args.key?(:primary) - @residual = args[:residual] if args.key?(:residual) end end @@ -1729,6 +3584,16 @@ module Google class Job include Google::Apis::Core::Hashable + # The ID of the Cloud Platform project that the job belongs to. + # Corresponds to the JSON property `projectId` + # @return [String] + attr_accessor :project_id + + # The type of Cloud Dataflow job. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + # A descriptive representation of submitted pipeline as well as the executed # form. This data is provided by the Dataflow service for ease of visualizing # the pipeline and interpretting Dataflow provided metrics. @@ -1801,12 +3666,6 @@ module Google # @return [Array] attr_accessor :steps - # Additional information about how a Cloud Dataflow job will be executed that - # isn't contained in the submitted job. - # Corresponds to the JSON property `executionInfo` - # @return [Google::Apis::DataflowV1b3::JobExecutionInfo] - attr_accessor :execution_info - # The unique ID of this job. # This field is set by the Cloud Dataflow service when the Job is # created, and is immutable for the life of the job. @@ -1814,6 +3673,12 @@ module Google # @return [String] attr_accessor :id + # Additional information about how a Cloud Dataflow job will be executed that + # isn't contained in the submitted job. + # Corresponds to the JSON property `executionInfo` + # @return [Google::Apis::DataflowV1b3::JobExecutionInfo] + attr_accessor :execution_info + # The current state of the job. # Jobs are created in the `JOB_STATE_STOPPED` state unless otherwise # specified. @@ -1842,6 +3707,11 @@ module Google # @return [Hash] attr_accessor :transform_name_mapping + # Describes the environment in which a Dataflow Job runs. + # Corresponds to the JSON property `environment` + # @return [Google::Apis::DataflowV1b3::Environment] + attr_accessor :environment + # User-defined labels for this job. # The labels map can contain no more than 64 entries. Entries of the labels # map are UTF8 strings that comply with the following restrictions: @@ -1853,33 +3723,20 @@ module Google # @return [Hash] attr_accessor :labels - # Describes the environment in which a Dataflow Job runs. - # Corresponds to the JSON property `environment` - # @return [Google::Apis::DataflowV1b3::Environment] - attr_accessor :environment - # The timestamp when the job was initially created. Immutable and set by the # Cloud Dataflow service. # Corresponds to the JSON property `createTime` # @return [String] attr_accessor :create_time - # The type of Cloud Dataflow job. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The ID of the Cloud Platform project that the job belongs to. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @project_id = args[:project_id] if args.key?(:project_id) + @type = args[:type] if args.key?(:type) @pipeline_description = args[:pipeline_description] if args.key?(:pipeline_description) @replace_job_id = args[:replace_job_id] if args.key?(:replace_job_id) @requested_state = args[:requested_state] if args.key?(:requested_state) @@ -1888,17 +3745,76 @@ module Google @name = args[:name] if args.key?(:name) @replaced_by_job_id = args[:replaced_by_job_id] if args.key?(:replaced_by_job_id) @steps = args[:steps] if args.key?(:steps) - @execution_info = args[:execution_info] if args.key?(:execution_info) @id = args[:id] if args.key?(:id) + @execution_info = args[:execution_info] if args.key?(:execution_info) @current_state = args[:current_state] if args.key?(:current_state) @location = args[:location] if args.key?(:location) @current_state_time = args[:current_state_time] if args.key?(:current_state_time) @transform_name_mapping = args[:transform_name_mapping] if args.key?(:transform_name_mapping) - @labels = args[:labels] if args.key?(:labels) @environment = args[:environment] if args.key?(:environment) + @labels = args[:labels] if args.key?(:labels) @create_time = args[:create_time] if args.key?(:create_time) - @type = args[:type] if args.key?(:type) - @project_id = args[:project_id] if args.key?(:project_id) + end + end + + # When a task splits using WorkItemStatus.dynamic_source_split, this + # message describes the two parts of the split relative to the + # description of the current task's input. + class DynamicSourceSplit + include Google::Apis::Core::Hashable + + # Specification of one of the bundles produced as a result of splitting + # a Source (e.g. when executing a SourceSplitRequest, or when + # splitting an active task using WorkItemStatus.dynamic_source_split), + # relative to the source being split. + # Corresponds to the JSON property `primary` + # @return [Google::Apis::DataflowV1b3::DerivedSource] + attr_accessor :primary + + # Specification of one of the bundles produced as a result of splitting + # a Source (e.g. when executing a SourceSplitRequest, or when + # splitting an active task using WorkItemStatus.dynamic_source_split), + # relative to the source being split. + # Corresponds to the JSON property `residual` + # @return [Google::Apis::DataflowV1b3::DerivedSource] + attr_accessor :residual + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @primary = args[:primary] if args.key?(:primary) + @residual = args[:residual] if args.key?(:residual) + end + end + + # Specification of one of the bundles produced as a result of splitting + # a Source (e.g. when executing a SourceSplitRequest, or when + # splitting an active task using WorkItemStatus.dynamic_source_split), + # relative to the source being split. + class DerivedSource + include Google::Apis::Core::Hashable + + # What source to base the produced source on (if any). + # Corresponds to the JSON property `derivationMode` + # @return [String] + attr_accessor :derivation_mode + + # A source that records can be read and decoded from. + # Corresponds to the JSON property `source` + # @return [Google::Apis::DataflowV1b3::Source] + attr_accessor :source + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @derivation_mode = args[:derivation_mode] if args.key?(:derivation_mode) + @source = args[:source] if args.key?(:source) end end @@ -1983,25 +3899,25 @@ module Google class CounterStructuredNameAndMetadata include Google::Apis::Core::Hashable + # CounterMetadata includes all static non-name non-value counter attributes. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::DataflowV1b3::CounterMetadata] + attr_accessor :metadata + # Identifies a counter within a per-job namespace. Counters whose structured # names are the same get merged into a single value for the job. # Corresponds to the JSON property `name` # @return [Google::Apis::DataflowV1b3::CounterStructuredName] attr_accessor :name - # CounterMetadata includes all static non-name non-value counter attributes. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::DataflowV1b3::CounterMetadata] - attr_accessor :metadata - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @name = args[:name] if args.key?(:name) @metadata = args[:metadata] if args.key?(:metadata) + @name = args[:name] if args.key?(:name) end end @@ -2039,25 +3955,25 @@ module Google class WriteInstruction include Google::Apis::Core::Hashable + # A sink that records can be encoded and written to. + # Corresponds to the JSON property `sink` + # @return [Google::Apis::DataflowV1b3::Sink] + attr_accessor :sink + # An input of an instruction, as a reference to an output of a # producer instruction. # Corresponds to the JSON property `input` # @return [Google::Apis::DataflowV1b3::InstructionInput] attr_accessor :input - # A sink that records can be encoded and written to. - # Corresponds to the JSON property `sink` - # @return [Google::Apis::DataflowV1b3::Sink] - attr_accessor :sink - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @input = args[:input] if args.key?(:input) @sink = args[:sink] if args.key?(:sink) + @input = args[:input] if args.key?(:input) end end @@ -2091,24 +4007,24 @@ module Google class AutoscalingSettings include Google::Apis::Core::Hashable - # The maximum number of workers to cap scaling at. - # Corresponds to the JSON property `maxNumWorkers` - # @return [Fixnum] - attr_accessor :max_num_workers - # The algorithm to use for autoscaling. # Corresponds to the JSON property `algorithm` # @return [String] attr_accessor :algorithm + # The maximum number of workers to cap scaling at. + # Corresponds to the JSON property `maxNumWorkers` + # @return [Fixnum] + attr_accessor :max_num_workers + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @max_num_workers = args[:max_num_workers] if args.key?(:max_num_workers) @algorithm = args[:algorithm] if args.key?(:algorithm) + @max_num_workers = args[:max_num_workers] if args.key?(:max_num_workers) end end @@ -2192,24 +4108,24 @@ module Google class SourceSplitShard include Google::Apis::Core::Hashable - # DEPRECATED - # Corresponds to the JSON property `derivationMode` - # @return [String] - attr_accessor :derivation_mode - # A source that records can be read and decoded from. # Corresponds to the JSON property `source` # @return [Google::Apis::DataflowV1b3::Source] attr_accessor :source + # DEPRECATED + # Corresponds to the JSON property `derivationMode` + # @return [String] + attr_accessor :derivation_mode + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @derivation_mode = args[:derivation_mode] if args.key?(:derivation_mode) @source = args[:source] if args.key?(:source) + @derivation_mode = args[:derivation_mode] if args.key?(:derivation_mode) end end @@ -2217,12 +4133,6 @@ module Google class CpuTime include Google::Apis::Core::Hashable - # Average CPU utilization rate (% non-idle cpu / second) since previous - # sample. - # Corresponds to the JSON property `rate` - # @return [Float] - attr_accessor :rate - # Timestamp of the measurement. # Corresponds to the JSON property `timestamp` # @return [String] @@ -2234,15 +4144,21 @@ module Google # @return [String] attr_accessor :total_ms + # Average CPU utilization rate (% non-idle cpu / second) since previous + # sample. + # Corresponds to the JSON property `rate` + # @return [Float] + attr_accessor :rate + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @rate = args[:rate] if args.key?(:rate) @timestamp = args[:timestamp] if args.key?(:timestamp) @total_ms = args[:total_ms] if args.key?(:total_ms) + @rate = args[:rate] if args.key?(:rate) end end @@ -2250,11 +4166,6 @@ module Google class Environment include Google::Apis::Core::Hashable - # Identity to run virtual machines as. Defaults to the default account. - # Corresponds to the JSON property `serviceAccountEmail` - # @return [String] - attr_accessor :service_account_email - # A description of the process that generated the request. # Corresponds to the JSON property `userAgent` # @return [Hash] @@ -2311,16 +4222,21 @@ module Google # @return [Array] attr_accessor :experiments + # Experimental settings. + # Corresponds to the JSON property `internalExperiments` + # @return [Hash] + attr_accessor :internal_experiments + # A structure describing which components and their versions of the service # are required in order to run the job. # Corresponds to the JSON property `version` # @return [Hash] attr_accessor :version - # Experimental settings. - # Corresponds to the JSON property `internalExperiments` - # @return [Hash] - attr_accessor :internal_experiments + # Identity to run virtual machines as. Defaults to the default account. + # Corresponds to the JSON property `serviceAccountEmail` + # @return [String] + attr_accessor :service_account_email def initialize(**args) update!(**args) @@ -2328,7 +4244,6 @@ module Google # Update properties of this object def update!(**args) - @service_account_email = args[:service_account_email] if args.key?(:service_account_email) @user_agent = args[:user_agent] if args.key?(:user_agent) @sdk_pipeline_options = args[:sdk_pipeline_options] if args.key?(:sdk_pipeline_options) @cluster_manager_api_service = args[:cluster_manager_api_service] if args.key?(:cluster_manager_api_service) @@ -2336,8 +4251,9 @@ module Google @worker_pools = args[:worker_pools] if args.key?(:worker_pools) @dataset = args[:dataset] if args.key?(:dataset) @experiments = args[:experiments] if args.key?(:experiments) - @version = args[:version] if args.key?(:version) @internal_experiments = args[:internal_experiments] if args.key?(:internal_experiments) + @version = args[:version] if args.key?(:version) + @service_account_email = args[:service_account_email] if args.key?(:service_account_email) end end @@ -2346,11 +4262,6 @@ module Google class StreamingComputationTask include Google::Apis::Core::Hashable - # A type of streaming computation task. - # Corresponds to the JSON property `taskType` - # @return [String] - attr_accessor :task_type - # Contains ranges of a streaming computation this task should apply to. # Corresponds to the JSON property `computationRanges` # @return [Array] @@ -2361,15 +4272,20 @@ module Google # @return [Array] attr_accessor :data_disks + # A type of streaming computation task. + # Corresponds to the JSON property `taskType` + # @return [String] + attr_accessor :task_type + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @task_type = args[:task_type] if args.key?(:task_type) @computation_ranges = args[:computation_ranges] if args.key?(:computation_ranges) @data_disks = args[:data_disks] if args.key?(:data_disks) + @task_type = args[:task_type] if args.key?(:task_type) end end @@ -2513,18 +4429,18 @@ module Google # @return [String] attr_accessor :id_label - # If set, contains a pubsub label from which to extract record timestamps. - # If left empty, record timestamps will be generated upon arrival. - # Corresponds to the JSON property `timestampLabel` - # @return [String] - attr_accessor :timestamp_label - # A pubsub topic, in the form of # "pubsub.googleapis.com/topics//" # Corresponds to the JSON property `topic` # @return [String] attr_accessor :topic + # If set, contains a pubsub label from which to extract record timestamps. + # If left empty, record timestamps will be generated upon arrival. + # Corresponds to the JSON property `timestampLabel` + # @return [String] + attr_accessor :timestamp_label + # A pubsub subscription, in the form of # "pubsub.googleapis.com/subscriptions//" # Corresponds to the JSON property `subscription` @@ -2551,8 +4467,8 @@ module Google def update!(**args) @with_attributes = args[:with_attributes] if args.key?(:with_attributes) @id_label = args[:id_label] if args.key?(:id_label) - @timestamp_label = args[:timestamp_label] if args.key?(:timestamp_label) @topic = args[:topic] if args.key?(:topic) + @timestamp_label = args[:timestamp_label] if args.key?(:timestamp_label) @subscription = args[:subscription] if args.key?(:subscription) @drop_late_data = args[:drop_late_data] if args.key?(:drop_late_data) @tracking_subscription = args[:tracking_subscription] if args.key?(:tracking_subscription) @@ -2608,12 +4524,6 @@ module Google class JobMessage include Google::Apis::Core::Hashable - # Identifies the message. This is automatically generated by the - # service; the caller should treat it as an opaque string. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - # The text of the message. # Corresponds to the JSON property `messageText` # @return [String] @@ -2629,16 +4539,22 @@ module Google # @return [String] attr_accessor :time + # Identifies the message. This is automatically generated by the + # service; the caller should treat it as an opaque string. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @id = args[:id] if args.key?(:id) @message_text = args[:message_text] if args.key?(:message_text) @message_importance = args[:message_importance] if args.key?(:message_importance) @time = args[:time] if args.key?(:time) + @id = args[:id] if args.key?(:id) end end @@ -2763,33 +4679,6 @@ module Google end end - # The metric short id is returned to the user alongside an offset into - # ReportWorkItemStatusRequest - class MetricShortId - include Google::Apis::Core::Hashable - - # The index of the corresponding metric in - # the ReportWorkItemStatusRequest. Required. - # Corresponds to the JSON property `metricIndex` - # @return [Fixnum] - attr_accessor :metric_index - - # The service-generated short identifier for the metric. - # Corresponds to the JSON property `shortId` - # @return [String] - attr_accessor :short_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @metric_index = args[:metric_index] if args.key?(:metric_index) - @short_id = args[:short_id] if args.key?(:short_id) - end - end - # A task which consists of a shell command for the worker to execute. class ShellTask include Google::Apis::Core::Hashable @@ -2815,41 +4704,47 @@ module Google end end + # The metric short id is returned to the user alongside an offset into + # ReportWorkItemStatusRequest + class MetricShortId + include Google::Apis::Core::Hashable + + # The service-generated short identifier for the metric. + # Corresponds to the JSON property `shortId` + # @return [String] + attr_accessor :short_id + + # The index of the corresponding metric in + # the ReportWorkItemStatusRequest. Required. + # Corresponds to the JSON property `metricIndex` + # @return [Fixnum] + attr_accessor :metric_index + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @short_id = args[:short_id] if args.key?(:short_id) + @metric_index = args[:metric_index] if args.key?(:metric_index) + end + end + # Taskrunner configuration settings. class TaskRunnerSettings include Google::Apis::Core::Hashable - # The UNIX group ID on the worker VM to use for tasks launched by - # taskrunner; e.g. "wheel". - # Corresponds to the JSON property `taskGroup` - # @return [String] - attr_accessor :task_group - - # The command to launch the worker harness. - # Corresponds to the JSON property `harnessCommand` - # @return [String] - attr_accessor :harness_command - - # The directory on the VM to store logs. - # Corresponds to the JSON property `logDir` - # @return [String] - attr_accessor :log_dir - - # The API version of endpoint, e.g. "v1b3" - # Corresponds to the JSON property `dataflowApiVersion` - # @return [String] - attr_accessor :dataflow_api_version - # The OAuth2 scopes to be requested by the taskrunner in order to # access the Cloud Dataflow API. # Corresponds to the JSON property `oauthScopes` # @return [Array] attr_accessor :oauth_scopes - # The streaming worker main class name. - # Corresponds to the JSON property `streamingWorkerMainClass` + # The API version of endpoint, e.g. "v1b3" + # Corresponds to the JSON property `dataflowApiVersion` # @return [String] - attr_accessor :streaming_worker_main_class + attr_accessor :dataflow_api_version # Indicates where to put logs. If this is not specified, the logs # will not be uploaded. @@ -2861,11 +4756,31 @@ module Google # @return [String] attr_accessor :log_upload_location + # The streaming worker main class name. + # Corresponds to the JSON property `streamingWorkerMainClass` + # @return [String] + attr_accessor :streaming_worker_main_class + # The file to store the workflow in. # Corresponds to the JSON property `workflowFileName` # @return [String] attr_accessor :workflow_file_name + # The suggested backend language. + # Corresponds to the JSON property `languageHint` + # @return [String] + attr_accessor :language_hint + + # The file to store preprocessing commands in. + # Corresponds to the JSON property `commandlinesFileName` + # @return [String] + attr_accessor :commandlines_file_name + + # The location on the worker for task-specific subdirectories. + # Corresponds to the JSON property `baseTaskDir` + # @return [String] + attr_accessor :base_task_dir + # The prefix of the resources the taskrunner should use for # temporary storage. # The supported resource type is: @@ -2876,21 +4791,6 @@ module Google # @return [String] attr_accessor :temp_storage_prefix - # The location on the worker for task-specific subdirectories. - # Corresponds to the JSON property `baseTaskDir` - # @return [String] - attr_accessor :base_task_dir - - # The file to store preprocessing commands in. - # Corresponds to the JSON property `commandlinesFileName` - # @return [String] - attr_accessor :commandlines_file_name - - # The suggested backend language. - # Corresponds to the JSON property `languageHint` - # @return [String] - attr_accessor :language_hint - # The base URL for the taskrunner to use when accessing Google Cloud APIs. # When workers access Google Cloud APIs, they logically do so via # relative URLs. If this field is specified, it supplies the base @@ -2937,24 +4837,37 @@ module Google attr_accessor :alsologtostderr alias_method :alsologtostderr?, :alsologtostderr + # The UNIX group ID on the worker VM to use for tasks launched by + # taskrunner; e.g. "wheel". + # Corresponds to the JSON property `taskGroup` + # @return [String] + attr_accessor :task_group + + # The command to launch the worker harness. + # Corresponds to the JSON property `harnessCommand` + # @return [String] + attr_accessor :harness_command + + # The directory on the VM to store logs. + # Corresponds to the JSON property `logDir` + # @return [String] + attr_accessor :log_dir + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @task_group = args[:task_group] if args.key?(:task_group) - @harness_command = args[:harness_command] if args.key?(:harness_command) - @log_dir = args[:log_dir] if args.key?(:log_dir) - @dataflow_api_version = args[:dataflow_api_version] if args.key?(:dataflow_api_version) @oauth_scopes = args[:oauth_scopes] if args.key?(:oauth_scopes) - @streaming_worker_main_class = args[:streaming_worker_main_class] if args.key?(:streaming_worker_main_class) + @dataflow_api_version = args[:dataflow_api_version] if args.key?(:dataflow_api_version) @log_upload_location = args[:log_upload_location] if args.key?(:log_upload_location) + @streaming_worker_main_class = args[:streaming_worker_main_class] if args.key?(:streaming_worker_main_class) @workflow_file_name = args[:workflow_file_name] if args.key?(:workflow_file_name) - @temp_storage_prefix = args[:temp_storage_prefix] if args.key?(:temp_storage_prefix) - @base_task_dir = args[:base_task_dir] if args.key?(:base_task_dir) - @commandlines_file_name = args[:commandlines_file_name] if args.key?(:commandlines_file_name) @language_hint = args[:language_hint] if args.key?(:language_hint) + @commandlines_file_name = args[:commandlines_file_name] if args.key?(:commandlines_file_name) + @base_task_dir = args[:base_task_dir] if args.key?(:base_task_dir) + @temp_storage_prefix = args[:temp_storage_prefix] if args.key?(:temp_storage_prefix) @base_url = args[:base_url] if args.key?(:base_url) @log_to_serialconsole = args[:log_to_serialconsole] if args.key?(:log_to_serialconsole) @continue_on_exception = args[:continue_on_exception] if args.key?(:continue_on_exception) @@ -2962,6 +4875,9 @@ module Google @task_user = args[:task_user] if args.key?(:task_user) @vm_id = args[:vm_id] if args.key?(:vm_id) @alsologtostderr = args[:alsologtostderr] if args.key?(:alsologtostderr) + @task_group = args[:task_group] if args.key?(:task_group) + @harness_command = args[:harness_command] if args.key?(:harness_command) + @log_dir = args[:log_dir] if args.key?(:log_dir) end end @@ -2971,6 +4887,17 @@ module Google class Position include Google::Apis::Core::Hashable + # Position is a record index. + # Corresponds to the JSON property `recordIndex` + # @return [String] + attr_accessor :record_index + + # CloudPosition is a base64 encoded BatchShufflePosition (with FIXED + # sharding). + # Corresponds to the JSON property `shufflePosition` + # @return [String] + attr_accessor :shuffle_position + # A position that encapsulates an inner position and an index for the inner # position. A ConcatPosition can be used by a reader of a source that # encapsulates a set of other sources. @@ -2995,1989 +4922,18 @@ module Google # @return [String] attr_accessor :key - # Position is a record index. - # Corresponds to the JSON property `recordIndex` - # @return [String] - attr_accessor :record_index - - # CloudPosition is a base64 encoded BatchShufflePosition (with FIXED - # sharding). - # Corresponds to the JSON property `shufflePosition` - # @return [String] - attr_accessor :shuffle_position - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @record_index = args[:record_index] if args.key?(:record_index) + @shuffle_position = args[:shuffle_position] if args.key?(:shuffle_position) @concat_position = args[:concat_position] if args.key?(:concat_position) @byte_offset = args[:byte_offset] if args.key?(:byte_offset) @end = args[:end] if args.key?(:end) @key = args[:key] if args.key?(:key) - @record_index = args[:record_index] if args.key?(:record_index) - @shuffle_position = args[:shuffle_position] if args.key?(:shuffle_position) - end - end - - # A representation of an int64, n, that is immune to precision loss when - # encoded in JSON. - class SplitInt64 - include Google::Apis::Core::Hashable - - # The low order bits: n & 0xffffffff. - # Corresponds to the JSON property `lowBits` - # @return [Fixnum] - attr_accessor :low_bits - - # The high order bits, including the sign: n >> 32. - # Corresponds to the JSON property `highBits` - # @return [Fixnum] - attr_accessor :high_bits - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @low_bits = args[:low_bits] if args.key?(:low_bits) - @high_bits = args[:high_bits] if args.key?(:high_bits) - end - end - - # A source that records can be read and decoded from. - class Source - include Google::Apis::Core::Hashable - - # Metadata about a Source useful for automatically optimizing - # and tuning the pipeline, etc. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::DataflowV1b3::SourceMetadata] - attr_accessor :metadata - - # While splitting, sources may specify the produced bundles - # as differences against another source, in order to save backend-side - # memory and allow bigger jobs. For details, see SourceSplitRequest. - # To support this use case, the full set of parameters of the source - # is logically obtained by taking the latest explicitly specified value - # of each parameter in the order: - # base_specs (later items win), spec (overrides anything in base_specs). - # Corresponds to the JSON property `baseSpecs` - # @return [Array>] - attr_accessor :base_specs - - # The codec to use to decode data read from the source. - # Corresponds to the JSON property `codec` - # @return [Hash] - attr_accessor :codec - - # Setting this value to true hints to the framework that the source - # doesn't need splitting, and using SourceSplitRequest on it would - # yield SOURCE_SPLIT_OUTCOME_USE_CURRENT. - # E.g. a file splitter may set this to true when splitting a single file - # into a set of byte ranges of appropriate size, and set this - # to false when splitting a filepattern into individual files. - # However, for efficiency, a file splitter may decide to produce - # file subranges directly from the filepattern to avoid a splitting - # round-trip. - # See SourceSplitRequest for an overview of the splitting process. - # This field is meaningful only in the Source objects populated - # by the user (e.g. when filling in a DerivedSource). - # Source objects supplied by the framework to the user don't have - # this field populated. - # Corresponds to the JSON property `doesNotNeedSplitting` - # @return [Boolean] - attr_accessor :does_not_need_splitting - alias_method :does_not_need_splitting?, :does_not_need_splitting - - # The source to read from, plus its parameters. - # Corresponds to the JSON property `spec` - # @return [Hash] - attr_accessor :spec - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @metadata = args[:metadata] if args.key?(:metadata) - @base_specs = args[:base_specs] if args.key?(:base_specs) - @codec = args[:codec] if args.key?(:codec) - @does_not_need_splitting = args[:does_not_need_splitting] if args.key?(:does_not_need_splitting) - @spec = args[:spec] if args.key?(:spec) - end - end - - # Describes one particular pool of Cloud Dataflow workers to be - # instantiated by the Cloud Dataflow service in order to perform the - # computations required by a job. Note that a workflow job may use - # multiple pools, in order to match the various computational - # requirements of the various stages of the job. - class WorkerPool - include Google::Apis::Core::Hashable - - # Sets the policy for determining when to turndown worker pool. - # Allowed values are: `TEARDOWN_ALWAYS`, `TEARDOWN_ON_SUCCESS`, and - # `TEARDOWN_NEVER`. - # `TEARDOWN_ALWAYS` means workers are always torn down regardless of whether - # the job succeeds. `TEARDOWN_ON_SUCCESS` means workers are torn down - # if the job succeeds. `TEARDOWN_NEVER` means the workers are never torn - # down. - # If the workers are not torn down by the service, they will - # continue to run and use Google Compute Engine VM resources in the - # user's project until they are explicitly terminated by the user. - # Because of this, Google recommends using the `TEARDOWN_ALWAYS` - # policy except for small, manually supervised test jobs. - # If unknown or unspecified, the service will attempt to choose a reasonable - # default. - # Corresponds to the JSON property `teardownPolicy` - # @return [String] - attr_accessor :teardown_policy - - # The action to take on host maintenance, as defined by the Google - # Compute Engine API. - # Corresponds to the JSON property `onHostMaintenance` - # @return [String] - attr_accessor :on_host_maintenance - - # Extra arguments for this worker pool. - # Corresponds to the JSON property `poolArgs` - # @return [Hash] - attr_accessor :pool_args - - # Size of root disk for VMs, in GB. If zero or unspecified, the service will - # attempt to choose a reasonable default. - # Corresponds to the JSON property `diskSizeGb` - # @return [Fixnum] - attr_accessor :disk_size_gb - - # Required. Docker container image that executes the Cloud Dataflow worker - # harness, residing in Google Container Registry. - # Corresponds to the JSON property `workerHarnessContainerImage` - # @return [String] - attr_accessor :worker_harness_container_image - - # Machine type (e.g. "n1-standard-1"). If empty or unspecified, the - # service will attempt to choose a reasonable default. - # Corresponds to the JSON property `machineType` - # @return [String] - attr_accessor :machine_type - - # Type of root disk for VMs. If empty or unspecified, the service will - # attempt to choose a reasonable default. - # Corresponds to the JSON property `diskType` - # @return [String] - attr_accessor :disk_type - - # The kind of the worker pool; currently only `harness` and `shuffle` - # are supported. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Data disks that are used by a VM in this workflow. - # Corresponds to the JSON property `dataDisks` - # @return [Array] - attr_accessor :data_disks - - # Subnetwork to which VMs will be assigned, if desired. Expected to be of - # the form "regions/REGION/subnetworks/SUBNETWORK". - # Corresponds to the JSON property `subnetwork` - # @return [String] - attr_accessor :subnetwork - - # Configuration for VM IPs. - # Corresponds to the JSON property `ipConfiguration` - # @return [String] - attr_accessor :ip_configuration - - # Settings for WorkerPool autoscaling. - # Corresponds to the JSON property `autoscalingSettings` - # @return [Google::Apis::DataflowV1b3::AutoscalingSettings] - attr_accessor :autoscaling_settings - - # Taskrunner configuration settings. - # Corresponds to the JSON property `taskrunnerSettings` - # @return [Google::Apis::DataflowV1b3::TaskRunnerSettings] - attr_accessor :taskrunner_settings - - # Metadata to set on the Google Compute Engine VMs. - # Corresponds to the JSON property `metadata` - # @return [Hash] - attr_accessor :metadata - - # The default package set to install. This allows the service to - # select a default set of packages which are useful to worker - # harnesses written in a particular language. - # Corresponds to the JSON property `defaultPackageSet` - # @return [String] - attr_accessor :default_package_set - - # Network to which VMs will be assigned. If empty or unspecified, - # the service will use the network "default". - # Corresponds to the JSON property `network` - # @return [String] - attr_accessor :network - - # The number of threads per worker harness. If empty or unspecified, the - # service will choose a number of threads (according to the number of cores - # on the selected machine type for batch, or 1 by convention for streaming). - # Corresponds to the JSON property `numThreadsPerWorker` - # @return [Fixnum] - attr_accessor :num_threads_per_worker - - # Zone to run the worker pools in. If empty or unspecified, the service - # will attempt to choose a reasonable default. - # Corresponds to the JSON property `zone` - # @return [String] - attr_accessor :zone - - # Number of Google Compute Engine workers in this pool needed to - # execute the job. If zero or unspecified, the service will - # attempt to choose a reasonable default. - # Corresponds to the JSON property `numWorkers` - # @return [Fixnum] - attr_accessor :num_workers - - # Fully qualified source image for disks. - # Corresponds to the JSON property `diskSourceImage` - # @return [String] - attr_accessor :disk_source_image - - # Packages to be installed on workers. - # Corresponds to the JSON property `packages` - # @return [Array] - attr_accessor :packages - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @teardown_policy = args[:teardown_policy] if args.key?(:teardown_policy) - @on_host_maintenance = args[:on_host_maintenance] if args.key?(:on_host_maintenance) - @pool_args = args[:pool_args] if args.key?(:pool_args) - @disk_size_gb = args[:disk_size_gb] if args.key?(:disk_size_gb) - @worker_harness_container_image = args[:worker_harness_container_image] if args.key?(:worker_harness_container_image) - @machine_type = args[:machine_type] if args.key?(:machine_type) - @disk_type = args[:disk_type] if args.key?(:disk_type) - @kind = args[:kind] if args.key?(:kind) - @data_disks = args[:data_disks] if args.key?(:data_disks) - @subnetwork = args[:subnetwork] if args.key?(:subnetwork) - @ip_configuration = args[:ip_configuration] if args.key?(:ip_configuration) - @autoscaling_settings = args[:autoscaling_settings] if args.key?(:autoscaling_settings) - @taskrunner_settings = args[:taskrunner_settings] if args.key?(:taskrunner_settings) - @metadata = args[:metadata] if args.key?(:metadata) - @default_package_set = args[:default_package_set] if args.key?(:default_package_set) - @network = args[:network] if args.key?(:network) - @num_threads_per_worker = args[:num_threads_per_worker] if args.key?(:num_threads_per_worker) - @zone = args[:zone] if args.key?(:zone) - @num_workers = args[:num_workers] if args.key?(:num_workers) - @disk_source_image = args[:disk_source_image] if args.key?(:disk_source_image) - @packages = args[:packages] if args.key?(:packages) - end - end - - # A work item that represents the different operations that can be - # performed on a user-defined Source specification. - class SourceOperationRequest - include Google::Apis::Core::Hashable - - # A request to compute the SourceMetadata of a Source. - # Corresponds to the JSON property `getMetadata` - # @return [Google::Apis::DataflowV1b3::SourceGetMetadataRequest] - attr_accessor :get_metadata - - # Represents the operation to split a high-level Source specification - # into bundles (parts for parallel processing). - # At a high level, splitting of a source into bundles happens as follows: - # SourceSplitRequest is applied to the source. If it returns - # SOURCE_SPLIT_OUTCOME_USE_CURRENT, no further splitting happens and the source - # is used "as is". Otherwise, splitting is applied recursively to each - # produced DerivedSource. - # As an optimization, for any Source, if its does_not_need_splitting is - # true, the framework assumes that splitting this source would return - # SOURCE_SPLIT_OUTCOME_USE_CURRENT, and doesn't initiate a SourceSplitRequest. - # This applies both to the initial source being split and to bundles - # produced from it. - # Corresponds to the JSON property `split` - # @return [Google::Apis::DataflowV1b3::SourceSplitRequest] - attr_accessor :split - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @get_metadata = args[:get_metadata] if args.key?(:get_metadata) - @split = args[:split] if args.key?(:split) - end - end - - # WorkItem represents basic information about a WorkItem to be executed - # in the cloud. - class WorkItem - include Google::Apis::Core::Hashable - - # The initial index to use when reporting the status of the WorkItem. - # Corresponds to the JSON property `initialReportIndex` - # @return [String] - attr_accessor :initial_report_index - - # A task which describes what action should be performed for the specified - # streaming computation ranges. - # Corresponds to the JSON property `streamingComputationTask` - # @return [Google::Apis::DataflowV1b3::StreamingComputationTask] - attr_accessor :streaming_computation_task - - # A task which consists of a shell command for the worker to execute. - # Corresponds to the JSON property `shellTask` - # @return [Google::Apis::DataflowV1b3::ShellTask] - attr_accessor :shell_task - - # Identifies the workflow job this WorkItem belongs to. - # Corresponds to the JSON property `jobId` - # @return [String] - attr_accessor :job_id - - # Identifies this WorkItem. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Work item-specific configuration as an opaque blob. - # Corresponds to the JSON property `configuration` - # @return [String] - attr_accessor :configuration - - # MapTask consists of an ordered set of instructions, each of which - # describes one particular low-level operation for the worker to - # perform in order to accomplish the MapTask's WorkItem. - # Each instruction must appear in the list before any instructions which - # depends on its output. - # Corresponds to the JSON property `mapTask` - # @return [Google::Apis::DataflowV1b3::MapTask] - attr_accessor :map_task - - # Describes a particular function to invoke. - # Corresponds to the JSON property `seqMapTask` - # @return [Google::Apis::DataflowV1b3::SeqMapTask] - attr_accessor :seq_map_task - - # Any required packages that need to be fetched in order to execute - # this WorkItem. - # Corresponds to the JSON property `packages` - # @return [Array] - attr_accessor :packages - - # Identifies the cloud project this WorkItem belongs to. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # Recommended reporting interval. - # Corresponds to the JSON property `reportStatusInterval` - # @return [String] - attr_accessor :report_status_interval - - # A task which initializes part of a streaming Dataflow job. - # Corresponds to the JSON property `streamingSetupTask` - # @return [Google::Apis::DataflowV1b3::StreamingSetupTask] - attr_accessor :streaming_setup_task - - # A work item that represents the different operations that can be - # performed on a user-defined Source specification. - # Corresponds to the JSON property `sourceOperationTask` - # @return [Google::Apis::DataflowV1b3::SourceOperationRequest] - attr_accessor :source_operation_task - - # Time when the lease on this Work will expire. - # Corresponds to the JSON property `leaseExpireTime` - # @return [String] - attr_accessor :lease_expire_time - - # A task that carries configuration information for streaming computations. - # Corresponds to the JSON property `streamingConfigTask` - # @return [Google::Apis::DataflowV1b3::StreamingConfigTask] - attr_accessor :streaming_config_task - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @initial_report_index = args[:initial_report_index] if args.key?(:initial_report_index) - @streaming_computation_task = args[:streaming_computation_task] if args.key?(:streaming_computation_task) - @shell_task = args[:shell_task] if args.key?(:shell_task) - @job_id = args[:job_id] if args.key?(:job_id) - @id = args[:id] if args.key?(:id) - @configuration = args[:configuration] if args.key?(:configuration) - @map_task = args[:map_task] if args.key?(:map_task) - @seq_map_task = args[:seq_map_task] if args.key?(:seq_map_task) - @packages = args[:packages] if args.key?(:packages) - @project_id = args[:project_id] if args.key?(:project_id) - @report_status_interval = args[:report_status_interval] if args.key?(:report_status_interval) - @streaming_setup_task = args[:streaming_setup_task] if args.key?(:streaming_setup_task) - @source_operation_task = args[:source_operation_task] if args.key?(:source_operation_task) - @lease_expire_time = args[:lease_expire_time] if args.key?(:lease_expire_time) - @streaming_config_task = args[:streaming_config_task] if args.key?(:streaming_config_task) - end - end - - # Worker metrics exported from workers. This contains resource utilization - # metrics accumulated from a variety of sources. For more information, see - # go/df-resource-signals. - class ResourceUtilizationReport - include Google::Apis::Core::Hashable - - # CPU utilization samples. - # Corresponds to the JSON property `cpuTime` - # @return [Array] - attr_accessor :cpu_time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cpu_time = args[:cpu_time] if args.key?(:cpu_time) - end - end - - # Represents the level of parallelism in a WorkItem's input, - # reported by the worker. - class ReportedParallelism - include Google::Apis::Core::Hashable - - # Specifies whether the parallelism is infinite. If true, "value" is - # ignored. - # Infinite parallelism means the service will assume that the work item - # can always be split into more non-empty work items by dynamic splitting. - # This is a work-around for lack of support for infinity by the current - # JSON-based Java RPC stack. - # Corresponds to the JSON property `isInfinite` - # @return [Boolean] - attr_accessor :is_infinite - alias_method :is_infinite?, :is_infinite - - # Specifies the level of parallelism in case it is finite. - # Corresponds to the JSON property `value` - # @return [Float] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @is_infinite = args[:is_infinite] if args.key?(:is_infinite) - @value = args[:value] if args.key?(:value) - end - end - - # Global topology of the streaming Dataflow job, including all - # computations and their sharded locations. - class TopologyConfig - include Google::Apis::Core::Hashable - - # The computations associated with a streaming Dataflow job. - # Corresponds to the JSON property `computations` - # @return [Array] - attr_accessor :computations - - # The disks assigned to a streaming Dataflow job. - # Corresponds to the JSON property `dataDiskAssignments` - # @return [Array] - attr_accessor :data_disk_assignments - - # Version number for persistent state. - # Corresponds to the JSON property `persistentStateVersion` - # @return [Fixnum] - attr_accessor :persistent_state_version - - # The size (in bits) of keys that will be assigned to source messages. - # Corresponds to the JSON property `forwardingKeyBits` - # @return [Fixnum] - attr_accessor :forwarding_key_bits - - # Maps user stage names to stable computation names. - # Corresponds to the JSON property `userStageToComputationNameMap` - # @return [Hash] - attr_accessor :user_stage_to_computation_name_map - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @computations = args[:computations] if args.key?(:computations) - @data_disk_assignments = args[:data_disk_assignments] if args.key?(:data_disk_assignments) - @persistent_state_version = args[:persistent_state_version] if args.key?(:persistent_state_version) - @forwarding_key_bits = args[:forwarding_key_bits] if args.key?(:forwarding_key_bits) - @user_stage_to_computation_name_map = args[:user_stage_to_computation_name_map] if args.key?(:user_stage_to_computation_name_map) - end - end - - # Hints for splitting a Source into bundles (parts for parallel - # processing) using SourceSplitRequest. - class SourceSplitOptions - include Google::Apis::Core::Hashable - - # The source should be split into a set of bundles where the estimated size - # of each is approximately this many bytes. - # Corresponds to the JSON property `desiredBundleSizeBytes` - # @return [String] - attr_accessor :desired_bundle_size_bytes - - # DEPRECATED in favor of desired_bundle_size_bytes. - # Corresponds to the JSON property `desiredShardSizeBytes` - # @return [String] - attr_accessor :desired_shard_size_bytes - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @desired_bundle_size_bytes = args[:desired_bundle_size_bytes] if args.key?(:desired_bundle_size_bytes) - @desired_shard_size_bytes = args[:desired_shard_size_bytes] if args.key?(:desired_shard_size_bytes) - end - end - - # An instruction that reads records. - # Takes no inputs, produces one output. - class ReadInstruction - include Google::Apis::Core::Hashable - - # A source that records can be read and decoded from. - # Corresponds to the JSON property `source` - # @return [Google::Apis::DataflowV1b3::Source] - attr_accessor :source - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @source = args[:source] if args.key?(:source) - end - end - - # Provides data to pass through to the worker harness. - class WorkerSettings - include Google::Apis::Core::Hashable - - # The prefix of the resources the system should use for temporary - # storage. - # The supported resource type is: - # Google Cloud Storage: - # storage.googleapis.com/`bucket`/`object` - # bucket.storage.googleapis.com/`object` - # Corresponds to the JSON property `tempStoragePrefix` - # @return [String] - attr_accessor :temp_storage_prefix - - # The base URL for accessing Google Cloud APIs. - # When workers access Google Cloud APIs, they logically do so via - # relative URLs. If this field is specified, it supplies the base - # URL to use for resolving these relative URLs. The normative - # algorithm used is defined by RFC 1808, "Relative Uniform Resource - # Locators". - # If not specified, the default value is "http://www.googleapis.com/" - # Corresponds to the JSON property `baseUrl` - # @return [String] - attr_accessor :base_url - - # Whether to send work progress updates to the service. - # Corresponds to the JSON property `reportingEnabled` - # @return [Boolean] - attr_accessor :reporting_enabled - alias_method :reporting_enabled?, :reporting_enabled - - # The Cloud Dataflow service path relative to the root URL, for example, - # "dataflow/v1b3/projects". - # Corresponds to the JSON property `servicePath` - # @return [String] - attr_accessor :service_path - - # The Shuffle service path relative to the root URL, for example, - # "shuffle/v1beta1". - # Corresponds to the JSON property `shuffleServicePath` - # @return [String] - attr_accessor :shuffle_service_path - - # The ID of the worker running this pipeline. - # Corresponds to the JSON property `workerId` - # @return [String] - attr_accessor :worker_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @temp_storage_prefix = args[:temp_storage_prefix] if args.key?(:temp_storage_prefix) - @base_url = args[:base_url] if args.key?(:base_url) - @reporting_enabled = args[:reporting_enabled] if args.key?(:reporting_enabled) - @service_path = args[:service_path] if args.key?(:service_path) - @shuffle_service_path = args[:shuffle_service_path] if args.key?(:shuffle_service_path) - @worker_id = args[:worker_id] if args.key?(:worker_id) - end - end - - # Identifies the location of a streaming computation stage, for - # stage-to-stage communication. - class StreamingStageLocation - include Google::Apis::Core::Hashable - - # Identifies the particular stream within the streaming Dataflow - # job. - # Corresponds to the JSON property `streamId` - # @return [String] - attr_accessor :stream_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @stream_id = args[:stream_id] if args.key?(:stream_id) - end - end - - # Data disk assignment for a given VM instance. - class DataDiskAssignment - include Google::Apis::Core::Hashable - - # VM instance name the data disks mounted to, for example - # "myproject-1014-104817-4c2-harness-0". - # Corresponds to the JSON property `vmInstance` - # @return [String] - attr_accessor :vm_instance - - # Mounted data disks. The order is important a data disk's 0-based index in - # this list defines which persistent directory the disk is mounted to, for - # example the list of ` "myproject-1014-104817-4c2-harness-0-disk-0" `, - # ` "myproject-1014-104817-4c2-harness-0-disk-1" `. - # Corresponds to the JSON property `dataDisks` - # @return [Array] - attr_accessor :data_disks - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @vm_instance = args[:vm_instance] if args.key?(:vm_instance) - @data_disks = args[:data_disks] if args.key?(:data_disks) - end - end - - # A suggestion by the service to the worker to dynamically split the WorkItem. - class ApproximateSplitRequest - include Google::Apis::Core::Hashable - - # Position defines a position within a collection of data. The value - # can be either the end position, a key (used with ordered - # collections), a byte offset, or a record index. - # Corresponds to the JSON property `position` - # @return [Google::Apis::DataflowV1b3::Position] - attr_accessor :position - - # A fraction at which to split the work item, from 0.0 (beginning of the - # input) to 1.0 (end of the input). - # Corresponds to the JSON property `fractionConsumed` - # @return [Float] - attr_accessor :fraction_consumed - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @position = args[:position] if args.key?(:position) - @fraction_consumed = args[:fraction_consumed] if args.key?(:fraction_consumed) - end - end - - # The `Status` type defines a logical error model that is suitable for different - # programming environments, including REST APIs and RPC APIs. It is used by - # [gRPC](https://github.com/grpc). The error model is designed to be: - # - Simple to use and understand for most users - # - Flexible enough to meet unexpected needs - # # Overview - # The `Status` message contains three pieces of data: error code, error message, - # and error details. The error code should be an enum value of - # google.rpc.Code, but it may accept additional error codes if needed. The - # error message should be a developer-facing English message that helps - # developers *understand* and *resolve* the error. If a localized user-facing - # error message is needed, put the localized message in the error details or - # localize it in the client. The optional error details may contain arbitrary - # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. - # # Language mapping - # The `Status` message is the logical representation of the error model, but it - # is not necessarily the actual wire format. When the `Status` message is - # exposed in different client libraries and different wire protocols, it can be - # mapped differently. For example, it will likely be mapped to some exceptions - # in Java, but more likely mapped to some error codes in C. - # # Other uses - # The error model and the `Status` message can be used in a variety of - # environments, either with or without APIs, to provide a - # consistent developer experience across different environments. - # Example uses of this error model include: - # - Partial errors. If a service needs to return partial errors to the client, - # it may embed the `Status` in the normal response to indicate the partial - # errors. - # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. - # - Batch operations. If a client uses batch request and batch response, the - # `Status` message should be used directly inside batch response, one for - # each error sub-response. - # - Asynchronous operations. If an API call embeds asynchronous operation - # results in its response, the status of those operations should be - # represented directly using the `Status` message. - # - Logging. If some API errors are stored in logs, the message `Status` could - # be used directly after any stripping needed for security/privacy reasons. - class Status - include Google::Apis::Core::Hashable - - # The status code, which should be an enum value of google.rpc.Code. - # Corresponds to the JSON property `code` - # @return [Fixnum] - attr_accessor :code - - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # google.rpc.Status.details field, or localized by the client. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - # A list of messages that carry the error details. There will be a - # common set of message types for APIs to use. - # Corresponds to the JSON property `details` - # @return [Array>] - attr_accessor :details - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @code = args[:code] if args.key?(:code) - @message = args[:message] if args.key?(:message) - @details = args[:details] if args.key?(:details) - end - end - - # Describes a stream of data, either as input to be processed or as - # output of a streaming Dataflow job. - class StreamLocation - include Google::Apis::Core::Hashable - - # Identifies the location of a custom souce. - # Corresponds to the JSON property `customSourceLocation` - # @return [Google::Apis::DataflowV1b3::CustomSourceLocation] - attr_accessor :custom_source_location - - # Identifies the location of a streaming computation stage, for - # stage-to-stage communication. - # Corresponds to the JSON property `streamingStageLocation` - # @return [Google::Apis::DataflowV1b3::StreamingStageLocation] - attr_accessor :streaming_stage_location - - # Identifies a pubsub location to use for transferring data into or - # out of a streaming Dataflow job. - # Corresponds to the JSON property `pubsubLocation` - # @return [Google::Apis::DataflowV1b3::PubsubLocation] - attr_accessor :pubsub_location - - # Identifies the location of a streaming side input. - # Corresponds to the JSON property `sideInputLocation` - # @return [Google::Apis::DataflowV1b3::StreamingSideInputLocation] - attr_accessor :side_input_location - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @custom_source_location = args[:custom_source_location] if args.key?(:custom_source_location) - @streaming_stage_location = args[:streaming_stage_location] if args.key?(:streaming_stage_location) - @pubsub_location = args[:pubsub_location] if args.key?(:pubsub_location) - @side_input_location = args[:side_input_location] if args.key?(:side_input_location) - end - end - - # The response to the worker messages. - class SendWorkerMessagesResponse - include Google::Apis::Core::Hashable - - # The servers response to the worker messages. - # Corresponds to the JSON property `workerMessageResponses` - # @return [Array] - attr_accessor :worker_message_responses - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @worker_message_responses = args[:worker_message_responses] if args.key?(:worker_message_responses) - end - end - - # Configuration information for a single streaming computation. - class StreamingComputationConfig - include Google::Apis::Core::Hashable - - # System defined name for this computation. - # Corresponds to the JSON property `systemName` - # @return [String] - attr_accessor :system_name - - # Stage name of this computation. - # Corresponds to the JSON property `stageName` - # @return [String] - attr_accessor :stage_name - - # Instructions that comprise the computation. - # Corresponds to the JSON property `instructions` - # @return [Array] - attr_accessor :instructions - - # Unique identifier for this computation. - # Corresponds to the JSON property `computationId` - # @return [String] - attr_accessor :computation_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @system_name = args[:system_name] if args.key?(:system_name) - @stage_name = args[:stage_name] if args.key?(:stage_name) - @instructions = args[:instructions] if args.key?(:instructions) - @computation_id = args[:computation_id] if args.key?(:computation_id) - end - end - - # Description of the type, names/ids, and input/outputs for a transform. - class TransformSummary - include Google::Apis::Core::Hashable - - # SDK generated id of this transform instance. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Transform-specific display data. - # Corresponds to the JSON property `displayData` - # @return [Array] - attr_accessor :display_data - - # User names for all collection outputs to this transform. - # Corresponds to the JSON property `outputCollectionName` - # @return [Array] - attr_accessor :output_collection_name - - # Type of transform. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # User names for all collection inputs to this transform. - # Corresponds to the JSON property `inputCollectionName` - # @return [Array] - attr_accessor :input_collection_name - - # User provided name for this transform instance. - # 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) - @display_data = args[:display_data] if args.key?(:display_data) - @output_collection_name = args[:output_collection_name] if args.key?(:output_collection_name) - @kind = args[:kind] if args.key?(:kind) - @input_collection_name = args[:input_collection_name] if args.key?(:input_collection_name) - @name = args[:name] if args.key?(:name) - end - end - - # Response to a request to lease WorkItems. - class LeaseWorkItemResponse - include Google::Apis::Core::Hashable - - # A list of the leased WorkItems. - # Corresponds to the JSON property `workItems` - # @return [Array] - attr_accessor :work_items - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @work_items = args[:work_items] if args.key?(:work_items) - end - end - - # Parameters to provide to the template being launched. - class LaunchTemplateParameters - include Google::Apis::Core::Hashable - - # Required. The job name to use for the created job. - # Corresponds to the JSON property `jobName` - # @return [String] - attr_accessor :job_name - - # The environment values to set at runtime. - # Corresponds to the JSON property `environment` - # @return [Google::Apis::DataflowV1b3::RuntimeEnvironment] - attr_accessor :environment - - # The runtime parameters to pass to the job. - # Corresponds to the JSON property `parameters` - # @return [Hash] - attr_accessor :parameters - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @job_name = args[:job_name] if args.key?(:job_name) - @environment = args[:environment] if args.key?(:environment) - @parameters = args[:parameters] if args.key?(:parameters) - end - end - - # A sink that records can be encoded and written to. - class Sink - include Google::Apis::Core::Hashable - - # The codec to use to encode data written to the sink. - # Corresponds to the JSON property `codec` - # @return [Hash] - attr_accessor :codec - - # The sink to write to, plus its parameters. - # Corresponds to the JSON property `spec` - # @return [Hash] - attr_accessor :spec - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @codec = args[:codec] if args.key?(:codec) - @spec = args[:spec] if args.key?(:spec) - end - end - - # An instruction that copies its inputs (zero or more) to its (single) output. - class FlattenInstruction - include Google::Apis::Core::Hashable - - # Describes the inputs to the flatten instruction. - # Corresponds to the JSON property `inputs` - # @return [Array] - attr_accessor :inputs - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @inputs = args[:inputs] if args.key?(:inputs) - end - end - - # An instruction that does a partial group-by-key. - # One input and one output. - class PartialGroupByKeyInstruction - include Google::Apis::Core::Hashable - - # The codec to use for interpreting an element in the input PTable. - # Corresponds to the JSON property `inputElementCodec` - # @return [Hash] - attr_accessor :input_element_codec - - # The value combining function to invoke. - # Corresponds to the JSON property `valueCombiningFn` - # @return [Hash] - attr_accessor :value_combining_fn - - # If this instruction includes a combining function this is the name of the - # intermediate store between the GBK and the CombineValues. - # Corresponds to the JSON property `originalCombineValuesInputStoreName` - # @return [String] - attr_accessor :original_combine_values_input_store_name - - # If this instruction includes a combining function, this is the name of the - # CombineValues instruction lifted into this instruction. - # Corresponds to the JSON property `originalCombineValuesStepName` - # @return [String] - attr_accessor :original_combine_values_step_name - - # Zero or more side inputs. - # Corresponds to the JSON property `sideInputs` - # @return [Array] - attr_accessor :side_inputs - - # An input of an instruction, as a reference to an output of a - # producer instruction. - # Corresponds to the JSON property `input` - # @return [Google::Apis::DataflowV1b3::InstructionInput] - attr_accessor :input - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @input_element_codec = args[:input_element_codec] if args.key?(:input_element_codec) - @value_combining_fn = args[:value_combining_fn] if args.key?(:value_combining_fn) - @original_combine_values_input_store_name = args[:original_combine_values_input_store_name] if args.key?(:original_combine_values_input_store_name) - @original_combine_values_step_name = args[:original_combine_values_step_name] if args.key?(:original_combine_values_step_name) - @side_inputs = args[:side_inputs] if args.key?(:side_inputs) - @input = args[:input] if args.key?(:input) - end - end - - # An input of an instruction, as a reference to an output of a - # producer instruction. - class InstructionInput - include Google::Apis::Core::Hashable - - # The index (origin zero) of the parallel instruction that produces - # the output to be consumed by this input. This index is relative - # to the list of instructions in this input's instruction's - # containing MapTask. - # Corresponds to the JSON property `producerInstructionIndex` - # @return [Fixnum] - attr_accessor :producer_instruction_index - - # The output index (origin zero) within the producer. - # Corresponds to the JSON property `outputNum` - # @return [Fixnum] - attr_accessor :output_num - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @producer_instruction_index = args[:producer_instruction_index] if args.key?(:producer_instruction_index) - @output_num = args[:output_num] if args.key?(:output_num) - end - end - - # Description of an input or output of an execution stage. - class StageSource - include Google::Apis::Core::Hashable - - # User name for the original user transform or collection with which this - # source is most closely associated. - # Corresponds to the JSON property `originalTransformOrCollection` - # @return [String] - attr_accessor :original_transform_or_collection - - # Dataflow service generated name for this source. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Size of the source, if measurable. - # Corresponds to the JSON property `sizeBytes` - # @return [String] - attr_accessor :size_bytes - - # Human-readable name for this source; may be user or system generated. - # Corresponds to the JSON property `userName` - # @return [String] - attr_accessor :user_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @original_transform_or_collection = args[:original_transform_or_collection] if args.key?(:original_transform_or_collection) - @name = args[:name] if args.key?(:name) - @size_bytes = args[:size_bytes] if args.key?(:size_bytes) - @user_name = args[:user_name] if args.key?(:user_name) - end - end - - # A metric value representing a list of strings. - class StringList - include Google::Apis::Core::Hashable - - # Elements of the list. - # Corresponds to the JSON property `elements` - # @return [Array] - attr_accessor :elements - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @elements = args[:elements] if args.key?(:elements) - end - end - - # Data provided with a pipeline or transform to provide descriptive info. - class DisplayData - include Google::Apis::Core::Hashable - - # Contains value if the data is of duration type. - # Corresponds to the JSON property `durationValue` - # @return [String] - attr_accessor :duration_value - - # Contains value if the data is of int64 type. - # Corresponds to the JSON property `int64Value` - # @return [String] - attr_accessor :int64_value - - # The namespace for the key. This is usually a class name or programming - # language namespace (i.e. python module) which defines the display data. - # This allows a dax monitoring system to specially handle the data - # and perform custom rendering. - # Corresponds to the JSON property `namespace` - # @return [String] - attr_accessor :namespace - - # Contains value if the data is of float type. - # Corresponds to the JSON property `floatValue` - # @return [Float] - attr_accessor :float_value - - # The key identifying the display data. - # This is intended to be used as a label for the display data - # when viewed in a dax monitoring system. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # A possible additional shorter value to display. - # For example a java_class_name_value of com.mypackage.MyDoFn - # will be stored with MyDoFn as the short_str_value and - # com.mypackage.MyDoFn as the java_class_name value. - # short_str_value can be displayed and java_class_name_value - # will be displayed as a tooltip. - # Corresponds to the JSON property `shortStrValue` - # @return [String] - attr_accessor :short_str_value - - # An optional label to display in a dax UI for the element. - # Corresponds to the JSON property `label` - # @return [String] - attr_accessor :label - - # An optional full URL. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - # Contains value if the data is of timestamp type. - # Corresponds to the JSON property `timestampValue` - # @return [String] - attr_accessor :timestamp_value - - # Contains value if the data is of a boolean type. - # Corresponds to the JSON property `boolValue` - # @return [Boolean] - attr_accessor :bool_value - alias_method :bool_value?, :bool_value - - # Contains value if the data is of java class type. - # Corresponds to the JSON property `javaClassValue` - # @return [String] - attr_accessor :java_class_value - - # Contains value if the data is of string type. - # Corresponds to the JSON property `strValue` - # @return [String] - attr_accessor :str_value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @duration_value = args[:duration_value] if args.key?(:duration_value) - @int64_value = args[:int64_value] if args.key?(:int64_value) - @namespace = args[:namespace] if args.key?(:namespace) - @float_value = args[:float_value] if args.key?(:float_value) - @key = args[:key] if args.key?(:key) - @short_str_value = args[:short_str_value] if args.key?(:short_str_value) - @label = args[:label] if args.key?(:label) - @url = args[:url] if args.key?(:url) - @timestamp_value = args[:timestamp_value] if args.key?(:timestamp_value) - @bool_value = args[:bool_value] if args.key?(:bool_value) - @java_class_value = args[:java_class_value] if args.key?(:java_class_value) - @str_value = args[:str_value] if args.key?(:str_value) - end - end - - # Request to get updated debug configuration for component. - class GetDebugConfigRequest - include Google::Apis::Core::Hashable - - # The internal component id for which debug configuration is - # requested. - # Corresponds to the JSON property `componentId` - # @return [String] - attr_accessor :component_id - - # The worker id, i.e., VM hostname. - # Corresponds to the JSON property `workerId` - # @return [String] - attr_accessor :worker_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @component_id = args[:component_id] if args.key?(:component_id) - @worker_id = args[:worker_id] if args.key?(:worker_id) - end - end - - # Request to lease WorkItems. - class LeaseWorkItemRequest - include Google::Apis::Core::Hashable - - # The current timestamp at the worker. - # Corresponds to the JSON property `currentWorkerTime` - # @return [String] - attr_accessor :current_worker_time - - # The location which contains the WorkItem's job. - # Corresponds to the JSON property `location` - # @return [String] - attr_accessor :location - - # Filter for WorkItem type. - # Corresponds to the JSON property `workItemTypes` - # @return [Array] - attr_accessor :work_item_types - - # Worker capabilities. WorkItems might be limited to workers with specific - # capabilities. - # Corresponds to the JSON property `workerCapabilities` - # @return [Array] - attr_accessor :worker_capabilities - - # Identifies the worker leasing work -- typically the ID of the - # virtual machine running the worker. - # Corresponds to the JSON property `workerId` - # @return [String] - attr_accessor :worker_id - - # The initial lease period. - # Corresponds to the JSON property `requestedLeaseDuration` - # @return [String] - attr_accessor :requested_lease_duration - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @current_worker_time = args[:current_worker_time] if args.key?(:current_worker_time) - @location = args[:location] if args.key?(:location) - @work_item_types = args[:work_item_types] if args.key?(:work_item_types) - @worker_capabilities = args[:worker_capabilities] if args.key?(:worker_capabilities) - @worker_id = args[:worker_id] if args.key?(:worker_id) - @requested_lease_duration = args[:requested_lease_duration] if args.key?(:requested_lease_duration) - end - end - - # The response to a GetTemplate request. - class GetTemplateResponse - include Google::Apis::Core::Hashable - - # The `Status` type defines a logical error model that is suitable for different - # programming environments, including REST APIs and RPC APIs. It is used by - # [gRPC](https://github.com/grpc). The error model is designed to be: - # - Simple to use and understand for most users - # - Flexible enough to meet unexpected needs - # # Overview - # The `Status` message contains three pieces of data: error code, error message, - # and error details. The error code should be an enum value of - # google.rpc.Code, but it may accept additional error codes if needed. The - # error message should be a developer-facing English message that helps - # developers *understand* and *resolve* the error. If a localized user-facing - # error message is needed, put the localized message in the error details or - # localize it in the client. The optional error details may contain arbitrary - # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. - # # Language mapping - # The `Status` message is the logical representation of the error model, but it - # is not necessarily the actual wire format. When the `Status` message is - # exposed in different client libraries and different wire protocols, it can be - # mapped differently. For example, it will likely be mapped to some exceptions - # in Java, but more likely mapped to some error codes in C. - # # Other uses - # The error model and the `Status` message can be used in a variety of - # environments, either with or without APIs, to provide a - # consistent developer experience across different environments. - # Example uses of this error model include: - # - Partial errors. If a service needs to return partial errors to the client, - # it may embed the `Status` in the normal response to indicate the partial - # errors. - # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. - # - Batch operations. If a client uses batch request and batch response, the - # `Status` message should be used directly inside batch response, one for - # each error sub-response. - # - Asynchronous operations. If an API call embeds asynchronous operation - # results in its response, the status of those operations should be - # represented directly using the `Status` message. - # - Logging. If some API errors are stored in logs, the message `Status` could - # be used directly after any stripping needed for security/privacy reasons. - # Corresponds to the JSON property `status` - # @return [Google::Apis::DataflowV1b3::Status] - attr_accessor :status - - # Metadata describing a template. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::DataflowV1b3::TemplateMetadata] - attr_accessor :metadata - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @status = args[:status] if args.key?(:status) - @metadata = args[:metadata] if args.key?(:metadata) - end - end - - # Request to report the status of WorkItems. - class ReportWorkItemStatusRequest - include Google::Apis::Core::Hashable - - # The ID of the worker reporting the WorkItem status. If this - # does not match the ID of the worker which the Dataflow service - # believes currently has the lease on the WorkItem, the report - # will be dropped (with an error response). - # Corresponds to the JSON property `workerId` - # @return [String] - attr_accessor :worker_id - - # The current timestamp at the worker. - # Corresponds to the JSON property `currentWorkerTime` - # @return [String] - attr_accessor :current_worker_time - - # The location which contains the WorkItem's job. - # Corresponds to the JSON property `location` - # @return [String] - attr_accessor :location - - # The order is unimportant, except that the order of the - # WorkItemServiceState messages in the ReportWorkItemStatusResponse - # corresponds to the order of WorkItemStatus messages here. - # Corresponds to the JSON property `workItemStatuses` - # @return [Array] - attr_accessor :work_item_statuses - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @worker_id = args[:worker_id] if args.key?(:worker_id) - @current_worker_time = args[:current_worker_time] if args.key?(:current_worker_time) - @location = args[:location] if args.key?(:location) - @work_item_statuses = args[:work_item_statuses] if args.key?(:work_item_statuses) - end - end - - # A task that carries configuration information for streaming computations. - class StreamingConfigTask - include Google::Apis::Core::Hashable - - # Set of computation configuration information. - # Corresponds to the JSON property `streamingComputationConfigs` - # @return [Array] - attr_accessor :streaming_computation_configs - - # Map from user step names to state families. - # Corresponds to the JSON property `userStepToStateFamilyNameMap` - # @return [Hash] - attr_accessor :user_step_to_state_family_name_map - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @streaming_computation_configs = args[:streaming_computation_configs] if args.key?(:streaming_computation_configs) - @user_step_to_state_family_name_map = args[:user_step_to_state_family_name_map] if args.key?(:user_step_to_state_family_name_map) - end - end - - # A descriptive representation of submitted pipeline as well as the executed - # form. This data is provided by the Dataflow service for ease of visualizing - # the pipeline and interpretting Dataflow provided metrics. - class PipelineDescription - include Google::Apis::Core::Hashable - - # Description of each transform in the pipeline and collections between them. - # Corresponds to the JSON property `originalPipelineTransform` - # @return [Array] - attr_accessor :original_pipeline_transform - - # Pipeline level display data. - # Corresponds to the JSON property `displayData` - # @return [Array] - attr_accessor :display_data - - # Description of each stage of execution of the pipeline. - # Corresponds to the JSON property `executionPipelineStage` - # @return [Array] - attr_accessor :execution_pipeline_stage - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @original_pipeline_transform = args[:original_pipeline_transform] if args.key?(:original_pipeline_transform) - @display_data = args[:display_data] if args.key?(:display_data) - @execution_pipeline_stage = args[:execution_pipeline_stage] if args.key?(:execution_pipeline_stage) - end - end - - # Defines a particular step within a Cloud Dataflow job. - # A job consists of multiple steps, each of which performs some - # specific operation as part of the overall job. Data is typically - # passed from one step to another as part of the job. - # Here's an example of a sequence of steps which together implement a - # Map-Reduce job: - # * Read a collection of data from some source, parsing the - # collection's elements. - # * Validate the elements. - # * Apply a user-defined function to map each element to some value - # and extract an element-specific key value. - # * Group elements with the same key into a single element with - # that key, transforming a multiply-keyed collection into a - # uniquely-keyed collection. - # * Write the elements out to some data sink. - # Note that the Cloud Dataflow service may be used to run many different - # types of jobs, not just Map-Reduce. - class Step - include Google::Apis::Core::Hashable - - # The name that identifies the step. This must be unique for each - # step with respect to all other steps in the Cloud Dataflow job. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The kind of step in the Cloud Dataflow job. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Named properties associated with the step. Each kind of - # predefined step has its own required set of properties. - # Must be provided on Create. Only retrieved with JOB_VIEW_ALL. - # Corresponds to the JSON property `properties` - # @return [Hash] - attr_accessor :properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - @kind = args[:kind] if args.key?(:kind) - @properties = args[:properties] if args.key?(:properties) - end - end - - # Additional information about how a Cloud Dataflow job will be executed that - # isn't contained in the submitted job. - class JobExecutionInfo - include Google::Apis::Core::Hashable - - # A mapping from each stage to the information about that stage. - # Corresponds to the JSON property `stages` - # @return [Hash] - attr_accessor :stages - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @stages = args[:stages] if args.key?(:stages) - end - end - - # Indicates which location failed to respond to a request for data. - class FailedLocation - include Google::Apis::Core::Hashable - - # The name of the failed location. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - end - end - - # Describes the data disk used by a workflow job. - class Disk - include Google::Apis::Core::Hashable - - # Size of disk in GB. If zero or unspecified, the service will - # attempt to choose a reasonable default. - # Corresponds to the JSON property `sizeGb` - # @return [Fixnum] - attr_accessor :size_gb - - # Disk storage type, as defined by Google Compute Engine. This - # must be a disk type appropriate to the project and zone in which - # the workers will run. If unknown or unspecified, the service - # will attempt to choose a reasonable default. - # For example, the standard persistent disk type is a resource name - # typically ending in "pd-standard". If SSD persistent disks are - # available, the resource name typically ends with "pd-ssd". The - # actual valid values are defined the Google Compute Engine API, - # not by the Cloud Dataflow API; consult the Google Compute Engine - # documentation for more information about determining the set of - # available disk types for a particular project and zone. - # Google Compute Engine Disk types are local to a particular - # project in a particular zone, and so the resource name will - # typically look something like this: - # compute.googleapis.com/projects/project-id/zones/zone/diskTypes/pd-standard - # Corresponds to the JSON property `diskType` - # @return [String] - attr_accessor :disk_type - - # Directory in a VM where disk is mounted. - # Corresponds to the JSON property `mountPoint` - # @return [String] - attr_accessor :mount_point - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @size_gb = args[:size_gb] if args.key?(:size_gb) - @disk_type = args[:disk_type] if args.key?(:disk_type) - @mount_point = args[:mount_point] if args.key?(:mount_point) - end - end - - # CounterMetadata includes all static non-name non-value counter attributes. - class CounterMetadata - include Google::Apis::Core::Hashable - - # System defined Units, see above enum. - # Corresponds to the JSON property `standardUnits` - # @return [String] - attr_accessor :standard_units - - # A string referring to the unit type. - # Corresponds to the JSON property `otherUnits` - # @return [String] - attr_accessor :other_units - - # Counter aggregation kind. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # Human-readable description of the counter semantics. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @standard_units = args[:standard_units] if args.key?(:standard_units) - @other_units = args[:other_units] if args.key?(:other_units) - @kind = args[:kind] if args.key?(:kind) - @description = args[:description] if args.key?(:description) - end - end - - # Response to a request to list job messages. - class ListJobMessagesResponse - include Google::Apis::Core::Hashable - - # Messages in ascending timestamp order. - # Corresponds to the JSON property `jobMessages` - # @return [Array] - attr_accessor :job_messages - - # The token to obtain the next page of results if there are more. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @job_messages = args[:job_messages] if args.key?(:job_messages) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # A progress measurement of a WorkItem by a worker. - class ApproximateReportedProgress - include Google::Apis::Core::Hashable - - # Represents the level of parallelism in a WorkItem's input, - # reported by the worker. - # Corresponds to the JSON property `remainingParallelism` - # @return [Google::Apis::DataflowV1b3::ReportedParallelism] - attr_accessor :remaining_parallelism - - # Position defines a position within a collection of data. The value - # can be either the end position, a key (used with ordered - # collections), a byte offset, or a record index. - # Corresponds to the JSON property `position` - # @return [Google::Apis::DataflowV1b3::Position] - attr_accessor :position - - # Completion as fraction of the input consumed, from 0.0 (beginning, nothing - # consumed), to 1.0 (end of the input, entire input consumed). - # Corresponds to the JSON property `fractionConsumed` - # @return [Float] - attr_accessor :fraction_consumed - - # Represents the level of parallelism in a WorkItem's input, - # reported by the worker. - # Corresponds to the JSON property `consumedParallelism` - # @return [Google::Apis::DataflowV1b3::ReportedParallelism] - attr_accessor :consumed_parallelism - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @remaining_parallelism = args[:remaining_parallelism] if args.key?(:remaining_parallelism) - @position = args[:position] if args.key?(:position) - @fraction_consumed = args[:fraction_consumed] if args.key?(:fraction_consumed) - @consumed_parallelism = args[:consumed_parallelism] if args.key?(:consumed_parallelism) - end - end - - # State family configuration. - class StateFamilyConfig - include Google::Apis::Core::Hashable - - # If true, this family corresponds to a read operation. - # Corresponds to the JSON property `isRead` - # @return [Boolean] - attr_accessor :is_read - alias_method :is_read?, :is_read - - # The state family value. - # Corresponds to the JSON property `stateFamily` - # @return [String] - attr_accessor :state_family - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @is_read = args[:is_read] if args.key?(:is_read) - @state_family = args[:state_family] if args.key?(:state_family) - end - end - - # A metric value representing a list of integers. - class IntegerList - include Google::Apis::Core::Hashable - - # Elements of the list. - # Corresponds to the JSON property `elements` - # @return [Array] - attr_accessor :elements - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @elements = args[:elements] if args.key?(:elements) - end - end - - # Service-side response to WorkerMessage reporting resource utilization. - class ResourceUtilizationReportResponse - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # The response to a SourceSplitRequest. - class SourceSplitResponse - include Google::Apis::Core::Hashable - - # Indicates whether splitting happened and produced a list of bundles. - # If this is USE_CURRENT_SOURCE_AS_IS, the current source should - # be processed "as is" without splitting. "bundles" is ignored in this case. - # If this is SPLITTING_HAPPENED, then "bundles" contains a list of - # bundles into which the source was split. - # Corresponds to the JSON property `outcome` - # @return [String] - attr_accessor :outcome - - # If outcome is SPLITTING_HAPPENED, then this is a list of bundles - # into which the source was split. Otherwise this field is ignored. - # This list can be empty, which means the source represents an empty input. - # Corresponds to the JSON property `bundles` - # @return [Array] - attr_accessor :bundles - - # DEPRECATED in favor of bundles. - # Corresponds to the JSON property `shards` - # @return [Array] - attr_accessor :shards - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @outcome = args[:outcome] if args.key?(:outcome) - @bundles = args[:bundles] if args.key?(:bundles) - @shards = args[:shards] if args.key?(:shards) - end - end - - # Describes a particular operation comprising a MapTask. - class ParallelInstruction - include Google::Apis::Core::Hashable - - # Describes the outputs of the instruction. - # Corresponds to the JSON property `outputs` - # @return [Array] - attr_accessor :outputs - - # User-provided name of this operation. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # An instruction that does a ParDo operation. - # Takes one main input and zero or more side inputs, and produces - # zero or more outputs. - # Runs user code. - # Corresponds to the JSON property `parDo` - # @return [Google::Apis::DataflowV1b3::ParDoInstruction] - attr_accessor :par_do - - # An instruction that reads records. - # Takes no inputs, produces one output. - # Corresponds to the JSON property `read` - # @return [Google::Apis::DataflowV1b3::ReadInstruction] - attr_accessor :read - - # System-defined name for the operation in the original workflow graph. - # Corresponds to the JSON property `originalName` - # @return [String] - attr_accessor :original_name - - # An instruction that copies its inputs (zero or more) to its (single) output. - # Corresponds to the JSON property `flatten` - # @return [Google::Apis::DataflowV1b3::FlattenInstruction] - attr_accessor :flatten - - # An instruction that writes records. - # Takes one input, produces no outputs. - # Corresponds to the JSON property `write` - # @return [Google::Apis::DataflowV1b3::WriteInstruction] - attr_accessor :write - - # System-defined name of this operation. - # Unique across the workflow. - # Corresponds to the JSON property `systemName` - # @return [String] - attr_accessor :system_name - - # An instruction that does a partial group-by-key. - # One input and one output. - # Corresponds to the JSON property `partialGroupByKey` - # @return [Google::Apis::DataflowV1b3::PartialGroupByKeyInstruction] - attr_accessor :partial_group_by_key - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @outputs = args[:outputs] if args.key?(:outputs) - @name = args[:name] if args.key?(:name) - @par_do = args[:par_do] if args.key?(:par_do) - @read = args[:read] if args.key?(:read) - @original_name = args[:original_name] if args.key?(:original_name) - @flatten = args[:flatten] if args.key?(:flatten) - @write = args[:write] if args.key?(:write) - @system_name = args[:system_name] if args.key?(:system_name) - @partial_group_by_key = args[:partial_group_by_key] if args.key?(:partial_group_by_key) - end - end - - # The packages that must be installed in order for a worker to run the - # steps of the Cloud Dataflow job that will be assigned to its worker - # pool. - # This is the mechanism by which the Cloud Dataflow SDK causes code to - # be loaded onto the workers. For example, the Cloud Dataflow Java SDK - # might use this to install jars containing the user's code and all of the - # various dependencies (libraries, data files, etc.) required in order - # for that code to run. - class Package - include Google::Apis::Core::Hashable - - # The name of the package. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The resource to read the package from. The supported resource type is: - # Google Cloud Storage: - # storage.googleapis.com/`bucket` - # bucket.storage.googleapis.com/ - # Corresponds to the JSON property `location` - # @return [String] - attr_accessor :location - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - @location = args[:location] if args.key?(:location) - end - end - - # Data disk assignment information for a specific key-range of a sharded - # computation. - # Currently we only support UTF-8 character splits to simplify encoding into - # JSON. - class KeyRangeDataDiskAssignment - include Google::Apis::Core::Hashable - - # The start (inclusive) of the key range. - # Corresponds to the JSON property `start` - # @return [String] - attr_accessor :start - - # The name of the data disk where data for this range is stored. - # This name is local to the Google Cloud Platform project and uniquely - # identifies the disk within that project, for example - # "myproject-1014-104817-4c2-harness-0-disk-1". - # Corresponds to the JSON property `dataDisk` - # @return [String] - attr_accessor :data_disk - - # The end (exclusive) of the key range. - # Corresponds to the JSON property `end` - # @return [String] - attr_accessor :end - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @start = args[:start] if args.key?(:start) - @data_disk = args[:data_disk] if args.key?(:data_disk) - @end = args[:end] if args.key?(:end) end end end diff --git a/generated/google/apis/dataflow_v1b3/representations.rb b/generated/google/apis/dataflow_v1b3/representations.rb index ba842192b..40ae60d3b 100644 --- a/generated/google/apis/dataflow_v1b3/representations.rb +++ b/generated/google/apis/dataflow_v1b3/representations.rb @@ -22,6 +22,294 @@ module Google module Apis module DataflowV1b3 + class Source + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SplitInt64 + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class WorkerPool + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SourceOperationRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class WorkItem + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ResourceUtilizationReport + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ReportedParallelism + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TopologyConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SourceSplitOptions + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ReadInstruction + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class WorkerSettings + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class StreamingStageLocation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DataDiskAssignment + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ApproximateSplitRequest + 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 StreamLocation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SendWorkerMessagesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class LeaseWorkItemResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class StreamingComputationConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TransformSummary + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Sink + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class LaunchTemplateParameters + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class FlattenInstruction + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PartialGroupByKeyInstruction + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class InstructionInput + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class StageSource + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class StringList + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DisplayData + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class LeaseWorkItemRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GetDebugConfigRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GetTemplateResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ReportWorkItemStatusRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PipelineDescription + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class StreamingConfigTask + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class JobExecutionInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Step + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class FailedLocation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Disk + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CounterMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListJobMessagesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ApproximateReportedProgress + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class IntegerList + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class StateFamilyConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ResourceUtilizationReportResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SourceSplitResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ParallelInstruction + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Package + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class KeyRangeDataDiskAssignment + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ParDoInstruction class Representation < Google::Apis::Core::JsonRepresentation; end @@ -154,13 +442,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class SeqMapTask + class NameAndKind class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class NameAndKind + class SeqMapTask class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -250,7 +538,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class DerivedSource + class Job class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -262,7 +550,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Job + class DerivedSource class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -418,13 +706,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class MetricShortId + class ShellTask class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ShellTask + class MetricShortId class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -442,311 +730,541 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class SplitInt64 - class Representation < Google::Apis::Core::JsonRepresentation; end + class Source + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :metadata, as: 'metadata', class: Google::Apis::DataflowV1b3::SourceMetadata, decorator: Google::Apis::DataflowV1b3::SourceMetadata::Representation - include Google::Apis::Core::JsonObjectSupport + collection :base_specs, as: 'baseSpecs' + hash :codec, as: 'codec' + property :does_not_need_splitting, as: 'doesNotNeedSplitting' + hash :spec, as: 'spec' + end end - class Source - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + class SplitInt64 + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :low_bits, as: 'lowBits' + property :high_bits, as: 'highBits' + end end class WorkerPool - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :worker_harness_container_image, as: 'workerHarnessContainerImage' + property :machine_type, as: 'machineType' + property :disk_type, as: 'diskType' + property :kind, as: 'kind' + collection :data_disks, as: 'dataDisks', class: Google::Apis::DataflowV1b3::Disk, decorator: Google::Apis::DataflowV1b3::Disk::Representation - include Google::Apis::Core::JsonObjectSupport + property :subnetwork, as: 'subnetwork' + property :ip_configuration, as: 'ipConfiguration' + property :autoscaling_settings, as: 'autoscalingSettings', class: Google::Apis::DataflowV1b3::AutoscalingSettings, decorator: Google::Apis::DataflowV1b3::AutoscalingSettings::Representation + + property :taskrunner_settings, as: 'taskrunnerSettings', class: Google::Apis::DataflowV1b3::TaskRunnerSettings, decorator: Google::Apis::DataflowV1b3::TaskRunnerSettings::Representation + + hash :metadata, as: 'metadata' + property :default_package_set, as: 'defaultPackageSet' + property :network, as: 'network' + property :zone, as: 'zone' + property :num_workers, as: 'numWorkers' + property :num_threads_per_worker, as: 'numThreadsPerWorker' + property :disk_source_image, as: 'diskSourceImage' + collection :packages, as: 'packages', class: Google::Apis::DataflowV1b3::Package, decorator: Google::Apis::DataflowV1b3::Package::Representation + + property :teardown_policy, as: 'teardownPolicy' + property :on_host_maintenance, as: 'onHostMaintenance' + hash :pool_args, as: 'poolArgs' + property :disk_size_gb, as: 'diskSizeGb' + end end class SourceOperationRequest - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :get_metadata, as: 'getMetadata', class: Google::Apis::DataflowV1b3::SourceGetMetadataRequest, decorator: Google::Apis::DataflowV1b3::SourceGetMetadataRequest::Representation - include Google::Apis::Core::JsonObjectSupport + property :split, as: 'split', class: Google::Apis::DataflowV1b3::SourceSplitRequest, decorator: Google::Apis::DataflowV1b3::SourceSplitRequest::Representation + + end end class WorkItem - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :job_id, as: 'jobId' + property :id, as: 'id' + property :configuration, as: 'configuration' + property :map_task, as: 'mapTask', class: Google::Apis::DataflowV1b3::MapTask, decorator: Google::Apis::DataflowV1b3::MapTask::Representation - include Google::Apis::Core::JsonObjectSupport + property :seq_map_task, as: 'seqMapTask', class: Google::Apis::DataflowV1b3::SeqMapTask, decorator: Google::Apis::DataflowV1b3::SeqMapTask::Representation + + collection :packages, as: 'packages', class: Google::Apis::DataflowV1b3::Package, decorator: Google::Apis::DataflowV1b3::Package::Representation + + property :project_id, as: 'projectId' + property :report_status_interval, as: 'reportStatusInterval' + property :streaming_setup_task, as: 'streamingSetupTask', class: Google::Apis::DataflowV1b3::StreamingSetupTask, decorator: Google::Apis::DataflowV1b3::StreamingSetupTask::Representation + + property :source_operation_task, as: 'sourceOperationTask', class: Google::Apis::DataflowV1b3::SourceOperationRequest, decorator: Google::Apis::DataflowV1b3::SourceOperationRequest::Representation + + property :streaming_config_task, as: 'streamingConfigTask', class: Google::Apis::DataflowV1b3::StreamingConfigTask, decorator: Google::Apis::DataflowV1b3::StreamingConfigTask::Representation + + property :lease_expire_time, as: 'leaseExpireTime' + property :initial_report_index, as: 'initialReportIndex' + property :shell_task, as: 'shellTask', class: Google::Apis::DataflowV1b3::ShellTask, decorator: Google::Apis::DataflowV1b3::ShellTask::Representation + + property :streaming_computation_task, as: 'streamingComputationTask', class: Google::Apis::DataflowV1b3::StreamingComputationTask, decorator: Google::Apis::DataflowV1b3::StreamingComputationTask::Representation + + end end class ResourceUtilizationReport - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :cpu_time, as: 'cpuTime', class: Google::Apis::DataflowV1b3::CpuTime, decorator: Google::Apis::DataflowV1b3::CpuTime::Representation - include Google::Apis::Core::JsonObjectSupport + end end class ReportedParallelism - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :is_infinite, as: 'isInfinite' + property :value, as: 'value' + end end class TopologyConfig - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :forwarding_key_bits, as: 'forwardingKeyBits' + hash :user_stage_to_computation_name_map, as: 'userStageToComputationNameMap' + collection :computations, as: 'computations', class: Google::Apis::DataflowV1b3::ComputationTopology, decorator: Google::Apis::DataflowV1b3::ComputationTopology::Representation - include Google::Apis::Core::JsonObjectSupport + collection :data_disk_assignments, as: 'dataDiskAssignments', class: Google::Apis::DataflowV1b3::DataDiskAssignment, decorator: Google::Apis::DataflowV1b3::DataDiskAssignment::Representation + + property :persistent_state_version, as: 'persistentStateVersion' + end end class SourceSplitOptions - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :desired_bundle_size_bytes, as: 'desiredBundleSizeBytes' + property :desired_shard_size_bytes, as: 'desiredShardSizeBytes' + end end class ReadInstruction - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :source, as: 'source', class: Google::Apis::DataflowV1b3::Source, decorator: Google::Apis::DataflowV1b3::Source::Representation - include Google::Apis::Core::JsonObjectSupport + end end class WorkerSettings - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :service_path, as: 'servicePath' + property :shuffle_service_path, as: 'shuffleServicePath' + property :worker_id, as: 'workerId' + property :temp_storage_prefix, as: 'tempStoragePrefix' + property :base_url, as: 'baseUrl' + property :reporting_enabled, as: 'reportingEnabled' + end end class StreamingStageLocation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :stream_id, as: 'streamId' + end end class DataDiskAssignment - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :vm_instance, as: 'vmInstance' + collection :data_disks, as: 'dataDisks' + end end class ApproximateSplitRequest - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :position, as: 'position', class: Google::Apis::DataflowV1b3::Position, decorator: Google::Apis::DataflowV1b3::Position::Representation - include Google::Apis::Core::JsonObjectSupport + property :fraction_consumed, as: 'fractionConsumed' + end end class Status - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :details, as: 'details' + property :code, as: 'code' + property :message, as: 'message' + end end class StreamLocation - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :custom_source_location, as: 'customSourceLocation', class: Google::Apis::DataflowV1b3::CustomSourceLocation, decorator: Google::Apis::DataflowV1b3::CustomSourceLocation::Representation - include Google::Apis::Core::JsonObjectSupport + property :streaming_stage_location, as: 'streamingStageLocation', class: Google::Apis::DataflowV1b3::StreamingStageLocation, decorator: Google::Apis::DataflowV1b3::StreamingStageLocation::Representation + + property :pubsub_location, as: 'pubsubLocation', class: Google::Apis::DataflowV1b3::PubsubLocation, decorator: Google::Apis::DataflowV1b3::PubsubLocation::Representation + + property :side_input_location, as: 'sideInputLocation', class: Google::Apis::DataflowV1b3::StreamingSideInputLocation, decorator: Google::Apis::DataflowV1b3::StreamingSideInputLocation::Representation + + end end class SendWorkerMessagesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :worker_message_responses, as: 'workerMessageResponses', class: Google::Apis::DataflowV1b3::WorkerMessageResponse, decorator: Google::Apis::DataflowV1b3::WorkerMessageResponse::Representation - include Google::Apis::Core::JsonObjectSupport - end - - class StreamingComputationConfig - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TransformSummary - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + end end class LeaseWorkItemResponse - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :work_items, as: 'workItems', class: Google::Apis::DataflowV1b3::WorkItem, decorator: Google::Apis::DataflowV1b3::WorkItem::Representation - include Google::Apis::Core::JsonObjectSupport + end end - class LaunchTemplateParameters - class Representation < Google::Apis::Core::JsonRepresentation; end + class StreamingComputationConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :computation_id, as: 'computationId' + property :system_name, as: 'systemName' + property :stage_name, as: 'stageName' + collection :instructions, as: 'instructions', class: Google::Apis::DataflowV1b3::ParallelInstruction, decorator: Google::Apis::DataflowV1b3::ParallelInstruction::Representation - include Google::Apis::Core::JsonObjectSupport + end + end + + class TransformSummary + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :input_collection_name, as: 'inputCollectionName' + property :name, as: 'name' + property :id, as: 'id' + collection :display_data, as: 'displayData', class: Google::Apis::DataflowV1b3::DisplayData, decorator: Google::Apis::DataflowV1b3::DisplayData::Representation + + collection :output_collection_name, as: 'outputCollectionName' + property :kind, as: 'kind' + end end class Sink - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :codec, as: 'codec' + hash :spec, as: 'spec' + end + end - include Google::Apis::Core::JsonObjectSupport + class LaunchTemplateParameters + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :parameters, as: 'parameters' + property :job_name, as: 'jobName' + property :environment, as: 'environment', class: Google::Apis::DataflowV1b3::RuntimeEnvironment, decorator: Google::Apis::DataflowV1b3::RuntimeEnvironment::Representation + + end end class FlattenInstruction - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :inputs, as: 'inputs', class: Google::Apis::DataflowV1b3::InstructionInput, decorator: Google::Apis::DataflowV1b3::InstructionInput::Representation - include Google::Apis::Core::JsonObjectSupport + end end class PartialGroupByKeyInstruction - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :input_element_codec, as: 'inputElementCodec' + hash :value_combining_fn, as: 'valueCombiningFn' + property :original_combine_values_input_store_name, as: 'originalCombineValuesInputStoreName' + collection :side_inputs, as: 'sideInputs', class: Google::Apis::DataflowV1b3::SideInputInfo, decorator: Google::Apis::DataflowV1b3::SideInputInfo::Representation - include Google::Apis::Core::JsonObjectSupport + property :original_combine_values_step_name, as: 'originalCombineValuesStepName' + property :input, as: 'input', class: Google::Apis::DataflowV1b3::InstructionInput, decorator: Google::Apis::DataflowV1b3::InstructionInput::Representation + + end end class InstructionInput - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :producer_instruction_index, as: 'producerInstructionIndex' + property :output_num, as: 'outputNum' + end end class StageSource - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + property :size_bytes, as: 'sizeBytes' + property :user_name, as: 'userName' + property :original_transform_or_collection, as: 'originalTransformOrCollection' + end end class StringList - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :elements, as: 'elements' + end end class DisplayData - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GetDebugConfigRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :str_value, as: 'strValue' + property :int64_value, as: 'int64Value' + property :duration_value, as: 'durationValue' + property :namespace, as: 'namespace' + property :float_value, as: 'floatValue' + property :key, as: 'key' + property :short_str_value, as: 'shortStrValue' + property :url, as: 'url' + property :label, as: 'label' + property :timestamp_value, as: 'timestampValue' + property :java_class_value, as: 'javaClassValue' + property :bool_value, as: 'boolValue' + end end class LeaseWorkItemRequest - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :worker_capabilities, as: 'workerCapabilities' + property :worker_id, as: 'workerId' + property :requested_lease_duration, as: 'requestedLeaseDuration' + property :current_worker_time, as: 'currentWorkerTime' + property :location, as: 'location' + collection :work_item_types, as: 'workItemTypes' + end + end - include Google::Apis::Core::JsonObjectSupport + class GetDebugConfigRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :component_id, as: 'componentId' + property :worker_id, as: 'workerId' + end end class GetTemplateResponse - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :status, as: 'status', class: Google::Apis::DataflowV1b3::Status, decorator: Google::Apis::DataflowV1b3::Status::Representation - include Google::Apis::Core::JsonObjectSupport + property :metadata, as: 'metadata', class: Google::Apis::DataflowV1b3::TemplateMetadata, decorator: Google::Apis::DataflowV1b3::TemplateMetadata::Representation + + end end class ReportWorkItemStatusRequest - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :worker_id, as: 'workerId' + property :current_worker_time, as: 'currentWorkerTime' + property :location, as: 'location' + collection :work_item_statuses, as: 'workItemStatuses', class: Google::Apis::DataflowV1b3::WorkItemStatus, decorator: Google::Apis::DataflowV1b3::WorkItemStatus::Representation - include Google::Apis::Core::JsonObjectSupport - end - - class StreamingConfigTask - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + end end class PipelineDescription - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :original_pipeline_transform, as: 'originalPipelineTransform', class: Google::Apis::DataflowV1b3::TransformSummary, decorator: Google::Apis::DataflowV1b3::TransformSummary::Representation - include Google::Apis::Core::JsonObjectSupport + collection :display_data, as: 'displayData', class: Google::Apis::DataflowV1b3::DisplayData, decorator: Google::Apis::DataflowV1b3::DisplayData::Representation + + collection :execution_pipeline_stage, as: 'executionPipelineStage', class: Google::Apis::DataflowV1b3::ExecutionStageSummary, decorator: Google::Apis::DataflowV1b3::ExecutionStageSummary::Representation + + end end - class Step - class Representation < Google::Apis::Core::JsonRepresentation; end + class StreamingConfigTask + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :streaming_computation_configs, as: 'streamingComputationConfigs', class: Google::Apis::DataflowV1b3::StreamingComputationConfig, decorator: Google::Apis::DataflowV1b3::StreamingComputationConfig::Representation - include Google::Apis::Core::JsonObjectSupport + hash :user_step_to_state_family_name_map, as: 'userStepToStateFamilyNameMap' + end end class JobExecutionInfo - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :stages, as: 'stages', class: Google::Apis::DataflowV1b3::JobExecutionStageInfo, decorator: Google::Apis::DataflowV1b3::JobExecutionStageInfo::Representation - include Google::Apis::Core::JsonObjectSupport + end + end + + class Step + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + property :kind, as: 'kind' + hash :properties, as: 'properties' + end end class FailedLocation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + end end class Disk - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :size_gb, as: 'sizeGb' + property :disk_type, as: 'diskType' + property :mount_point, as: 'mountPoint' + end end class CounterMetadata - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :kind, as: 'kind' + property :description, as: 'description' + property :standard_units, as: 'standardUnits' + property :other_units, as: 'otherUnits' + end end class ListJobMessagesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :job_messages, as: 'jobMessages', class: Google::Apis::DataflowV1b3::JobMessage, decorator: Google::Apis::DataflowV1b3::JobMessage::Representation - include Google::Apis::Core::JsonObjectSupport + end end class ApproximateReportedProgress - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :position, as: 'position', class: Google::Apis::DataflowV1b3::Position, decorator: Google::Apis::DataflowV1b3::Position::Representation - include Google::Apis::Core::JsonObjectSupport - end + property :fraction_consumed, as: 'fractionConsumed' + property :consumed_parallelism, as: 'consumedParallelism', class: Google::Apis::DataflowV1b3::ReportedParallelism, decorator: Google::Apis::DataflowV1b3::ReportedParallelism::Representation - class StateFamilyConfig - class Representation < Google::Apis::Core::JsonRepresentation; end + property :remaining_parallelism, as: 'remainingParallelism', class: Google::Apis::DataflowV1b3::ReportedParallelism, decorator: Google::Apis::DataflowV1b3::ReportedParallelism::Representation - include Google::Apis::Core::JsonObjectSupport + end end class IntegerList - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :elements, as: 'elements', class: Google::Apis::DataflowV1b3::SplitInt64, decorator: Google::Apis::DataflowV1b3::SplitInt64::Representation - include Google::Apis::Core::JsonObjectSupport + end + end + + class StateFamilyConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :state_family, as: 'stateFamily' + property :is_read, as: 'isRead' + end end class ResourceUtilizationReportResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end end class SourceSplitResponse - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :outcome, as: 'outcome' + collection :bundles, as: 'bundles', class: Google::Apis::DataflowV1b3::DerivedSource, decorator: Google::Apis::DataflowV1b3::DerivedSource::Representation - include Google::Apis::Core::JsonObjectSupport + collection :shards, as: 'shards', class: Google::Apis::DataflowV1b3::SourceSplitShard, decorator: Google::Apis::DataflowV1b3::SourceSplitShard::Representation + + end end class ParallelInstruction - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :par_do, as: 'parDo', class: Google::Apis::DataflowV1b3::ParDoInstruction, decorator: Google::Apis::DataflowV1b3::ParDoInstruction::Representation - include Google::Apis::Core::JsonObjectSupport + property :read, as: 'read', class: Google::Apis::DataflowV1b3::ReadInstruction, decorator: Google::Apis::DataflowV1b3::ReadInstruction::Representation + + property :flatten, as: 'flatten', class: Google::Apis::DataflowV1b3::FlattenInstruction, decorator: Google::Apis::DataflowV1b3::FlattenInstruction::Representation + + property :original_name, as: 'originalName' + property :write, as: 'write', class: Google::Apis::DataflowV1b3::WriteInstruction, decorator: Google::Apis::DataflowV1b3::WriteInstruction::Representation + + property :system_name, as: 'systemName' + property :partial_group_by_key, as: 'partialGroupByKey', class: Google::Apis::DataflowV1b3::PartialGroupByKeyInstruction, decorator: Google::Apis::DataflowV1b3::PartialGroupByKeyInstruction::Representation + + collection :outputs, as: 'outputs', class: Google::Apis::DataflowV1b3::InstructionOutput, decorator: Google::Apis::DataflowV1b3::InstructionOutput::Representation + + property :name, as: 'name' + end end class Package - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :location, as: 'location' + property :name, as: 'name' + end end class KeyRangeDataDiskAssignment - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :start, as: 'start' + property :data_disk, as: 'dataDisk' + property :end, as: 'end' + end end class ParDoInstruction # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :multi_output_infos, as: 'multiOutputInfos', class: Google::Apis::DataflowV1b3::MultiOutputInfo, decorator: Google::Apis::DataflowV1b3::MultiOutputInfo::Representation - hash :user_fn, as: 'userFn' property :input, as: 'input', class: Google::Apis::DataflowV1b3::InstructionInput, decorator: Google::Apis::DataflowV1b3::InstructionInput::Representation property :num_outputs, as: 'numOutputs' collection :side_inputs, as: 'sideInputs', class: Google::Apis::DataflowV1b3::SideInputInfo, decorator: Google::Apis::DataflowV1b3::SideInputInfo::Representation + collection :multi_output_infos, as: 'multiOutputInfos', class: Google::Apis::DataflowV1b3::MultiOutputInfo, decorator: Google::Apis::DataflowV1b3::MultiOutputInfo::Representation + end end class MetricUpdate # @private class Representation < Google::Apis::Core::JsonRepresentation + property :update_time, as: 'updateTime' + property :name, as: 'name', class: Google::Apis::DataflowV1b3::MetricStructuredName, decorator: Google::Apis::DataflowV1b3::MetricStructuredName::Representation + property :set, as: 'set' property :cumulative, as: 'cumulative' property :internal, as: 'internal' @@ -754,9 +1272,6 @@ module Google property :scalar, as: 'scalar' property :mean_count, as: 'meanCount' property :mean_sum, as: 'meanSum' - property :update_time, as: 'updateTime' - property :name, as: 'name', class: Google::Apis::DataflowV1b3::MetricStructuredName, decorator: Google::Apis::DataflowV1b3::MetricStructuredName::Representation - end end @@ -768,9 +1283,9 @@ module Google property :original_step_name, as: 'originalStepName' property :worker_id, as: 'workerId' property :origin_namespace, as: 'originNamespace' - property :origin, as: 'origin' property :name, as: 'name' property :execution_step_name, as: 'executionStepName' + property :origin, as: 'origin' end end @@ -797,11 +1312,11 @@ module Google class TemplateMetadata # @private class Representation < Google::Apis::Core::JsonRepresentation - property :bypass_temp_dir_validation, as: 'bypassTempDirValidation' property :name, as: 'name' collection :parameters, as: 'parameters', class: Google::Apis::DataflowV1b3::ParameterMetadata, decorator: Google::Apis::DataflowV1b3::ParameterMetadata::Representation property :description, as: 'description' + property :bypass_temp_dir_validation, as: 'bypassTempDirValidation' end end @@ -846,20 +1361,20 @@ module Google property :structured_name_and_metadata, as: 'structuredNameAndMetadata', class: Google::Apis::DataflowV1b3::CounterStructuredNameAndMetadata, decorator: Google::Apis::DataflowV1b3::CounterStructuredNameAndMetadata::Representation - property :floating_point, as: 'floatingPoint' property :integer_mean, as: 'integerMean', class: Google::Apis::DataflowV1b3::IntegerMean, decorator: Google::Apis::DataflowV1b3::IntegerMean::Representation - property :cumulative, as: 'cumulative' + property :floating_point, as: 'floatingPoint' property :internal, as: 'internal' + property :cumulative, as: 'cumulative' property :floating_point_mean, as: 'floatingPointMean', class: Google::Apis::DataflowV1b3::FloatingPointMean, decorator: Google::Apis::DataflowV1b3::FloatingPointMean::Representation property :boolean, as: 'boolean' property :name_and_kind, as: 'nameAndKind', class: Google::Apis::DataflowV1b3::NameAndKind, decorator: Google::Apis::DataflowV1b3::NameAndKind::Representation - property :distribution, as: 'distribution', class: Google::Apis::DataflowV1b3::DistributionUpdate, decorator: Google::Apis::DataflowV1b3::DistributionUpdate::Representation - property :string_list, as: 'stringList', class: Google::Apis::DataflowV1b3::StringList, decorator: Google::Apis::DataflowV1b3::StringList::Representation + property :distribution, as: 'distribution', class: Google::Apis::DataflowV1b3::DistributionUpdate, decorator: Google::Apis::DataflowV1b3::DistributionUpdate::Representation + property :short_id, as: 'shortId' end end @@ -891,14 +1406,14 @@ module Google class SourceFork # @private class Representation < Google::Apis::Core::JsonRepresentation - property :primary_source, as: 'primarySource', class: Google::Apis::DataflowV1b3::DerivedSource, decorator: Google::Apis::DataflowV1b3::DerivedSource::Representation - - property :residual, as: 'residual', class: Google::Apis::DataflowV1b3::SourceSplitShard, decorator: Google::Apis::DataflowV1b3::SourceSplitShard::Representation - property :residual_source, as: 'residualSource', class: Google::Apis::DataflowV1b3::DerivedSource, decorator: Google::Apis::DataflowV1b3::DerivedSource::Representation property :primary, as: 'primary', class: Google::Apis::DataflowV1b3::SourceSplitShard, decorator: Google::Apis::DataflowV1b3::SourceSplitShard::Representation + property :primary_source, as: 'primarySource', class: Google::Apis::DataflowV1b3::DerivedSource, decorator: Google::Apis::DataflowV1b3::DerivedSource::Representation + + property :residual, as: 'residual', class: Google::Apis::DataflowV1b3::SourceSplitShard, decorator: Google::Apis::DataflowV1b3::SourceSplitShard::Representation + end end @@ -915,10 +1430,10 @@ module Google collection :counter_updates, as: 'counterUpdates', class: Google::Apis::DataflowV1b3::CounterUpdate, decorator: Google::Apis::DataflowV1b3::CounterUpdate::Representation property :work_item_id, as: 'workItemId' - collection :metric_updates, as: 'metricUpdates', class: Google::Apis::DataflowV1b3::MetricUpdate, decorator: Google::Apis::DataflowV1b3::MetricUpdate::Representation - collection :errors, as: 'errors', class: Google::Apis::DataflowV1b3::Status, decorator: Google::Apis::DataflowV1b3::Status::Representation + collection :metric_updates, as: 'metricUpdates', class: Google::Apis::DataflowV1b3::MetricUpdate, decorator: Google::Apis::DataflowV1b3::MetricUpdate::Representation + property :dynamic_source_split, as: 'dynamicSourceSplit', class: Google::Apis::DataflowV1b3::DynamicSourceSplit, decorator: Google::Apis::DataflowV1b3::DynamicSourceSplit::Representation property :source_operation_response, as: 'sourceOperationResponse', class: Google::Apis::DataflowV1b3::SourceOperationResponse, decorator: Google::Apis::DataflowV1b3::SourceOperationResponse::Representation @@ -949,6 +1464,8 @@ module Google class WorkItemServiceState # @private class Representation < Google::Apis::Core::JsonRepresentation + property :split_request, as: 'splitRequest', class: Google::Apis::DataflowV1b3::ApproximateSplitRequest, decorator: Google::Apis::DataflowV1b3::ApproximateSplitRequest::Representation + property :report_status_interval, as: 'reportStatusInterval' property :suggested_stop_position, as: 'suggestedStopPosition', class: Google::Apis::DataflowV1b3::Position, decorator: Google::Apis::DataflowV1b3::Position::Representation @@ -959,8 +1476,6 @@ module Google property :next_report_index, as: 'nextReportIndex' property :suggested_stop_point, as: 'suggestedStopPoint', class: Google::Apis::DataflowV1b3::ApproximateProgress, decorator: Google::Apis::DataflowV1b3::ApproximateProgress::Representation - property :split_request, as: 'splitRequest', class: Google::Apis::DataflowV1b3::ApproximateSplitRequest, decorator: Google::Apis::DataflowV1b3::ApproximateSplitRequest::Representation - end end @@ -992,10 +1507,10 @@ module Google class KeyRangeLocation # @private class Representation < Google::Apis::Core::JsonRepresentation + property :deprecated_persistent_directory, as: 'deprecatedPersistentDirectory' property :delivery_endpoint, as: 'deliveryEndpoint' property :start, as: 'start' property :data_disk, as: 'dataDisk' - property :persistent_directory, as: 'persistentDirectory' property :end, as: 'end' end end @@ -1008,20 +1523,6 @@ module Google end end - class SeqMapTask - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - collection :output_infos, as: 'outputInfos', class: Google::Apis::DataflowV1b3::SeqMapTaskOutputInfo, decorator: Google::Apis::DataflowV1b3::SeqMapTaskOutputInfo::Representation - - collection :inputs, as: 'inputs', class: Google::Apis::DataflowV1b3::SideInputInfo, decorator: Google::Apis::DataflowV1b3::SideInputInfo::Representation - - property :stage_name, as: 'stageName' - property :system_name, as: 'systemName' - hash :user_fn, as: 'userFn' - end - end - class NameAndKind # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1030,11 +1531,25 @@ module Google end end + class SeqMapTask + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :inputs, as: 'inputs', class: Google::Apis::DataflowV1b3::SideInputInfo, decorator: Google::Apis::DataflowV1b3::SideInputInfo::Representation + + property :stage_name, as: 'stageName' + property :system_name, as: 'systemName' + hash :user_fn, as: 'userFn' + property :name, as: 'name' + collection :output_infos, as: 'outputInfos', class: Google::Apis::DataflowV1b3::SeqMapTaskOutputInfo, decorator: Google::Apis::DataflowV1b3::SeqMapTaskOutputInfo::Representation + + end + end + class WorkerMessageCode # @private class Representation < Google::Apis::Core::JsonRepresentation - hash :parameters, as: 'parameters' property :code, as: 'code' + hash :parameters, as: 'parameters' end end @@ -1048,19 +1563,19 @@ module Google class MapTask # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :instructions, as: 'instructions', class: Google::Apis::DataflowV1b3::ParallelInstruction, decorator: Google::Apis::DataflowV1b3::ParallelInstruction::Representation - property :system_name, as: 'systemName' property :stage_name, as: 'stageName' + collection :instructions, as: 'instructions', class: Google::Apis::DataflowV1b3::ParallelInstruction, decorator: Google::Apis::DataflowV1b3::ParallelInstruction::Representation + end end class FloatingPointMean # @private class Representation < Google::Apis::Core::JsonRepresentation - property :sum, as: 'sum' property :count, as: 'count', class: Google::Apis::DataflowV1b3::SplitInt64, decorator: Google::Apis::DataflowV1b3::SplitInt64::Representation + property :sum, as: 'sum' end end @@ -1075,23 +1590,23 @@ module Google class InstructionOutput # @private class Representation < Google::Apis::Core::JsonRepresentation - property :system_name, as: 'systemName' - property :only_count_key_bytes, as: 'onlyCountKeyBytes' - property :only_count_value_bytes, as: 'onlyCountValueBytes' hash :codec, as: 'codec' property :name, as: 'name' property :original_name, as: 'originalName' + property :system_name, as: 'systemName' + property :only_count_key_bytes, as: 'onlyCountKeyBytes' + property :only_count_value_bytes, as: 'onlyCountValueBytes' end end class CreateJobFromTemplateRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + hash :parameters, as: 'parameters' + property :job_name, as: 'jobName' property :gcs_path, as: 'gcsPath' property :environment, as: 'environment', class: Google::Apis::DataflowV1b3::RuntimeEnvironment, decorator: Google::Apis::DataflowV1b3::RuntimeEnvironment::Representation - hash :parameters, as: 'parameters' - property :job_name, as: 'jobName' end end @@ -1164,17 +1679,35 @@ module Google class Representation < Google::Apis::Core::JsonRepresentation property :job, as: 'job', class: Google::Apis::DataflowV1b3::Job, decorator: Google::Apis::DataflowV1b3::Job::Representation - property :status, as: 'status', class: Google::Apis::DataflowV1b3::Status, decorator: Google::Apis::DataflowV1b3::Status::Representation - end end - class DerivedSource + class Job # @private class Representation < Google::Apis::Core::JsonRepresentation - property :derivation_mode, as: 'derivationMode' - property :source, as: 'source', class: Google::Apis::DataflowV1b3::Source, decorator: Google::Apis::DataflowV1b3::Source::Representation + property :project_id, as: 'projectId' + property :type, as: 'type' + property :pipeline_description, as: 'pipelineDescription', class: Google::Apis::DataflowV1b3::PipelineDescription, decorator: Google::Apis::DataflowV1b3::PipelineDescription::Representation + property :replace_job_id, as: 'replaceJobId' + property :requested_state, as: 'requestedState' + collection :temp_files, as: 'tempFiles' + property :client_request_id, as: 'clientRequestId' + property :name, as: 'name' + property :replaced_by_job_id, as: 'replacedByJobId' + collection :steps, as: 'steps', class: Google::Apis::DataflowV1b3::Step, decorator: Google::Apis::DataflowV1b3::Step::Representation + + property :id, as: 'id' + property :execution_info, as: 'executionInfo', class: Google::Apis::DataflowV1b3::JobExecutionInfo, decorator: Google::Apis::DataflowV1b3::JobExecutionInfo::Representation + + property :current_state, as: 'currentState' + property :location, as: 'location' + property :current_state_time, as: 'currentStateTime' + hash :transform_name_mapping, as: 'transformNameMapping' + property :environment, as: 'environment', class: Google::Apis::DataflowV1b3::Environment, decorator: Google::Apis::DataflowV1b3::Environment::Representation + + hash :labels, as: 'labels' + property :create_time, as: 'createTime' end end @@ -1188,32 +1721,12 @@ module Google end end - class Job + class DerivedSource # @private class Representation < Google::Apis::Core::JsonRepresentation - property :pipeline_description, as: 'pipelineDescription', class: Google::Apis::DataflowV1b3::PipelineDescription, decorator: Google::Apis::DataflowV1b3::PipelineDescription::Representation + property :derivation_mode, as: 'derivationMode' + property :source, as: 'source', class: Google::Apis::DataflowV1b3::Source, decorator: Google::Apis::DataflowV1b3::Source::Representation - property :replace_job_id, as: 'replaceJobId' - property :requested_state, as: 'requestedState' - collection :temp_files, as: 'tempFiles' - property :client_request_id, as: 'clientRequestId' - property :name, as: 'name' - property :replaced_by_job_id, as: 'replacedByJobId' - collection :steps, as: 'steps', class: Google::Apis::DataflowV1b3::Step, decorator: Google::Apis::DataflowV1b3::Step::Representation - - property :execution_info, as: 'executionInfo', class: Google::Apis::DataflowV1b3::JobExecutionInfo, decorator: Google::Apis::DataflowV1b3::JobExecutionInfo::Representation - - property :id, as: 'id' - property :current_state, as: 'currentState' - property :location, as: 'location' - property :current_state_time, as: 'currentStateTime' - hash :transform_name_mapping, as: 'transformNameMapping' - hash :labels, as: 'labels' - property :environment, as: 'environment', class: Google::Apis::DataflowV1b3::Environment, decorator: Google::Apis::DataflowV1b3::Environment::Representation - - property :create_time, as: 'createTime' - property :type, as: 'type' - property :project_id, as: 'projectId' end end @@ -1246,10 +1759,10 @@ module Google class CounterStructuredNameAndMetadata # @private class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name', class: Google::Apis::DataflowV1b3::CounterStructuredName, decorator: Google::Apis::DataflowV1b3::CounterStructuredName::Representation - property :metadata, as: 'metadata', class: Google::Apis::DataflowV1b3::CounterMetadata, decorator: Google::Apis::DataflowV1b3::CounterMetadata::Representation + property :name, as: 'name', class: Google::Apis::DataflowV1b3::CounterStructuredName, decorator: Google::Apis::DataflowV1b3::CounterStructuredName::Representation + end end @@ -1265,10 +1778,10 @@ module Google class WriteInstruction # @private class Representation < Google::Apis::Core::JsonRepresentation - property :input, as: 'input', class: Google::Apis::DataflowV1b3::InstructionInput, decorator: Google::Apis::DataflowV1b3::InstructionInput::Representation - property :sink, as: 'sink', class: Google::Apis::DataflowV1b3::Sink, decorator: Google::Apis::DataflowV1b3::Sink::Representation + property :input, as: 'input', class: Google::Apis::DataflowV1b3::InstructionInput, decorator: Google::Apis::DataflowV1b3::InstructionInput::Representation + end end @@ -1284,8 +1797,8 @@ module Google class AutoscalingSettings # @private class Representation < Google::Apis::Core::JsonRepresentation - property :max_num_workers, as: 'maxNumWorkers' property :algorithm, as: 'algorithm' + property :max_num_workers, as: 'maxNumWorkers' end end @@ -1317,25 +1830,24 @@ module Google class SourceSplitShard # @private class Representation < Google::Apis::Core::JsonRepresentation - property :derivation_mode, as: 'derivationMode' property :source, as: 'source', class: Google::Apis::DataflowV1b3::Source, decorator: Google::Apis::DataflowV1b3::Source::Representation + property :derivation_mode, as: 'derivationMode' end end class CpuTime # @private class Representation < Google::Apis::Core::JsonRepresentation - property :rate, as: 'rate' property :timestamp, as: 'timestamp' property :total_ms, as: 'totalMs' + property :rate, as: 'rate' end end class Environment # @private class Representation < Google::Apis::Core::JsonRepresentation - property :service_account_email, as: 'serviceAccountEmail' hash :user_agent, as: 'userAgent' hash :sdk_pipeline_options, as: 'sdkPipelineOptions' property :cluster_manager_api_service, as: 'clusterManagerApiService' @@ -1344,19 +1856,20 @@ module Google property :dataset, as: 'dataset' collection :experiments, as: 'experiments' - hash :version, as: 'version' hash :internal_experiments, as: 'internalExperiments' + hash :version, as: 'version' + property :service_account_email, as: 'serviceAccountEmail' end end class StreamingComputationTask # @private class Representation < Google::Apis::Core::JsonRepresentation - property :task_type, as: 'taskType' collection :computation_ranges, as: 'computationRanges', class: Google::Apis::DataflowV1b3::StreamingComputationRanges, decorator: Google::Apis::DataflowV1b3::StreamingComputationRanges::Representation collection :data_disks, as: 'dataDisks', class: Google::Apis::DataflowV1b3::MountedDataDisk, decorator: Google::Apis::DataflowV1b3::MountedDataDisk::Representation + property :task_type, as: 'taskType' end end @@ -1401,8 +1914,8 @@ module Google class Representation < Google::Apis::Core::JsonRepresentation property :with_attributes, as: 'withAttributes' property :id_label, as: 'idLabel' - property :timestamp_label, as: 'timestampLabel' property :topic, as: 'topic' + property :timestamp_label, as: 'timestampLabel' property :subscription, as: 'subscription' property :drop_late_data, as: 'dropLateData' property :tracking_subscription, as: 'trackingSubscription' @@ -1422,10 +1935,10 @@ module Google class JobMessage # @private class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' property :message_text, as: 'messageText' property :message_importance, as: 'messageImportance' property :time, as: 'time' + property :id, as: 'id' end end @@ -1465,14 +1978,6 @@ module Google end end - class MetricShortId - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :metric_index, as: 'metricIndex' - property :short_id, as: 'shortId' - end - end - class ShellTask # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1481,21 +1986,26 @@ module Google end end + class MetricShortId + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :short_id, as: 'shortId' + property :metric_index, as: 'metricIndex' + end + end + class TaskRunnerSettings # @private class Representation < Google::Apis::Core::JsonRepresentation - property :task_group, as: 'taskGroup' - property :harness_command, as: 'harnessCommand' - property :log_dir, as: 'logDir' - property :dataflow_api_version, as: 'dataflowApiVersion' collection :oauth_scopes, as: 'oauthScopes' - property :streaming_worker_main_class, as: 'streamingWorkerMainClass' + property :dataflow_api_version, as: 'dataflowApiVersion' property :log_upload_location, as: 'logUploadLocation' + property :streaming_worker_main_class, as: 'streamingWorkerMainClass' property :workflow_file_name, as: 'workflowFileName' - property :temp_storage_prefix, as: 'tempStoragePrefix' - property :base_task_dir, as: 'baseTaskDir' - property :commandlines_file_name, as: 'commandlinesFileName' property :language_hint, as: 'languageHint' + property :commandlines_file_name, as: 'commandlinesFileName' + property :base_task_dir, as: 'baseTaskDir' + property :temp_storage_prefix, as: 'tempStoragePrefix' property :base_url, as: 'baseUrl' property :log_to_serialconsole, as: 'logToSerialconsole' property :continue_on_exception, as: 'continueOnException' @@ -1504,534 +2014,22 @@ module Google property :task_user, as: 'taskUser' property :vm_id, as: 'vmId' property :alsologtostderr, as: 'alsologtostderr' + property :task_group, as: 'taskGroup' + property :harness_command, as: 'harnessCommand' + property :log_dir, as: 'logDir' end end class Position # @private class Representation < Google::Apis::Core::JsonRepresentation + property :record_index, as: 'recordIndex' + property :shuffle_position, as: 'shufflePosition' property :concat_position, as: 'concatPosition', class: Google::Apis::DataflowV1b3::ConcatPosition, decorator: Google::Apis::DataflowV1b3::ConcatPosition::Representation property :byte_offset, as: 'byteOffset' property :end, as: 'end' property :key, as: 'key' - property :record_index, as: 'recordIndex' - property :shuffle_position, as: 'shufflePosition' - end - end - - class SplitInt64 - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :low_bits, as: 'lowBits' - property :high_bits, as: 'highBits' - end - end - - class Source - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :metadata, as: 'metadata', class: Google::Apis::DataflowV1b3::SourceMetadata, decorator: Google::Apis::DataflowV1b3::SourceMetadata::Representation - - collection :base_specs, as: 'baseSpecs' - hash :codec, as: 'codec' - property :does_not_need_splitting, as: 'doesNotNeedSplitting' - hash :spec, as: 'spec' - end - end - - class WorkerPool - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :teardown_policy, as: 'teardownPolicy' - property :on_host_maintenance, as: 'onHostMaintenance' - hash :pool_args, as: 'poolArgs' - property :disk_size_gb, as: 'diskSizeGb' - property :worker_harness_container_image, as: 'workerHarnessContainerImage' - property :machine_type, as: 'machineType' - property :disk_type, as: 'diskType' - property :kind, as: 'kind' - collection :data_disks, as: 'dataDisks', class: Google::Apis::DataflowV1b3::Disk, decorator: Google::Apis::DataflowV1b3::Disk::Representation - - property :subnetwork, as: 'subnetwork' - property :ip_configuration, as: 'ipConfiguration' - property :autoscaling_settings, as: 'autoscalingSettings', class: Google::Apis::DataflowV1b3::AutoscalingSettings, decorator: Google::Apis::DataflowV1b3::AutoscalingSettings::Representation - - property :taskrunner_settings, as: 'taskrunnerSettings', class: Google::Apis::DataflowV1b3::TaskRunnerSettings, decorator: Google::Apis::DataflowV1b3::TaskRunnerSettings::Representation - - hash :metadata, as: 'metadata' - property :default_package_set, as: 'defaultPackageSet' - property :network, as: 'network' - property :num_threads_per_worker, as: 'numThreadsPerWorker' - property :zone, as: 'zone' - property :num_workers, as: 'numWorkers' - property :disk_source_image, as: 'diskSourceImage' - collection :packages, as: 'packages', class: Google::Apis::DataflowV1b3::Package, decorator: Google::Apis::DataflowV1b3::Package::Representation - - end - end - - class SourceOperationRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :get_metadata, as: 'getMetadata', class: Google::Apis::DataflowV1b3::SourceGetMetadataRequest, decorator: Google::Apis::DataflowV1b3::SourceGetMetadataRequest::Representation - - property :split, as: 'split', class: Google::Apis::DataflowV1b3::SourceSplitRequest, decorator: Google::Apis::DataflowV1b3::SourceSplitRequest::Representation - - end - end - - class WorkItem - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :initial_report_index, as: 'initialReportIndex' - property :streaming_computation_task, as: 'streamingComputationTask', class: Google::Apis::DataflowV1b3::StreamingComputationTask, decorator: Google::Apis::DataflowV1b3::StreamingComputationTask::Representation - - property :shell_task, as: 'shellTask', class: Google::Apis::DataflowV1b3::ShellTask, decorator: Google::Apis::DataflowV1b3::ShellTask::Representation - - property :job_id, as: 'jobId' - property :id, as: 'id' - property :configuration, as: 'configuration' - property :map_task, as: 'mapTask', class: Google::Apis::DataflowV1b3::MapTask, decorator: Google::Apis::DataflowV1b3::MapTask::Representation - - property :seq_map_task, as: 'seqMapTask', class: Google::Apis::DataflowV1b3::SeqMapTask, decorator: Google::Apis::DataflowV1b3::SeqMapTask::Representation - - collection :packages, as: 'packages', class: Google::Apis::DataflowV1b3::Package, decorator: Google::Apis::DataflowV1b3::Package::Representation - - property :project_id, as: 'projectId' - property :report_status_interval, as: 'reportStatusInterval' - property :streaming_setup_task, as: 'streamingSetupTask', class: Google::Apis::DataflowV1b3::StreamingSetupTask, decorator: Google::Apis::DataflowV1b3::StreamingSetupTask::Representation - - property :source_operation_task, as: 'sourceOperationTask', class: Google::Apis::DataflowV1b3::SourceOperationRequest, decorator: Google::Apis::DataflowV1b3::SourceOperationRequest::Representation - - property :lease_expire_time, as: 'leaseExpireTime' - property :streaming_config_task, as: 'streamingConfigTask', class: Google::Apis::DataflowV1b3::StreamingConfigTask, decorator: Google::Apis::DataflowV1b3::StreamingConfigTask::Representation - - end - end - - class ResourceUtilizationReport - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :cpu_time, as: 'cpuTime', class: Google::Apis::DataflowV1b3::CpuTime, decorator: Google::Apis::DataflowV1b3::CpuTime::Representation - - end - end - - class ReportedParallelism - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :is_infinite, as: 'isInfinite' - property :value, as: 'value' - end - end - - class TopologyConfig - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :computations, as: 'computations', class: Google::Apis::DataflowV1b3::ComputationTopology, decorator: Google::Apis::DataflowV1b3::ComputationTopology::Representation - - collection :data_disk_assignments, as: 'dataDiskAssignments', class: Google::Apis::DataflowV1b3::DataDiskAssignment, decorator: Google::Apis::DataflowV1b3::DataDiskAssignment::Representation - - property :persistent_state_version, as: 'persistentStateVersion' - property :forwarding_key_bits, as: 'forwardingKeyBits' - hash :user_stage_to_computation_name_map, as: 'userStageToComputationNameMap' - end - end - - class SourceSplitOptions - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :desired_bundle_size_bytes, as: 'desiredBundleSizeBytes' - property :desired_shard_size_bytes, as: 'desiredShardSizeBytes' - end - end - - class ReadInstruction - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :source, as: 'source', class: Google::Apis::DataflowV1b3::Source, decorator: Google::Apis::DataflowV1b3::Source::Representation - - end - end - - class WorkerSettings - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :temp_storage_prefix, as: 'tempStoragePrefix' - property :base_url, as: 'baseUrl' - property :reporting_enabled, as: 'reportingEnabled' - property :service_path, as: 'servicePath' - property :shuffle_service_path, as: 'shuffleServicePath' - property :worker_id, as: 'workerId' - end - end - - class StreamingStageLocation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :stream_id, as: 'streamId' - end - end - - class DataDiskAssignment - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :vm_instance, as: 'vmInstance' - collection :data_disks, as: 'dataDisks' - end - end - - class ApproximateSplitRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :position, as: 'position', class: Google::Apis::DataflowV1b3::Position, decorator: Google::Apis::DataflowV1b3::Position::Representation - - property :fraction_consumed, as: 'fractionConsumed' - end - end - - class Status - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - property :message, as: 'message' - collection :details, as: 'details' - end - end - - class StreamLocation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :custom_source_location, as: 'customSourceLocation', class: Google::Apis::DataflowV1b3::CustomSourceLocation, decorator: Google::Apis::DataflowV1b3::CustomSourceLocation::Representation - - property :streaming_stage_location, as: 'streamingStageLocation', class: Google::Apis::DataflowV1b3::StreamingStageLocation, decorator: Google::Apis::DataflowV1b3::StreamingStageLocation::Representation - - property :pubsub_location, as: 'pubsubLocation', class: Google::Apis::DataflowV1b3::PubsubLocation, decorator: Google::Apis::DataflowV1b3::PubsubLocation::Representation - - property :side_input_location, as: 'sideInputLocation', class: Google::Apis::DataflowV1b3::StreamingSideInputLocation, decorator: Google::Apis::DataflowV1b3::StreamingSideInputLocation::Representation - - end - end - - class SendWorkerMessagesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :worker_message_responses, as: 'workerMessageResponses', class: Google::Apis::DataflowV1b3::WorkerMessageResponse, decorator: Google::Apis::DataflowV1b3::WorkerMessageResponse::Representation - - end - end - - class StreamingComputationConfig - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :system_name, as: 'systemName' - property :stage_name, as: 'stageName' - collection :instructions, as: 'instructions', class: Google::Apis::DataflowV1b3::ParallelInstruction, decorator: Google::Apis::DataflowV1b3::ParallelInstruction::Representation - - property :computation_id, as: 'computationId' - end - end - - class TransformSummary - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - collection :display_data, as: 'displayData', class: Google::Apis::DataflowV1b3::DisplayData, decorator: Google::Apis::DataflowV1b3::DisplayData::Representation - - collection :output_collection_name, as: 'outputCollectionName' - property :kind, as: 'kind' - collection :input_collection_name, as: 'inputCollectionName' - property :name, as: 'name' - end - end - - class LeaseWorkItemResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :work_items, as: 'workItems', class: Google::Apis::DataflowV1b3::WorkItem, decorator: Google::Apis::DataflowV1b3::WorkItem::Representation - - end - end - - class LaunchTemplateParameters - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :job_name, as: 'jobName' - property :environment, as: 'environment', class: Google::Apis::DataflowV1b3::RuntimeEnvironment, decorator: Google::Apis::DataflowV1b3::RuntimeEnvironment::Representation - - hash :parameters, as: 'parameters' - end - end - - class Sink - # @private - class Representation < Google::Apis::Core::JsonRepresentation - hash :codec, as: 'codec' - hash :spec, as: 'spec' - end - end - - class FlattenInstruction - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :inputs, as: 'inputs', class: Google::Apis::DataflowV1b3::InstructionInput, decorator: Google::Apis::DataflowV1b3::InstructionInput::Representation - - end - end - - class PartialGroupByKeyInstruction - # @private - class Representation < Google::Apis::Core::JsonRepresentation - hash :input_element_codec, as: 'inputElementCodec' - hash :value_combining_fn, as: 'valueCombiningFn' - property :original_combine_values_input_store_name, as: 'originalCombineValuesInputStoreName' - property :original_combine_values_step_name, as: 'originalCombineValuesStepName' - collection :side_inputs, as: 'sideInputs', class: Google::Apis::DataflowV1b3::SideInputInfo, decorator: Google::Apis::DataflowV1b3::SideInputInfo::Representation - - property :input, as: 'input', class: Google::Apis::DataflowV1b3::InstructionInput, decorator: Google::Apis::DataflowV1b3::InstructionInput::Representation - - end - end - - class InstructionInput - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :producer_instruction_index, as: 'producerInstructionIndex' - property :output_num, as: 'outputNum' - end - end - - class StageSource - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :original_transform_or_collection, as: 'originalTransformOrCollection' - property :name, as: 'name' - property :size_bytes, as: 'sizeBytes' - property :user_name, as: 'userName' - end - end - - class StringList - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :elements, as: 'elements' - end - end - - class DisplayData - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :duration_value, as: 'durationValue' - property :int64_value, as: 'int64Value' - property :namespace, as: 'namespace' - property :float_value, as: 'floatValue' - property :key, as: 'key' - property :short_str_value, as: 'shortStrValue' - property :label, as: 'label' - property :url, as: 'url' - property :timestamp_value, as: 'timestampValue' - property :bool_value, as: 'boolValue' - property :java_class_value, as: 'javaClassValue' - property :str_value, as: 'strValue' - end - end - - class GetDebugConfigRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :component_id, as: 'componentId' - property :worker_id, as: 'workerId' - end - end - - class LeaseWorkItemRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :current_worker_time, as: 'currentWorkerTime' - property :location, as: 'location' - collection :work_item_types, as: 'workItemTypes' - collection :worker_capabilities, as: 'workerCapabilities' - property :worker_id, as: 'workerId' - property :requested_lease_duration, as: 'requestedLeaseDuration' - end - end - - class GetTemplateResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :status, as: 'status', class: Google::Apis::DataflowV1b3::Status, decorator: Google::Apis::DataflowV1b3::Status::Representation - - property :metadata, as: 'metadata', class: Google::Apis::DataflowV1b3::TemplateMetadata, decorator: Google::Apis::DataflowV1b3::TemplateMetadata::Representation - - end - end - - class ReportWorkItemStatusRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :worker_id, as: 'workerId' - property :current_worker_time, as: 'currentWorkerTime' - property :location, as: 'location' - collection :work_item_statuses, as: 'workItemStatuses', class: Google::Apis::DataflowV1b3::WorkItemStatus, decorator: Google::Apis::DataflowV1b3::WorkItemStatus::Representation - - end - end - - class StreamingConfigTask - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :streaming_computation_configs, as: 'streamingComputationConfigs', class: Google::Apis::DataflowV1b3::StreamingComputationConfig, decorator: Google::Apis::DataflowV1b3::StreamingComputationConfig::Representation - - hash :user_step_to_state_family_name_map, as: 'userStepToStateFamilyNameMap' - end - end - - class PipelineDescription - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :original_pipeline_transform, as: 'originalPipelineTransform', class: Google::Apis::DataflowV1b3::TransformSummary, decorator: Google::Apis::DataflowV1b3::TransformSummary::Representation - - collection :display_data, as: 'displayData', class: Google::Apis::DataflowV1b3::DisplayData, decorator: Google::Apis::DataflowV1b3::DisplayData::Representation - - collection :execution_pipeline_stage, as: 'executionPipelineStage', class: Google::Apis::DataflowV1b3::ExecutionStageSummary, decorator: Google::Apis::DataflowV1b3::ExecutionStageSummary::Representation - - end - end - - class Step - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :kind, as: 'kind' - hash :properties, as: 'properties' - end - end - - class JobExecutionInfo - # @private - class Representation < Google::Apis::Core::JsonRepresentation - hash :stages, as: 'stages', class: Google::Apis::DataflowV1b3::JobExecutionStageInfo, decorator: Google::Apis::DataflowV1b3::JobExecutionStageInfo::Representation - - end - end - - class FailedLocation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - end - end - - class Disk - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :size_gb, as: 'sizeGb' - property :disk_type, as: 'diskType' - property :mount_point, as: 'mountPoint' - end - end - - class CounterMetadata - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :standard_units, as: 'standardUnits' - property :other_units, as: 'otherUnits' - property :kind, as: 'kind' - property :description, as: 'description' - end - end - - class ListJobMessagesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :job_messages, as: 'jobMessages', class: Google::Apis::DataflowV1b3::JobMessage, decorator: Google::Apis::DataflowV1b3::JobMessage::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - class ApproximateReportedProgress - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :remaining_parallelism, as: 'remainingParallelism', class: Google::Apis::DataflowV1b3::ReportedParallelism, decorator: Google::Apis::DataflowV1b3::ReportedParallelism::Representation - - property :position, as: 'position', class: Google::Apis::DataflowV1b3::Position, decorator: Google::Apis::DataflowV1b3::Position::Representation - - property :fraction_consumed, as: 'fractionConsumed' - property :consumed_parallelism, as: 'consumedParallelism', class: Google::Apis::DataflowV1b3::ReportedParallelism, decorator: Google::Apis::DataflowV1b3::ReportedParallelism::Representation - - end - end - - class StateFamilyConfig - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :is_read, as: 'isRead' - property :state_family, as: 'stateFamily' - end - end - - class IntegerList - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :elements, as: 'elements', class: Google::Apis::DataflowV1b3::SplitInt64, decorator: Google::Apis::DataflowV1b3::SplitInt64::Representation - - end - end - - class ResourceUtilizationReportResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - class SourceSplitResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :outcome, as: 'outcome' - collection :bundles, as: 'bundles', class: Google::Apis::DataflowV1b3::DerivedSource, decorator: Google::Apis::DataflowV1b3::DerivedSource::Representation - - collection :shards, as: 'shards', class: Google::Apis::DataflowV1b3::SourceSplitShard, decorator: Google::Apis::DataflowV1b3::SourceSplitShard::Representation - - end - end - - class ParallelInstruction - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :outputs, as: 'outputs', class: Google::Apis::DataflowV1b3::InstructionOutput, decorator: Google::Apis::DataflowV1b3::InstructionOutput::Representation - - property :name, as: 'name' - property :par_do, as: 'parDo', class: Google::Apis::DataflowV1b3::ParDoInstruction, decorator: Google::Apis::DataflowV1b3::ParDoInstruction::Representation - - property :read, as: 'read', class: Google::Apis::DataflowV1b3::ReadInstruction, decorator: Google::Apis::DataflowV1b3::ReadInstruction::Representation - - property :original_name, as: 'originalName' - property :flatten, as: 'flatten', class: Google::Apis::DataflowV1b3::FlattenInstruction, decorator: Google::Apis::DataflowV1b3::FlattenInstruction::Representation - - property :write, as: 'write', class: Google::Apis::DataflowV1b3::WriteInstruction, decorator: Google::Apis::DataflowV1b3::WriteInstruction::Representation - - property :system_name, as: 'systemName' - property :partial_group_by_key, as: 'partialGroupByKey', class: Google::Apis::DataflowV1b3::PartialGroupByKeyInstruction, decorator: Google::Apis::DataflowV1b3::PartialGroupByKeyInstruction::Representation - - end - end - - class Package - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :location, as: 'location' - end - end - - class KeyRangeDataDiskAssignment - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :start, as: 'start' - property :data_disk, as: 'dataDisk' - property :end, as: 'end' end end end diff --git a/generated/google/apis/dataflow_v1b3/service.rb b/generated/google/apis/dataflow_v1b3/service.rb index 11a66f820..2202fd58f 100644 --- a/generated/google/apis/dataflow_v1b3/service.rb +++ b/generated/google/apis/dataflow_v1b3/service.rb @@ -50,11 +50,11 @@ module Google # @param [String] project_id # The project to send the WorkerMessages to. # @param [Google::Apis::DataflowV1b3::SendWorkerMessagesRequest] send_worker_messages_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -67,33 +67,32 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def worker_project_messages(project_id, send_worker_messages_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def worker_project_messages(project_id, send_worker_messages_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1b3/projects/{projectId}/WorkerMessages', options) command.request_representation = Google::Apis::DataflowV1b3::SendWorkerMessagesRequest::Representation command.request_object = send_worker_messages_request_object command.response_representation = Google::Apis::DataflowV1b3::SendWorkerMessagesResponse::Representation command.response_class = Google::Apis::DataflowV1b3::SendWorkerMessagesResponse command.params['projectId'] = project_id unless project_id.nil? - command.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 Cloud Dataflow job. + # Gets the state of the specified Cloud Dataflow job. # @param [String] project_id # The ID of the Cloud Platform project that the job belongs to. # @param [String] location # The location that contains this job. - # @param [Google::Apis::DataflowV1b3::Job] job_object + # @param [String] job_id + # The job ID. # @param [String] view # The level of information requested in response. - # @param [String] replace_job_id - # Deprecated. This field is now in the Job message. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not 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,7 +105,134 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_job(project_id, location, job_object = nil, view: nil, replace_job_id: nil, quota_user: nil, fields: nil, options: nil, &block) + def get_project_location_job(project_id, location, job_id, view: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}', options) + command.response_representation = Google::Apis::DataflowV1b3::Job::Representation + command.response_class = Google::Apis::DataflowV1b3::Job + command.params['projectId'] = project_id unless project_id.nil? + command.params['location'] = location unless location.nil? + command.params['jobId'] = job_id unless job_id.nil? + command.query['view'] = view unless view.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # List the jobs of a project. + # @param [String] project_id + # The project which owns the jobs. + # @param [String] location + # The location that contains this job. + # @param [String] page_token + # Set this to the 'next_page_token' field of a previous response + # to request additional results in a long list. + # @param [Fixnum] page_size + # If there are many jobs, limit response to at most this many. + # The actual number of jobs returned will be the lesser of max_responses + # and an unspecified server-defined limit. + # @param [String] view + # Level of information requested in response. Default is `JOB_VIEW_SUMMARY`. + # @param [String] filter + # The kind of filter to use. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::DataflowV1b3::ListJobsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataflowV1b3::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_project_location_jobs(project_id, location, page_token: nil, page_size: nil, view: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1b3/projects/{projectId}/locations/{location}/jobs', options) + command.response_representation = Google::Apis::DataflowV1b3::ListJobsResponse::Representation + command.response_class = Google::Apis::DataflowV1b3::ListJobsResponse + command.params['projectId'] = project_id unless project_id.nil? + command.params['location'] = location unless location.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['view'] = view unless view.nil? + command.query['filter'] = filter unless filter.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates the state of an existing Cloud Dataflow job. + # @param [String] project_id + # The ID of the Cloud Platform project that the job belongs to. + # @param [String] location + # The location that contains this job. + # @param [String] job_id + # The job ID. + # @param [Google::Apis::DataflowV1b3::Job] job_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::DataflowV1b3::Job] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataflowV1b3::Job] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_project_location_job(project_id, location, job_id, job_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}', options) + command.request_representation = Google::Apis::DataflowV1b3::Job::Representation + command.request_object = job_object + command.response_representation = Google::Apis::DataflowV1b3::Job::Representation + command.response_class = Google::Apis::DataflowV1b3::Job + command.params['projectId'] = project_id unless project_id.nil? + command.params['location'] = location unless location.nil? + command.params['jobId'] = job_id unless job_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a Cloud Dataflow job. + # @param [String] project_id + # The ID of the Cloud Platform project that the job belongs to. + # @param [String] location + # The location that contains this job. + # @param [Google::Apis::DataflowV1b3::Job] job_object + # @param [String] replace_job_id + # Deprecated. This field is now in the Job message. + # @param [String] view + # The level of information requested in response. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::DataflowV1b3::Job] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataflowV1b3::Job] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_location_job(project_id, location, job_object = nil, replace_job_id: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1b3/projects/{projectId}/locations/{location}/jobs', options) command.request_representation = Google::Apis::DataflowV1b3::Job::Representation command.request_object = job_object @@ -114,10 +240,10 @@ module Google command.response_class = Google::Apis::DataflowV1b3::Job command.params['projectId'] = project_id unless project_id.nil? command.params['location'] = location unless location.nil? - command.query['view'] = view unless view.nil? command.query['replaceJobId'] = replace_job_id unless replace_job_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['view'] = view unless view.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -131,11 +257,11 @@ module Google # @param [String] start_time # Return only metric data that has changed since this time. # Default is to return all information about all metrics for the job. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -148,7 +274,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_location_job_metrics(project_id, location, job_id, start_time: nil, quota_user: nil, fields: nil, options: nil, &block) + def get_project_location_job_metrics(project_id, location, job_id, start_time: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/metrics', options) command.response_representation = Google::Apis::DataflowV1b3::JobMetrics::Representation command.response_class = Google::Apis::DataflowV1b3::JobMetrics @@ -156,191 +282,8 @@ module Google command.params['location'] = location unless location.nil? command.params['jobId'] = job_id unless job_id.nil? command.query['startTime'] = start_time unless start_time.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Gets the state of the specified Cloud Dataflow job. - # @param [String] project_id - # The ID of the Cloud Platform project that the job belongs to. - # @param [String] location - # The location that contains this job. - # @param [String] job_id - # The job ID. - # @param [String] view - # The level of information requested in response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::DataflowV1b3::Job] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DataflowV1b3::Job] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_location_job(project_id, location, job_id, view: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}', options) - command.response_representation = Google::Apis::DataflowV1b3::Job::Representation - command.response_class = Google::Apis::DataflowV1b3::Job - command.params['projectId'] = project_id unless project_id.nil? - command.params['location'] = location unless location.nil? - command.params['jobId'] = job_id unless job_id.nil? - command.query['view'] = view unless view.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # List the jobs of a project. - # @param [String] project_id - # The project which owns the jobs. - # @param [String] location - # The location that contains this job. - # @param [String] filter - # The kind of filter to use. - # @param [String] page_token - # Set this to the 'next_page_token' field of a previous response - # to request additional results in a long list. - # @param [Fixnum] page_size - # If there are many jobs, limit response to at most this many. - # The actual number of jobs returned will be the lesser of max_responses - # and an unspecified server-defined limit. - # @param [String] view - # Level of information requested in response. Default is `JOB_VIEW_SUMMARY`. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::DataflowV1b3::ListJobsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DataflowV1b3::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_project_location_jobs(project_id, location, filter: nil, page_token: nil, page_size: nil, view: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1b3/projects/{projectId}/locations/{location}/jobs', options) - command.response_representation = Google::Apis::DataflowV1b3::ListJobsResponse::Representation - command.response_class = Google::Apis::DataflowV1b3::ListJobsResponse - command.params['projectId'] = project_id unless project_id.nil? - command.params['location'] = location unless location.nil? - command.query['filter'] = filter unless filter.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['view'] = view unless view.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Updates the state of an existing Cloud Dataflow job. - # @param [String] project_id - # The ID of the Cloud Platform project that the job belongs to. - # @param [String] location - # The location that contains this job. - # @param [String] job_id - # The job ID. - # @param [Google::Apis::DataflowV1b3::Job] job_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::DataflowV1b3::Job] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DataflowV1b3::Job] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_project_location_job(project_id, location, job_id, job_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:put, 'v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}', options) - command.request_representation = Google::Apis::DataflowV1b3::Job::Representation - command.request_object = job_object - command.response_representation = Google::Apis::DataflowV1b3::Job::Representation - command.response_class = Google::Apis::DataflowV1b3::Job - command.params['projectId'] = project_id unless project_id.nil? - command.params['location'] = location unless location.nil? - command.params['jobId'] = job_id unless job_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 the job status. - # @param [String] project_id - # A project id. - # @param [String] location - # The location which contains the job specified by job_id. - # @param [String] job_id - # The job to get messages about. - # @param [String] page_token - # If supplied, this should be the value of next_page_token returned - # by an earlier call. This will cause the next page of results to - # be returned. - # @param [String] start_time - # If specified, return only messages with timestamps >= start_time. - # The default is the job creation time (i.e. beginning of messages). - # @param [Fixnum] page_size - # If specified, determines the maximum number of messages to - # return. If unspecified, the service may choose an appropriate - # default, or may return an arbitrarily large number of results. - # @param [String] minimum_importance - # Filter to only get messages with importance >= level - # @param [String] end_time - # Return only messages with timestamps < end_time. The default is now - # (i.e. return up to the latest messages 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::DataflowV1b3::ListJobMessagesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DataflowV1b3::ListJobMessagesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_job_messages(project_id, location, job_id, page_token: nil, start_time: nil, page_size: nil, minimum_importance: nil, end_time: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/messages', options) - command.response_representation = Google::Apis::DataflowV1b3::ListJobMessagesResponse::Representation - command.response_class = Google::Apis::DataflowV1b3::ListJobMessagesResponse - command.params['projectId'] = project_id unless project_id.nil? - command.params['location'] = location unless location.nil? - command.params['jobId'] = job_id unless job_id.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['startTime'] = start_time unless start_time.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['minimumImportance'] = minimum_importance unless minimum_importance.nil? - command.query['endTime'] = end_time unless end_time.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -352,11 +295,11 @@ module Google # @param [String] job_id # Identifies the workflow job this worker belongs to. # @param [Google::Apis::DataflowV1b3::LeaseWorkItemRequest] lease_work_item_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 # @@ -369,7 +312,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 lease_project_location_work_item(project_id, location, job_id, lease_work_item_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def lease_project_location_work_item(project_id, location, job_id, lease_work_item_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:lease', options) command.request_representation = Google::Apis::DataflowV1b3::LeaseWorkItemRequest::Representation command.request_object = lease_work_item_request_object @@ -378,8 +321,8 @@ module Google command.params['projectId'] = project_id unless project_id.nil? command.params['location'] = location unless location.nil? command.params['jobId'] = job_id unless job_id.nil? - command.query['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 @@ -391,11 +334,11 @@ module Google # @param [String] job_id # The job which the WorkItem is part of. # @param [Google::Apis::DataflowV1b3::ReportWorkItemStatusRequest] report_work_item_status_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -408,7 +351,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 report_project_location_job_work_item_status(project_id, location, job_id, report_work_item_status_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def report_project_location_job_work_item_status(project_id, location, job_id, report_work_item_status_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:reportStatus', options) command.request_representation = Google::Apis::DataflowV1b3::ReportWorkItemStatusRequest::Representation command.request_object = report_work_item_status_request_object @@ -417,41 +360,65 @@ module Google command.params['projectId'] = project_id unless project_id.nil? command.params['location'] = location unless location.nil? command.params['jobId'] = job_id unless job_id.nil? - command.query['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 Cloud Dataflow job from a template. + # Request the job status. # @param [String] project_id - # Required. The ID of the Cloud Platform project that the job belongs to. - # @param [Google::Apis::DataflowV1b3::CreateJobFromTemplateRequest] create_job_from_template_request_object + # A project id. + # @param [String] location + # The location which contains the job specified by job_id. + # @param [String] job_id + # The job to get messages about. + # @param [String] end_time + # Return only messages with timestamps < end_time. The default is now + # (i.e. return up to the latest messages available). + # @param [String] start_time + # If specified, return only messages with timestamps >= start_time. + # The default is the job creation time (i.e. beginning of messages). + # @param [String] page_token + # If supplied, this should be the value of next_page_token returned + # by an earlier call. This will cause the next page of results to + # be returned. + # @param [Fixnum] page_size + # If specified, determines the maximum number of messages to + # return. If unspecified, the service may choose an appropriate + # default, or may return an arbitrarily large number of results. + # @param [String] minimum_importance + # Filter to only get messages with importance >= level + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::DataflowV1b3::Job] parsed result object + # @yieldparam result [Google::Apis::DataflowV1b3::ListJobMessagesResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::DataflowV1b3::Job] + # @return [Google::Apis::DataflowV1b3::ListJobMessagesResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_job_from_template(project_id, create_job_from_template_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1b3/projects/{projectId}/templates', options) - command.request_representation = Google::Apis::DataflowV1b3::CreateJobFromTemplateRequest::Representation - command.request_object = create_job_from_template_request_object - command.response_representation = Google::Apis::DataflowV1b3::Job::Representation - command.response_class = Google::Apis::DataflowV1b3::Job + def list_project_location_job_messages(project_id, location, job_id, end_time: nil, start_time: nil, page_token: nil, page_size: nil, minimum_importance: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/messages', options) + command.response_representation = Google::Apis::DataflowV1b3::ListJobMessagesResponse::Representation + command.response_class = Google::Apis::DataflowV1b3::ListJobMessagesResponse command.params['projectId'] = project_id unless project_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? + command.params['location'] = location unless location.nil? + command.params['jobId'] = job_id unless job_id.nil? + command.query['endTime'] = end_time unless end_time.nil? + command.query['startTime'] = start_time unless start_time.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['minimumImportance'] = minimum_importance unless minimum_importance.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -467,11 +434,11 @@ module Google # Whether or not the job should actually be executed after # validating parameters. Defaults to false. Validation errors do # not cause the HTTP request to fail if true. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -484,7 +451,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 launch_project_template(project_id, launch_template_parameters_object = nil, gcs_path: nil, dry_run: nil, quota_user: nil, fields: nil, options: nil, &block) + def launch_project_template(project_id, launch_template_parameters_object = nil, gcs_path: nil, dry_run: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1b3/projects/{projectId}/templates:launch', options) command.request_representation = Google::Apis::DataflowV1b3::LaunchTemplateParameters::Representation command.request_object = launch_template_parameters_object @@ -493,8 +460,8 @@ module Google command.params['projectId'] = project_id unless project_id.nil? command.query['gcsPath'] = gcs_path unless gcs_path.nil? command.query['dryRun'] = dry_run unless dry_run.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 @@ -507,11 +474,11 @@ module Google # Required. A Cloud Storage path to the template from which to # create the job. # Must be a valid Cloud Storage URL, beginning with `gs://`. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -524,15 +491,48 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_template(project_id, view: nil, gcs_path: nil, quota_user: nil, fields: nil, options: nil, &block) + def get_project_template(project_id, view: nil, gcs_path: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1b3/projects/{projectId}/templates:get', options) command.response_representation = Google::Apis::DataflowV1b3::GetTemplateResponse::Representation command.response_class = Google::Apis::DataflowV1b3::GetTemplateResponse command.params['projectId'] = project_id unless project_id.nil? command.query['view'] = view unless view.nil? command.query['gcsPath'] = gcs_path unless gcs_path.nil? - command.query['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 Cloud Dataflow job from a template. + # @param [String] project_id + # Required. The ID of the Cloud Platform project that the job belongs to. + # @param [Google::Apis::DataflowV1b3::CreateJobFromTemplateRequest] create_job_from_template_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::DataflowV1b3::Job] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataflowV1b3::Job] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_job_from_template(project_id, create_job_from_template_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1b3/projects/{projectId}/templates', options) + command.request_representation = Google::Apis::DataflowV1b3::CreateJobFromTemplateRequest::Representation + command.request_object = create_job_from_template_request_object + command.response_representation = Google::Apis::DataflowV1b3::Job::Representation + command.response_class = Google::Apis::DataflowV1b3::Job + command.params['projectId'] = project_id unless project_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -546,11 +546,11 @@ module Google # @param [String] start_time # Return only metric data that has changed since this time. # Default is to return all information about all metrics for the job. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -563,7 +563,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_job_metrics(project_id, job_id, location: nil, start_time: nil, quota_user: nil, fields: nil, options: nil, &block) + def get_project_job_metrics(project_id, job_id, location: nil, start_time: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1b3/projects/{projectId}/jobs/{jobId}/metrics', options) command.response_representation = Google::Apis::DataflowV1b3::JobMetrics::Representation command.response_class = Google::Apis::DataflowV1b3::JobMetrics @@ -571,8 +571,8 @@ module Google command.params['jobId'] = job_id unless job_id.nil? command.query['location'] = location unless location.nil? command.query['startTime'] = start_time unless start_time.nil? - command.query['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 @@ -585,11 +585,11 @@ module Google # The level of information requested in response. # @param [String] location # The location that contains this job. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -602,7 +602,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_job(project_id, job_id, view: nil, location: nil, quota_user: nil, fields: nil, options: nil, &block) + def get_project_job(project_id, job_id, view: nil, location: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1b3/projects/{projectId}/jobs/{jobId}', options) command.response_representation = Google::Apis::DataflowV1b3::Job::Representation command.response_class = Google::Apis::DataflowV1b3::Job @@ -610,8 +610,8 @@ module Google command.params['jobId'] = job_id unless job_id.nil? command.query['view'] = view unless view.nil? command.query['location'] = location unless location.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 @@ -631,11 +631,11 @@ module Google # and an unspecified server-defined limit. # @param [String] view # Level of information requested in response. Default is `JOB_VIEW_SUMMARY`. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -648,7 +648,7 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_project_jobs(project_id, filter: nil, location: nil, page_token: nil, page_size: nil, view: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_project_jobs(project_id, filter: nil, location: nil, page_token: nil, page_size: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1b3/projects/{projectId}/jobs', options) command.response_representation = Google::Apis::DataflowV1b3::ListJobsResponse::Representation command.response_class = Google::Apis::DataflowV1b3::ListJobsResponse @@ -658,8 +658,8 @@ module Google command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['view'] = view unless view.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -671,11 +671,11 @@ module Google # @param [Google::Apis::DataflowV1b3::Job] job_object # @param [String] location # The location that contains this job. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -688,7 +688,7 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_project_job(project_id, job_id, job_object = nil, location: nil, quota_user: nil, fields: nil, options: nil, &block) + def update_project_job(project_id, job_id, job_object = nil, location: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:put, 'v1b3/projects/{projectId}/jobs/{jobId}', options) command.request_representation = Google::Apis::DataflowV1b3::Job::Representation command.request_object = job_object @@ -697,8 +697,8 @@ module Google command.params['projectId'] = project_id unless project_id.nil? command.params['jobId'] = job_id unless job_id.nil? command.query['location'] = location unless location.nil? - command.query['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 @@ -706,17 +706,17 @@ module Google # @param [String] project_id # The ID of the Cloud Platform project that the job belongs to. # @param [Google::Apis::DataflowV1b3::Job] job_object - # @param [String] view - # The level of information requested in response. # @param [String] location # The location that contains this job. # @param [String] replace_job_id # Deprecated. This field is now in the Job message. + # @param [String] view + # The level of information requested in response. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -729,18 +729,18 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_project_job(project_id, job_object = nil, view: nil, location: nil, replace_job_id: nil, quota_user: nil, fields: nil, options: nil, &block) + def create_project_job(project_id, job_object = nil, location: nil, replace_job_id: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1b3/projects/{projectId}/jobs', options) command.request_representation = Google::Apis::DataflowV1b3::Job::Representation command.request_object = job_object command.response_representation = Google::Apis::DataflowV1b3::Job::Representation command.response_class = Google::Apis::DataflowV1b3::Job command.params['projectId'] = project_id unless project_id.nil? - command.query['view'] = view unless view.nil? command.query['location'] = location unless location.nil? command.query['replaceJobId'] = replace_job_id unless replace_job_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['view'] = view unless view.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -750,11 +750,11 @@ module Google # @param [String] job_id # The job id. # @param [Google::Apis::DataflowV1b3::GetDebugConfigRequest] get_debug_config_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -767,7 +767,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_job_debug_config(project_id, job_id, get_debug_config_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def get_project_job_debug_config(project_id, job_id, get_debug_config_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1b3/projects/{projectId}/jobs/{jobId}/debug/getConfig', options) command.request_representation = Google::Apis::DataflowV1b3::GetDebugConfigRequest::Representation command.request_object = get_debug_config_request_object @@ -775,8 +775,8 @@ module Google command.response_class = Google::Apis::DataflowV1b3::GetDebugConfigResponse command.params['projectId'] = project_id unless project_id.nil? command.params['jobId'] = job_id unless job_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 @@ -786,11 +786,11 @@ module Google # @param [String] job_id # The job id. # @param [Google::Apis::DataflowV1b3::SendDebugCaptureRequest] send_debug_capture_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -803,7 +803,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 send_project_job_debug_capture(project_id, job_id, send_debug_capture_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def send_project_job_debug_capture(project_id, job_id, send_debug_capture_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1b3/projects/{projectId}/jobs/{jobId}/debug/sendCapture', options) command.request_representation = Google::Apis::DataflowV1b3::SendDebugCaptureRequest::Representation command.request_object = send_debug_capture_request_object @@ -811,44 +811,8 @@ module Google command.response_class = Google::Apis::DataflowV1b3::SendDebugCaptureResponse command.params['projectId'] = project_id unless project_id.nil? command.params['jobId'] = job_id unless job_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 - - # Reports the status of dataflow WorkItems leased by a worker. - # @param [String] project_id - # The project which owns the WorkItem's job. - # @param [String] job_id - # The job which the WorkItem is part of. - # @param [Google::Apis::DataflowV1b3::ReportWorkItemStatusRequest] report_work_item_status_request_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::DataflowV1b3::ReportWorkItemStatusResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DataflowV1b3::ReportWorkItemStatusResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def report_project_job_work_item_status(project_id, job_id, report_work_item_status_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1b3/projects/{projectId}/jobs/{jobId}/workItems:reportStatus', options) - command.request_representation = Google::Apis::DataflowV1b3::ReportWorkItemStatusRequest::Representation - command.request_object = report_work_item_status_request_object - command.response_representation = Google::Apis::DataflowV1b3::ReportWorkItemStatusResponse::Representation - command.response_class = Google::Apis::DataflowV1b3::ReportWorkItemStatusResponse - command.params['projectId'] = project_id unless project_id.nil? - command.params['jobId'] = job_id unless job_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -858,11 +822,11 @@ module Google # @param [String] job_id # Identifies the workflow job this worker belongs to. # @param [Google::Apis::DataflowV1b3::LeaseWorkItemRequest] lease_work_item_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 # @@ -875,7 +839,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 lease_project_work_item(project_id, job_id, lease_work_item_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def lease_project_work_item(project_id, job_id, lease_work_item_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease', options) command.request_representation = Google::Apis::DataflowV1b3::LeaseWorkItemRequest::Representation command.request_object = lease_work_item_request_object @@ -883,8 +847,44 @@ module Google command.response_class = Google::Apis::DataflowV1b3::LeaseWorkItemResponse command.params['projectId'] = project_id unless project_id.nil? command.params['jobId'] = job_id unless job_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 + + # Reports the status of dataflow WorkItems leased by a worker. + # @param [String] project_id + # The project which owns the WorkItem's job. + # @param [String] job_id + # The job which the WorkItem is part of. + # @param [Google::Apis::DataflowV1b3::ReportWorkItemStatusRequest] report_work_item_status_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::DataflowV1b3::ReportWorkItemStatusResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataflowV1b3::ReportWorkItemStatusResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def report_project_job_work_item_status(project_id, job_id, report_work_item_status_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1b3/projects/{projectId}/jobs/{jobId}/workItems:reportStatus', options) + command.request_representation = Google::Apis::DataflowV1b3::ReportWorkItemStatusRequest::Representation + command.request_object = report_work_item_status_request_object + command.response_representation = Google::Apis::DataflowV1b3::ReportWorkItemStatusResponse::Representation + command.response_class = Google::Apis::DataflowV1b3::ReportWorkItemStatusResponse + command.params['projectId'] = project_id unless project_id.nil? + command.params['jobId'] = job_id unless job_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -893,11 +893,11 @@ module Google # A project id. # @param [String] job_id # The job to get messages about. + # @param [String] location + # The location which contains the job specified by job_id. # @param [String] end_time # Return only messages with timestamps < end_time. The default is now # (i.e. return up to the latest messages available). - # @param [String] location - # The location which contains the job specified by job_id. # @param [String] page_token # If supplied, this should be the value of next_page_token returned # by an earlier call. This will cause the next page of results to @@ -911,11 +911,11 @@ module Google # default, or may return an arbitrarily large number of results. # @param [String] minimum_importance # Filter to only get messages with importance >= level + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -928,20 +928,20 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_project_job_messages(project_id, job_id, end_time: nil, location: nil, page_token: nil, start_time: nil, page_size: nil, minimum_importance: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_project_job_messages(project_id, job_id, location: nil, end_time: nil, page_token: nil, start_time: nil, page_size: nil, minimum_importance: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1b3/projects/{projectId}/jobs/{jobId}/messages', options) command.response_representation = Google::Apis::DataflowV1b3::ListJobMessagesResponse::Representation command.response_class = Google::Apis::DataflowV1b3::ListJobMessagesResponse command.params['projectId'] = project_id unless project_id.nil? command.params['jobId'] = job_id unless job_id.nil? - command.query['endTime'] = end_time unless end_time.nil? command.query['location'] = location unless location.nil? + command.query['endTime'] = end_time unless end_time.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['startTime'] = start_time unless start_time.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['minimumImportance'] = minimum_importance unless minimum_importance.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/dataproc_v1.rb b/generated/google/apis/dataproc_v1.rb index 5b600df13..a80e0e077 100644 --- a/generated/google/apis/dataproc_v1.rb +++ b/generated/google/apis/dataproc_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/dataproc/ module DataprocV1 VERSION = 'V1' - REVISION = '20170228' + REVISION = '20170321' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/dataproc_v1/classes.rb b/generated/google/apis/dataproc_v1/classes.rb index 174695714..78d27d8ad 100644 --- a/generated/google/apis/dataproc_v1/classes.rb +++ b/generated/google/apis/dataproc_v1/classes.rb @@ -22,6 +22,1202 @@ module Google module Apis module DataprocV1 + # Metadata describing the operation. + class OperationMetadata + include Google::Apis::Core::Hashable + + # Output-only Short description of operation. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The status of the operation. + # Corresponds to the JSON property `status` + # @return [Google::Apis::DataprocV1::OperationStatus] + attr_accessor :status + + # A message containing any operation metadata details. + # Corresponds to the JSON property `details` + # @return [String] + attr_accessor :details + + # A message containing the operation state. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + # Name of the cluster for the operation. + # Corresponds to the JSON property `clusterName` + # @return [String] + attr_accessor :cluster_name + + # Cluster UUId for the operation. + # Corresponds to the JSON property `clusterUuid` + # @return [String] + attr_accessor :cluster_uuid + + # A message containing the detailed operation state. + # Corresponds to the JSON property `innerState` + # @return [String] + attr_accessor :inner_state + + # The time that the operation completed. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # The time that the operation was started by the server. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + # Output-only Errors encountered during operation execution. + # Corresponds to the JSON property `warnings` + # @return [Array] + attr_accessor :warnings + + # The time that the operation was requested. + # Corresponds to the JSON property `insertTime` + # @return [String] + attr_accessor :insert_time + + # Output-only Previous operation status. + # Corresponds to the JSON property `statusHistory` + # @return [Array] + attr_accessor :status_history + + # Output-only The operation type. + # Corresponds to the JSON property `operationType` + # @return [String] + attr_accessor :operation_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @description = args[:description] if args.key?(:description) + @status = args[:status] if args.key?(:status) + @details = args[:details] if args.key?(:details) + @state = args[:state] if args.key?(:state) + @cluster_name = args[:cluster_name] if args.key?(:cluster_name) + @cluster_uuid = args[:cluster_uuid] if args.key?(:cluster_uuid) + @inner_state = args[:inner_state] if args.key?(:inner_state) + @end_time = args[:end_time] if args.key?(:end_time) + @start_time = args[:start_time] if args.key?(:start_time) + @warnings = args[:warnings] if args.key?(:warnings) + @insert_time = args[:insert_time] if args.key?(:insert_time) + @status_history = args[:status_history] if args.key?(:status_history) + @operation_type = args[:operation_type] if args.key?(:operation_type) + end + end + + # Specifies the selection and config of software inside the cluster. + class SoftwareConfig + include Google::Apis::Core::Hashable + + # Optional The version of software inside the cluster. It must match the regular + # expression [0-9]+\.[0-9]+. If unspecified, it defaults to the latest version ( + # see Cloud Dataproc Versioning). + # Corresponds to the JSON property `imageVersion` + # @return [String] + attr_accessor :image_version + + # Optional The properties to set on daemon config files.Property keys are + # specified in prefix:property format, such as core:fs.defaultFS. The following + # are supported prefixes and their mappings: + # core: core-site.xml + # hdfs: hdfs-site.xml + # mapred: mapred-site.xml + # yarn: yarn-site.xml + # hive: hive-site.xml + # pig: pig.properties + # spark: spark-defaults.conf + # Corresponds to the JSON property `properties` + # @return [Hash] + attr_accessor :properties + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @image_version = args[:image_version] if args.key?(:image_version) + @properties = args[:properties] if args.key?(:properties) + end + end + + # Cloud Dataproc job config. + class JobPlacement + include Google::Apis::Core::Hashable + + # Required The name of the cluster where the job will be submitted. + # Corresponds to the JSON property `clusterName` + # @return [String] + attr_accessor :cluster_name + + # Output-only A cluster UUID generated by the Cloud Dataproc service when the + # job is submitted. + # Corresponds to the JSON property `clusterUuid` + # @return [String] + attr_accessor :cluster_uuid + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @cluster_name = args[:cluster_name] if args.key?(:cluster_name) + @cluster_uuid = args[:cluster_uuid] if args.key?(:cluster_uuid) + end + end + + # A Cloud Dataproc job for running Apache Pig (https://pig.apache.org/) queries + # on YARN. + class PigJob + include Google::Apis::Core::Hashable + + # Optional Whether to continue executing queries if a query fails. The default + # value is false. Setting to true can be useful when executing independent + # parallel queries. + # Corresponds to the JSON property `continueOnFailure` + # @return [Boolean] + attr_accessor :continue_on_failure + alias_method :continue_on_failure?, :continue_on_failure + + # The HCFS URI of the script that contains the Pig queries. + # Corresponds to the JSON property `queryFileUri` + # @return [String] + attr_accessor :query_file_uri + + # A list of queries to run on a cluster. + # Corresponds to the JSON property `queryList` + # @return [Google::Apis::DataprocV1::QueryList] + attr_accessor :query_list + + # Optional HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and + # Hadoop MapReduce (MR) tasks. Can contain Pig UDFs. + # Corresponds to the JSON property `jarFileUris` + # @return [Array] + attr_accessor :jar_file_uris + + # Optional Mapping of query variable names to values (equivalent to the Pig + # command: name=[value]). + # Corresponds to the JSON property `scriptVariables` + # @return [Hash] + attr_accessor :script_variables + + # The runtime logging config of the job. + # Corresponds to the JSON property `loggingConfig` + # @return [Google::Apis::DataprocV1::LoggingConfig] + attr_accessor :logging_config + + # Optional A mapping of property names to values, used to configure Pig. + # Properties that conflict with values set by the Cloud Dataproc API may be + # overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/ + # pig/conf/pig.properties, and classes in user code. + # Corresponds to the JSON property `properties` + # @return [Hash] + attr_accessor :properties + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @continue_on_failure = args[:continue_on_failure] if args.key?(:continue_on_failure) + @query_file_uri = args[:query_file_uri] if args.key?(:query_file_uri) + @query_list = args[:query_list] if args.key?(:query_list) + @jar_file_uris = args[:jar_file_uris] if args.key?(:jar_file_uris) + @script_variables = args[:script_variables] if args.key?(:script_variables) + @logging_config = args[:logging_config] if args.key?(:logging_config) + @properties = args[:properties] if args.key?(:properties) + end + end + + # The status of a cluster and its instances. + class ClusterStatus + include Google::Apis::Core::Hashable + + # Output-only Optional details of cluster's state. + # Corresponds to the JSON property `detail` + # @return [String] + attr_accessor :detail + + # Output-only The cluster's state. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + # Output-only Time when this state was entered. + # Corresponds to the JSON property `stateStartTime` + # @return [String] + attr_accessor :state_start_time + + # Output-only Additional state information that includes status reported by the + # agent. + # Corresponds to the JSON property `substate` + # @return [String] + attr_accessor :substate + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @detail = args[:detail] if args.key?(:detail) + @state = args[:state] if args.key?(:state) + @state_start_time = args[:state_start_time] if args.key?(:state_start_time) + @substate = args[:substate] if args.key?(:substate) + end + end + + # The list of all clusters in a project. + class ListClustersResponse + include Google::Apis::Core::Hashable + + # Output-only The clusters in the project. + # Corresponds to the JSON property `clusters` + # @return [Array] + attr_accessor :clusters + + # Output-only This token is included in the response if there are more results + # to fetch. To fetch additional results, provide this value as the page_token in + # a subsequent ListClustersRequest. + # 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) + @clusters = args[:clusters] if args.key?(:clusters) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # A Cloud Dataproc job resource. + class Job + include Google::Apis::Core::Hashable + + # Cloud Dataproc job status. + # Corresponds to the JSON property `status` + # @return [Google::Apis::DataprocV1::JobStatus] + attr_accessor :status + + # Cloud Dataproc job config. + # Corresponds to the JSON property `placement` + # @return [Google::Apis::DataprocV1::JobPlacement] + attr_accessor :placement + + # Output-only If present, the location of miscellaneous control files which may + # be used as part of job setup and handling. If not present, control files may + # be placed in the same location as driver_output_uri. + # Corresponds to the JSON property `driverControlFilesUri` + # @return [String] + attr_accessor :driver_control_files_uri + + # Job scheduling options.Beta Feature: These options are available for testing + # purposes only. They may be changed before final release. + # Corresponds to the JSON property `scheduling` + # @return [Google::Apis::DataprocV1::JobScheduling] + attr_accessor :scheduling + + # A Cloud Dataproc job for running Apache Pig (https://pig.apache.org/) queries + # on YARN. + # Corresponds to the JSON property `pigJob` + # @return [Google::Apis::DataprocV1::PigJob] + attr_accessor :pig_job + + # A Cloud Dataproc job for running Apache Hive (https://hive.apache.org/) + # queries on YARN. + # Corresponds to the JSON property `hiveJob` + # @return [Google::Apis::DataprocV1::HiveJob] + attr_accessor :hive_job + + # Optional The labels to associate with this job. Label keys must contain 1 to + # 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035. + # txt). Label values may be empty, but, if present, must contain 1 to 63 + # characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt) + # . No more than 32 labels can be associated with a job. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # Output-only A URI pointing to the location of the stdout of the job's driver + # program. + # Corresponds to the JSON property `driverOutputResourceUri` + # @return [String] + attr_accessor :driver_output_resource_uri + + # A Cloud Dataproc job for running Apache Spark (http://spark.apache.org/) + # applications on YARN. + # Corresponds to the JSON property `sparkJob` + # @return [Google::Apis::DataprocV1::SparkJob] + attr_accessor :spark_job + + # A Cloud Dataproc job for running Apache Spark SQL (http://spark.apache.org/sql/ + # ) queries. + # Corresponds to the JSON property `sparkSqlJob` + # @return [Google::Apis::DataprocV1::SparkSqlJob] + attr_accessor :spark_sql_job + + # Output-only The previous job status. + # Corresponds to the JSON property `statusHistory` + # @return [Array] + attr_accessor :status_history + + # Output-only The collection of YARN applications spun up by this job.Beta + # Feature: This report is available for testing purposes only. It may be changed + # before final release. + # Corresponds to the JSON property `yarnApplications` + # @return [Array] + attr_accessor :yarn_applications + + # A Cloud Dataproc job for running Apache PySpark (https://spark.apache.org/docs/ + # 0.9.0/python-programming-guide.html) applications on YARN. + # Corresponds to the JSON property `pysparkJob` + # @return [Google::Apis::DataprocV1::PySparkJob] + attr_accessor :pyspark_job + + # Encapsulates the full scoping used to reference a job. + # Corresponds to the JSON property `reference` + # @return [Google::Apis::DataprocV1::JobReference] + attr_accessor :reference + + # A Cloud Dataproc job for running Apache Hadoop MapReduce (https://hadoop. + # apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/ + # MapReduceTutorial.html) jobs on Apache Hadoop YARN (https://hadoop.apache.org/ + # docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html). + # Corresponds to the JSON property `hadoopJob` + # @return [Google::Apis::DataprocV1::HadoopJob] + attr_accessor :hadoop_job + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @status = args[:status] if args.key?(:status) + @placement = args[:placement] if args.key?(:placement) + @driver_control_files_uri = args[:driver_control_files_uri] if args.key?(:driver_control_files_uri) + @scheduling = args[:scheduling] if args.key?(:scheduling) + @pig_job = args[:pig_job] if args.key?(:pig_job) + @hive_job = args[:hive_job] if args.key?(:hive_job) + @labels = args[:labels] if args.key?(:labels) + @driver_output_resource_uri = args[:driver_output_resource_uri] if args.key?(:driver_output_resource_uri) + @spark_job = args[:spark_job] if args.key?(:spark_job) + @spark_sql_job = args[:spark_sql_job] if args.key?(:spark_sql_job) + @status_history = args[:status_history] if args.key?(:status_history) + @yarn_applications = args[:yarn_applications] if args.key?(:yarn_applications) + @pyspark_job = args[:pyspark_job] if args.key?(:pyspark_job) + @reference = args[:reference] if args.key?(:reference) + @hadoop_job = args[:hadoop_job] if args.key?(:hadoop_job) + end + end + + # A Cloud Dataproc job for running Apache Spark (http://spark.apache.org/) + # applications on YARN. + class SparkJob + include Google::Apis::Core::Hashable + + # Optional HCFS URIs of jar files to add to the CLASSPATHs of the Spark driver + # and tasks. + # Corresponds to the JSON property `jarFileUris` + # @return [Array] + attr_accessor :jar_file_uris + + # The runtime logging config of the job. + # Corresponds to the JSON property `loggingConfig` + # @return [Google::Apis::DataprocV1::LoggingConfig] + attr_accessor :logging_config + + # Optional A mapping of property names to values, used to configure Spark. + # Properties that conflict with values set by the Cloud Dataproc API may be + # overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf + # and classes in user code. + # Corresponds to the JSON property `properties` + # @return [Hash] + attr_accessor :properties + + # Optional The arguments to pass to the driver. Do not include arguments, such + # as --conf, that can be set as job properties, since a collision may occur that + # causes an incorrect job submission. + # Corresponds to the JSON property `args` + # @return [Array] + attr_accessor :args + + # Optional HCFS URIs of files to be copied to the working directory of Spark + # drivers and distributed tasks. Useful for naively parallel tasks. + # Corresponds to the JSON property `fileUris` + # @return [Array] + attr_accessor :file_uris + + # The name of the driver's main class. The jar file that contains the class must + # be in the default CLASSPATH or specified in jar_file_uris. + # Corresponds to the JSON property `mainClass` + # @return [String] + attr_accessor :main_class + + # Optional HCFS URIs of archives to be extracted in the working directory of + # Spark drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, and . + # zip. + # Corresponds to the JSON property `archiveUris` + # @return [Array] + attr_accessor :archive_uris + + # The HCFS URI of the jar file that contains the main class. + # Corresponds to the JSON property `mainJarFileUri` + # @return [String] + attr_accessor :main_jar_file_uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @jar_file_uris = args[:jar_file_uris] if args.key?(:jar_file_uris) + @logging_config = args[:logging_config] if args.key?(:logging_config) + @properties = args[:properties] if args.key?(:properties) + @args = args[:args] if args.key?(:args) + @file_uris = args[:file_uris] if args.key?(:file_uris) + @main_class = args[:main_class] if args.key?(:main_class) + @archive_uris = args[:archive_uris] if args.key?(:archive_uris) + @main_jar_file_uri = args[:main_jar_file_uri] if args.key?(:main_jar_file_uri) + end + end + + # Cloud Dataproc job status. + class JobStatus + include Google::Apis::Core::Hashable + + # Output-only A state message specifying the overall job state. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + # Output-only Optional job state details, such as an error description if the + # state is ERROR. + # Corresponds to the JSON property `details` + # @return [String] + attr_accessor :details + + # Output-only The time when this state was entered. + # Corresponds to the JSON property `stateStartTime` + # @return [String] + attr_accessor :state_start_time + + # Output-only Additional state information, which includes status reported by + # the agent. + # Corresponds to the JSON property `substate` + # @return [String] + attr_accessor :substate + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @state = args[:state] if args.key?(:state) + @details = args[:details] if args.key?(:details) + @state_start_time = args[:state_start_time] if args.key?(:state_start_time) + @substate = args[:substate] if args.key?(:substate) + end + end + + # Specifies the resources used to actively manage an instance group. + class ManagedGroupConfig + include Google::Apis::Core::Hashable + + # Output-only The name of the Instance Group Manager for this group. + # Corresponds to the JSON property `instanceGroupManagerName` + # @return [String] + attr_accessor :instance_group_manager_name + + # Output-only The name of the Instance Template used for the Managed Instance + # Group. + # Corresponds to the JSON property `instanceTemplateName` + # @return [String] + attr_accessor :instance_template_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @instance_group_manager_name = args[:instance_group_manager_name] if args.key?(:instance_group_manager_name) + @instance_template_name = args[:instance_template_name] if args.key?(:instance_template_name) + end + end + + # The status of the operation. + class ClusterOperationStatus + include Google::Apis::Core::Hashable + + # Output-only A message containing the detailed operation state. + # Corresponds to the JSON property `innerState` + # @return [String] + attr_accessor :inner_state + + # Output-only The time this state was entered. + # Corresponds to the JSON property `stateStartTime` + # @return [String] + attr_accessor :state_start_time + + # Output-only A message containing the operation state. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + # Output-onlyA message containing any operation metadata details. + # Corresponds to the JSON property `details` + # @return [String] + attr_accessor :details + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @inner_state = args[:inner_state] if args.key?(:inner_state) + @state_start_time = args[:state_start_time] if args.key?(:state_start_time) + @state = args[:state] if args.key?(:state) + @details = args[:details] if args.key?(:details) + end + end + + # A Cloud Dataproc job for running Apache Hadoop MapReduce (https://hadoop. + # apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/ + # MapReduceTutorial.html) jobs on Apache Hadoop YARN (https://hadoop.apache.org/ + # docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html). + class HadoopJob + include Google::Apis::Core::Hashable + + # The name of the driver's main class. The jar file containing the class must be + # in the default CLASSPATH or specified in jar_file_uris. + # Corresponds to the JSON property `mainClass` + # @return [String] + attr_accessor :main_class + + # Optional HCFS URIs of archives to be extracted in the working directory of + # Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or . + # zip. + # Corresponds to the JSON property `archiveUris` + # @return [Array] + attr_accessor :archive_uris + + # The HCFS URI of the jar file containing the main class. Examples: 'gs://foo- + # bucket/analytics-binaries/extract-useful-metrics-mr.jar' 'hdfs:/tmp/test- + # samples/custom-wordcount.jar' 'file:///home/usr/lib/hadoop-mapreduce/hadoop- + # mapreduce-examples.jar' + # Corresponds to the JSON property `mainJarFileUri` + # @return [String] + attr_accessor :main_jar_file_uri + + # Optional Jar file URIs to add to the CLASSPATHs of the Hadoop driver and tasks. + # Corresponds to the JSON property `jarFileUris` + # @return [Array] + attr_accessor :jar_file_uris + + # The runtime logging config of the job. + # Corresponds to the JSON property `loggingConfig` + # @return [Google::Apis::DataprocV1::LoggingConfig] + attr_accessor :logging_config + + # Optional A mapping of property names to values, used to configure Hadoop. + # Properties that conflict with values set by the Cloud Dataproc API may be + # overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes + # in user code. + # Corresponds to the JSON property `properties` + # @return [Hash] + attr_accessor :properties + + # Optional The arguments to pass to the driver. Do not include arguments, such + # as -libjars or -Dfoo=bar, that can be set as job properties, since a collision + # may occur that causes an incorrect job submission. + # Corresponds to the JSON property `args` + # @return [Array] + attr_accessor :args + + # Optional HCFS (Hadoop Compatible Filesystem) URIs of files to be copied to the + # working directory of Hadoop drivers and distributed tasks. Useful for naively + # parallel tasks. + # Corresponds to the JSON property `fileUris` + # @return [Array] + attr_accessor :file_uris + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @main_class = args[:main_class] if args.key?(:main_class) + @archive_uris = args[:archive_uris] if args.key?(:archive_uris) + @main_jar_file_uri = args[:main_jar_file_uri] if args.key?(:main_jar_file_uri) + @jar_file_uris = args[:jar_file_uris] if args.key?(:jar_file_uris) + @logging_config = args[:logging_config] if args.key?(:logging_config) + @properties = args[:properties] if args.key?(:properties) + @args = args[:args] if args.key?(:args) + @file_uris = args[:file_uris] if args.key?(:file_uris) + end + end + + # A list of queries to run on a cluster. + class QueryList + include Google::Apis::Core::Hashable + + # Required The queries to execute. You do not need to terminate a query with a + # semicolon. Multiple queries can be specified in one string by separating each + # with a semicolon. Here is an example of an Cloud Dataproc API snippet that + # uses a QueryList to specify a HiveJob: + # "hiveJob": ` + # "queryList": ` + # "queries": [ + # "query1", + # "query2", + # "query3;query4", + # ] + # ` + # ` + # Corresponds to the JSON property `queries` + # @return [Array] + attr_accessor :queries + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @queries = args[:queries] if args.key?(:queries) + end + end + + # A YARN application created by a job. Application information is a subset of < + # code>org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto. + # Beta Feature: This report is available for testing purposes only. It may be + # changed before final release. + class YarnApplication + include Google::Apis::Core::Hashable + + # Optional The HTTP URL of the ApplicationMaster, HistoryServer, or + # TimelineServer that provides application-specific information. The URL uses + # the internal hostname, and requires a proxy server for resolution and, + # possibly, access. + # Corresponds to the JSON property `trackingUrl` + # @return [String] + attr_accessor :tracking_url + + # Required The numerical progress of the application, from 1 to 100. + # Corresponds to the JSON property `progress` + # @return [Float] + attr_accessor :progress + + # Required The application state. + # Corresponds to the JSON property `state` + # @return [String] + attr_accessor :state + + # Required The application name. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @tracking_url = args[:tracking_url] if args.key?(:tracking_url) + @progress = args[:progress] if args.key?(:progress) + @state = args[:state] if args.key?(:state) + @name = args[:name] if args.key?(:name) + end + end + + # A request to collect cluster diagnostic information. + class DiagnoseClusterRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Specifies the config of disk options for a group of VM instances. + class DiskConfig + include Google::Apis::Core::Hashable + + # Optional Size in GB of the boot disk (default is 500GB). + # Corresponds to the JSON property `bootDiskSizeGb` + # @return [Fixnum] + attr_accessor :boot_disk_size_gb + + # Optional Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not + # attached, the boot disk is used to store runtime logs and HDFS (https://hadoop. + # apache.org/docs/r1.2.1/hdfs_user_guide.html) data. If one or more SSDs are + # attached, this runtime bulk data is spread across them, and the boot disk + # contains only basic config and installed binaries. + # Corresponds to the JSON property `numLocalSsds` + # @return [Fixnum] + attr_accessor :num_local_ssds + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @boot_disk_size_gb = args[:boot_disk_size_gb] if args.key?(:boot_disk_size_gb) + @num_local_ssds = args[:num_local_ssds] if args.key?(:num_local_ssds) + end + end + + # Metadata describing the operation. + class ClusterOperationMetadata + include Google::Apis::Core::Hashable + + # Output-only The operation type. + # Corresponds to the JSON property `operationType` + # @return [String] + attr_accessor :operation_type + + # Output-only Short description of operation. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Output-only Errors encountered during operation execution. + # Corresponds to the JSON property `warnings` + # @return [Array] + attr_accessor :warnings + + # Output-only Labels associated with the operation + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # The status of the operation. + # Corresponds to the JSON property `status` + # @return [Google::Apis::DataprocV1::ClusterOperationStatus] + attr_accessor :status + + # Output-only The previous operation status. + # Corresponds to the JSON property `statusHistory` + # @return [Array] + attr_accessor :status_history + + # Output-only Cluster UUID for the operation. + # Corresponds to the JSON property `clusterUuid` + # @return [String] + attr_accessor :cluster_uuid + + # Output-only Name of the cluster for the operation. + # Corresponds to the JSON property `clusterName` + # @return [String] + attr_accessor :cluster_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @operation_type = args[:operation_type] if args.key?(:operation_type) + @description = args[:description] if args.key?(:description) + @warnings = args[:warnings] if args.key?(:warnings) + @labels = args[:labels] if args.key?(:labels) + @status = args[:status] if args.key?(:status) + @status_history = args[:status_history] if args.key?(:status_history) + @cluster_uuid = args[:cluster_uuid] if args.key?(:cluster_uuid) + @cluster_name = args[:cluster_name] if args.key?(:cluster_name) + end + end + + # A generic empty message that you can re-use to avoid defining duplicated empty + # messages in your APIs. A typical example is to use it as the request or the + # response type of an API method. For instance: + # service Foo ` + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # ` + # The JSON representation for Empty is empty JSON object ``. + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # A Cloud Dataproc job for running Apache Hive (https://hive.apache.org/) + # queries on YARN. + class HiveJob + include Google::Apis::Core::Hashable + + # Optional HCFS URIs of jar files to add to the CLASSPATH of the Hive server and + # Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and UDFs. + # Corresponds to the JSON property `jarFileUris` + # @return [Array] + attr_accessor :jar_file_uris + + # Optional Mapping of query variable names to values (equivalent to the Hive + # command: SET name="value";). + # Corresponds to the JSON property `scriptVariables` + # @return [Hash] + attr_accessor :script_variables + + # Optional A mapping of property names and values, used to configure Hive. + # Properties that conflict with values set by the Cloud Dataproc API may be + # overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/ + # hive/conf/hive-site.xml, and classes in user code. + # Corresponds to the JSON property `properties` + # @return [Hash] + attr_accessor :properties + + # Optional Whether to continue executing queries if a query fails. The default + # value is false. Setting to true can be useful when executing independent + # parallel queries. + # Corresponds to the JSON property `continueOnFailure` + # @return [Boolean] + attr_accessor :continue_on_failure + alias_method :continue_on_failure?, :continue_on_failure + + # The HCFS URI of the script that contains Hive queries. + # Corresponds to the JSON property `queryFileUri` + # @return [String] + attr_accessor :query_file_uri + + # A list of queries to run on a cluster. + # Corresponds to the JSON property `queryList` + # @return [Google::Apis::DataprocV1::QueryList] + attr_accessor :query_list + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @jar_file_uris = args[:jar_file_uris] if args.key?(:jar_file_uris) + @script_variables = args[:script_variables] if args.key?(:script_variables) + @properties = args[:properties] if args.key?(:properties) + @continue_on_failure = args[:continue_on_failure] if args.key?(:continue_on_failure) + @query_file_uri = args[:query_file_uri] if args.key?(:query_file_uri) + @query_list = args[:query_list] if args.key?(:query_list) + end + end + + # The location of diagnostic output. + class DiagnoseClusterResults + include Google::Apis::Core::Hashable + + # Output-only The Google Cloud Storage URI of the diagnostic output. The output + # report is a plain text file with a summary of collected diagnostics. + # Corresponds to the JSON property `outputUri` + # @return [String] + attr_accessor :output_uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @output_uri = args[:output_uri] if args.key?(:output_uri) + end + end + + # The cluster config. + class ClusterConfig + include Google::Apis::Core::Hashable + + # Optional The config settings for Google Compute Engine resources in an + # instance group, such as a master or worker group. + # Corresponds to the JSON property `masterConfig` + # @return [Google::Apis::DataprocV1::InstanceGroupConfig] + attr_accessor :master_config + + # Optional The config settings for Google Compute Engine resources in an + # instance group, such as a master or worker group. + # Corresponds to the JSON property `secondaryWorkerConfig` + # @return [Google::Apis::DataprocV1::InstanceGroupConfig] + attr_accessor :secondary_worker_config + + # Optional Commands to execute on each node after config is completed. By + # default, executables are run on master and all worker nodes. You can test a + # node's role metadata to run an executable on a master or worker + # node, as shown below using curl (you can also use wget): + # ROLE=$(curl -H Metadata-Flavor:Google http://metadata/computeMetadata/v1/ + # instance/attributes/dataproc-role) + # if [[ "$`ROLE`" == 'Master' ]]; then + # ... master specific actions ... + # else + # ... worker specific actions ... + # fi + # Corresponds to the JSON property `initializationActions` + # @return [Array] + attr_accessor :initialization_actions + + # Optional A Google Cloud Storage staging bucket used for sharing generated SSH + # keys and config. If you do not specify a staging bucket, Cloud Dataproc will + # determine an appropriate Cloud Storage location (US, ASIA, or EU) for your + # cluster's staging bucket according to the Google Compute Engine zone where + # your cluster is deployed, and then it will create and manage this project- + # level, per-location bucket for you. + # Corresponds to the JSON property `configBucket` + # @return [String] + attr_accessor :config_bucket + + # Optional The config settings for Google Compute Engine resources in an + # instance group, such as a master or worker group. + # Corresponds to the JSON property `workerConfig` + # @return [Google::Apis::DataprocV1::InstanceGroupConfig] + attr_accessor :worker_config + + # Common config settings for resources of Google Compute Engine cluster + # instances, applicable to all instances in the cluster. + # Corresponds to the JSON property `gceClusterConfig` + # @return [Google::Apis::DataprocV1::GceClusterConfig] + attr_accessor :gce_cluster_config + + # Specifies the selection and config of software inside the cluster. + # Corresponds to the JSON property `softwareConfig` + # @return [Google::Apis::DataprocV1::SoftwareConfig] + attr_accessor :software_config + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @master_config = args[:master_config] if args.key?(:master_config) + @secondary_worker_config = args[:secondary_worker_config] if args.key?(:secondary_worker_config) + @initialization_actions = args[:initialization_actions] if args.key?(:initialization_actions) + @config_bucket = args[:config_bucket] if args.key?(:config_bucket) + @worker_config = args[:worker_config] if args.key?(:worker_config) + @gce_cluster_config = args[:gce_cluster_config] if args.key?(:gce_cluster_config) + @software_config = args[:software_config] if args.key?(:software_config) + end + end + + # A Cloud Dataproc job for running Apache PySpark (https://spark.apache.org/docs/ + # 0.9.0/python-programming-guide.html) applications on YARN. + class PySparkJob + include Google::Apis::Core::Hashable + + # Optional HCFS URIs of jar files to add to the CLASSPATHs of the Python driver + # and tasks. + # Corresponds to the JSON property `jarFileUris` + # @return [Array] + attr_accessor :jar_file_uris + + # The runtime logging config of the job. + # Corresponds to the JSON property `loggingConfig` + # @return [Google::Apis::DataprocV1::LoggingConfig] + attr_accessor :logging_config + + # Optional A mapping of property names to values, used to configure PySpark. + # Properties that conflict with values set by the Cloud Dataproc API may be + # overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf + # and classes in user code. + # Corresponds to the JSON property `properties` + # @return [Hash] + attr_accessor :properties + + # Optional The arguments to pass to the driver. Do not include arguments, such + # as --conf, that can be set as job properties, since a collision may occur that + # causes an incorrect job submission. + # Corresponds to the JSON property `args` + # @return [Array] + attr_accessor :args + + # Optional HCFS URIs of files to be copied to the working directory of Python + # drivers and distributed tasks. Useful for naively parallel tasks. + # Corresponds to the JSON property `fileUris` + # @return [Array] + attr_accessor :file_uris + + # Optional HCFS file URIs of Python files to pass to the PySpark framework. + # Supported file types: .py, .egg, and .zip. + # Corresponds to the JSON property `pythonFileUris` + # @return [Array] + attr_accessor :python_file_uris + + # Required The HCFS URI of the main Python file to use as the driver. Must be a . + # py file. + # Corresponds to the JSON property `mainPythonFileUri` + # @return [String] + attr_accessor :main_python_file_uri + + # Optional HCFS URIs of archives to be extracted in the working directory of . + # jar, .tar, .tar.gz, .tgz, and .zip. + # Corresponds to the JSON property `archiveUris` + # @return [Array] + attr_accessor :archive_uris + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @jar_file_uris = args[:jar_file_uris] if args.key?(:jar_file_uris) + @logging_config = args[:logging_config] if args.key?(:logging_config) + @properties = args[:properties] if args.key?(:properties) + @args = args[:args] if args.key?(:args) + @file_uris = args[:file_uris] if args.key?(:file_uris) + @python_file_uris = args[:python_file_uris] if args.key?(:python_file_uris) + @main_python_file_uri = args[:main_python_file_uri] if args.key?(:main_python_file_uri) + @archive_uris = args[:archive_uris] if args.key?(:archive_uris) + end + end + + # Common config settings for resources of Google Compute Engine cluster + # instances, applicable to all instances in the cluster. + class GceClusterConfig + include Google::Apis::Core::Hashable + + # The Google Compute Engine metadata entries to add to all instances (see + # Project and instance metadata (https://cloud.google.com/compute/docs/storing- + # retrieving-metadata#project_and_instance_metadata)). + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # Optional If true, all instances in the cluster will only have internal IP + # addresses. By default, clusters are not restricted to internal IP addresses, + # and will have ephemeral external IP addresses assigned to each instance. This + # internal_ip_only restriction can only be enabled for subnetwork enabled + # networks, and all off-cluster dependencies must be configured to be accessible + # without external IP addresses. + # Corresponds to the JSON property `internalIpOnly` + # @return [Boolean] + attr_accessor :internal_ip_only + alias_method :internal_ip_only?, :internal_ip_only + + # Optional The URIs of service account scopes to be included in Google Compute + # Engine instances. The following base set of scopes is always included: + # https://www.googleapis.com/auth/cloud.useraccounts.readonly + # https://www.googleapis.com/auth/devstorage.read_write + # https://www.googleapis.com/auth/logging.writeIf no scopes are specified, the + # following defaults are also provided: + # https://www.googleapis.com/auth/bigquery + # https://www.googleapis.com/auth/bigtable.admin.table + # https://www.googleapis.com/auth/bigtable.data + # https://www.googleapis.com/auth/devstorage.full_control + # Corresponds to the JSON property `serviceAccountScopes` + # @return [Array] + attr_accessor :service_account_scopes + + # The Google Compute Engine tags to add to all instances (see Tagging instances). + # Corresponds to the JSON property `tags` + # @return [Array] + attr_accessor :tags + + # Optional The service account of the instances. Defaults to the default Google + # Compute Engine service account. Custom service accounts need permissions + # equivalent to the folloing IAM roles: + # roles/logging.logWriter + # roles/storage.objectAdmin(see https://cloud.google.com/compute/docs/access/ + # service-accounts#custom_service_accounts for more information). Example: [ + # account_id]@[project_id].iam.gserviceaccount.com + # Corresponds to the JSON property `serviceAccount` + # @return [String] + attr_accessor :service_account + + # Optional The Google Compute Engine subnetwork to be used for machine + # communications. Cannot be specified with network_uri. Example: https://www. + # googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0. + # Corresponds to the JSON property `subnetworkUri` + # @return [String] + attr_accessor :subnetwork_uri + + # Optional The Google Compute Engine network to be used for machine + # communications. Cannot be specified with subnetwork_uri. If neither + # network_uri nor subnetwork_uri is specified, the "default" network of the + # project is used, if it exists. Cannot be a "Custom Subnet Network" (see Using + # Subnetworks for more information). Example: https://www.googleapis.com/compute/ + # v1/projects/[project_id]/regions/global/default. + # Corresponds to the JSON property `networkUri` + # @return [String] + attr_accessor :network_uri + + # Required The zone where the Google Compute Engine cluster will be located. + # Example: https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[ + # zone]. + # Corresponds to the JSON property `zoneUri` + # @return [String] + attr_accessor :zone_uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @metadata = args[:metadata] if args.key?(:metadata) + @internal_ip_only = args[:internal_ip_only] if args.key?(:internal_ip_only) + @service_account_scopes = args[:service_account_scopes] if args.key?(:service_account_scopes) + @tags = args[:tags] if args.key?(:tags) + @service_account = args[:service_account] if args.key?(:service_account) + @subnetwork_uri = args[:subnetwork_uri] if args.key?(:subnetwork_uri) + @network_uri = args[:network_uri] if args.key?(:network_uri) + @zone_uri = args[:zone_uri] if args.key?(:zone_uri) + end + end + + # Specifies the type and number of accelerator cards attached to the instances + # of an instance group (see GPUs on Compute Engine). + class AcceleratorConfig + include Google::Apis::Core::Hashable + + # The number of the accelerator cards of this type exposed to this instance. + # Corresponds to the JSON property `acceleratorCount` + # @return [Fixnum] + attr_accessor :accelerator_count + + # Full or partial URI of the accelerator type resource to expose to this + # instance. See Google Compute Engine AcceleratorTypes( /compute/docs/reference/ + # beta/acceleratorTypes) + # Corresponds to the JSON property `acceleratorTypeUri` + # @return [String] + attr_accessor :accelerator_type_uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @accelerator_count = args[:accelerator_count] if args.key?(:accelerator_count) + @accelerator_type_uri = args[:accelerator_type_uri] if args.key?(:accelerator_type_uri) + end + end + # Contains cluster daemon metrics, such as HDFS and YARN stats.Beta Feature: # This report is available for testing purposes only. It may be changed before # final release. @@ -49,34 +1245,6 @@ module Google end end - # Specifies the type and number of accelerator cards attached to the instances - # of an instance group (see GPUs on Compute Engine). - class AcceleratorConfig - include Google::Apis::Core::Hashable - - # Full or partial URI of the accelerator type resource to expose to this - # instance. See Google Compute Engine AcceleratorTypes( /compute/docs/reference/ - # beta/acceleratorTypes) - # Corresponds to the JSON property `acceleratorTypeUri` - # @return [String] - attr_accessor :accelerator_type_uri - - # The number of the accelerator cards of this type exposed to this instance. - # Corresponds to the JSON property `acceleratorCount` - # @return [Fixnum] - attr_accessor :accelerator_count - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @accelerator_type_uri = args[:accelerator_type_uri] if args.key?(:accelerator_type_uri) - @accelerator_count = args[:accelerator_count] if args.key?(:accelerator_count) - end - end - # The runtime logging config of the job. class LoggingConfig include Google::Apis::Core::Hashable @@ -123,31 +1291,6 @@ module Google class Operation include Google::Apis::Core::Hashable - # If the value is false, it means the operation is still in progress. If true, - # the operation is completed, and either error or response is available. - # Corresponds to the JSON property `done` - # @return [Boolean] - attr_accessor :done - alias_method :done?, :done - - # The normal response of the operation in case of success. If the original - # method returns no data on success, such as Delete, the response is google. - # protobuf.Empty. If the original method is standard Get/Create/Update, the - # response should be the resource. For other methods, the response should have - # the type XxxResponse, where Xxx is the original method name. For example, if - # the original method name is TakeSnapshot(), the inferred response type is - # TakeSnapshotResponse. - # Corresponds to the JSON property `response` - # @return [Hash] - attr_accessor :response - - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the name should - # have the format of operations/some/unique/name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - # The Status type defines a logical error model that is suitable for different # programming environments, including REST APIs and RPC APIs. It is used by gRPC # (https://github.com/grpc). The error model is designed to be: @@ -194,17 +1337,42 @@ module Google # @return [Hash] attr_accessor :metadata + # If the value is false, it means the operation is still in progress. If true, + # the operation is completed, and either error or response is available. + # Corresponds to the JSON property `done` + # @return [Boolean] + attr_accessor :done + alias_method :done?, :done + + # The normal response of the operation in case of success. If the original + # method returns no data on success, such as Delete, the response is google. + # protobuf.Empty. If the original method is standard Get/Create/Update, the + # response should be the resource. For other methods, the response should have + # the type XxxResponse, where Xxx is the original method name. For example, if + # the original method name is TakeSnapshot(), the inferred response type is + # TakeSnapshotResponse. + # Corresponds to the JSON property `response` + # @return [Hash] + attr_accessor :response + + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the name should + # have the format of operations/some/unique/name. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @error = args[:error] if args.key?(:error) + @metadata = args[:metadata] if args.key?(:metadata) @done = args[:done] if args.key?(:done) @response = args[:response] if args.key?(:response) @name = args[:name] if args.key?(:name) - @error = args[:error] if args.key?(:error) - @metadata = args[:metadata] if args.key?(:metadata) end end @@ -376,6 +1544,12 @@ module Google attr_accessor :is_preemptible alias_method :is_preemptible?, :is_preemptible + # Output-only The Google Compute Engine image resource used for cluster + # instances. Inferred from SoftwareConfig.image_version. + # Corresponds to the JSON property `imageUri` + # @return [String] + attr_accessor :image_uri + # Required The Google Compute Engine machine type used for cluster instances. # Example: https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us- # east1-a/machineTypes/n1-standard-2. @@ -383,12 +1557,6 @@ module Google # @return [String] attr_accessor :machine_type_uri - # Output-only The Google Compute Engine image resource used for cluster - # instances. Inferred from SoftwareConfig.image_version. - # Corresponds to the JSON property `imageUri` - # @return [String] - attr_accessor :image_uri - # Optional The list of instance names. Cloud Dataproc derives the names from # cluster_name, num_instances, and the instance group if not set by user ( # recommended practice is to let Cloud Dataproc derive the name). @@ -422,8 +1590,8 @@ module Google def update!(**args) @managed_group_config = args[:managed_group_config] if args.key?(:managed_group_config) @is_preemptible = args[:is_preemptible] if args.key?(:is_preemptible) - @machine_type_uri = args[:machine_type_uri] if args.key?(:machine_type_uri) @image_uri = args[:image_uri] if args.key?(:image_uri) + @machine_type_uri = args[:machine_type_uri] if args.key?(:machine_type_uri) @instance_names = args[:instance_names] if args.key?(:instance_names) @accelerators = args[:accelerators] if args.key?(:accelerators) @num_instances = args[:num_instances] if args.key?(:num_instances) @@ -458,6 +1626,11 @@ module Google class ListJobsResponse include Google::Apis::Core::Hashable + # Output-only Jobs list. + # Corresponds to the JSON property `jobs` + # @return [Array] + attr_accessor :jobs + # Optional This token is included in the response if there are more results to # fetch. To fetch additional results, provide this value as the page_token in a # subsequent ListJobsRequest. @@ -465,19 +1638,14 @@ module Google # @return [String] attr_accessor :next_page_token - # Output-only Jobs list. - # Corresponds to the JSON property `jobs` - # @return [Array] - attr_accessor :jobs - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) @jobs = args[:jobs] if args.key?(:jobs) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) end end @@ -486,6 +1654,11 @@ module Google class NodeInitializationAction include Google::Apis::Core::Hashable + # Required Google Cloud Storage URI of executable file. + # Corresponds to the JSON property `executableFile` + # @return [String] + attr_accessor :executable_file + # Optional Amount of time executable has to complete. Default is 10 minutes. # Cluster creation fails with an explanatory error message (the name of the # executable that caused the error and the exceeded timeout period) if the @@ -494,19 +1667,14 @@ module Google # @return [String] attr_accessor :execution_timeout - # Required Google Cloud Storage URI of executable file. - # Corresponds to the JSON property `executableFile` - # @return [String] - attr_accessor :executable_file - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @execution_timeout = args[:execution_timeout] if args.key?(:execution_timeout) @executable_file = args[:executable_file] if args.key?(:executable_file) + @execution_timeout = args[:execution_timeout] if args.key?(:execution_timeout) end end @@ -528,16 +1696,6 @@ module Google class SparkSqlJob include Google::Apis::Core::Hashable - # The HCFS URI of the script that contains SQL queries. - # Corresponds to the JSON property `queryFileUri` - # @return [String] - attr_accessor :query_file_uri - - # A list of queries to run on a cluster. - # Corresponds to the JSON property `queryList` - # @return [Google::Apis::DataprocV1::QueryList] - attr_accessor :query_list - # Optional Mapping of query variable names to values (equivalent to the Spark # SQL command: SET name="value";). # Corresponds to the JSON property `scriptVariables` @@ -561,18 +1719,28 @@ module Google # @return [Hash] attr_accessor :properties + # The HCFS URI of the script that contains SQL queries. + # Corresponds to the JSON property `queryFileUri` + # @return [String] + attr_accessor :query_file_uri + + # A list of queries to run on a cluster. + # Corresponds to the JSON property `queryList` + # @return [Google::Apis::DataprocV1::QueryList] + attr_accessor :query_list + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @query_file_uri = args[:query_file_uri] if args.key?(:query_file_uri) - @query_list = args[:query_list] if args.key?(:query_list) @script_variables = args[:script_variables] if args.key?(:script_variables) @jar_file_uris = args[:jar_file_uris] if args.key?(:jar_file_uris) @logging_config = args[:logging_config] if args.key?(:logging_config) @properties = args[:properties] if args.key?(:properties) + @query_file_uri = args[:query_file_uri] if args.key?(:query_file_uri) + @query_list = args[:query_list] if args.key?(:query_list) end end @@ -581,6 +1749,11 @@ module Google class Cluster include Google::Apis::Core::Hashable + # Required The Google Cloud Platform project ID that the cluster belongs to. + # Corresponds to the JSON property `projectId` + # @return [String] + attr_accessor :project_id + # Optional The labels to associate with this cluster. Label keys must contain 1 # to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/ # rfc1035.txt). Label values may be empty, but, if present, must contain 1 to 63 @@ -590,6 +1763,11 @@ module Google # @return [Hash] attr_accessor :labels + # The status of a cluster and its instances. + # Corresponds to the JSON property `status` + # @return [Google::Apis::DataprocV1::ClusterStatus] + attr_accessor :status + # Contains cluster daemon metrics, such as HDFS and YARN stats.Beta Feature: # This report is available for testing purposes only. It may be changed before # final release. @@ -597,26 +1775,15 @@ module Google # @return [Google::Apis::DataprocV1::ClusterMetrics] attr_accessor :metrics - # The status of a cluster and its instances. - # Corresponds to the JSON property `status` - # @return [Google::Apis::DataprocV1::ClusterStatus] - attr_accessor :status - - # The cluster config. - # Corresponds to the JSON property `config` - # @return [Google::Apis::DataprocV1::ClusterConfig] - attr_accessor :config - # Output-only The previous cluster status. # Corresponds to the JSON property `statusHistory` # @return [Array] attr_accessor :status_history - # Required The cluster name. Cluster names within a project must be unique. - # Names of deleted clusters can be reused. - # Corresponds to the JSON property `clusterName` - # @return [String] - attr_accessor :cluster_name + # The cluster config. + # Corresponds to the JSON property `config` + # @return [Google::Apis::DataprocV1::ClusterConfig] + attr_accessor :config # Output-only A cluster UUID (Unique Universal Identifier). Cloud Dataproc # generates this value when it creates the cluster. @@ -624,10 +1791,11 @@ module Google # @return [String] attr_accessor :cluster_uuid - # Required The Google Cloud Platform project ID that the cluster belongs to. - # Corresponds to the JSON property `projectId` + # Required The cluster name. Cluster names within a project must be unique. + # Names of deleted clusters can be reused. + # Corresponds to the JSON property `clusterName` # @return [String] - attr_accessor :project_id + attr_accessor :cluster_name def initialize(**args) update!(**args) @@ -635,14 +1803,14 @@ module Google # Update properties of this object def update!(**args) - @labels = args[:labels] if args.key?(:labels) - @metrics = args[:metrics] if args.key?(:metrics) - @status = args[:status] if args.key?(:status) - @config = args[:config] if args.key?(:config) - @status_history = args[:status_history] if args.key?(:status_history) - @cluster_name = args[:cluster_name] if args.key?(:cluster_name) - @cluster_uuid = args[:cluster_uuid] if args.key?(:cluster_uuid) @project_id = args[:project_id] if args.key?(:project_id) + @labels = args[:labels] if args.key?(:labels) + @status = args[:status] if args.key?(:status) + @metrics = args[:metrics] if args.key?(:metrics) + @status_history = args[:status_history] if args.key?(:status_history) + @config = args[:config] if args.key?(:config) + @cluster_uuid = args[:cluster_uuid] if args.key?(:cluster_uuid) + @cluster_name = args[:cluster_name] if args.key?(:cluster_name) end end @@ -670,1160 +1838,6 @@ module Google @operations = args[:operations] if args.key?(:operations) end end - - # Metadata describing the operation. - class OperationMetadata - include Google::Apis::Core::Hashable - - # Output-only Previous operation status. - # Corresponds to the JSON property `statusHistory` - # @return [Array] - attr_accessor :status_history - - # Output-only The operation type. - # Corresponds to the JSON property `operationType` - # @return [String] - attr_accessor :operation_type - - # Output-only Short description of operation. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The status of the operation. - # Corresponds to the JSON property `status` - # @return [Google::Apis::DataprocV1::OperationStatus] - attr_accessor :status - - # A message containing any operation metadata details. - # Corresponds to the JSON property `details` - # @return [String] - attr_accessor :details - - # A message containing the operation state. - # Corresponds to the JSON property `state` - # @return [String] - attr_accessor :state - - # Name of the cluster for the operation. - # Corresponds to the JSON property `clusterName` - # @return [String] - attr_accessor :cluster_name - - # Cluster UUId for the operation. - # Corresponds to the JSON property `clusterUuid` - # @return [String] - attr_accessor :cluster_uuid - - # A message containing the detailed operation state. - # Corresponds to the JSON property `innerState` - # @return [String] - attr_accessor :inner_state - - # The time that the operation completed. - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - # The time that the operation was started by the server. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - # Output-only Errors encountered during operation execution. - # Corresponds to the JSON property `warnings` - # @return [Array] - attr_accessor :warnings - - # The time that the operation was requested. - # Corresponds to the JSON property `insertTime` - # @return [String] - attr_accessor :insert_time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @status_history = args[:status_history] if args.key?(:status_history) - @operation_type = args[:operation_type] if args.key?(:operation_type) - @description = args[:description] if args.key?(:description) - @status = args[:status] if args.key?(:status) - @details = args[:details] if args.key?(:details) - @state = args[:state] if args.key?(:state) - @cluster_name = args[:cluster_name] if args.key?(:cluster_name) - @cluster_uuid = args[:cluster_uuid] if args.key?(:cluster_uuid) - @inner_state = args[:inner_state] if args.key?(:inner_state) - @end_time = args[:end_time] if args.key?(:end_time) - @start_time = args[:start_time] if args.key?(:start_time) - @warnings = args[:warnings] if args.key?(:warnings) - @insert_time = args[:insert_time] if args.key?(:insert_time) - end - end - - # Cloud Dataproc job config. - class JobPlacement - include Google::Apis::Core::Hashable - - # Required The name of the cluster where the job will be submitted. - # Corresponds to the JSON property `clusterName` - # @return [String] - attr_accessor :cluster_name - - # Output-only A cluster UUID generated by the Cloud Dataproc service when the - # job is submitted. - # Corresponds to the JSON property `clusterUuid` - # @return [String] - attr_accessor :cluster_uuid - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cluster_name = args[:cluster_name] if args.key?(:cluster_name) - @cluster_uuid = args[:cluster_uuid] if args.key?(:cluster_uuid) - end - end - - # Specifies the selection and config of software inside the cluster. - class SoftwareConfig - include Google::Apis::Core::Hashable - - # Optional The version of software inside the cluster. It must match the regular - # expression [0-9]+\.[0-9]+. If unspecified, it defaults to the latest version ( - # see Cloud Dataproc Versioning). - # Corresponds to the JSON property `imageVersion` - # @return [String] - attr_accessor :image_version - - # Optional The properties to set on daemon config files.Property keys are - # specified in prefix:property format, such as core:fs.defaultFS. The following - # are supported prefixes and their mappings: - # core: core-site.xml - # hdfs: hdfs-site.xml - # mapred: mapred-site.xml - # yarn: yarn-site.xml - # hive: hive-site.xml - # pig: pig.properties - # spark: spark-defaults.conf - # Corresponds to the JSON property `properties` - # @return [Hash] - attr_accessor :properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @image_version = args[:image_version] if args.key?(:image_version) - @properties = args[:properties] if args.key?(:properties) - end - end - - # A Cloud Dataproc job for running Apache Pig (https://pig.apache.org/) queries - # on YARN. - class PigJob - include Google::Apis::Core::Hashable - - # Optional Whether to continue executing queries if a query fails. The default - # value is false. Setting to true can be useful when executing independent - # parallel queries. - # Corresponds to the JSON property `continueOnFailure` - # @return [Boolean] - attr_accessor :continue_on_failure - alias_method :continue_on_failure?, :continue_on_failure - - # A list of queries to run on a cluster. - # Corresponds to the JSON property `queryList` - # @return [Google::Apis::DataprocV1::QueryList] - attr_accessor :query_list - - # The HCFS URI of the script that contains the Pig queries. - # Corresponds to the JSON property `queryFileUri` - # @return [String] - attr_accessor :query_file_uri - - # Optional Mapping of query variable names to values (equivalent to the Pig - # command: name=[value]). - # Corresponds to the JSON property `scriptVariables` - # @return [Hash] - attr_accessor :script_variables - - # Optional HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and - # Hadoop MapReduce (MR) tasks. Can contain Pig UDFs. - # Corresponds to the JSON property `jarFileUris` - # @return [Array] - attr_accessor :jar_file_uris - - # The runtime logging config of the job. - # Corresponds to the JSON property `loggingConfig` - # @return [Google::Apis::DataprocV1::LoggingConfig] - attr_accessor :logging_config - - # Optional A mapping of property names to values, used to configure Pig. - # Properties that conflict with values set by the Cloud Dataproc API may be - # overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/ - # pig/conf/pig.properties, and classes in user code. - # Corresponds to the JSON property `properties` - # @return [Hash] - attr_accessor :properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @continue_on_failure = args[:continue_on_failure] if args.key?(:continue_on_failure) - @query_list = args[:query_list] if args.key?(:query_list) - @query_file_uri = args[:query_file_uri] if args.key?(:query_file_uri) - @script_variables = args[:script_variables] if args.key?(:script_variables) - @jar_file_uris = args[:jar_file_uris] if args.key?(:jar_file_uris) - @logging_config = args[:logging_config] if args.key?(:logging_config) - @properties = args[:properties] if args.key?(:properties) - end - end - - # The status of a cluster and its instances. - class ClusterStatus - include Google::Apis::Core::Hashable - - # Output-only Time when this state was entered. - # Corresponds to the JSON property `stateStartTime` - # @return [String] - attr_accessor :state_start_time - - # Output-only Optional details of cluster's state. - # Corresponds to the JSON property `detail` - # @return [String] - attr_accessor :detail - - # Output-only The cluster's state. - # Corresponds to the JSON property `state` - # @return [String] - attr_accessor :state - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @state_start_time = args[:state_start_time] if args.key?(:state_start_time) - @detail = args[:detail] if args.key?(:detail) - @state = args[:state] if args.key?(:state) - end - end - - # The list of all clusters in a project. - class ListClustersResponse - include Google::Apis::Core::Hashable - - # Output-only The clusters in the project. - # Corresponds to the JSON property `clusters` - # @return [Array] - attr_accessor :clusters - - # Output-only This token is included in the response if there are more results - # to fetch. To fetch additional results, provide this value as the page_token in - # a subsequent ListClustersRequest. - # 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) - @clusters = args[:clusters] if args.key?(:clusters) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # A Cloud Dataproc job resource. - class Job - include Google::Apis::Core::Hashable - - # Encapsulates the full scoping used to reference a job. - # Corresponds to the JSON property `reference` - # @return [Google::Apis::DataprocV1::JobReference] - attr_accessor :reference - - # A Cloud Dataproc job for running Apache Hadoop MapReduce (https://hadoop. - # apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/ - # MapReduceTutorial.html) jobs on Apache Hadoop YARN (https://hadoop.apache.org/ - # docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html). - # Corresponds to the JSON property `hadoopJob` - # @return [Google::Apis::DataprocV1::HadoopJob] - attr_accessor :hadoop_job - - # Cloud Dataproc job config. - # Corresponds to the JSON property `placement` - # @return [Google::Apis::DataprocV1::JobPlacement] - attr_accessor :placement - - # Cloud Dataproc job status. - # Corresponds to the JSON property `status` - # @return [Google::Apis::DataprocV1::JobStatus] - attr_accessor :status - - # Output-only If present, the location of miscellaneous control files which may - # be used as part of job setup and handling. If not present, control files may - # be placed in the same location as driver_output_uri. - # Corresponds to the JSON property `driverControlFilesUri` - # @return [String] - attr_accessor :driver_control_files_uri - - # Job scheduling options.Beta Feature: These options are available for testing - # purposes only. They may be changed before final release. - # Corresponds to the JSON property `scheduling` - # @return [Google::Apis::DataprocV1::JobScheduling] - attr_accessor :scheduling - - # A Cloud Dataproc job for running Apache Pig (https://pig.apache.org/) queries - # on YARN. - # Corresponds to the JSON property `pigJob` - # @return [Google::Apis::DataprocV1::PigJob] - attr_accessor :pig_job - - # A Cloud Dataproc job for running Apache Hive (https://hive.apache.org/) - # queries on YARN. - # Corresponds to the JSON property `hiveJob` - # @return [Google::Apis::DataprocV1::HiveJob] - attr_accessor :hive_job - - # Optional The labels to associate with this job. Label keys must contain 1 to - # 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035. - # txt). Label values may be empty, but, if present, must contain 1 to 63 - # characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt) - # . No more than 32 labels can be associated with a job. - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels - - # Output-only A URI pointing to the location of the stdout of the job's driver - # program. - # Corresponds to the JSON property `driverOutputResourceUri` - # @return [String] - attr_accessor :driver_output_resource_uri - - # Output-only The previous job status. - # Corresponds to the JSON property `statusHistory` - # @return [Array] - attr_accessor :status_history - - # A Cloud Dataproc job for running Apache Spark SQL (http://spark.apache.org/sql/ - # ) queries. - # Corresponds to the JSON property `sparkSqlJob` - # @return [Google::Apis::DataprocV1::SparkSqlJob] - attr_accessor :spark_sql_job - - # A Cloud Dataproc job for running Apache Spark (http://spark.apache.org/) - # applications on YARN. - # Corresponds to the JSON property `sparkJob` - # @return [Google::Apis::DataprocV1::SparkJob] - attr_accessor :spark_job - - # Output-only The collection of YARN applications spun up by this job.Beta - # Feature: This report is available for testing purposes only. It may be changed - # before final release. - # Corresponds to the JSON property `yarnApplications` - # @return [Array] - attr_accessor :yarn_applications - - # A Cloud Dataproc job for running Apache PySpark (https://spark.apache.org/docs/ - # 0.9.0/python-programming-guide.html) applications on YARN. - # Corresponds to the JSON property `pysparkJob` - # @return [Google::Apis::DataprocV1::PySparkJob] - attr_accessor :pyspark_job - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @reference = args[:reference] if args.key?(:reference) - @hadoop_job = args[:hadoop_job] if args.key?(:hadoop_job) - @placement = args[:placement] if args.key?(:placement) - @status = args[:status] if args.key?(:status) - @driver_control_files_uri = args[:driver_control_files_uri] if args.key?(:driver_control_files_uri) - @scheduling = args[:scheduling] if args.key?(:scheduling) - @pig_job = args[:pig_job] if args.key?(:pig_job) - @hive_job = args[:hive_job] if args.key?(:hive_job) - @labels = args[:labels] if args.key?(:labels) - @driver_output_resource_uri = args[:driver_output_resource_uri] if args.key?(:driver_output_resource_uri) - @status_history = args[:status_history] if args.key?(:status_history) - @spark_sql_job = args[:spark_sql_job] if args.key?(:spark_sql_job) - @spark_job = args[:spark_job] if args.key?(:spark_job) - @yarn_applications = args[:yarn_applications] if args.key?(:yarn_applications) - @pyspark_job = args[:pyspark_job] if args.key?(:pyspark_job) - end - end - - # A Cloud Dataproc job for running Apache Spark (http://spark.apache.org/) - # applications on YARN. - class SparkJob - include Google::Apis::Core::Hashable - - # Optional HCFS URIs of archives to be extracted in the working directory of - # Spark drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, and . - # zip. - # Corresponds to the JSON property `archiveUris` - # @return [Array] - attr_accessor :archive_uris - - # The HCFS URI of the jar file that contains the main class. - # Corresponds to the JSON property `mainJarFileUri` - # @return [String] - attr_accessor :main_jar_file_uri - - # Optional HCFS URIs of jar files to add to the CLASSPATHs of the Spark driver - # and tasks. - # Corresponds to the JSON property `jarFileUris` - # @return [Array] - attr_accessor :jar_file_uris - - # The runtime logging config of the job. - # Corresponds to the JSON property `loggingConfig` - # @return [Google::Apis::DataprocV1::LoggingConfig] - attr_accessor :logging_config - - # Optional A mapping of property names to values, used to configure Spark. - # Properties that conflict with values set by the Cloud Dataproc API may be - # overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf - # and classes in user code. - # Corresponds to the JSON property `properties` - # @return [Hash] - attr_accessor :properties - - # Optional The arguments to pass to the driver. Do not include arguments, such - # as --conf, that can be set as job properties, since a collision may occur that - # causes an incorrect job submission. - # Corresponds to the JSON property `args` - # @return [Array] - attr_accessor :args - - # Optional HCFS URIs of files to be copied to the working directory of Spark - # drivers and distributed tasks. Useful for naively parallel tasks. - # Corresponds to the JSON property `fileUris` - # @return [Array] - attr_accessor :file_uris - - # The name of the driver's main class. The jar file that contains the class must - # be in the default CLASSPATH or specified in jar_file_uris. - # Corresponds to the JSON property `mainClass` - # @return [String] - attr_accessor :main_class - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @archive_uris = args[:archive_uris] if args.key?(:archive_uris) - @main_jar_file_uri = args[:main_jar_file_uri] if args.key?(:main_jar_file_uri) - @jar_file_uris = args[:jar_file_uris] if args.key?(:jar_file_uris) - @logging_config = args[:logging_config] if args.key?(:logging_config) - @properties = args[:properties] if args.key?(:properties) - @args = args[:args] if args.key?(:args) - @file_uris = args[:file_uris] if args.key?(:file_uris) - @main_class = args[:main_class] if args.key?(:main_class) - end - end - - # Cloud Dataproc job status. - class JobStatus - include Google::Apis::Core::Hashable - - # Output-only The time when this state was entered. - # Corresponds to the JSON property `stateStartTime` - # @return [String] - attr_accessor :state_start_time - - # Output-only A state message specifying the overall job state. - # Corresponds to the JSON property `state` - # @return [String] - attr_accessor :state - - # Output-only Optional job state details, such as an error description if the - # state is ERROR. - # Corresponds to the JSON property `details` - # @return [String] - attr_accessor :details - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @state_start_time = args[:state_start_time] if args.key?(:state_start_time) - @state = args[:state] if args.key?(:state) - @details = args[:details] if args.key?(:details) - end - end - - # Specifies the resources used to actively manage an instance group. - class ManagedGroupConfig - include Google::Apis::Core::Hashable - - # Output-only The name of the Instance Group Manager for this group. - # Corresponds to the JSON property `instanceGroupManagerName` - # @return [String] - attr_accessor :instance_group_manager_name - - # Output-only The name of the Instance Template used for the Managed Instance - # Group. - # Corresponds to the JSON property `instanceTemplateName` - # @return [String] - attr_accessor :instance_template_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @instance_group_manager_name = args[:instance_group_manager_name] if args.key?(:instance_group_manager_name) - @instance_template_name = args[:instance_template_name] if args.key?(:instance_template_name) - end - end - - # The status of the operation. - class ClusterOperationStatus - include Google::Apis::Core::Hashable - - # Output-only A message containing the operation state. - # Corresponds to the JSON property `state` - # @return [String] - attr_accessor :state - - # Output-onlyA message containing any operation metadata details. - # Corresponds to the JSON property `details` - # @return [String] - attr_accessor :details - - # Output-only A message containing the detailed operation state. - # Corresponds to the JSON property `innerState` - # @return [String] - attr_accessor :inner_state - - # Output-only The time this state was entered. - # Corresponds to the JSON property `stateStartTime` - # @return [String] - attr_accessor :state_start_time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @state = args[:state] if args.key?(:state) - @details = args[:details] if args.key?(:details) - @inner_state = args[:inner_state] if args.key?(:inner_state) - @state_start_time = args[:state_start_time] if args.key?(:state_start_time) - end - end - - # A Cloud Dataproc job for running Apache Hadoop MapReduce (https://hadoop. - # apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/ - # MapReduceTutorial.html) jobs on Apache Hadoop YARN (https://hadoop.apache.org/ - # docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html). - class HadoopJob - include Google::Apis::Core::Hashable - - # Optional A mapping of property names to values, used to configure Hadoop. - # Properties that conflict with values set by the Cloud Dataproc API may be - # overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes - # in user code. - # Corresponds to the JSON property `properties` - # @return [Hash] - attr_accessor :properties - - # Optional The arguments to pass to the driver. Do not include arguments, such - # as -libjars or -Dfoo=bar, that can be set as job properties, since a collision - # may occur that causes an incorrect job submission. - # Corresponds to the JSON property `args` - # @return [Array] - attr_accessor :args - - # Optional HCFS (Hadoop Compatible Filesystem) URIs of files to be copied to the - # working directory of Hadoop drivers and distributed tasks. Useful for naively - # parallel tasks. - # Corresponds to the JSON property `fileUris` - # @return [Array] - attr_accessor :file_uris - - # The name of the driver's main class. The jar file containing the class must be - # in the default CLASSPATH or specified in jar_file_uris. - # Corresponds to the JSON property `mainClass` - # @return [String] - attr_accessor :main_class - - # Optional HCFS URIs of archives to be extracted in the working directory of - # Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or . - # zip. - # Corresponds to the JSON property `archiveUris` - # @return [Array] - attr_accessor :archive_uris - - # The HCFS URI of the jar file containing the main class. Examples: 'gs://foo- - # bucket/analytics-binaries/extract-useful-metrics-mr.jar' 'hdfs:/tmp/test- - # samples/custom-wordcount.jar' 'file:///home/usr/lib/hadoop-mapreduce/hadoop- - # mapreduce-examples.jar' - # Corresponds to the JSON property `mainJarFileUri` - # @return [String] - attr_accessor :main_jar_file_uri - - # Optional Jar file URIs to add to the CLASSPATHs of the Hadoop driver and tasks. - # Corresponds to the JSON property `jarFileUris` - # @return [Array] - attr_accessor :jar_file_uris - - # The runtime logging config of the job. - # Corresponds to the JSON property `loggingConfig` - # @return [Google::Apis::DataprocV1::LoggingConfig] - attr_accessor :logging_config - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @properties = args[:properties] if args.key?(:properties) - @args = args[:args] if args.key?(:args) - @file_uris = args[:file_uris] if args.key?(:file_uris) - @main_class = args[:main_class] if args.key?(:main_class) - @archive_uris = args[:archive_uris] if args.key?(:archive_uris) - @main_jar_file_uri = args[:main_jar_file_uri] if args.key?(:main_jar_file_uri) - @jar_file_uris = args[:jar_file_uris] if args.key?(:jar_file_uris) - @logging_config = args[:logging_config] if args.key?(:logging_config) - end - end - - # A list of queries to run on a cluster. - class QueryList - include Google::Apis::Core::Hashable - - # Required The queries to execute. You do not need to terminate a query with a - # semicolon. Multiple queries can be specified in one string by separating each - # with a semicolon. Here is an example of an Cloud Dataproc API snippet that - # uses a QueryList to specify a HiveJob: - # "hiveJob": ` - # "queryList": ` - # "queries": [ - # "query1", - # "query2", - # "query3;query4", - # ] - # ` - # ` - # Corresponds to the JSON property `queries` - # @return [Array] - attr_accessor :queries - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @queries = args[:queries] if args.key?(:queries) - end - end - - # A YARN application created by a job. Application information is a subset of < - # code>org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto. - # Beta Feature: This report is available for testing purposes only. It may be - # changed before final release. - class YarnApplication - include Google::Apis::Core::Hashable - - # Required The application state. - # Corresponds to the JSON property `state` - # @return [String] - attr_accessor :state - - # Required The application name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Optional The HTTP URL of the ApplicationMaster, HistoryServer, or - # TimelineServer that provides application-specific information. The URL uses - # the internal hostname, and requires a proxy server for resolution and, - # possibly, access. - # Corresponds to the JSON property `trackingUrl` - # @return [String] - attr_accessor :tracking_url - - # Required The numerical progress of the application, from 1 to 100. - # Corresponds to the JSON property `progress` - # @return [Float] - attr_accessor :progress - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @state = args[:state] if args.key?(:state) - @name = args[:name] if args.key?(:name) - @tracking_url = args[:tracking_url] if args.key?(:tracking_url) - @progress = args[:progress] if args.key?(:progress) - end - end - - # A request to collect cluster diagnostic information. - class DiagnoseClusterRequest - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # Specifies the config of disk options for a group of VM instances. - class DiskConfig - include Google::Apis::Core::Hashable - - # Optional Size in GB of the boot disk (default is 500GB). - # Corresponds to the JSON property `bootDiskSizeGb` - # @return [Fixnum] - attr_accessor :boot_disk_size_gb - - # Optional Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not - # attached, the boot disk is used to store runtime logs and HDFS (https://hadoop. - # apache.org/docs/r1.2.1/hdfs_user_guide.html) data. If one or more SSDs are - # attached, this runtime bulk data is spread across them, and the boot disk - # contains only basic config and installed binaries. - # Corresponds to the JSON property `numLocalSsds` - # @return [Fixnum] - attr_accessor :num_local_ssds - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @boot_disk_size_gb = args[:boot_disk_size_gb] if args.key?(:boot_disk_size_gb) - @num_local_ssds = args[:num_local_ssds] if args.key?(:num_local_ssds) - end - end - - # Metadata describing the operation. - class ClusterOperationMetadata - include Google::Apis::Core::Hashable - - # Output-only Short description of operation. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Output-only Errors encountered during operation execution. - # Corresponds to the JSON property `warnings` - # @return [Array] - attr_accessor :warnings - - # Output-only Labels associated with the operation - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels - - # The status of the operation. - # Corresponds to the JSON property `status` - # @return [Google::Apis::DataprocV1::ClusterOperationStatus] - attr_accessor :status - - # Output-only The previous operation status. - # Corresponds to the JSON property `statusHistory` - # @return [Array] - attr_accessor :status_history - - # Output-only Cluster UUID for the operation. - # Corresponds to the JSON property `clusterUuid` - # @return [String] - attr_accessor :cluster_uuid - - # Output-only Name of the cluster for the operation. - # Corresponds to the JSON property `clusterName` - # @return [String] - attr_accessor :cluster_name - - # Output-only The operation type. - # Corresponds to the JSON property `operationType` - # @return [String] - attr_accessor :operation_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @description = args[:description] if args.key?(:description) - @warnings = args[:warnings] if args.key?(:warnings) - @labels = args[:labels] if args.key?(:labels) - @status = args[:status] if args.key?(:status) - @status_history = args[:status_history] if args.key?(:status_history) - @cluster_uuid = args[:cluster_uuid] if args.key?(:cluster_uuid) - @cluster_name = args[:cluster_name] if args.key?(:cluster_name) - @operation_type = args[:operation_type] if args.key?(:operation_type) - end - end - - # A Cloud Dataproc job for running Apache Hive (https://hive.apache.org/) - # queries on YARN. - class HiveJob - include Google::Apis::Core::Hashable - - # Optional Whether to continue executing queries if a query fails. The default - # value is false. Setting to true can be useful when executing independent - # parallel queries. - # Corresponds to the JSON property `continueOnFailure` - # @return [Boolean] - attr_accessor :continue_on_failure - alias_method :continue_on_failure?, :continue_on_failure - - # The HCFS URI of the script that contains Hive queries. - # Corresponds to the JSON property `queryFileUri` - # @return [String] - attr_accessor :query_file_uri - - # A list of queries to run on a cluster. - # Corresponds to the JSON property `queryList` - # @return [Google::Apis::DataprocV1::QueryList] - attr_accessor :query_list - - # Optional HCFS URIs of jar files to add to the CLASSPATH of the Hive server and - # Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and UDFs. - # Corresponds to the JSON property `jarFileUris` - # @return [Array] - attr_accessor :jar_file_uris - - # Optional Mapping of query variable names to values (equivalent to the Hive - # command: SET name="value";). - # Corresponds to the JSON property `scriptVariables` - # @return [Hash] - attr_accessor :script_variables - - # Optional A mapping of property names and values, used to configure Hive. - # Properties that conflict with values set by the Cloud Dataproc API may be - # overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/ - # hive/conf/hive-site.xml, and classes in user code. - # Corresponds to the JSON property `properties` - # @return [Hash] - attr_accessor :properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @continue_on_failure = args[:continue_on_failure] if args.key?(:continue_on_failure) - @query_file_uri = args[:query_file_uri] if args.key?(:query_file_uri) - @query_list = args[:query_list] if args.key?(:query_list) - @jar_file_uris = args[:jar_file_uris] if args.key?(:jar_file_uris) - @script_variables = args[:script_variables] if args.key?(:script_variables) - @properties = args[:properties] if args.key?(:properties) - end - end - - # A generic empty message that you can re-use to avoid defining duplicated empty - # messages in your APIs. A typical example is to use it as the request or the - # response type of an API method. For instance: - # service Foo ` - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # ` - # The JSON representation for Empty is empty JSON object ``. - class Empty - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # The location of diagnostic output. - class DiagnoseClusterResults - include Google::Apis::Core::Hashable - - # Output-only The Google Cloud Storage URI of the diagnostic output. The output - # report is a plain text file with a summary of collected diagnostics. - # Corresponds to the JSON property `outputUri` - # @return [String] - attr_accessor :output_uri - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @output_uri = args[:output_uri] if args.key?(:output_uri) - end - end - - # The cluster config. - class ClusterConfig - include Google::Apis::Core::Hashable - - # Optional Commands to execute on each node after config is completed. By - # default, executables are run on master and all worker nodes. You can test a - # node's role metadata to run an executable on a master or worker - # node, as shown below using curl (you can also use wget): - # ROLE=$(curl -H Metadata-Flavor:Google http://metadata/computeMetadata/v1/ - # instance/attributes/dataproc-role) - # if [[ "$`ROLE`" == 'Master' ]]; then - # ... master specific actions ... - # else - # ... worker specific actions ... - # fi - # Corresponds to the JSON property `initializationActions` - # @return [Array] - attr_accessor :initialization_actions - - # Optional A Google Cloud Storage staging bucket used for sharing generated SSH - # keys and config. If you do not specify a staging bucket, Cloud Dataproc will - # determine an appropriate Cloud Storage location (US, ASIA, or EU) for your - # cluster's staging bucket according to the Google Compute Engine zone where - # your cluster is deployed, and then it will create and manage this project- - # level, per-location bucket for you. - # Corresponds to the JSON property `configBucket` - # @return [String] - attr_accessor :config_bucket - - # Optional The config settings for Google Compute Engine resources in an - # instance group, such as a master or worker group. - # Corresponds to the JSON property `workerConfig` - # @return [Google::Apis::DataprocV1::InstanceGroupConfig] - attr_accessor :worker_config - - # Common config settings for resources of Google Compute Engine cluster - # instances, applicable to all instances in the cluster. - # Corresponds to the JSON property `gceClusterConfig` - # @return [Google::Apis::DataprocV1::GceClusterConfig] - attr_accessor :gce_cluster_config - - # Specifies the selection and config of software inside the cluster. - # Corresponds to the JSON property `softwareConfig` - # @return [Google::Apis::DataprocV1::SoftwareConfig] - attr_accessor :software_config - - # Optional The config settings for Google Compute Engine resources in an - # instance group, such as a master or worker group. - # Corresponds to the JSON property `masterConfig` - # @return [Google::Apis::DataprocV1::InstanceGroupConfig] - attr_accessor :master_config - - # Optional The config settings for Google Compute Engine resources in an - # instance group, such as a master or worker group. - # Corresponds to the JSON property `secondaryWorkerConfig` - # @return [Google::Apis::DataprocV1::InstanceGroupConfig] - attr_accessor :secondary_worker_config - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @initialization_actions = args[:initialization_actions] if args.key?(:initialization_actions) - @config_bucket = args[:config_bucket] if args.key?(:config_bucket) - @worker_config = args[:worker_config] if args.key?(:worker_config) - @gce_cluster_config = args[:gce_cluster_config] if args.key?(:gce_cluster_config) - @software_config = args[:software_config] if args.key?(:software_config) - @master_config = args[:master_config] if args.key?(:master_config) - @secondary_worker_config = args[:secondary_worker_config] if args.key?(:secondary_worker_config) - end - end - - # A Cloud Dataproc job for running Apache PySpark (https://spark.apache.org/docs/ - # 0.9.0/python-programming-guide.html) applications on YARN. - class PySparkJob - include Google::Apis::Core::Hashable - - # Optional HCFS file URIs of Python files to pass to the PySpark framework. - # Supported file types: .py, .egg, and .zip. - # Corresponds to the JSON property `pythonFileUris` - # @return [Array] - attr_accessor :python_file_uris - - # Required The HCFS URI of the main Python file to use as the driver. Must be a . - # py file. - # Corresponds to the JSON property `mainPythonFileUri` - # @return [String] - attr_accessor :main_python_file_uri - - # Optional HCFS URIs of archives to be extracted in the working directory of . - # jar, .tar, .tar.gz, .tgz, and .zip. - # Corresponds to the JSON property `archiveUris` - # @return [Array] - attr_accessor :archive_uris - - # Optional HCFS URIs of jar files to add to the CLASSPATHs of the Python driver - # and tasks. - # Corresponds to the JSON property `jarFileUris` - # @return [Array] - attr_accessor :jar_file_uris - - # The runtime logging config of the job. - # Corresponds to the JSON property `loggingConfig` - # @return [Google::Apis::DataprocV1::LoggingConfig] - attr_accessor :logging_config - - # Optional A mapping of property names to values, used to configure PySpark. - # Properties that conflict with values set by the Cloud Dataproc API may be - # overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf - # and classes in user code. - # Corresponds to the JSON property `properties` - # @return [Hash] - attr_accessor :properties - - # Optional The arguments to pass to the driver. Do not include arguments, such - # as --conf, that can be set as job properties, since a collision may occur that - # causes an incorrect job submission. - # Corresponds to the JSON property `args` - # @return [Array] - attr_accessor :args - - # Optional HCFS URIs of files to be copied to the working directory of Python - # drivers and distributed tasks. Useful for naively parallel tasks. - # Corresponds to the JSON property `fileUris` - # @return [Array] - attr_accessor :file_uris - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @python_file_uris = args[:python_file_uris] if args.key?(:python_file_uris) - @main_python_file_uri = args[:main_python_file_uri] if args.key?(:main_python_file_uri) - @archive_uris = args[:archive_uris] if args.key?(:archive_uris) - @jar_file_uris = args[:jar_file_uris] if args.key?(:jar_file_uris) - @logging_config = args[:logging_config] if args.key?(:logging_config) - @properties = args[:properties] if args.key?(:properties) - @args = args[:args] if args.key?(:args) - @file_uris = args[:file_uris] if args.key?(:file_uris) - end - end - - # Common config settings for resources of Google Compute Engine cluster - # instances, applicable to all instances in the cluster. - class GceClusterConfig - include Google::Apis::Core::Hashable - - # Optional The Google Compute Engine network to be used for machine - # communications. Cannot be specified with subnetwork_uri. If neither - # network_uri nor subnetwork_uri is specified, the "default" network of the - # project is used, if it exists. Cannot be a "Custom Subnet Network" (see Using - # Subnetworks for more information). Example: https://www.googleapis.com/compute/ - # v1/projects/[project_id]/regions/global/default. - # Corresponds to the JSON property `networkUri` - # @return [String] - attr_accessor :network_uri - - # Required The zone where the Google Compute Engine cluster will be located. - # Example: https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[ - # zone]. - # Corresponds to the JSON property `zoneUri` - # @return [String] - attr_accessor :zone_uri - - # The Google Compute Engine metadata entries to add to all instances (see - # Project and instance metadata (https://cloud.google.com/compute/docs/storing- - # retrieving-metadata#project_and_instance_metadata)). - # Corresponds to the JSON property `metadata` - # @return [Hash] - attr_accessor :metadata - - # Optional If true, all instances in the cluster will only have internal IP - # addresses. By default, clusters are not restricted to internal IP addresses, - # and will have ephemeral external IP addresses assigned to each instance. This - # internal_ip_only restriction can only be enabled for subnetwork enabled - # networks, and all off-cluster dependencies must be configured to be accessible - # without external IP addresses. - # Corresponds to the JSON property `internalIpOnly` - # @return [Boolean] - attr_accessor :internal_ip_only - alias_method :internal_ip_only?, :internal_ip_only - - # Optional The URIs of service account scopes to be included in Google Compute - # Engine instances. The following base set of scopes is always included: - # https://www.googleapis.com/auth/cloud.useraccounts.readonly - # https://www.googleapis.com/auth/devstorage.read_write - # https://www.googleapis.com/auth/logging.writeIf no scopes are specified, the - # following defaults are also provided: - # https://www.googleapis.com/auth/bigquery - # https://www.googleapis.com/auth/bigtable.admin.table - # https://www.googleapis.com/auth/bigtable.data - # https://www.googleapis.com/auth/devstorage.full_control - # Corresponds to the JSON property `serviceAccountScopes` - # @return [Array] - attr_accessor :service_account_scopes - - # The Google Compute Engine tags to add to all instances (see Tagging instances). - # Corresponds to the JSON property `tags` - # @return [Array] - attr_accessor :tags - - # Optional The service account of the instances. Defaults to the default Google - # Compute Engine service account. Custom service accounts need permissions - # equivalent to the folloing IAM roles: - # roles/logging.logWriter - # roles/storage.objectAdmin(see https://cloud.google.com/compute/docs/access/ - # service-accounts#custom_service_accounts for more information). Example: [ - # account_id]@[project_id].iam.gserviceaccount.com - # Corresponds to the JSON property `serviceAccount` - # @return [String] - attr_accessor :service_account - - # Optional The Google Compute Engine subnetwork to be used for machine - # communications. Cannot be specified with network_uri. Example: https://www. - # googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0. - # Corresponds to the JSON property `subnetworkUri` - # @return [String] - attr_accessor :subnetwork_uri - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @network_uri = args[:network_uri] if args.key?(:network_uri) - @zone_uri = args[:zone_uri] if args.key?(:zone_uri) - @metadata = args[:metadata] if args.key?(:metadata) - @internal_ip_only = args[:internal_ip_only] if args.key?(:internal_ip_only) - @service_account_scopes = args[:service_account_scopes] if args.key?(:service_account_scopes) - @tags = args[:tags] if args.key?(:tags) - @service_account = args[:service_account] if args.key?(:service_account) - @subnetwork_uri = args[:subnetwork_uri] if args.key?(:subnetwork_uri) - end - end end end end diff --git a/generated/google/apis/dataproc_v1/representations.rb b/generated/google/apis/dataproc_v1/representations.rb index dee68ff18..2017ca661 100644 --- a/generated/google/apis/dataproc_v1/representations.rb +++ b/generated/google/apis/dataproc_v1/representations.rb @@ -22,7 +22,139 @@ module Google module Apis module DataprocV1 - class ClusterMetrics + class OperationMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SoftwareConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class JobPlacement + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PigJob + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ClusterStatus + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListClustersResponse + 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 SparkJob + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class JobStatus + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ManagedGroupConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ClusterOperationStatus + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class HadoopJob + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class QueryList + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class YarnApplication + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DiagnoseClusterRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DiskConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ClusterOperationMetadata + 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 HiveJob + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DiagnoseClusterResults + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ClusterConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PySparkJob + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GceClusterConfig class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -34,6 +166,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class ClusterMetrics + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class LoggingConfig class Representation < Google::Apis::Core::JsonRepresentation; end @@ -125,141 +263,294 @@ module Google end class OperationMetadata - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :description, as: 'description' + property :status, as: 'status', class: Google::Apis::DataprocV1::OperationStatus, decorator: Google::Apis::DataprocV1::OperationStatus::Representation - include Google::Apis::Core::JsonObjectSupport - end + property :details, as: 'details' + property :state, as: 'state' + property :cluster_name, as: 'clusterName' + property :cluster_uuid, as: 'clusterUuid' + property :inner_state, as: 'innerState' + property :end_time, as: 'endTime' + property :start_time, as: 'startTime' + collection :warnings, as: 'warnings' + property :insert_time, as: 'insertTime' + collection :status_history, as: 'statusHistory', class: Google::Apis::DataprocV1::OperationStatus, decorator: Google::Apis::DataprocV1::OperationStatus::Representation - class JobPlacement - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + property :operation_type, as: 'operationType' + end end class SoftwareConfig - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :image_version, as: 'imageVersion' + hash :properties, as: 'properties' + end + end - include Google::Apis::Core::JsonObjectSupport + class JobPlacement + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :cluster_name, as: 'clusterName' + property :cluster_uuid, as: 'clusterUuid' + end end class PigJob - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :continue_on_failure, as: 'continueOnFailure' + property :query_file_uri, as: 'queryFileUri' + property :query_list, as: 'queryList', class: Google::Apis::DataprocV1::QueryList, decorator: Google::Apis::DataprocV1::QueryList::Representation - include Google::Apis::Core::JsonObjectSupport + collection :jar_file_uris, as: 'jarFileUris' + hash :script_variables, as: 'scriptVariables' + property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1::LoggingConfig, decorator: Google::Apis::DataprocV1::LoggingConfig::Representation + + hash :properties, as: 'properties' + end end class ClusterStatus - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :detail, as: 'detail' + property :state, as: 'state' + property :state_start_time, as: 'stateStartTime' + property :substate, as: 'substate' + end end class ListClustersResponse - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :clusters, as: 'clusters', class: Google::Apis::DataprocV1::Cluster, decorator: Google::Apis::DataprocV1::Cluster::Representation - include Google::Apis::Core::JsonObjectSupport + property :next_page_token, as: 'nextPageToken' + end end class Job - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :status, as: 'status', class: Google::Apis::DataprocV1::JobStatus, decorator: Google::Apis::DataprocV1::JobStatus::Representation - include Google::Apis::Core::JsonObjectSupport + property :placement, as: 'placement', class: Google::Apis::DataprocV1::JobPlacement, decorator: Google::Apis::DataprocV1::JobPlacement::Representation + + property :driver_control_files_uri, as: 'driverControlFilesUri' + property :scheduling, as: 'scheduling', class: Google::Apis::DataprocV1::JobScheduling, decorator: Google::Apis::DataprocV1::JobScheduling::Representation + + property :pig_job, as: 'pigJob', class: Google::Apis::DataprocV1::PigJob, decorator: Google::Apis::DataprocV1::PigJob::Representation + + property :hive_job, as: 'hiveJob', class: Google::Apis::DataprocV1::HiveJob, decorator: Google::Apis::DataprocV1::HiveJob::Representation + + hash :labels, as: 'labels' + property :driver_output_resource_uri, as: 'driverOutputResourceUri' + property :spark_job, as: 'sparkJob', class: Google::Apis::DataprocV1::SparkJob, decorator: Google::Apis::DataprocV1::SparkJob::Representation + + property :spark_sql_job, as: 'sparkSqlJob', class: Google::Apis::DataprocV1::SparkSqlJob, decorator: Google::Apis::DataprocV1::SparkSqlJob::Representation + + collection :status_history, as: 'statusHistory', class: Google::Apis::DataprocV1::JobStatus, decorator: Google::Apis::DataprocV1::JobStatus::Representation + + collection :yarn_applications, as: 'yarnApplications', class: Google::Apis::DataprocV1::YarnApplication, decorator: Google::Apis::DataprocV1::YarnApplication::Representation + + property :pyspark_job, as: 'pysparkJob', class: Google::Apis::DataprocV1::PySparkJob, decorator: Google::Apis::DataprocV1::PySparkJob::Representation + + property :reference, as: 'reference', class: Google::Apis::DataprocV1::JobReference, decorator: Google::Apis::DataprocV1::JobReference::Representation + + property :hadoop_job, as: 'hadoopJob', class: Google::Apis::DataprocV1::HadoopJob, decorator: Google::Apis::DataprocV1::HadoopJob::Representation + + end end class SparkJob - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :jar_file_uris, as: 'jarFileUris' + property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1::LoggingConfig, decorator: Google::Apis::DataprocV1::LoggingConfig::Representation - include Google::Apis::Core::JsonObjectSupport + hash :properties, as: 'properties' + collection :args, as: 'args' + collection :file_uris, as: 'fileUris' + property :main_class, as: 'mainClass' + collection :archive_uris, as: 'archiveUris' + property :main_jar_file_uri, as: 'mainJarFileUri' + end end class JobStatus - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :state, as: 'state' + property :details, as: 'details' + property :state_start_time, as: 'stateStartTime' + property :substate, as: 'substate' + end end class ManagedGroupConfig - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :instance_group_manager_name, as: 'instanceGroupManagerName' + property :instance_template_name, as: 'instanceTemplateName' + end end class ClusterOperationStatus - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :inner_state, as: 'innerState' + property :state_start_time, as: 'stateStartTime' + property :state, as: 'state' + property :details, as: 'details' + end end class HadoopJob - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :main_class, as: 'mainClass' + collection :archive_uris, as: 'archiveUris' + property :main_jar_file_uri, as: 'mainJarFileUri' + collection :jar_file_uris, as: 'jarFileUris' + property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1::LoggingConfig, decorator: Google::Apis::DataprocV1::LoggingConfig::Representation - include Google::Apis::Core::JsonObjectSupport + hash :properties, as: 'properties' + collection :args, as: 'args' + collection :file_uris, as: 'fileUris' + end end class QueryList - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :queries, as: 'queries' + end end class YarnApplication - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :tracking_url, as: 'trackingUrl' + property :progress, as: 'progress' + property :state, as: 'state' + property :name, as: 'name' + end end class DiagnoseClusterRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end end class DiskConfig - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :boot_disk_size_gb, as: 'bootDiskSizeGb' + property :num_local_ssds, as: 'numLocalSsds' + end end class ClusterOperationMetadata - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :operation_type, as: 'operationType' + property :description, as: 'description' + collection :warnings, as: 'warnings' + hash :labels, as: 'labels' + property :status, as: 'status', class: Google::Apis::DataprocV1::ClusterOperationStatus, decorator: Google::Apis::DataprocV1::ClusterOperationStatus::Representation - include Google::Apis::Core::JsonObjectSupport - end + collection :status_history, as: 'statusHistory', class: Google::Apis::DataprocV1::ClusterOperationStatus, decorator: Google::Apis::DataprocV1::ClusterOperationStatus::Representation - class HiveJob - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + property :cluster_uuid, as: 'clusterUuid' + property :cluster_name, as: 'clusterName' + end end class Empty - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end - include Google::Apis::Core::JsonObjectSupport + class HiveJob + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :jar_file_uris, as: 'jarFileUris' + hash :script_variables, as: 'scriptVariables' + hash :properties, as: 'properties' + property :continue_on_failure, as: 'continueOnFailure' + property :query_file_uri, as: 'queryFileUri' + property :query_list, as: 'queryList', class: Google::Apis::DataprocV1::QueryList, decorator: Google::Apis::DataprocV1::QueryList::Representation + + end end class DiagnoseClusterResults - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :output_uri, as: 'outputUri' + end end class ClusterConfig - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :master_config, as: 'masterConfig', class: Google::Apis::DataprocV1::InstanceGroupConfig, decorator: Google::Apis::DataprocV1::InstanceGroupConfig::Representation - include Google::Apis::Core::JsonObjectSupport + property :secondary_worker_config, as: 'secondaryWorkerConfig', class: Google::Apis::DataprocV1::InstanceGroupConfig, decorator: Google::Apis::DataprocV1::InstanceGroupConfig::Representation + + collection :initialization_actions, as: 'initializationActions', class: Google::Apis::DataprocV1::NodeInitializationAction, decorator: Google::Apis::DataprocV1::NodeInitializationAction::Representation + + property :config_bucket, as: 'configBucket' + property :worker_config, as: 'workerConfig', class: Google::Apis::DataprocV1::InstanceGroupConfig, decorator: Google::Apis::DataprocV1::InstanceGroupConfig::Representation + + property :gce_cluster_config, as: 'gceClusterConfig', class: Google::Apis::DataprocV1::GceClusterConfig, decorator: Google::Apis::DataprocV1::GceClusterConfig::Representation + + property :software_config, as: 'softwareConfig', class: Google::Apis::DataprocV1::SoftwareConfig, decorator: Google::Apis::DataprocV1::SoftwareConfig::Representation + + end end class PySparkJob - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :jar_file_uris, as: 'jarFileUris' + property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1::LoggingConfig, decorator: Google::Apis::DataprocV1::LoggingConfig::Representation - include Google::Apis::Core::JsonObjectSupport + hash :properties, as: 'properties' + collection :args, as: 'args' + collection :file_uris, as: 'fileUris' + collection :python_file_uris, as: 'pythonFileUris' + property :main_python_file_uri, as: 'mainPythonFileUri' + collection :archive_uris, as: 'archiveUris' + end end class GceClusterConfig - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :metadata, as: 'metadata' + property :internal_ip_only, as: 'internalIpOnly' + collection :service_account_scopes, as: 'serviceAccountScopes' + collection :tags, as: 'tags' + property :service_account, as: 'serviceAccount' + property :subnetwork_uri, as: 'subnetworkUri' + property :network_uri, as: 'networkUri' + property :zone_uri, as: 'zoneUri' + end + end - include Google::Apis::Core::JsonObjectSupport + class AcceleratorConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :accelerator_count, as: 'acceleratorCount' + property :accelerator_type_uri, as: 'acceleratorTypeUri' + end end class ClusterMetrics @@ -270,14 +561,6 @@ module Google end end - class AcceleratorConfig - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :accelerator_type_uri, as: 'acceleratorTypeUri' - property :accelerator_count, as: 'acceleratorCount' - end - end - class LoggingConfig # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -295,12 +578,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::DataprocV1::Status, decorator: Google::Apis::DataprocV1::Status::Representation hash :metadata, as: 'metadata' + property :done, as: 'done' + hash :response, as: 'response' + property :name, as: 'name' end end @@ -345,8 +628,8 @@ module Google property :managed_group_config, as: 'managedGroupConfig', class: Google::Apis::DataprocV1::ManagedGroupConfig, decorator: Google::Apis::DataprocV1::ManagedGroupConfig::Representation property :is_preemptible, as: 'isPreemptible' - property :machine_type_uri, as: 'machineTypeUri' property :image_uri, as: 'imageUri' + property :machine_type_uri, as: 'machineTypeUri' collection :instance_names, as: 'instanceNames' collection :accelerators, as: 'accelerators', class: Google::Apis::DataprocV1::AcceleratorConfig, decorator: Google::Apis::DataprocV1::AcceleratorConfig::Representation @@ -366,17 +649,17 @@ module Google class ListJobsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' collection :jobs, as: 'jobs', class: Google::Apis::DataprocV1::Job, decorator: Google::Apis::DataprocV1::Job::Representation + property :next_page_token, as: 'nextPageToken' end end class NodeInitializationAction # @private class Representation < Google::Apis::Core::JsonRepresentation - property :execution_timeout, as: 'executionTimeout' property :executable_file, as: 'executableFile' + property :execution_timeout, as: 'executionTimeout' end end @@ -389,32 +672,32 @@ module Google class SparkSqlJob # @private class Representation < Google::Apis::Core::JsonRepresentation - property :query_file_uri, as: 'queryFileUri' - property :query_list, as: 'queryList', class: Google::Apis::DataprocV1::QueryList, decorator: Google::Apis::DataprocV1::QueryList::Representation - hash :script_variables, as: 'scriptVariables' collection :jar_file_uris, as: 'jarFileUris' property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1::LoggingConfig, decorator: Google::Apis::DataprocV1::LoggingConfig::Representation hash :properties, as: 'properties' + property :query_file_uri, as: 'queryFileUri' + property :query_list, as: 'queryList', class: Google::Apis::DataprocV1::QueryList, decorator: Google::Apis::DataprocV1::QueryList::Representation + end end class Cluster # @private class Representation < Google::Apis::Core::JsonRepresentation + property :project_id, as: 'projectId' hash :labels, as: 'labels' - property :metrics, as: 'metrics', class: Google::Apis::DataprocV1::ClusterMetrics, decorator: Google::Apis::DataprocV1::ClusterMetrics::Representation - property :status, as: 'status', class: Google::Apis::DataprocV1::ClusterStatus, decorator: Google::Apis::DataprocV1::ClusterStatus::Representation - property :config, as: 'config', class: Google::Apis::DataprocV1::ClusterConfig, decorator: Google::Apis::DataprocV1::ClusterConfig::Representation + property :metrics, as: 'metrics', class: Google::Apis::DataprocV1::ClusterMetrics, decorator: Google::Apis::DataprocV1::ClusterMetrics::Representation collection :status_history, as: 'statusHistory', class: Google::Apis::DataprocV1::ClusterStatus, decorator: Google::Apis::DataprocV1::ClusterStatus::Representation - property :cluster_name, as: 'clusterName' + property :config, as: 'config', class: Google::Apis::DataprocV1::ClusterConfig, decorator: Google::Apis::DataprocV1::ClusterConfig::Representation + property :cluster_uuid, as: 'clusterUuid' - property :project_id, as: 'projectId' + property :cluster_name, as: 'clusterName' end end @@ -426,287 +709,6 @@ module Google end end - - class OperationMetadata - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :status_history, as: 'statusHistory', class: Google::Apis::DataprocV1::OperationStatus, decorator: Google::Apis::DataprocV1::OperationStatus::Representation - - property :operation_type, as: 'operationType' - property :description, as: 'description' - property :status, as: 'status', class: Google::Apis::DataprocV1::OperationStatus, decorator: Google::Apis::DataprocV1::OperationStatus::Representation - - property :details, as: 'details' - property :state, as: 'state' - property :cluster_name, as: 'clusterName' - property :cluster_uuid, as: 'clusterUuid' - property :inner_state, as: 'innerState' - property :end_time, as: 'endTime' - property :start_time, as: 'startTime' - collection :warnings, as: 'warnings' - property :insert_time, as: 'insertTime' - end - end - - class JobPlacement - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :cluster_name, as: 'clusterName' - property :cluster_uuid, as: 'clusterUuid' - end - end - - class SoftwareConfig - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :image_version, as: 'imageVersion' - hash :properties, as: 'properties' - end - end - - class PigJob - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :continue_on_failure, as: 'continueOnFailure' - property :query_list, as: 'queryList', class: Google::Apis::DataprocV1::QueryList, decorator: Google::Apis::DataprocV1::QueryList::Representation - - property :query_file_uri, as: 'queryFileUri' - hash :script_variables, as: 'scriptVariables' - collection :jar_file_uris, as: 'jarFileUris' - property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1::LoggingConfig, decorator: Google::Apis::DataprocV1::LoggingConfig::Representation - - hash :properties, as: 'properties' - end - end - - class ClusterStatus - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :state_start_time, as: 'stateStartTime' - property :detail, as: 'detail' - property :state, as: 'state' - end - end - - class ListClustersResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :clusters, as: 'clusters', class: Google::Apis::DataprocV1::Cluster, decorator: Google::Apis::DataprocV1::Cluster::Representation - - property :next_page_token, as: 'nextPageToken' - end - end - - class Job - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :reference, as: 'reference', class: Google::Apis::DataprocV1::JobReference, decorator: Google::Apis::DataprocV1::JobReference::Representation - - property :hadoop_job, as: 'hadoopJob', class: Google::Apis::DataprocV1::HadoopJob, decorator: Google::Apis::DataprocV1::HadoopJob::Representation - - property :placement, as: 'placement', class: Google::Apis::DataprocV1::JobPlacement, decorator: Google::Apis::DataprocV1::JobPlacement::Representation - - property :status, as: 'status', class: Google::Apis::DataprocV1::JobStatus, decorator: Google::Apis::DataprocV1::JobStatus::Representation - - property :driver_control_files_uri, as: 'driverControlFilesUri' - property :scheduling, as: 'scheduling', class: Google::Apis::DataprocV1::JobScheduling, decorator: Google::Apis::DataprocV1::JobScheduling::Representation - - property :pig_job, as: 'pigJob', class: Google::Apis::DataprocV1::PigJob, decorator: Google::Apis::DataprocV1::PigJob::Representation - - property :hive_job, as: 'hiveJob', class: Google::Apis::DataprocV1::HiveJob, decorator: Google::Apis::DataprocV1::HiveJob::Representation - - hash :labels, as: 'labels' - property :driver_output_resource_uri, as: 'driverOutputResourceUri' - collection :status_history, as: 'statusHistory', class: Google::Apis::DataprocV1::JobStatus, decorator: Google::Apis::DataprocV1::JobStatus::Representation - - property :spark_sql_job, as: 'sparkSqlJob', class: Google::Apis::DataprocV1::SparkSqlJob, decorator: Google::Apis::DataprocV1::SparkSqlJob::Representation - - property :spark_job, as: 'sparkJob', class: Google::Apis::DataprocV1::SparkJob, decorator: Google::Apis::DataprocV1::SparkJob::Representation - - collection :yarn_applications, as: 'yarnApplications', class: Google::Apis::DataprocV1::YarnApplication, decorator: Google::Apis::DataprocV1::YarnApplication::Representation - - property :pyspark_job, as: 'pysparkJob', class: Google::Apis::DataprocV1::PySparkJob, decorator: Google::Apis::DataprocV1::PySparkJob::Representation - - end - end - - class SparkJob - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :archive_uris, as: 'archiveUris' - property :main_jar_file_uri, as: 'mainJarFileUri' - collection :jar_file_uris, as: 'jarFileUris' - property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1::LoggingConfig, decorator: Google::Apis::DataprocV1::LoggingConfig::Representation - - hash :properties, as: 'properties' - collection :args, as: 'args' - collection :file_uris, as: 'fileUris' - property :main_class, as: 'mainClass' - end - end - - class JobStatus - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :state_start_time, as: 'stateStartTime' - property :state, as: 'state' - property :details, as: 'details' - end - end - - class ManagedGroupConfig - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :instance_group_manager_name, as: 'instanceGroupManagerName' - property :instance_template_name, as: 'instanceTemplateName' - end - end - - class ClusterOperationStatus - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :state, as: 'state' - property :details, as: 'details' - property :inner_state, as: 'innerState' - property :state_start_time, as: 'stateStartTime' - end - end - - class HadoopJob - # @private - class Representation < Google::Apis::Core::JsonRepresentation - hash :properties, as: 'properties' - collection :args, as: 'args' - collection :file_uris, as: 'fileUris' - property :main_class, as: 'mainClass' - collection :archive_uris, as: 'archiveUris' - property :main_jar_file_uri, as: 'mainJarFileUri' - collection :jar_file_uris, as: 'jarFileUris' - property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1::LoggingConfig, decorator: Google::Apis::DataprocV1::LoggingConfig::Representation - - end - end - - class QueryList - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :queries, as: 'queries' - end - end - - class YarnApplication - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :state, as: 'state' - property :name, as: 'name' - property :tracking_url, as: 'trackingUrl' - property :progress, as: 'progress' - end - end - - class DiagnoseClusterRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - class DiskConfig - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :boot_disk_size_gb, as: 'bootDiskSizeGb' - property :num_local_ssds, as: 'numLocalSsds' - end - end - - class ClusterOperationMetadata - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :description, as: 'description' - collection :warnings, as: 'warnings' - hash :labels, as: 'labels' - property :status, as: 'status', class: Google::Apis::DataprocV1::ClusterOperationStatus, decorator: Google::Apis::DataprocV1::ClusterOperationStatus::Representation - - collection :status_history, as: 'statusHistory', class: Google::Apis::DataprocV1::ClusterOperationStatus, decorator: Google::Apis::DataprocV1::ClusterOperationStatus::Representation - - property :cluster_uuid, as: 'clusterUuid' - property :cluster_name, as: 'clusterName' - property :operation_type, as: 'operationType' - end - end - - class HiveJob - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :continue_on_failure, as: 'continueOnFailure' - property :query_file_uri, as: 'queryFileUri' - property :query_list, as: 'queryList', class: Google::Apis::DataprocV1::QueryList, decorator: Google::Apis::DataprocV1::QueryList::Representation - - collection :jar_file_uris, as: 'jarFileUris' - hash :script_variables, as: 'scriptVariables' - hash :properties, as: 'properties' - end - end - - class Empty - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - - class DiagnoseClusterResults - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :output_uri, as: 'outputUri' - end - end - - class ClusterConfig - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :initialization_actions, as: 'initializationActions', class: Google::Apis::DataprocV1::NodeInitializationAction, decorator: Google::Apis::DataprocV1::NodeInitializationAction::Representation - - property :config_bucket, as: 'configBucket' - property :worker_config, as: 'workerConfig', class: Google::Apis::DataprocV1::InstanceGroupConfig, decorator: Google::Apis::DataprocV1::InstanceGroupConfig::Representation - - property :gce_cluster_config, as: 'gceClusterConfig', class: Google::Apis::DataprocV1::GceClusterConfig, decorator: Google::Apis::DataprocV1::GceClusterConfig::Representation - - property :software_config, as: 'softwareConfig', class: Google::Apis::DataprocV1::SoftwareConfig, decorator: Google::Apis::DataprocV1::SoftwareConfig::Representation - - property :master_config, as: 'masterConfig', class: Google::Apis::DataprocV1::InstanceGroupConfig, decorator: Google::Apis::DataprocV1::InstanceGroupConfig::Representation - - property :secondary_worker_config, as: 'secondaryWorkerConfig', class: Google::Apis::DataprocV1::InstanceGroupConfig, decorator: Google::Apis::DataprocV1::InstanceGroupConfig::Representation - - end - end - - class PySparkJob - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :python_file_uris, as: 'pythonFileUris' - property :main_python_file_uri, as: 'mainPythonFileUri' - collection :archive_uris, as: 'archiveUris' - collection :jar_file_uris, as: 'jarFileUris' - property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1::LoggingConfig, decorator: Google::Apis::DataprocV1::LoggingConfig::Representation - - hash :properties, as: 'properties' - collection :args, as: 'args' - collection :file_uris, as: 'fileUris' - end - end - - class GceClusterConfig - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :network_uri, as: 'networkUri' - property :zone_uri, as: 'zoneUri' - hash :metadata, as: 'metadata' - property :internal_ip_only, as: 'internalIpOnly' - collection :service_account_scopes, as: 'serviceAccountScopes' - collection :tags, as: 'tags' - property :service_account, as: 'serviceAccount' - property :subnetwork_uri, as: 'subnetworkUri' - end - end end end end diff --git a/generated/google/apis/dataproc_v1/service.rb b/generated/google/apis/dataproc_v1/service.rb index af20aca1f..fe833f1a5 100644 --- a/generated/google/apis/dataproc_v1/service.rb +++ b/generated/google/apis/dataproc_v1/service.rb @@ -150,43 +150,6 @@ module Google execute_or_queue_command(command, &block) end - # Deletes a cluster in a project. - # @param [String] project_id - # Required The ID of the Google Cloud Platform project that the cluster belongs - # to. - # @param [String] region - # Required The Cloud Dataproc region in which to handle the request. - # @param [String] cluster_name - # Required The cluster name. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::DataprocV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DataprocV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_cluster(project_id, region, cluster_name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/projects/{projectId}/regions/{region}/clusters/{clusterName}', options) - command.response_representation = Google::Apis::DataprocV1::Operation::Representation - command.response_class = Google::Apis::DataprocV1::Operation - command.params['projectId'] = project_id unless project_id.nil? - command.params['region'] = region unless region.nil? - command.params['clusterName'] = cluster_name unless cluster_name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - # Gets cluster diagnostic information. After the operation completes, the # Operation.response field contains DiagnoseClusterOutputLocation. # @param [String] project_id @@ -228,14 +191,49 @@ module Google execute_or_queue_command(command, &block) end + # Deletes a cluster in a project. + # @param [String] project_id + # Required The ID of the Google Cloud Platform project that the cluster belongs + # to. + # @param [String] region + # Required The Cloud Dataproc region in which to handle the request. + # @param [String] cluster_name + # Required The cluster name. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::DataprocV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataprocV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_cluster(project_id, region, cluster_name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/projects/{projectId}/regions/{region}/clusters/{clusterName}', options) + command.response_representation = Google::Apis::DataprocV1::Operation::Representation + command.response_class = Google::Apis::DataprocV1::Operation + command.params['projectId'] = project_id unless project_id.nil? + command.params['region'] = region unless region.nil? + command.params['clusterName'] = cluster_name unless cluster_name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Lists all regions/`region`/clusters in a project. # @param [String] project_id # Required The ID of the Google Cloud Platform project that the cluster belongs # to. # @param [String] region # Required The Cloud Dataproc region in which to handle the request. - # @param [String] page_token - # Optional The standard List page token. # @param [Fixnum] page_size # Optional The standard List page size. # @param [String] filter @@ -250,6 +248,8 @@ module Google # separated items are treated as having an implicit AND operator.Example filter: # status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND # labels.starred = * + # @param [String] page_token + # Optional The standard List page token. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -267,15 +267,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_clusters(project_id, region, page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_clusters(project_id, region, page_size: nil, filter: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/projects/{projectId}/regions/{region}/clusters', options) command.response_representation = Google::Apis::DataprocV1::ListClustersResponse::Representation command.response_class = Google::Apis::DataprocV1::ListClustersResponse command.params['projectId'] = project_id unless project_id.nil? command.params['region'] = region unless region.nil? - command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['filter'] = filter unless filter.nil? + command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) @@ -394,12 +394,12 @@ module Google # name schemes, such as users/*/operations. # @param [String] name # The name of the operation collection. + # @param [Fixnum] page_size + # The standard list page size. # @param [String] filter # The standard list filter. # @param [String] page_token # The standard list page token. - # @param [Fixnum] page_size - # The standard list page size. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -417,14 +417,14 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_operations(name, filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_operations(name, page_size: nil, filter: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', options) command.response_representation = Google::Apis::DataprocV1::ListOperationsResponse::Representation command.response_class = Google::Apis::DataprocV1::ListOperationsResponse command.params['name'] = name unless name.nil? + command.query['pageSize'] = page_size unless page_size.nil? command.query['filter'] = filter unless filter.nil? command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) @@ -461,136 +461,6 @@ module Google execute_or_queue_command(command, &block) end - # Submits a job to a cluster. - # @param [String] project_id - # Required The ID of the Google Cloud Platform project that the job belongs to. - # @param [String] region - # Required The Cloud Dataproc region in which to handle the request. - # @param [Google::Apis::DataprocV1::SubmitJobRequest] submit_job_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::DataprocV1::Job] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DataprocV1::Job] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def submit_job(project_id, region, submit_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/projects/{projectId}/regions/{region}/jobs:submit', options) - command.request_representation = Google::Apis::DataprocV1::SubmitJobRequest::Representation - command.request_object = submit_job_request_object - command.response_representation = Google::Apis::DataprocV1::Job::Representation - command.response_class = Google::Apis::DataprocV1::Job - command.params['projectId'] = project_id unless project_id.nil? - command.params['region'] = region unless region.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes the job from the project. If the job is active, the delete fails, and - # the response returns FAILED_PRECONDITION. - # @param [String] project_id - # Required The ID of the Google Cloud Platform project that the job belongs to. - # @param [String] region - # Required The Cloud Dataproc region in which to handle the request. - # @param [String] job_id - # Required The job ID. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::DataprocV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DataprocV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_job(project_id, region, job_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/projects/{projectId}/regions/{region}/jobs/{jobId}', options) - command.response_representation = Google::Apis::DataprocV1::Empty::Representation - command.response_class = Google::Apis::DataprocV1::Empty - command.params['projectId'] = project_id unless project_id.nil? - command.params['region'] = region unless region.nil? - command.params['jobId'] = job_id unless job_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Lists regions/`region`/jobs in a project. - # @param [String] project_id - # Required The ID of the Google Cloud Platform project that the job belongs to. - # @param [String] region - # Required The Cloud Dataproc region in which to handle the request. - # @param [String] cluster_name - # Optional If set, the returned jobs list includes only jobs that were submitted - # to the named cluster. - # @param [String] filter - # Optional A filter constraining the jobs to list. Filters are case-sensitive - # and have the following syntax:field = value AND field = value ...where field - # is status.state or labels.[KEY], and [KEY] is a label key. value can be * to - # match all values. status.state can be either ACTIVE or INACTIVE. Only the - # logical AND operator is supported; space-separated items are treated as having - # an implicit AND operator.Example filter:status.state = ACTIVE AND labels.env = - # staging AND labels.starred = * - # @param [String] job_state_matcher - # Optional Specifies enumerated categories of jobs to list (default = match ALL - # jobs). - # @param [String] page_token - # Optional The page token, returned by a previous call, to request the next page - # of results. - # @param [Fixnum] page_size - # Optional The number of results to return in each response. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::DataprocV1::ListJobsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::DataprocV1::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(project_id, region, cluster_name: nil, filter: nil, job_state_matcher: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/projects/{projectId}/regions/{region}/jobs', options) - command.response_representation = Google::Apis::DataprocV1::ListJobsResponse::Representation - command.response_class = Google::Apis::DataprocV1::ListJobsResponse - command.params['projectId'] = project_id unless project_id.nil? - command.params['region'] = region unless region.nil? - command.query['clusterName'] = cluster_name unless cluster_name.nil? - command.query['filter'] = filter unless filter.nil? - command.query['jobStateMatcher'] = job_state_matcher unless job_state_matcher.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 - # Starts a job cancellation request. To access the job resource after # cancellation, call regions/`region`/jobs.list or regions/`region`/jobs.get. # @param [String] project_id @@ -712,6 +582,136 @@ module Google command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end + + # Submits a job to a cluster. + # @param [String] project_id + # Required The ID of the Google Cloud Platform project that the job belongs to. + # @param [String] region + # Required The Cloud Dataproc region in which to handle the request. + # @param [Google::Apis::DataprocV1::SubmitJobRequest] submit_job_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::DataprocV1::Job] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataprocV1::Job] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def submit_job(project_id, region, submit_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/projects/{projectId}/regions/{region}/jobs:submit', options) + command.request_representation = Google::Apis::DataprocV1::SubmitJobRequest::Representation + command.request_object = submit_job_request_object + command.response_representation = Google::Apis::DataprocV1::Job::Representation + command.response_class = Google::Apis::DataprocV1::Job + command.params['projectId'] = project_id unless project_id.nil? + command.params['region'] = region unless region.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes the job from the project. If the job is active, the delete fails, and + # the response returns FAILED_PRECONDITION. + # @param [String] project_id + # Required The ID of the Google Cloud Platform project that the job belongs to. + # @param [String] region + # Required The Cloud Dataproc region in which to handle the request. + # @param [String] job_id + # Required The job ID. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::DataprocV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataprocV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_job(project_id, region, job_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/projects/{projectId}/regions/{region}/jobs/{jobId}', options) + command.response_representation = Google::Apis::DataprocV1::Empty::Representation + command.response_class = Google::Apis::DataprocV1::Empty + command.params['projectId'] = project_id unless project_id.nil? + command.params['region'] = region unless region.nil? + command.params['jobId'] = job_id unless job_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists regions/`region`/jobs in a project. + # @param [String] project_id + # Required The ID of the Google Cloud Platform project that the job belongs to. + # @param [String] region + # Required The Cloud Dataproc region in which to handle the request. + # @param [String] filter + # Optional A filter constraining the jobs to list. Filters are case-sensitive + # and have the following syntax:field = value AND field = value ...where field + # is status.state or labels.[KEY], and [KEY] is a label key. value can be * to + # match all values. status.state can be either ACTIVE or INACTIVE. Only the + # logical AND operator is supported; space-separated items are treated as having + # an implicit AND operator.Example filter:status.state = ACTIVE AND labels.env = + # staging AND labels.starred = * + # @param [String] job_state_matcher + # Optional Specifies enumerated categories of jobs to list (default = match ALL + # jobs). + # @param [String] page_token + # Optional The page token, returned by a previous call, to request the next page + # of results. + # @param [Fixnum] page_size + # Optional The number of results to return in each response. + # @param [String] cluster_name + # Optional If set, the returned jobs list includes only jobs that were submitted + # to the named cluster. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::DataprocV1::ListJobsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::DataprocV1::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(project_id, region, filter: nil, job_state_matcher: nil, page_token: nil, page_size: nil, cluster_name: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/projects/{projectId}/regions/{region}/jobs', options) + command.response_representation = Google::Apis::DataprocV1::ListJobsResponse::Representation + command.response_class = Google::Apis::DataprocV1::ListJobsResponse + command.params['projectId'] = project_id unless project_id.nil? + command.params['region'] = region unless region.nil? + command.query['filter'] = filter unless filter.nil? + command.query['jobStateMatcher'] = job_state_matcher unless job_state_matcher.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['clusterName'] = cluster_name unless cluster_name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end protected diff --git a/generated/google/apis/deploymentmanager_v2.rb b/generated/google/apis/deploymentmanager_v2.rb index d69d762c0..16d08d3ea 100644 --- a/generated/google/apis/deploymentmanager_v2.rb +++ b/generated/google/apis/deploymentmanager_v2.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/deployment-manager/ module DeploymentmanagerV2 VERSION = 'V2' - REVISION = '20170302' + REVISION = '20170315' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/deploymentmanager_v2/classes.rb b/generated/google/apis/deploymentmanager_v2/classes.rb index c24153330..901161bfc 100644 --- a/generated/google/apis/deploymentmanager_v2/classes.rb +++ b/generated/google/apis/deploymentmanager_v2/classes.rb @@ -22,9 +22,9 @@ module Google module Apis module DeploymentmanagerV2 - # 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. + # Specifies the audit configuration for a service. The configuration determines + # which permission types are logged, and what identities, if any, are exempted + # from logging. An AuditConifg must have one or more AuditLogConfigs. # If there are AuditConfigs for both `allServices` and a specific service, the # union of the two AuditConfigs is used for that service: the log_types # specified in each AuditConfig are enabled, and the exempted_members in each @@ -51,8 +51,8 @@ module Google 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. + # storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special + # value that covers all services. # Corresponds to the JSON property `service` # @return [String] attr_accessor :service diff --git a/generated/google/apis/dns_v1.rb b/generated/google/apis/dns_v1.rb index 2a7b19e76..8efdf9fd2 100644 --- a/generated/google/apis/dns_v1.rb +++ b/generated/google/apis/dns_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/cloud-dns module DnsV1 VERSION = 'V1' - REVISION = '20170221' + REVISION = '20170322' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/dns_v2beta1.rb b/generated/google/apis/dns_v2beta1.rb index 9af01d46d..0f17c6f99 100644 --- a/generated/google/apis/dns_v2beta1.rb +++ b/generated/google/apis/dns_v2beta1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/cloud-dns module DnsV2beta1 VERSION = 'V2beta1' - REVISION = '20170221' + REVISION = '20170322' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/doubleclicksearch_v2.rb b/generated/google/apis/doubleclicksearch_v2.rb index 1a88e6b53..d9f20841d 100644 --- a/generated/google/apis/doubleclicksearch_v2.rb +++ b/generated/google/apis/doubleclicksearch_v2.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/doubleclick-search/ module DoubleclicksearchV2 VERSION = 'V2' - REVISION = '20170228' + REVISION = '20170314' # View and manage your advertising data in DoubleClick Search AUTH_DOUBLECLICKSEARCH = 'https://www.googleapis.com/auth/doubleclicksearch' diff --git a/generated/google/apis/drive_v2.rb b/generated/google/apis/drive_v2.rb index 967b173eb..6369ef4ae 100644 --- a/generated/google/apis/drive_v2.rb +++ b/generated/google/apis/drive_v2.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/drive/ module DriveV2 VERSION = 'V2' - REVISION = '20170228' + REVISION = '20170320' # View and manage the files in your Google Drive AUTH_DRIVE = 'https://www.googleapis.com/auth/drive' diff --git a/generated/google/apis/drive_v2/classes.rb b/generated/google/apis/drive_v2/classes.rb index 966c4cd4e..507706a68 100644 --- a/generated/google/apis/drive_v2/classes.rb +++ b/generated/google/apis/drive_v2/classes.rb @@ -1571,7 +1571,9 @@ module Google # @return [String] attr_accessor :thumbnail_version - # The title of this file. + # The title of this file. Note that for immutable items such as the top level + # folders of Team Drives, My Drive root folder, and Application Data folder the + # title is constant. # Corresponds to the JSON property `title` # @return [String] attr_accessor :title diff --git a/generated/google/apis/drive_v3.rb b/generated/google/apis/drive_v3.rb index c70239002..1ebf9b964 100644 --- a/generated/google/apis/drive_v3.rb +++ b/generated/google/apis/drive_v3.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/drive/ module DriveV3 VERSION = 'V3' - REVISION = '20170228' + REVISION = '20170320' # View and manage the files in your Google Drive AUTH_DRIVE = 'https://www.googleapis.com/auth/drive' diff --git a/generated/google/apis/drive_v3/classes.rb b/generated/google/apis/drive_v3/classes.rb index 61d120a7b..342016b06 100644 --- a/generated/google/apis/drive_v3/classes.rb +++ b/generated/google/apis/drive_v3/classes.rb @@ -618,7 +618,9 @@ module Google # @return [DateTime] attr_accessor :modified_time - # The name of the file. This is not necessarily unique within a folder. + # The name of the file. This is not necessarily unique within a folder. Note + # that for immutable items such as the top level folders of Team Drives, My + # Drive root folder, and Application Data folder the name is constant. # Corresponds to the JSON property `name` # @return [String] attr_accessor :name diff --git a/generated/google/apis/fusiontables_v2.rb b/generated/google/apis/fusiontables_v2.rb index 4d517d799..83b4e2333 100644 --- a/generated/google/apis/fusiontables_v2.rb +++ b/generated/google/apis/fusiontables_v2.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/fusiontables module FusiontablesV2 VERSION = 'V2' - REVISION = '20160526' + REVISION = '20170321' # Manage your Fusion Tables AUTH_FUSIONTABLES = 'https://www.googleapis.com/auth/fusiontables' diff --git a/generated/google/apis/games_configuration_v1configuration.rb b/generated/google/apis/games_configuration_v1configuration.rb index 690250ff7..505ef1910 100644 --- a/generated/google/apis/games_configuration_v1configuration.rb +++ b/generated/google/apis/games_configuration_v1configuration.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/games/services module GamesConfigurationV1configuration VERSION = 'V1configuration' - REVISION = '20170302' + REVISION = '20170323' # View and manage your Google Play Developer account AUTH_ANDROIDPUBLISHER = 'https://www.googleapis.com/auth/androidpublisher' diff --git a/generated/google/apis/games_management_v1management.rb b/generated/google/apis/games_management_v1management.rb index 2af027d6e..f6c587152 100644 --- a/generated/google/apis/games_management_v1management.rb +++ b/generated/google/apis/games_management_v1management.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/games/services module GamesManagementV1management VERSION = 'V1management' - REVISION = '20170302' + REVISION = '20170323' # Share your Google+ profile information and view and manage your game activity AUTH_GAMES = 'https://www.googleapis.com/auth/games' diff --git a/generated/google/apis/games_v1.rb b/generated/google/apis/games_v1.rb index b25abb29c..7c536ad7b 100644 --- a/generated/google/apis/games_v1.rb +++ b/generated/google/apis/games_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/games/services/ module GamesV1 VERSION = 'V1' - REVISION = '20170302' + REVISION = '20170323' # View and manage its own configuration data in your Google Drive AUTH_DRIVE_APPDATA = 'https://www.googleapis.com/auth/drive.appdata' diff --git a/generated/google/apis/genomics_v1.rb b/generated/google/apis/genomics_v1.rb index ae7baa824..a2d66cb3b 100644 --- a/generated/google/apis/genomics_v1.rb +++ b/generated/google/apis/genomics_v1.rb @@ -25,7 +25,13 @@ module Google # @see https://cloud.google.com/genomics module GenomicsV1 VERSION = 'V1' - REVISION = '20170309' + REVISION = '20170322' + + # 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' @@ -35,12 +41,6 @@ module Google # Manage your data in Google Cloud Storage AUTH_DEVSTORAGE_READ_WRITE = 'https://www.googleapis.com/auth/devstorage.read_write' - - # 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' end end end diff --git a/generated/google/apis/genomics_v1/classes.rb b/generated/google/apis/genomics_v1/classes.rb index 66e882657..c9dd189b0 100644 --- a/generated/google/apis/genomics_v1/classes.rb +++ b/generated/google/apis/genomics_v1/classes.rb @@ -22,238 +22,6 @@ module Google module Apis module GenomicsV1 - # Response message for `TestIamPermissions` method. - class TestIamPermissionsResponse - include Google::Apis::Core::Hashable - - # A subset of `TestPermissionsRequest.permissions` that the caller is - # allowed. - # Corresponds to the JSON property `permissions` - # @return [Array] - attr_accessor :permissions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @permissions = args[:permissions] if args.key?(:permissions) - end - end - - # Request message for `GetIamPolicy` method. - class GetIamPolicyRequest - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # - class SearchReferencesResponse - include Google::Apis::Core::Hashable - - # The matching references. - # Corresponds to the JSON property `references` - # @return [Array] - attr_accessor :references - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of - # results. This field will be empty if there aren't any additional results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @references = args[:references] if args.key?(:references) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # - class SearchAnnotationSetsRequest - include Google::Apis::Core::Hashable - - # Only return annotations sets for which a substring of the name matches this - # string (case insensitive). - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # If specified, only annotation sets associated with the given reference set - # are returned. - # Corresponds to the JSON property `referenceSetId` - # @return [String] - attr_accessor :reference_set_id - - # The continuation token, which is used to page through large result sets. - # To get the next page of results, set this parameter to the value of - # `nextPageToken` from the previous response. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # The maximum number of results to return in a single page. If unspecified, - # defaults to 128. The maximum value is 1024. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - # Required. The dataset IDs to search within. Caller must have `READ` access - # to these datasets. - # Corresponds to the JSON property `datasetIds` - # @return [Array] - attr_accessor :dataset_ids - - # If specified, only annotation sets that have any of these types are - # returned. - # Corresponds to the JSON property `types` - # @return [Array] - attr_accessor :types - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - @reference_set_id = args[:reference_set_id] if args.key?(:reference_set_id) - @page_token = args[:page_token] if args.key?(:page_token) - @page_size = args[:page_size] if args.key?(:page_size) - @dataset_ids = args[:dataset_ids] if args.key?(:dataset_ids) - @types = args[:types] if args.key?(:types) - end - end - - # The read group set search response. - class SearchReadGroupSetsResponse - include Google::Apis::Core::Hashable - - # The list of matching read group sets. - # Corresponds to the JSON property `readGroupSets` - # @return [Array] - attr_accessor :read_group_sets - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of - # results. This field will be empty if there aren't any additional results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @read_group_sets = args[:read_group_sets] if args.key?(:read_group_sets) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # - class SearchReferencesRequest - include Google::Apis::Core::Hashable - - # If present, return references for which the - # md5checksum matches exactly. - # Corresponds to the JSON property `md5checksums` - # @return [Array] - attr_accessor :md5checksums - - # If present, return references for which a prefix of any of - # sourceAccessions match - # any of these strings. Accession numbers typically have a main number and a - # version, for example `GCF_000001405.26`. - # Corresponds to the JSON property `accessions` - # @return [Array] - attr_accessor :accessions - - # The continuation token, which is used to page through large result sets. - # To get the next page of results, set this parameter to the value of - # `nextPageToken` from the previous response. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # If present, return only references which belong to this reference set. - # Corresponds to the JSON property `referenceSetId` - # @return [String] - attr_accessor :reference_set_id - - # The maximum number of results to return in a single page. If unspecified, - # defaults to 1024. The maximum value is 4096. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @md5checksums = args[:md5checksums] if args.key?(:md5checksums) - @accessions = args[:accessions] if args.key?(:accessions) - @page_token = args[:page_token] if args.key?(:page_token) - @reference_set_id = args[:reference_set_id] if args.key?(:reference_set_id) - @page_size = args[:page_size] if args.key?(:page_size) - end - end - - # A linear alignment can be represented by one CIGAR string. Describes the - # mapped position and local alignment of the read to the reference. - class LinearAlignment - include Google::Apis::Core::Hashable - - # An abstraction for referring to a genomic position, in relation to some - # already known reference. For now, represents a genomic position as a - # reference name, a base number on that reference (0-based), and a - # determination of forward or reverse strand. - # Corresponds to the JSON property `position` - # @return [Google::Apis::GenomicsV1::Position] - attr_accessor :position - - # Represents the local alignment of this sequence (alignment matches, indels, - # etc) against the reference. - # Corresponds to the JSON property `cigar` - # @return [Array] - attr_accessor :cigar - - # The mapping quality of this alignment. Represents how likely - # the read maps to this position as opposed to other locations. - # Specifically, this is -10 log10 Pr(mapping position is wrong), rounded to - # the nearest integer. - # Corresponds to the JSON property `mappingQuality` - # @return [Fixnum] - attr_accessor :mapping_quality - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @position = args[:position] if args.key?(:position) - @cigar = args[:cigar] if args.key?(:cigar) - @mapping_quality = args[:mapping_quality] if args.key?(:mapping_quality) - end - end - # A Dataset is a collection of genomic data. # For more genomics resource definitions, see [Fundamentals of Google # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) @@ -339,12 +107,6 @@ module Google # @return [String] attr_accessor :id - # The predicted insert size of this read group. The insert size is the length - # the sequenced DNA fragment from end-to-end, not including the adapters. - # Corresponds to the JSON property `predictedInsertSize` - # @return [Fixnum] - attr_accessor :predicted_insert_size - # The programs used to generate this read group. Programs are always # identical for all read groups within a read group set. For this reason, # only the first read group in a returned set will have this field @@ -353,6 +115,12 @@ module Google # @return [Array] attr_accessor :programs + # The predicted insert size of this read group. The insert size is the length + # the sequenced DNA fragment from end-to-end, not including the adapters. + # Corresponds to the JSON property `predictedInsertSize` + # @return [Fixnum] + attr_accessor :predicted_insert_size + # A free-form text description of this read group. # Corresponds to the JSON property `description` # @return [String] @@ -383,8 +151,8 @@ module Google @reference_set_id = args[:reference_set_id] if args.key?(:reference_set_id) @info = args[:info] if args.key?(:info) @id = args[:id] if args.key?(:id) - @predicted_insert_size = args[:predicted_insert_size] if args.key?(:predicted_insert_size) @programs = args[:programs] if args.key?(:programs) + @predicted_insert_size = args[:predicted_insert_size] if args.key?(:predicted_insert_size) @description = args[:description] if args.key?(:description) @sample_id = args[:sample_id] if args.key?(:sample_id) @dataset_id = args[:dataset_id] if args.key?(:dataset_id) @@ -404,27 +172,17 @@ module Google class ReadGroupSet include Google::Apis::Core::Hashable - # The server-generated read group set ID, unique for all read group sets. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The dataset to which this read group set belongs. - # Corresponds to the JSON property `datasetId` - # @return [String] - attr_accessor :dataset_id - - # The filename of the original source file for this read group set, if any. - # Corresponds to the JSON property `filename` - # @return [String] - attr_accessor :filename - # The read groups in this set. There are typically 1-10 read groups in a read # group set. # Corresponds to the JSON property `readGroups` # @return [Array] attr_accessor :read_groups + # The filename of the original source file for this read group set, if any. + # Corresponds to the JSON property `filename` + # @return [String] + attr_accessor :filename + # The read group set name. By default this will be initialized to the sample # name of the sequenced data contained in this set. # Corresponds to the JSON property `name` @@ -441,19 +199,29 @@ module Google # @return [Hash>] attr_accessor :info + # The server-generated read group set ID, unique for all read group sets. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # The dataset to which this read group set belongs. + # Corresponds to the JSON property `datasetId` + # @return [String] + attr_accessor :dataset_id + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @id = args[:id] if args.key?(:id) - @dataset_id = args[:dataset_id] if args.key?(:dataset_id) - @filename = args[:filename] if args.key?(:filename) @read_groups = args[:read_groups] if args.key?(:read_groups) + @filename = args[:filename] if args.key?(:filename) @name = args[:name] if args.key?(:name) @reference_set_id = args[:reference_set_id] if args.key?(:reference_set_id) @info = args[:info] if args.key?(:info) + @id = args[:id] if args.key?(:id) + @dataset_id = args[:dataset_id] if args.key?(:dataset_id) end end @@ -461,11 +229,6 @@ module Google class SearchVariantSetsResponse include Google::Apis::Core::Hashable - # The variant sets belonging to the requested dataset. - # Corresponds to the JSON property `variantSets` - # @return [Array] - attr_accessor :variant_sets - # The continuation token, which is used to page through large result sets. # Provide this value in a subsequent request to return the next page of # results. This field will be empty if there aren't any additional results. @@ -473,14 +236,19 @@ module Google # @return [String] attr_accessor :next_page_token + # The variant sets belonging to the requested dataset. + # Corresponds to the JSON property `variantSets` + # @return [Array] + attr_accessor :variant_sets + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @variant_sets = args[:variant_sets] if args.key?(:variant_sets) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @variant_sets = args[:variant_sets] if args.key?(:variant_sets) end end @@ -578,13 +346,6 @@ module Google class Position include Google::Apis::Core::Hashable - # Whether this position is on the reverse strand, as opposed to the forward - # strand. - # Corresponds to the JSON property `reverseStrand` - # @return [Boolean] - attr_accessor :reverse_strand - alias_method :reverse_strand?, :reverse_strand - # The 0-based offset from the start of the forward strand for that reference. # Corresponds to the JSON property `position` # @return [String] @@ -595,15 +356,22 @@ module Google # @return [String] attr_accessor :reference_name + # Whether this position is on the reverse strand, as opposed to the forward + # strand. + # Corresponds to the JSON property `reverseStrand` + # @return [Boolean] + attr_accessor :reverse_strand + alias_method :reverse_strand?, :reverse_strand + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @reverse_strand = args[:reverse_strand] if args.key?(:reverse_strand) @position = args[:position] if args.key?(:position) @reference_name = args[:reference_name] if args.key?(:reference_name) + @reverse_strand = args[:reverse_strand] if args.key?(:reverse_strand) end end @@ -638,6 +406,12 @@ module Google class SearchCallSetsRequest include Google::Apis::Core::Hashable + # Restrict the query to call sets within the given variant sets. At least one + # ID must be provided. + # Corresponds to the JSON property `variantSetIds` + # @return [Array] + attr_accessor :variant_set_ids + # Only return call sets for which a substring of the name matches this # string. # Corresponds to the JSON property `name` @@ -657,22 +431,16 @@ module Google # @return [Fixnum] attr_accessor :page_size - # Restrict the query to call sets within the given variant sets. At least one - # ID must be provided. - # Corresponds to the JSON property `variantSetIds` - # @return [Array] - attr_accessor :variant_set_ids - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @variant_set_ids = args[:variant_set_ids] if args.key?(:variant_set_ids) @name = args[:name] if args.key?(:name) @page_token = args[:page_token] if args.key?(:page_token) @page_size = args[:page_size] if args.key?(:page_size) - @variant_set_ids = args[:variant_set_ids] if args.key?(:variant_set_ids) end end @@ -796,14 +564,6 @@ module Google class SearchReadsRequest include Google::Apis::Core::Hashable - # The IDs of the read groups sets within which to search for reads. All - # specified read group sets must be aligned against a common set of reference - # sequences; this defines the genomic coordinates for the query. Must specify - # one of `readGroupSetIds` or `readGroupIds`. - # Corresponds to the JSON property `readGroupSetIds` - # @return [Array] - attr_accessor :read_group_set_ids - # The IDs of the read groups within which to search for reads. All specified # read groups must belong to the same read group sets. Must specify one of # `readGroupSetIds` or `readGroupIds`. @@ -843,19 +603,40 @@ module Google # @return [String] attr_accessor :reference_name + # The IDs of the read groups sets within which to search for reads. All + # specified read group sets must be aligned against a common set of reference + # sequences; this defines the genomic coordinates for the query. Must specify + # one of `readGroupSetIds` or `readGroupIds`. + # Corresponds to the JSON property `readGroupSetIds` + # @return [Array] + attr_accessor :read_group_set_ids + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @read_group_set_ids = args[:read_group_set_ids] if args.key?(:read_group_set_ids) @read_group_ids = args[:read_group_ids] if args.key?(:read_group_ids) @end = args[:end] if args.key?(:end) @page_token = args[:page_token] if args.key?(:page_token) @page_size = args[:page_size] if args.key?(:page_size) @start = args[:start] if args.key?(:start) @reference_name = args[:reference_name] if args.key?(:reference_name) + @read_group_set_ids = args[:read_group_set_ids] if args.key?(:read_group_set_ids) + 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 @@ -868,24 +649,32 @@ module Google class Annotation include Google::Apis::Core::Hashable + # Whether this range refers to the reverse strand, as opposed to the forward + # strand. Note that regardless of this field, the start/end position of the + # range always refer to the forward strand. + # Corresponds to the JSON property `reverseStrand` + # @return [Boolean] + attr_accessor :reverse_strand + alias_method :reverse_strand?, :reverse_strand + # The display name corresponding to the reference specified by # `referenceId`, for example `chr1`, `1`, or `chrX`. # Corresponds to the JSON property `referenceName` # @return [String] attr_accessor :reference_name - # The data type for this annotation. Must match the containing annotation - # set's type. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - # A map of additional read alignment information. This must be of the form # map (string key mapping to a list of string values). # Corresponds to the JSON property `info` # @return [Hash>] attr_accessor :info + # The data type for this annotation. Must match the containing annotation + # set's type. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + # The end position of the range on the reference, 0-based exclusive. # Corresponds to the JSON property `end` # @return [String] @@ -920,23 +709,15 @@ module Google # @return [Google::Apis::GenomicsV1::VariantAnnotation] attr_accessor :variant - # The server-generated annotation ID, unique across all annotations. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - # The ID of the Google Genomics reference associated with this range. # Corresponds to the JSON property `referenceId` # @return [String] attr_accessor :reference_id - # Whether this range refers to the reverse strand, as opposed to the forward - # strand. Note that regardless of this field, the start/end position of the - # range always refer to the forward strand. - # Corresponds to the JSON property `reverseStrand` - # @return [Boolean] - attr_accessor :reverse_strand - alias_method :reverse_strand?, :reverse_strand + # The server-generated annotation ID, unique across all annotations. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id def initialize(**args) update!(**args) @@ -944,53 +725,18 @@ module Google # Update properties of this object def update!(**args) + @reverse_strand = args[:reverse_strand] if args.key?(:reverse_strand) @reference_name = args[:reference_name] if args.key?(:reference_name) - @type = args[:type] if args.key?(:type) @info = args[:info] if args.key?(:info) + @type = args[:type] if args.key?(:type) @end = args[:end] if args.key?(:end) @transcript = args[:transcript] if args.key?(:transcript) @start = args[:start] if args.key?(:start) @annotation_set_id = args[:annotation_set_id] if args.key?(:annotation_set_id) @name = args[:name] if args.key?(:name) @variant = args[:variant] if args.key?(:variant) - @id = args[:id] if args.key?(:id) @reference_id = args[:reference_id] if args.key?(:reference_id) - @reverse_strand = args[:reverse_strand] if args.key?(:reverse_strand) - end - end - - # The request message for Operations.CancelOperation. - class CancelOperationRequest - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # Runtime metadata that will be populated in the - # runtimeMetadata - # field of the Operation associated with a RunPipeline execution. - class RuntimeMetadata - include Google::Apis::Core::Hashable - - # Describes a Compute Engine resource that is being managed by a running - # pipeline. - # Corresponds to the JSON property `computeEngine` - # @return [Google::Apis::GenomicsV1::ComputeEngine] - attr_accessor :compute_engine - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @compute_engine = args[:compute_engine] if args.key?(:compute_engine) + @id = args[:id] if args.key?(:id) end end @@ -999,14 +745,6 @@ module Google class Operation include Google::Apis::Core::Hashable - # If the value is `false`, it means the operation is still in progress. - # If true, the operation is completed, and either `error` or `response` is - # available. - # Corresponds to the JSON property `done` - # @return [Boolean] - attr_accessor :done - alias_method :done?, :done - # If importing ReadGroupSets, an ImportReadGroupSetsResponse is returned. If # importing Variants, an ImportVariantsResponse is returned. For pipelines and # exports, an empty response is returned. @@ -1069,17 +807,47 @@ module Google # @return [Hash] attr_accessor :metadata + # If the value is `false`, it means the operation is still in progress. + # If true, the operation is completed, and either `error` or `response` is + # available. + # Corresponds to the JSON property `done` + # @return [Boolean] + attr_accessor :done + alias_method :done?, :done + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @done = args[:done] if args.key?(:done) @response = args[:response] if args.key?(:response) @name = args[:name] if args.key?(:name) @error = args[:error] if args.key?(:error) @metadata = args[:metadata] if args.key?(:metadata) + @done = args[:done] if args.key?(:done) + end + end + + # Runtime metadata that will be populated in the + # runtimeMetadata + # field of the Operation associated with a RunPipeline execution. + class RuntimeMetadata + include Google::Apis::Core::Hashable + + # Describes a Compute Engine resource that is being managed by a running + # pipeline. + # Corresponds to the JSON property `computeEngine` + # @return [Google::Apis::GenomicsV1::ComputeEngine] + attr_accessor :compute_engine + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @compute_engine = args[:compute_engine] if args.key?(:compute_engine) end end @@ -1109,6 +877,26 @@ module Google class VariantCall include Google::Apis::Core::Hashable + # The name of the call set this variant call belongs to. + # Corresponds to the JSON property `callSetName` + # @return [String] + attr_accessor :call_set_name + + # The genotype likelihoods for this variant call. Each array entry + # represents how likely a specific genotype is for this call. The value + # ordering is defined by the GL tag in the VCF spec. + # If Phred-scaled genotype likelihood scores (PL) are available and + # log10(P) genotype likelihood scores (GL) are not, PL scores are converted + # to GL scores. If both are available, PL scores are stored in `info`. + # Corresponds to the JSON property `genotypeLikelihood` + # @return [Array] + attr_accessor :genotype_likelihood + + # The ID of the call set this variant call belongs to. + # Corresponds to the JSON property `callSetId` + # @return [String] + attr_accessor :call_set_id + # The genotype of this variant call. Each value represents either the value # of the `referenceBases` field or a 1-based index into # `alternateBases`. If a variant had a `referenceBases` @@ -1140,38 +928,18 @@ module Google # @return [Hash>] attr_accessor :info - # The name of the call set this variant call belongs to. - # Corresponds to the JSON property `callSetName` - # @return [String] - attr_accessor :call_set_name - - # The genotype likelihoods for this variant call. Each array entry - # represents how likely a specific genotype is for this call. The value - # ordering is defined by the GL tag in the VCF spec. - # If Phred-scaled genotype likelihood scores (PL) are available and - # log10(P) genotype likelihood scores (GL) are not, PL scores are converted - # to GL scores. If both are available, PL scores are stored in `info`. - # Corresponds to the JSON property `genotypeLikelihood` - # @return [Array] - attr_accessor :genotype_likelihood - - # The ID of the call set this variant call belongs to. - # Corresponds to the JSON property `callSetId` - # @return [String] - attr_accessor :call_set_id - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @genotype = args[:genotype] if args.key?(:genotype) - @phaseset = args[:phaseset] if args.key?(:phaseset) - @info = args[:info] if args.key?(:info) @call_set_name = args[:call_set_name] if args.key?(:call_set_name) @genotype_likelihood = args[:genotype_likelihood] if args.key?(:genotype_likelihood) @call_set_id = args[:call_set_id] if args.key?(:call_set_id) + @genotype = args[:genotype] if args.key?(:genotype) + @phaseset = args[:phaseset] if args.key?(:phaseset) + @info = args[:info] if args.key?(:info) end end @@ -1206,13 +974,6 @@ module Google class ListBasesResponse include Google::Apis::Core::Hashable - # The offset position (0-based) of the given `sequence` from the - # start of this `Reference`. This value will differ for each page - # in a paginated request. - # Corresponds to the JSON property `offset` - # @return [String] - attr_accessor :offset - # The continuation token, which is used to page through large result sets. # Provide this value in a subsequent request to return the next page of # results. This field will be empty if there aren't any additional results. @@ -1225,15 +986,22 @@ module Google # @return [String] attr_accessor :sequence + # The offset position (0-based) of the given `sequence` from the + # start of this `Reference`. This value will differ for each page + # in a paginated request. + # Corresponds to the JSON property `offset` + # @return [String] + attr_accessor :offset + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @offset = args[:offset] if args.key?(:offset) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) @sequence = args[:sequence] if args.key?(:sequence) + @offset = args[:offset] if args.key?(:offset) end end @@ -1309,19 +1077,6 @@ module Google end end - # - class UndeleteDatasetRequest - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - # Associates `members` with a `role`. class Binding include Google::Apis::Core::Hashable @@ -1362,10 +1117,29 @@ module Google end end + # + class UndeleteDatasetRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + # A 0-based half-open genomic coordinate range for search requests. class Range include Google::Apis::Core::Hashable + # The reference sequence name, for example `chr1`, + # `1`, or `chrX`. + # Corresponds to the JSON property `referenceName` + # @return [String] + attr_accessor :reference_name + # The start position of the range on the reference, 0-based inclusive. # Corresponds to the JSON property `start` # @return [String] @@ -1376,21 +1150,15 @@ module Google # @return [String] attr_accessor :end - # The reference sequence name, for example `chr1`, - # `1`, or `chrX`. - # Corresponds to the JSON property `referenceName` - # @return [String] - attr_accessor :reference_name - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @reference_name = args[:reference_name] if args.key?(:reference_name) @start = args[:start] if args.key?(:start) @end = args[:end] if args.key?(:end) - @reference_name = args[:reference_name] if args.key?(:reference_name) end end @@ -1512,11 +1280,6 @@ module Google class SearchCallSetsResponse include Google::Apis::Core::Hashable - # The list of matching call sets. - # Corresponds to the JSON property `callSets` - # @return [Array] - attr_accessor :call_sets - # The continuation token, which is used to page through large result sets. # Provide this value in a subsequent request to return the next page of # results. This field will be empty if there aren't any additional results. @@ -1524,14 +1287,19 @@ module Google # @return [String] attr_accessor :next_page_token + # The list of matching call sets. + # Corresponds to the JSON property `callSets` + # @return [Array] + attr_accessor :call_sets + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @call_sets = args[:call_sets] if args.key?(:call_sets) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @call_sets = args[:call_sets] if args.key?(:call_sets) end end @@ -1548,6 +1316,12 @@ module Google class Variant include Google::Apis::Core::Hashable + # The reference on which this variant occurs. + # (such as `chr20` or `X`) + # Corresponds to the JSON property `referenceName` + # @return [String] + attr_accessor :reference_name + # A map of additional variant information. This must be of the form # map (string key mapping to a list of string values). # Corresponds to the JSON property `info` @@ -1560,15 +1334,21 @@ module Google # @return [String] attr_accessor :reference_bases + # The bases that appear instead of the reference bases. + # Corresponds to the JSON property `alternateBases` + # @return [Array] + attr_accessor :alternate_bases + # Names for the variant, for example a RefSNP ID. # Corresponds to the JSON property `names` # @return [Array] attr_accessor :names - # The bases that appear instead of the reference bases. - # Corresponds to the JSON property `alternateBases` + # A list of filters (normally quality filters) this variant has failed. + # `PASS` indicates this variant has passed all filters. + # Corresponds to the JSON property `filter` # @return [Array] - attr_accessor :alternate_bases + attr_accessor :filter # The end position (0-based) of this variant. This corresponds to the first # base after the last base in the reference allele. So, the length of @@ -1578,12 +1358,6 @@ module Google # @return [String] attr_accessor :end - # A list of filters (normally quality filters) this variant has failed. - # `PASS` indicates this variant has passed all filters. - # Corresponds to the JSON property `filter` - # @return [Array] - attr_accessor :filter - # The variant calls for this particular variant. Each one represents the # determination of genotype with respect to this variant. # Corresponds to the JSON property `calls` @@ -1617,31 +1391,25 @@ module Google # @return [String] attr_accessor :variant_set_id - # The reference on which this variant occurs. - # (such as `chr20` or `X`) - # Corresponds to the JSON property `referenceName` - # @return [String] - attr_accessor :reference_name - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @reference_name = args[:reference_name] if args.key?(:reference_name) @info = args[:info] if args.key?(:info) @reference_bases = args[:reference_bases] if args.key?(:reference_bases) - @names = args[:names] if args.key?(:names) @alternate_bases = args[:alternate_bases] if args.key?(:alternate_bases) - @end = args[:end] if args.key?(:end) + @names = args[:names] if args.key?(:names) @filter = args[:filter] if args.key?(:filter) + @end = args[:end] if args.key?(:end) @calls = args[:calls] if args.key?(:calls) @created = args[:created] if args.key?(:created) @start = args[:start] if args.key?(:start) @quality = args[:quality] if args.key?(:quality) @id = args[:id] if args.key?(:id) @variant_set_id = args[:variant_set_id] if args.key?(:variant_set_id) - @reference_name = args[:reference_name] if args.key?(:reference_name) end end @@ -1649,103 +1417,24 @@ module Google class ListOperationsResponse include Google::Apis::Core::Hashable - # A list of operations that matches the specified filter in the request. - # Corresponds to the JSON property `operations` - # @return [Array] - attr_accessor :operations - # The standard List next-page token. # Corresponds to the JSON property `nextPageToken` # @return [String] attr_accessor :next_page_token + # A list of operations that matches the specified filter in the request. + # Corresponds to the JSON property `operations` + # @return [Array] + attr_accessor :operations + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @operations = args[:operations] if args.key?(:operations) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # The variant search request. - class SearchVariantsRequest - include Google::Apis::Core::Hashable - - # At most one variant set ID must be provided. Only variants from this - # variant set will be returned. If omitted, a call set id must be included in - # the request. - # Corresponds to the JSON property `variantSetIds` - # @return [Array] - attr_accessor :variant_set_ids - - # The end of the window, 0-based exclusive. If unspecified or 0, defaults to - # the length of the reference. - # Corresponds to the JSON property `end` - # @return [String] - attr_accessor :end - - # The maximum number of calls to return in a single page. Note that this - # limit may be exceeded in the event that a matching variant contains more - # calls than the requested maximum. If unspecified, defaults to 5000. The - # maximum value is 10000. - # Corresponds to the JSON property `maxCalls` - # @return [Fixnum] - attr_accessor :max_calls - - # The continuation token, which is used to page through large result sets. - # To get the next page of results, set this parameter to the value of - # `nextPageToken` from the previous response. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # The maximum number of variants to return in a single page. If unspecified, - # defaults to 5000. The maximum value is 10000. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - # Only return variant calls which belong to call sets with these ids. - # Leaving this blank returns all variant calls. If a variant has no - # calls belonging to any of these call sets, it won't be returned at all. - # Corresponds to the JSON property `callSetIds` - # @return [Array] - attr_accessor :call_set_ids - - # The beginning of the window (0-based, inclusive) for which - # overlapping variants should be returned. If unspecified, defaults to 0. - # Corresponds to the JSON property `start` - # @return [String] - attr_accessor :start - - # Only return variants which have exactly this name. - # Corresponds to the JSON property `variantName` - # @return [String] - attr_accessor :variant_name - - # Required. Only return variants in this reference sequence. - # Corresponds to the JSON property `referenceName` - # @return [String] - attr_accessor :reference_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @variant_set_ids = args[:variant_set_ids] if args.key?(:variant_set_ids) - @end = args[:end] if args.key?(:end) - @max_calls = args[:max_calls] if args.key?(:max_calls) - @page_token = args[:page_token] if args.key?(:page_token) - @page_size = args[:page_size] if args.key?(:page_size) - @call_set_ids = args[:call_set_ids] if args.key?(:call_set_ids) - @start = args[:start] if args.key?(:start) - @variant_name = args[:variant_name] if args.key?(:variant_name) - @reference_name = args[:reference_name] if args.key?(:reference_name) + @operations = args[:operations] if args.key?(:operations) end end @@ -1822,10 +1511,95 @@ module Google end end + # The variant search request. + class SearchVariantsRequest + include Google::Apis::Core::Hashable + + # At most one variant set ID must be provided. Only variants from this + # variant set will be returned. If omitted, a call set id must be included in + # the request. + # Corresponds to the JSON property `variantSetIds` + # @return [Array] + attr_accessor :variant_set_ids + + # The end of the window, 0-based exclusive. If unspecified or 0, defaults to + # the length of the reference. + # Corresponds to the JSON property `end` + # @return [String] + attr_accessor :end + + # The continuation token, which is used to page through large result sets. + # To get the next page of results, set this parameter to the value of + # `nextPageToken` from the previous response. + # Corresponds to the JSON property `pageToken` + # @return [String] + attr_accessor :page_token + + # The maximum number of calls to return in a single page. Note that this + # limit may be exceeded in the event that a matching variant contains more + # calls than the requested maximum. If unspecified, defaults to 5000. The + # maximum value is 10000. + # Corresponds to the JSON property `maxCalls` + # @return [Fixnum] + attr_accessor :max_calls + + # The maximum number of variants to return in a single page. If unspecified, + # defaults to 5000. The maximum value is 10000. + # Corresponds to the JSON property `pageSize` + # @return [Fixnum] + attr_accessor :page_size + + # Only return variant calls which belong to call sets with these ids. + # Leaving this blank returns all variant calls. If a variant has no + # calls belonging to any of these call sets, it won't be returned at all. + # Corresponds to the JSON property `callSetIds` + # @return [Array] + attr_accessor :call_set_ids + + # Only return variants which have exactly this name. + # Corresponds to the JSON property `variantName` + # @return [String] + attr_accessor :variant_name + + # The beginning of the window (0-based, inclusive) for which + # overlapping variants should be returned. If unspecified, defaults to 0. + # Corresponds to the JSON property `start` + # @return [String] + attr_accessor :start + + # Required. Only return variants in this reference sequence. + # Corresponds to the JSON property `referenceName` + # @return [String] + attr_accessor :reference_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @variant_set_ids = args[:variant_set_ids] if args.key?(:variant_set_ids) + @end = args[:end] if args.key?(:end) + @page_token = args[:page_token] if args.key?(:page_token) + @max_calls = args[:max_calls] if args.key?(:max_calls) + @page_size = args[:page_size] if args.key?(:page_size) + @call_set_ids = args[:call_set_ids] if args.key?(:call_set_ids) + @variant_name = args[:variant_name] if args.key?(:variant_name) + @start = args[:start] if args.key?(:start) + @reference_name = args[:reference_name] if args.key?(:reference_name) + end + end + # The read group set search request. class SearchReadGroupSetsRequest include Google::Apis::Core::Hashable + # Restricts this query to read group sets within the given datasets. At least + # one ID must be provided. + # Corresponds to the JSON property `datasetIds` + # @return [Array] + attr_accessor :dataset_ids + # Only return read group sets for which a substring of the name matches this # string. # Corresponds to the JSON property `name` @@ -1845,22 +1619,16 @@ module Google # @return [Fixnum] attr_accessor :page_size - # Restricts this query to read group sets within the given datasets. At least - # one ID must be provided. - # Corresponds to the JSON property `datasetIds` - # @return [Array] - attr_accessor :dataset_ids - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @dataset_ids = args[:dataset_ids] if args.key?(:dataset_ids) @name = args[:name] if args.key?(:name) @page_token = args[:page_token] if args.key?(:page_token) @page_size = args[:page_size] if args.key?(:page_size) - @dataset_ids = args[:dataset_ids] if args.key?(:dataset_ids) end end @@ -1895,6 +1663,13 @@ module Google class SearchReadsResponse include Google::Apis::Core::Hashable + # The continuation token, which is used to page through large result sets. + # Provide this value in a subsequent request to return the next page of + # results. This field will be empty if there aren't any additional results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + # The list of matching alignments sorted by mapped genomic coordinate, # if any, ascending in position within the same reference. Unmapped reads, # which have no position, are returned contiguously and are sorted in @@ -1903,21 +1678,14 @@ module Google # @return [Array] attr_accessor :alignments - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of - # results. This field will be empty if there aren't any additional results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @alignments = args[:alignments] if args.key?(:alignments) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @alignments = args[:alignments] if args.key?(:alignments) end end @@ -1925,6 +1693,12 @@ module Google class ClinicalCondition include Google::Apis::Core::Hashable + # The MedGen concept id associated with this gene. + # Search for these IDs at http://www.ncbi.nlm.nih.gov/medgen/ + # Corresponds to the JSON property `conceptId` + # @return [String] + attr_accessor :concept_id + # A set of names for the condition. # Corresponds to the JSON property `names` # @return [Array] @@ -1941,22 +1715,16 @@ module Google # @return [Array] attr_accessor :external_ids - # The MedGen concept id associated with this gene. - # Search for these IDs at http://www.ncbi.nlm.nih.gov/medgen/ - # Corresponds to the JSON property `conceptId` - # @return [String] - attr_accessor :concept_id - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @concept_id = args[:concept_id] if args.key?(:concept_id) @names = args[:names] if args.key?(:names) @omim_id = args[:omim_id] if args.key?(:omim_id) @external_ids = args[:external_ids] if args.key?(:external_ids) - @concept_id = args[:concept_id] if args.key?(:concept_id) end end @@ -1964,6 +1732,16 @@ module Google class Program include Google::Apis::Core::Hashable + # The command line used to run this program. + # Corresponds to the JSON property `commandLine` + # @return [String] + attr_accessor :command_line + + # The ID of the program run before this one. + # Corresponds to the JSON property `prevProgramId` + # @return [String] + attr_accessor :prev_program_id + # The user specified locally unique ID of the program. Used along with # `prevProgramId` to define an ordering between programs. # Corresponds to the JSON property `id` @@ -1981,15 +1759,44 @@ module Google # @return [String] attr_accessor :name - # The command line used to run this program. - # Corresponds to the JSON property `commandLine` - # @return [String] - attr_accessor :command_line + def initialize(**args) + update!(**args) + end - # The ID of the program run before this one. - # Corresponds to the JSON property `prevProgramId` + # Update properties of this object + def update!(**args) + @command_line = args[:command_line] if args.key?(:command_line) + @prev_program_id = args[:prev_program_id] if args.key?(:prev_program_id) + @id = args[:id] if args.key?(:id) + @version = args[:version] if args.key?(:version) + @name = args[:name] if args.key?(:name) + end + end + + # Describes a Compute Engine resource that is being managed by a running + # pipeline. + class ComputeEngine + include Google::Apis::Core::Hashable + + # The machine type of the instance. + # Corresponds to the JSON property `machineType` # @return [String] - attr_accessor :prev_program_id + attr_accessor :machine_type + + # The names of the disks that were created for this pipeline. + # Corresponds to the JSON property `diskNames` + # @return [Array] + attr_accessor :disk_names + + # The instance on which the operation is running. + # Corresponds to the JSON property `instanceName` + # @return [String] + attr_accessor :instance_name + + # The availability zone in which the instance resides. + # Corresponds to the JSON property `zone` + # @return [String] + attr_accessor :zone def initialize(**args) update!(**args) @@ -1997,11 +1804,10 @@ module Google # Update properties of this object def update!(**args) - @id = args[:id] if args.key?(:id) - @version = args[:version] if args.key?(:version) - @name = args[:name] if args.key?(:name) - @command_line = args[:command_line] if args.key?(:command_line) - @prev_program_id = args[:prev_program_id] if args.key?(:prev_program_id) + @machine_type = args[:machine_type] if args.key?(:machine_type) + @disk_names = args[:disk_names] if args.key?(:disk_names) + @instance_name = args[:instance_name] if args.key?(:instance_name) + @zone = args[:zone] if args.key?(:zone) end end @@ -2032,66 +1838,28 @@ module Google end end - # Describes a Compute Engine resource that is being managed by a running - # pipeline. - class ComputeEngine - include Google::Apis::Core::Hashable - - # The instance on which the operation is running. - # Corresponds to the JSON property `instanceName` - # @return [String] - attr_accessor :instance_name - - # The availability zone in which the instance resides. - # Corresponds to the JSON property `zone` - # @return [String] - attr_accessor :zone - - # The machine type of the instance. - # Corresponds to the JSON property `machineType` - # @return [String] - attr_accessor :machine_type - - # The names of the disks that were created for this pipeline. - # Corresponds to the JSON property `diskNames` - # @return [Array] - attr_accessor :disk_names - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @instance_name = args[:instance_name] if args.key?(:instance_name) - @zone = args[:zone] if args.key?(:zone) - @machine_type = args[:machine_type] if args.key?(:machine_type) - @disk_names = args[:disk_names] if args.key?(:disk_names) - end - end - # class ExternalId include Google::Apis::Core::Hashable - # The id used by the source of this data. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - # The name of the source of this data. # Corresponds to the JSON property `sourceName` # @return [String] attr_accessor :source_name + # The id used by the source of this data. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @id = args[:id] if args.key?(:id) @source_name = args[:source_name] if args.key?(:source_name) + @id = args[:id] if args.key?(:id) end end @@ -2137,18 +1905,6 @@ module Google class VariantSetMetadata include Google::Apis::Core::Hashable - # The type of data. Possible types include: Integer, Float, - # Flag, Character, and String. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Remaining structured metadata key-value pairs. This must be of the form - # map (string key mapping to a list of string values). - # Corresponds to the JSON property `info` - # @return [Hash>] - attr_accessor :info - # The number of values that can be included in a field described by this # metadata. # Corresponds to the JSON property `number` @@ -2177,19 +1933,31 @@ module Google # @return [String] attr_accessor :description + # Remaining structured metadata key-value pairs. This must be of the form + # map (string key mapping to a list of string values). + # Corresponds to the JSON property `info` + # @return [Hash>] + attr_accessor :info + + # The type of data. Possible types include: Integer, Float, + # Flag, Character, and String. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @type = args[:type] if args.key?(:type) - @info = args[:info] if args.key?(:info) @number = args[:number] if args.key?(:number) @id = args[:id] if args.key?(:id) @value = args[:value] if args.key?(:value) @key = args[:key] if args.key?(:key) @description = args[:description] if args.key?(:description) + @info = args[:info] if args.key?(:info) + @type = args[:type] if args.key?(:type) end end @@ -2202,23 +1970,33 @@ module Google class Reference include Google::Apis::Core::Hashable + # The server-generated reference ID, unique across all references. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # The length of this reference's sequence. + # Corresponds to the JSON property `length` + # @return [String] + attr_accessor :length + # All known corresponding accession IDs in INSDC (GenBank/ENA/DDBJ) ideally # with a version number, for example `GCF_000001405.26`. # Corresponds to the JSON property `sourceAccessions` # @return [Array] attr_accessor :source_accessions - # ID from http://www.ncbi.nlm.nih.gov/taxonomy. For example, 9606 for human. - # Corresponds to the JSON property `ncbiTaxonId` - # @return [Fixnum] - attr_accessor :ncbi_taxon_id - # The URI from which the sequence was obtained. Typically specifies a FASTA # format file. # Corresponds to the JSON property `sourceUri` # @return [String] attr_accessor :source_uri + # ID from http://www.ncbi.nlm.nih.gov/taxonomy. For example, 9606 for human. + # Corresponds to the JSON property `ncbiTaxonId` + # @return [Fixnum] + attr_accessor :ncbi_taxon_id + # The name of this reference, for example `22`. # Corresponds to the JSON property `name` # @return [String] @@ -2231,29 +2009,19 @@ module Google # @return [String] attr_accessor :md5checksum - # The server-generated reference ID, unique across all references. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The length of this reference's sequence. - # Corresponds to the JSON property `length` - # @return [String] - attr_accessor :length - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @source_accessions = args[:source_accessions] if args.key?(:source_accessions) - @ncbi_taxon_id = args[:ncbi_taxon_id] if args.key?(:ncbi_taxon_id) - @source_uri = args[:source_uri] if args.key?(:source_uri) - @name = args[:name] if args.key?(:name) - @md5checksum = args[:md5checksum] if args.key?(:md5checksum) @id = args[:id] if args.key?(:id) @length = args[:length] if args.key?(:length) + @source_accessions = args[:source_accessions] if args.key?(:source_accessions) + @source_uri = args[:source_uri] if args.key?(:source_uri) + @ncbi_taxon_id = args[:ncbi_taxon_id] if args.key?(:ncbi_taxon_id) + @name = args[:name] if args.key?(:name) + @md5checksum = args[:md5checksum] if args.key?(:md5checksum) end end @@ -2261,6 +2029,12 @@ module Google class SearchReferenceSetsRequest include Google::Apis::Core::Hashable + # If present, return reference sets for which the + # md5checksum matches exactly. + # Corresponds to the JSON property `md5checksums` + # @return [Array] + attr_accessor :md5checksums + # If present, return reference sets for which a prefix of any of # sourceAccessions # match any of these strings. Accession numbers typically have a main number @@ -2288,23 +2062,17 @@ module Google # @return [String] attr_accessor :assembly_id - # If present, return reference sets for which the - # md5checksum matches exactly. - # Corresponds to the JSON property `md5checksums` - # @return [Array] - attr_accessor :md5checksums - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @md5checksums = args[:md5checksums] if args.key?(:md5checksums) @accessions = args[:accessions] if args.key?(:accessions) @page_token = args[:page_token] if args.key?(:page_token) @page_size = args[:page_size] if args.key?(:page_size) @assembly_id = args[:assembly_id] if args.key?(:assembly_id) - @md5checksums = args[:md5checksums] if args.key?(:md5checksums) end end @@ -2384,38 +2152,6 @@ module Google end end - # - class BatchCreateAnnotationsRequest - include Google::Apis::Core::Hashable - - # The annotations to be created. At most 4096 can be specified in a single - # request. - # Corresponds to the JSON property `annotations` - # @return [Array] - attr_accessor :annotations - - # A unique request ID which enables the server to detect duplicated requests. - # If provided, duplicated requests will result in the same response; if not - # provided, duplicated requests may result in duplicated data. For a given - # annotation set, callers should not reuse `request_id`s when writing - # different batches of annotations - behavior in this case is undefined. - # A common approach is to use a UUID. For batch jobs where worker crashes are - # a possibility, consider using some unique variant of a worker or run ID. - # Corresponds to the JSON property `requestId` - # @return [String] - attr_accessor :request_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @annotations = args[:annotations] if args.key?(:annotations) - @request_id = args[:request_id] if args.key?(:request_id) - end - end - # A read alignment describes a linear alignment of a string of DNA to a # reference sequence, in addition to metadata # about the fragment (the molecule of DNA sequenced) and the read (the bases @@ -2491,6 +2227,39 @@ module Google class Read include Google::Apis::Core::Hashable + # A linear alignment can be represented by one CIGAR string. Describes the + # mapped position and local alignment of the read to the reference. + # Corresponds to the JSON property `alignment` + # @return [Google::Apis::GenomicsV1::LinearAlignment] + attr_accessor :alignment + + # The server-generated read ID, unique across all reads. This is different + # from the `fragmentName`. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # The number of reads in the fragment (extension to SAM flag 0x1). + # Corresponds to the JSON property `numberReads` + # @return [Fixnum] + attr_accessor :number_reads + + # Whether this alignment is secondary. Equivalent to SAM flag 0x100. + # A secondary alignment represents an alternative to the primary alignment + # for this read. Aligners may return secondary alignments if a read can map + # ambiguously to multiple coordinates in the genome. By convention, each read + # has one and only one alignment where both `secondaryAlignment` + # and `supplementaryAlignment` are false. + # Corresponds to the JSON property `secondaryAlignment` + # @return [Boolean] + attr_accessor :secondary_alignment + alias_method :secondary_alignment?, :secondary_alignment + + # The fragment name. Equivalent to QNAME (query template name) in SAM. + # Corresponds to the JSON property `fragmentName` + # @return [String] + attr_accessor :fragment_name + # The ID of the read group set this read belongs to. A read belongs to # exactly one read group set. # Corresponds to the JSON property `readGroupSetId` @@ -2509,6 +2278,14 @@ module Google # @return [Fixnum] attr_accessor :read_number + # The ID of the read group this read belongs to. A read belongs to exactly + # one read group. This is a server-generated ID which is distinct from SAM's + # RG tag (for that value, see + # ReadGroup.name). + # Corresponds to the JSON property `readGroupId` + # @return [String] + attr_accessor :read_group_id + # The bases of the read sequence contained in this alignment record, # **without CIGAR operations applied** (equivalent to SEQ in SAM). # `alignedSequence` and `alignedQuality` may be @@ -2520,14 +2297,6 @@ module Google # @return [String] attr_accessor :aligned_sequence - # The ID of the read group this read belongs to. A read belongs to exactly - # one read group. This is a server-generated ID which is distinct from SAM's - # RG tag (for that value, see - # ReadGroup.name). - # Corresponds to the JSON property `readGroupId` - # @return [String] - attr_accessor :read_group_id - # An abstraction for referring to a genomic position, in relation to some # already known reference. For now, represents a genomic position as a # reference name, a base number on that reference (0-based), and a @@ -2588,50 +2357,22 @@ module Google # @return [Array] attr_accessor :aligned_quality - # A linear alignment can be represented by one CIGAR string. Describes the - # mapped position and local alignment of the read to the reference. - # Corresponds to the JSON property `alignment` - # @return [Google::Apis::GenomicsV1::LinearAlignment] - attr_accessor :alignment - - # The number of reads in the fragment (extension to SAM flag 0x1). - # Corresponds to the JSON property `numberReads` - # @return [Fixnum] - attr_accessor :number_reads - - # The server-generated read ID, unique across all reads. This is different - # from the `fragmentName`. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Whether this alignment is secondary. Equivalent to SAM flag 0x100. - # A secondary alignment represents an alternative to the primary alignment - # for this read. Aligners may return secondary alignments if a read can map - # ambiguously to multiple coordinates in the genome. By convention, each read - # has one and only one alignment where both `secondaryAlignment` - # and `supplementaryAlignment` are false. - # Corresponds to the JSON property `secondaryAlignment` - # @return [Boolean] - attr_accessor :secondary_alignment - alias_method :secondary_alignment?, :secondary_alignment - - # The fragment name. Equivalent to QNAME (query template name) in SAM. - # Corresponds to the JSON property `fragmentName` - # @return [String] - attr_accessor :fragment_name - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @alignment = args[:alignment] if args.key?(:alignment) + @id = args[:id] if args.key?(:id) + @number_reads = args[:number_reads] if args.key?(:number_reads) + @secondary_alignment = args[:secondary_alignment] if args.key?(:secondary_alignment) + @fragment_name = args[:fragment_name] if args.key?(:fragment_name) @read_group_set_id = args[:read_group_set_id] if args.key?(:read_group_set_id) @duplicate_fragment = args[:duplicate_fragment] if args.key?(:duplicate_fragment) @read_number = args[:read_number] if args.key?(:read_number) - @aligned_sequence = args[:aligned_sequence] if args.key?(:aligned_sequence) @read_group_id = args[:read_group_id] if args.key?(:read_group_id) + @aligned_sequence = args[:aligned_sequence] if args.key?(:aligned_sequence) @next_mate_position = args[:next_mate_position] if args.key?(:next_mate_position) @info = args[:info] if args.key?(:info) @proper_placement = args[:proper_placement] if args.key?(:proper_placement) @@ -2639,73 +2380,29 @@ module Google @fragment_length = args[:fragment_length] if args.key?(:fragment_length) @failed_vendor_quality_checks = args[:failed_vendor_quality_checks] if args.key?(:failed_vendor_quality_checks) @aligned_quality = args[:aligned_quality] if args.key?(:aligned_quality) - @alignment = args[:alignment] if args.key?(:alignment) - @number_reads = args[:number_reads] if args.key?(:number_reads) - @id = args[:id] if args.key?(:id) - @secondary_alignment = args[:secondary_alignment] if args.key?(:secondary_alignment) - @fragment_name = args[:fragment_name] if args.key?(:fragment_name) end end - # A reference set is a set of references which typically comprise a reference - # assembly for a species, such as `GRCh38` which is representative - # of the human genome. A reference set defines a common coordinate space for - # comparing reference-aligned experimental data. A reference set contains 1 or - # more references. - # For more genomics resource definitions, see [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - class ReferenceSet + # + class BatchCreateAnnotationsRequest include Google::Apis::Core::Hashable - # The IDs of the reference objects that are part of this set. - # `Reference.md5checksum` must be unique within this set. - # Corresponds to the JSON property `referenceIds` - # @return [Array] - attr_accessor :reference_ids - - # Order-independent MD5 checksum which identifies this reference set. The - # checksum is computed by sorting all lower case hexidecimal string - # `reference.md5checksum` (for all reference in this set) in - # ascending lexicographic order, concatenating, and taking the MD5 of that - # value. The resulting value is represented in lower case hexadecimal format. - # Corresponds to the JSON property `md5checksum` + # A unique request ID which enables the server to detect duplicated requests. + # If provided, duplicated requests will result in the same response; if not + # provided, duplicated requests may result in duplicated data. For a given + # annotation set, callers should not reuse `request_id`s when writing + # different batches of annotations - behavior in this case is undefined. + # A common approach is to use a UUID. For batch jobs where worker crashes are + # a possibility, consider using some unique variant of a worker or run ID. + # Corresponds to the JSON property `requestId` # @return [String] - attr_accessor :md5checksum + attr_accessor :request_id - # Public id of this reference set, such as `GRCh37`. - # Corresponds to the JSON property `assemblyId` - # @return [String] - attr_accessor :assembly_id - - # The server-generated reference set ID, unique across all reference sets. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Free text description of this reference set. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # All known corresponding accession IDs in INSDC (GenBank/ENA/DDBJ) ideally - # with a version number, for example `NC_000001.11`. - # Corresponds to the JSON property `sourceAccessions` - # @return [Array] - attr_accessor :source_accessions - - # The URI from which the references were obtained. - # Corresponds to the JSON property `sourceUri` - # @return [String] - attr_accessor :source_uri - - # ID from http://www.ncbi.nlm.nih.gov/taxonomy (for example, 9606 for human) - # indicating the species which this reference set is intended to model. Note - # that contained references may specify a different `ncbiTaxonId`, as - # assemblies may contain reference sequences which do not belong to the - # modeled species, for example EBV in a human reference genome. - # Corresponds to the JSON property `ncbiTaxonId` - # @return [Fixnum] - attr_accessor :ncbi_taxon_id + # The annotations to be created. At most 4096 can be specified in a single + # request. + # Corresponds to the JSON property `annotations` + # @return [Array] + attr_accessor :annotations def initialize(**args) update!(**args) @@ -2713,14 +2410,8 @@ module Google # Update properties of this object def update!(**args) - @reference_ids = args[:reference_ids] if args.key?(:reference_ids) - @md5checksum = args[:md5checksum] if args.key?(:md5checksum) - @assembly_id = args[:assembly_id] if args.key?(:assembly_id) - @id = args[:id] if args.key?(:id) - @description = args[:description] if args.key?(:description) - @source_accessions = args[:source_accessions] if args.key?(:source_accessions) - @source_uri = args[:source_uri] if args.key?(:source_uri) - @ncbi_taxon_id = args[:ncbi_taxon_id] if args.key?(:ncbi_taxon_id) + @request_id = args[:request_id] if args.key?(:request_id) + @annotations = args[:annotations] if args.key?(:annotations) end end @@ -2758,28 +2449,153 @@ module Google end end + # A reference set is a set of references which typically comprise a reference + # assembly for a species, such as `GRCh38` which is representative + # of the human genome. A reference set defines a common coordinate space for + # comparing reference-aligned experimental data. A reference set contains 1 or + # more references. + # For more genomics resource definitions, see [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + class ReferenceSet + include Google::Apis::Core::Hashable + + # ID from http://www.ncbi.nlm.nih.gov/taxonomy (for example, 9606 for human) + # indicating the species which this reference set is intended to model. Note + # that contained references may specify a different `ncbiTaxonId`, as + # assemblies may contain reference sequences which do not belong to the + # modeled species, for example EBV in a human reference genome. + # Corresponds to the JSON property `ncbiTaxonId` + # @return [Fixnum] + attr_accessor :ncbi_taxon_id + + # The URI from which the references were obtained. + # Corresponds to the JSON property `sourceUri` + # @return [String] + attr_accessor :source_uri + + # The IDs of the reference objects that are part of this set. + # `Reference.md5checksum` must be unique within this set. + # Corresponds to the JSON property `referenceIds` + # @return [Array] + attr_accessor :reference_ids + + # Order-independent MD5 checksum which identifies this reference set. The + # checksum is computed by sorting all lower case hexidecimal string + # `reference.md5checksum` (for all reference in this set) in + # ascending lexicographic order, concatenating, and taking the MD5 of that + # value. The resulting value is represented in lower case hexadecimal format. + # Corresponds to the JSON property `md5checksum` + # @return [String] + attr_accessor :md5checksum + + # Public id of this reference set, such as `GRCh37`. + # Corresponds to the JSON property `assemblyId` + # @return [String] + attr_accessor :assembly_id + + # The server-generated reference set ID, unique across all reference sets. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # All known corresponding accession IDs in INSDC (GenBank/ENA/DDBJ) ideally + # with a version number, for example `NC_000001.11`. + # Corresponds to the JSON property `sourceAccessions` + # @return [Array] + attr_accessor :source_accessions + + # Free text description of this reference set. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @ncbi_taxon_id = args[:ncbi_taxon_id] if args.key?(:ncbi_taxon_id) + @source_uri = args[:source_uri] if args.key?(:source_uri) + @reference_ids = args[:reference_ids] if args.key?(:reference_ids) + @md5checksum = args[:md5checksum] if args.key?(:md5checksum) + @assembly_id = args[:assembly_id] if args.key?(:assembly_id) + @id = args[:id] if args.key?(:id) + @source_accessions = args[:source_accessions] if args.key?(:source_accessions) + @description = args[:description] if args.key?(:description) + end + end + + # A transcript represents the assertion that a particular region of the + # reference genome may be transcribed as RNA. + class Transcript + include Google::Apis::Core::Hashable + + # The range of the coding sequence for this transcript, if any. To determine + # the exact ranges of coding sequence, intersect this range with those of the + # exons, if any. If there are any + # exons, the + # codingSequence must start + # and end within them. + # Note that in some cases, the reference genome will not exactly match the + # observed mRNA transcript e.g. due to variance in the source genome from + # reference. In these cases, + # exon.frame will not necessarily + # match the expected reference reading frame and coding exon reference bases + # cannot necessarily be concatenated to produce the original transcript mRNA. + # Corresponds to the JSON property `codingSequence` + # @return [Google::Apis::GenomicsV1::CodingSequence] + attr_accessor :coding_sequence + + # The annotation ID of the gene from which this transcript is transcribed. + # Corresponds to the JSON property `geneId` + # @return [String] + attr_accessor :gene_id + + # The exons that compose + # this transcript. This field should be unset for genomes where transcript + # splicing does not occur, for example prokaryotes. + # Introns are regions of the transcript that are not included in the + # spliced RNA product. Though not explicitly modeled here, intron ranges can + # be deduced; all regions of this transcript that are not exons are introns. + # Exonic sequences do not necessarily code for a translational product + # (amino acids). Only the regions of exons bounded by the + # codingSequence correspond + # to coding DNA sequence. + # Exons are ordered by start position and may not overlap. + # Corresponds to the JSON property `exons` + # @return [Array] + attr_accessor :exons + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @coding_sequence = args[:coding_sequence] if args.key?(:coding_sequence) + @gene_id = args[:gene_id] if args.key?(:gene_id) + @exons = args[:exons] if args.key?(:exons) + end + end + # An annotation set is a logical grouping of annotations that share consistent # type information and provenance. Examples of annotation sets include 'all # genes from refseq', and 'all variant annotations from ClinVar'. class AnnotationSet include Google::Apis::Core::Hashable - # The server-generated annotation set ID, unique across all annotation sets. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The dataset to which this annotation set belongs. - # Corresponds to the JSON property `datasetId` - # @return [String] - attr_accessor :dataset_id - # The source URI describing the file from which this annotation set was # generated, if any. # Corresponds to the JSON property `sourceUri` # @return [String] attr_accessor :source_uri + # The dataset to which this annotation set belongs. + # Corresponds to the JSON property `datasetId` + # @return [String] + attr_accessor :dataset_id + # The display name for this annotation set. # Corresponds to the JSON property `name` # @return [String] @@ -2802,72 +2618,24 @@ module Google # @return [String] attr_accessor :type + # The server-generated annotation set ID, unique across all annotation sets. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @id = args[:id] if args.key?(:id) - @dataset_id = args[:dataset_id] if args.key?(:dataset_id) @source_uri = args[:source_uri] if args.key?(:source_uri) + @dataset_id = args[:dataset_id] if args.key?(:dataset_id) @name = args[:name] if args.key?(:name) @reference_set_id = args[:reference_set_id] if args.key?(:reference_set_id) @info = args[:info] if args.key?(:info) @type = args[:type] if args.key?(:type) - end - end - - # A transcript represents the assertion that a particular region of the - # reference genome may be transcribed as RNA. - class Transcript - include Google::Apis::Core::Hashable - - # The annotation ID of the gene from which this transcript is transcribed. - # Corresponds to the JSON property `geneId` - # @return [String] - attr_accessor :gene_id - - # The exons that compose - # this transcript. This field should be unset for genomes where transcript - # splicing does not occur, for example prokaryotes. - # Introns are regions of the transcript that are not included in the - # spliced RNA product. Though not explicitly modeled here, intron ranges can - # be deduced; all regions of this transcript that are not exons are introns. - # Exonic sequences do not necessarily code for a translational product - # (amino acids). Only the regions of exons bounded by the - # codingSequence correspond - # to coding DNA sequence. - # Exons are ordered by start position and may not overlap. - # Corresponds to the JSON property `exons` - # @return [Array] - attr_accessor :exons - - # The range of the coding sequence for this transcript, if any. To determine - # the exact ranges of coding sequence, intersect this range with those of the - # exons, if any. If there are any - # exons, the - # codingSequence must start - # and end within them. - # Note that in some cases, the reference genome will not exactly match the - # observed mRNA transcript e.g. due to variance in the source genome from - # reference. In these cases, - # exon.frame will not necessarily - # match the expected reference reading frame and coding exon reference bases - # cannot necessarily be concatenated to produce the original transcript mRNA. - # Corresponds to the JSON property `codingSequence` - # @return [Google::Apis::GenomicsV1::CodingSequence] - attr_accessor :coding_sequence - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @gene_id = args[:gene_id] if args.key?(:gene_id) - @exons = args[:exons] if args.key?(:exons) - @coding_sequence = args[:coding_sequence] if args.key?(:coding_sequence) + @id = args[:id] if args.key?(:id) end end @@ -2875,18 +2643,6 @@ module Google class Experiment include Google::Apis::Core::Hashable - # The sequencing center used as part of this experiment. - # Corresponds to the JSON property `sequencingCenter` - # @return [String] - attr_accessor :sequencing_center - - # The platform unit used as part of this experiment, for example - # flowcell-barcode.lane for Illumina or slide for SOLiD. Corresponds to the - # @RG PU field in the SAM spec. - # Corresponds to the JSON property `platformUnit` - # @return [String] - attr_accessor :platform_unit - # A client-supplied library identifier; a library is a collection of DNA # fragments which have been prepared for sequencing from a sample. This # field is important for quality control as error or bias can be introduced @@ -2901,16 +2657,28 @@ module Google # @return [String] attr_accessor :instrument_model + # The sequencing center used as part of this experiment. + # Corresponds to the JSON property `sequencingCenter` + # @return [String] + attr_accessor :sequencing_center + + # The platform unit used as part of this experiment, for example + # flowcell-barcode.lane for Illumina or slide for SOLiD. Corresponds to the + # @RG PU field in the SAM spec. + # Corresponds to the JSON property `platformUnit` + # @return [String] + attr_accessor :platform_unit + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @sequencing_center = args[:sequencing_center] if args.key?(:sequencing_center) - @platform_unit = args[:platform_unit] if args.key?(:platform_unit) @library_id = args[:library_id] if args.key?(:library_id) @instrument_model = args[:instrument_model] if args.key?(:instrument_model) + @sequencing_center = args[:sequencing_center] if args.key?(:sequencing_center) + @platform_unit = args[:platform_unit] if args.key?(:platform_unit) end end @@ -3058,6 +2826,16 @@ module Google class CallSet include Google::Apis::Core::Hashable + # The date this call set was created in milliseconds from the epoch. + # Corresponds to the JSON property `created` + # @return [String] + attr_accessor :created + + # The sample ID this call set corresponds to. + # Corresponds to the JSON property `sampleId` + # @return [String] + attr_accessor :sample_id + # The call set name. # Corresponds to the JSON property `name` # @return [String] @@ -3084,28 +2862,18 @@ module Google # @return [String] attr_accessor :id - # The date this call set was created in milliseconds from the epoch. - # Corresponds to the JSON property `created` - # @return [String] - attr_accessor :created - - # The sample ID this call set corresponds to. - # Corresponds to the JSON property `sampleId` - # @return [String] - attr_accessor :sample_id - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @created = args[:created] if args.key?(:created) + @sample_id = args[:sample_id] if args.key?(:sample_id) @name = args[:name] if args.key?(:name) @info = args[:info] if args.key?(:info) @variant_set_ids = args[:variant_set_ids] if args.key?(:variant_set_ids) @id = args[:id] if args.key?(:id) - @created = args[:created] if args.key?(:created) - @sample_id = args[:sample_id] if args.key?(:sample_id) end end @@ -3113,11 +2881,6 @@ module Google class SearchAnnotationSetsResponse include Google::Apis::Core::Hashable - # The matching annotation sets. - # Corresponds to the JSON property `annotationSets` - # @return [Array] - attr_accessor :annotation_sets - # The continuation token, which is used to page through large result sets. # Provide this value in a subsequent request to return the next page of # results. This field will be empty if there aren't any additional results. @@ -3125,14 +2888,19 @@ module Google # @return [String] attr_accessor :next_page_token + # The matching annotation sets. + # Corresponds to the JSON property `annotationSets` + # @return [Array] + attr_accessor :annotation_sets + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @annotation_sets = args[:annotation_sets] if args.key?(:annotation_sets) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @annotation_sets = args[:annotation_sets] if args.key?(:annotation_sets) end end @@ -3140,6 +2908,19 @@ module Google class ImportVariantsRequest include Google::Apis::Core::Hashable + # Convert reference names to the canonical representation. + # hg19 haploytypes (those reference names containing "_hap") + # are not modified in any way. + # All other reference names are modified according to the following rules: + # The reference name is capitalized. + # The "chr" prefix is dropped for all autosomes and sex chromsomes. + # For example "chr17" becomes "17" and "chrX" becomes "X". + # All mitochondrial chromosomes ("chrM", "chrMT", etc) become "MT". + # Corresponds to the JSON property `normalizeReferenceNames` + # @return [Boolean] + attr_accessor :normalize_reference_names + alias_method :normalize_reference_names?, :normalize_reference_names + # The format of the variant data being imported. If unspecified, defaults to # to `VCF`. # Corresponds to the JSON property `format` @@ -3166,18 +2947,46 @@ module Google # @return [Array] attr_accessor :source_uris - # Convert reference names to the canonical representation. - # hg19 haploytypes (those reference names containing "_hap") - # are not modified in any way. - # All other reference names are modified according to the following rules: - # The reference name is capitalized. - # The "chr" prefix is dropped for all autosomes and sex chromsomes. - # For example "chr17" becomes "17" and "chrX" becomes "X". - # All mitochondrial chromosomes ("chrM", "chrMT", etc) become "MT". - # Corresponds to the JSON property `normalizeReferenceNames` - # @return [Boolean] - attr_accessor :normalize_reference_names - alias_method :normalize_reference_names?, :normalize_reference_names + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @normalize_reference_names = args[:normalize_reference_names] if args.key?(:normalize_reference_names) + @format = args[:format] if args.key?(:format) + @info_merge_config = args[:info_merge_config] if args.key?(:info_merge_config) + @variant_set_id = args[:variant_set_id] if args.key?(:variant_set_id) + @source_uris = args[:source_uris] if args.key?(:source_uris) + end + end + + # + class ListCoverageBucketsResponse + include Google::Apis::Core::Hashable + + # The continuation token, which is used to page through large result sets. + # Provide this value in a subsequent request to return the next page of + # results. This field will be empty if there aren't any additional results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The length of each coverage bucket in base pairs. Note that buckets at the + # end of a reference sequence may be shorter. This value is omitted if the + # bucket width is infinity (the default behaviour, with no range or + # `targetBucketWidth`). + # Corresponds to the JSON property `bucketWidth` + # @return [String] + attr_accessor :bucket_width + + # The coverage buckets. The list of buckets is sparse; a bucket with 0 + # overlapping reads is not returned. A bucket never crosses more than one + # reference sequence. Each bucket has width `bucketWidth`, unless + # its end is the end of the reference sequence. + # Corresponds to the JSON property `coverageBuckets` + # @return [Array] + attr_accessor :coverage_buckets def initialize(**args) update!(**args) @@ -3185,11 +2994,9 @@ module Google # Update properties of this object def update!(**args) - @format = args[:format] if args.key?(:format) - @info_merge_config = args[:info_merge_config] if args.key?(:info_merge_config) - @variant_set_id = args[:variant_set_id] if args.key?(:variant_set_id) - @source_uris = args[:source_uris] if args.key?(:source_uris) - @normalize_reference_names = args[:normalize_reference_names] if args.key?(:normalize_reference_names) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @bucket_width = args[:bucket_width] if args.key?(:bucket_width) + @coverage_buckets = args[:coverage_buckets] if args.key?(:coverage_buckets) end end @@ -3256,45 +3063,6 @@ module Google end end - # - class ListCoverageBucketsResponse - include Google::Apis::Core::Hashable - - # The continuation token, which is used to page through large result sets. - # Provide this value in a subsequent request to return the next page of - # results. This field will be empty if there aren't any additional results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The length of each coverage bucket in base pairs. Note that buckets at the - # end of a reference sequence may be shorter. This value is omitted if the - # bucket width is infinity (the default behaviour, with no range or - # `targetBucketWidth`). - # Corresponds to the JSON property `bucketWidth` - # @return [String] - attr_accessor :bucket_width - - # The coverage buckets. The list of buckets is sparse; a bucket with 0 - # overlapping reads is not returned. A bucket never crosses more than one - # reference sequence. Each bucket has width `bucketWidth`, unless - # its end is the end of the reference sequence. - # Corresponds to the JSON property `coverageBuckets` - # @return [Array] - attr_accessor :coverage_buckets - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @bucket_width = args[:bucket_width] if args.key?(:bucket_width) - @coverage_buckets = args[:coverage_buckets] if args.key?(:coverage_buckets) - end - end - # The variant data export request. class ExportVariantSetRequest include Google::Apis::Core::Hashable @@ -3348,6 +3116,28 @@ module Google class SearchAnnotationsRequest include Google::Apis::Core::Hashable + # The start position of the range on the reference, 0-based inclusive. If + # specified, + # referenceId or + # referenceName + # must be specified. Defaults to 0. + # Corresponds to the JSON property `start` + # @return [String] + attr_accessor :start + + # Required. The annotation sets to search within. The caller must have + # `READ` access to these annotation sets. + # All queried annotation sets must have the same type. + # Corresponds to the JSON property `annotationSetIds` + # @return [Array] + attr_accessor :annotation_set_ids + + # The name of the reference to query, within the reference set associated + # with this query. + # Corresponds to the JSON property `referenceName` + # @return [String] + attr_accessor :reference_name + # The ID of the reference to query. # Corresponds to the JSON property `referenceId` # @return [String] @@ -3374,41 +3164,19 @@ module Google # @return [Fixnum] attr_accessor :page_size - # The start position of the range on the reference, 0-based inclusive. If - # specified, - # referenceId or - # referenceName - # must be specified. Defaults to 0. - # Corresponds to the JSON property `start` - # @return [String] - attr_accessor :start - - # Required. The annotation sets to search within. The caller must have - # `READ` access to these annotation sets. - # All queried annotation sets must have the same type. - # Corresponds to the JSON property `annotationSetIds` - # @return [Array] - attr_accessor :annotation_set_ids - - # The name of the reference to query, within the reference set associated - # with this query. - # Corresponds to the JSON property `referenceName` - # @return [String] - attr_accessor :reference_name - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @start = args[:start] if args.key?(:start) + @annotation_set_ids = args[:annotation_set_ids] if args.key?(:annotation_set_ids) + @reference_name = args[:reference_name] if args.key?(:reference_name) @reference_id = args[:reference_id] if args.key?(:reference_id) @end = args[:end] if args.key?(:end) @page_token = args[:page_token] if args.key?(:page_token) @page_size = args[:page_size] if args.key?(:page_size) - @start = args[:start] if args.key?(:start) - @annotation_set_ids = args[:annotation_set_ids] if args.key?(:annotation_set_ids) - @reference_name = args[:reference_name] if args.key?(:reference_name) end end @@ -3416,6 +3184,12 @@ module Google class OperationEvent include Google::Apis::Core::Hashable + # Optional time of when event finished. An event can have a start time and no + # finish time. If an event has a finish time, there must be a start time. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + # Optional time of when event started. # Corresponds to the JSON property `startTime` # @return [String] @@ -3426,21 +3200,15 @@ module Google # @return [String] attr_accessor :description - # Optional time of when event finished. An event can have a start time and no - # finish time. If an event has a finish time, there must be a start time. - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @end_time = args[:end_time] if args.key?(:end_time) @start_time = args[:start_time] if args.key?(:start_time) @description = args[:description] if args.key?(:description) - @end_time = args[:end_time] if args.key?(:end_time) end end @@ -3472,6 +3240,238 @@ module Google @end = args[:end] if args.key?(:end) end end + + # Request message for `GetIamPolicy` method. + class GetIamPolicyRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Response message for `TestIamPermissions` method. + class TestIamPermissionsResponse + include Google::Apis::Core::Hashable + + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @permissions = args[:permissions] if args.key?(:permissions) + end + end + + # + class SearchReferencesResponse + include Google::Apis::Core::Hashable + + # The matching references. + # Corresponds to the JSON property `references` + # @return [Array] + attr_accessor :references + + # The continuation token, which is used to page through large result sets. + # Provide this value in a subsequent request to return the next page of + # results. This field will be empty if there aren't any additional results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @references = args[:references] if args.key?(:references) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # + class SearchAnnotationSetsRequest + include Google::Apis::Core::Hashable + + # The continuation token, which is used to page through large result sets. + # To get the next page of results, set this parameter to the value of + # `nextPageToken` from the previous response. + # Corresponds to the JSON property `pageToken` + # @return [String] + attr_accessor :page_token + + # The maximum number of results to return in a single page. If unspecified, + # defaults to 128. The maximum value is 1024. + # Corresponds to the JSON property `pageSize` + # @return [Fixnum] + attr_accessor :page_size + + # Required. The dataset IDs to search within. Caller must have `READ` access + # to these datasets. + # Corresponds to the JSON property `datasetIds` + # @return [Array] + attr_accessor :dataset_ids + + # If specified, only annotation sets that have any of these types are + # returned. + # Corresponds to the JSON property `types` + # @return [Array] + attr_accessor :types + + # Only return annotations sets for which a substring of the name matches this + # string (case insensitive). + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # If specified, only annotation sets associated with the given reference set + # are returned. + # Corresponds to the JSON property `referenceSetId` + # @return [String] + attr_accessor :reference_set_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @page_token = args[:page_token] if args.key?(:page_token) + @page_size = args[:page_size] if args.key?(:page_size) + @dataset_ids = args[:dataset_ids] if args.key?(:dataset_ids) + @types = args[:types] if args.key?(:types) + @name = args[:name] if args.key?(:name) + @reference_set_id = args[:reference_set_id] if args.key?(:reference_set_id) + end + end + + # The read group set search response. + class SearchReadGroupSetsResponse + include Google::Apis::Core::Hashable + + # The continuation token, which is used to page through large result sets. + # Provide this value in a subsequent request to return the next page of + # results. This field will be empty if there aren't any additional results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The list of matching read group sets. + # Corresponds to the JSON property `readGroupSets` + # @return [Array] + attr_accessor :read_group_sets + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @read_group_sets = args[:read_group_sets] if args.key?(:read_group_sets) + end + end + + # A linear alignment can be represented by one CIGAR string. Describes the + # mapped position and local alignment of the read to the reference. + class LinearAlignment + include Google::Apis::Core::Hashable + + # An abstraction for referring to a genomic position, in relation to some + # already known reference. For now, represents a genomic position as a + # reference name, a base number on that reference (0-based), and a + # determination of forward or reverse strand. + # Corresponds to the JSON property `position` + # @return [Google::Apis::GenomicsV1::Position] + attr_accessor :position + + # Represents the local alignment of this sequence (alignment matches, indels, + # etc) against the reference. + # Corresponds to the JSON property `cigar` + # @return [Array] + attr_accessor :cigar + + # The mapping quality of this alignment. Represents how likely + # the read maps to this position as opposed to other locations. + # Specifically, this is -10 log10 Pr(mapping position is wrong), rounded to + # the nearest integer. + # Corresponds to the JSON property `mappingQuality` + # @return [Fixnum] + attr_accessor :mapping_quality + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @position = args[:position] if args.key?(:position) + @cigar = args[:cigar] if args.key?(:cigar) + @mapping_quality = args[:mapping_quality] if args.key?(:mapping_quality) + end + end + + # + class SearchReferencesRequest + include Google::Apis::Core::Hashable + + # If present, return references for which a prefix of any of + # sourceAccessions match + # any of these strings. Accession numbers typically have a main number and a + # version, for example `GCF_000001405.26`. + # Corresponds to the JSON property `accessions` + # @return [Array] + attr_accessor :accessions + + # The continuation token, which is used to page through large result sets. + # To get the next page of results, set this parameter to the value of + # `nextPageToken` from the previous response. + # Corresponds to the JSON property `pageToken` + # @return [String] + attr_accessor :page_token + + # If present, return only references which belong to this reference set. + # Corresponds to the JSON property `referenceSetId` + # @return [String] + attr_accessor :reference_set_id + + # The maximum number of results to return in a single page. If unspecified, + # defaults to 1024. The maximum value is 4096. + # Corresponds to the JSON property `pageSize` + # @return [Fixnum] + attr_accessor :page_size + + # If present, return references for which the + # md5checksum matches exactly. + # Corresponds to the JSON property `md5checksums` + # @return [Array] + attr_accessor :md5checksums + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @accessions = args[:accessions] if args.key?(:accessions) + @page_token = args[:page_token] if args.key?(:page_token) + @reference_set_id = args[:reference_set_id] if args.key?(:reference_set_id) + @page_size = args[:page_size] if args.key?(:page_size) + @md5checksums = args[:md5checksums] if args.key?(:md5checksums) + end + end end end end diff --git a/generated/google/apis/genomics_v1/representations.rb b/generated/google/apis/genomics_v1/representations.rb index ac5dfba7d..f281ff20e 100644 --- a/generated/google/apis/genomics_v1/representations.rb +++ b/generated/google/apis/genomics_v1/representations.rb @@ -22,48 +22,6 @@ module Google module Apis module GenomicsV1 - class TestIamPermissionsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GetIamPolicyRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SearchReferencesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SearchAnnotationSetsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SearchReadGroupSetsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SearchReferencesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class LinearAlignment - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class Dataset class Representation < Google::Apis::Core::JsonRepresentation; end @@ -142,19 +100,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Annotation - 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 RuntimeMetadata + class Annotation class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -166,6 +118,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class RuntimeMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ImportReadGroupSetsResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -196,13 +154,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class UndeleteDatasetRequest + class Binding class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Binding + class UndeleteDatasetRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -250,13 +208,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class SearchVariantsRequest + class OperationMetadata class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class OperationMetadata + class SearchVariantsRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -292,13 +250,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class CoverageBucket + class ComputeEngine class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ComputeEngine + class CoverageBucket class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -346,19 +304,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class BatchCreateAnnotationsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class Read class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ReferenceSet + class BatchCreateAnnotationsRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -370,7 +322,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class AnnotationSet + class ReferenceSet class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -382,6 +334,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class AnnotationSet + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Experiment class Representation < Google::Apis::Core::JsonRepresentation; end @@ -430,13 +388,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class VariantAnnotation + class ListCoverageBucketsResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ListCoverageBucketsResponse + class VariantAnnotation class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -466,69 +424,46 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class TestIamPermissionsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :permissions, as: 'permissions' - end + class GetIamPolicyRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end - class GetIamPolicyRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end + class TestIamPermissionsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class SearchReferencesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :references, as: 'references', class: Google::Apis::GenomicsV1::Reference, decorator: Google::Apis::GenomicsV1::Reference::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :next_page_token, as: 'nextPageToken' - end + include Google::Apis::Core::JsonObjectSupport end class SearchAnnotationSetsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :reference_set_id, as: 'referenceSetId' - property :page_token, as: 'pageToken' - property :page_size, as: 'pageSize' - collection :dataset_ids, as: 'datasetIds' - collection :types, as: 'types' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class SearchReadGroupSetsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :read_group_sets, as: 'readGroupSets', class: Google::Apis::GenomicsV1::ReadGroupSet, decorator: Google::Apis::GenomicsV1::ReadGroupSet::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :next_page_token, as: 'nextPageToken' - end - end - - class SearchReferencesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :md5checksums, as: 'md5checksums' - collection :accessions, as: 'accessions' - property :page_token, as: 'pageToken' - property :reference_set_id, as: 'referenceSetId' - property :page_size, as: 'pageSize' - end + include Google::Apis::Core::JsonObjectSupport end class LinearAlignment - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :position, as: 'position', class: Google::Apis::GenomicsV1::Position, decorator: Google::Apis::GenomicsV1::Position::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - collection :cigar, as: 'cigar', class: Google::Apis::GenomicsV1::CigarUnit, decorator: Google::Apis::GenomicsV1::CigarUnit::Representation + include Google::Apis::Core::JsonObjectSupport + end - property :mapping_quality, as: 'mappingQuality' - end + class SearchReferencesRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Dataset @@ -559,9 +494,9 @@ module Google end property :id, as: 'id' - property :predicted_insert_size, as: 'predictedInsertSize' collection :programs, as: 'programs', class: Google::Apis::GenomicsV1::Program, decorator: Google::Apis::GenomicsV1::Program::Representation + property :predicted_insert_size, as: 'predictedInsertSize' property :description, as: 'description' property :sample_id, as: 'sampleId' property :dataset_id, as: 'datasetId' @@ -573,11 +508,9 @@ module Google class ReadGroupSet # @private class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :dataset_id, as: 'datasetId' - property :filename, as: 'filename' collection :read_groups, as: 'readGroups', class: Google::Apis::GenomicsV1::ReadGroup, decorator: Google::Apis::GenomicsV1::ReadGroup::Representation + property :filename, as: 'filename' property :name, as: 'name' property :reference_set_id, as: 'referenceSetId' hash :info, as: 'info', :class => Array do @@ -585,15 +518,17 @@ module Google items end + property :id, as: 'id' + property :dataset_id, as: 'datasetId' end end class SearchVariantSetsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' collection :variant_sets, as: 'variantSets', class: Google::Apis::GenomicsV1::VariantSet, decorator: Google::Apis::GenomicsV1::VariantSet::Representation - property :next_page_token, as: 'nextPageToken' end end @@ -616,9 +551,9 @@ module Google class Position # @private class Representation < Google::Apis::Core::JsonRepresentation - property :reverse_strand, as: 'reverseStrand' property :position, as: 'position' property :reference_name, as: 'referenceName' + property :reverse_strand, as: 'reverseStrand' end end @@ -634,10 +569,10 @@ module Google class SearchCallSetsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :variant_set_ids, as: 'variantSetIds' property :name, as: 'name' property :page_token, as: 'pageToken' property :page_size, as: 'pageSize' - collection :variant_set_ids, as: 'variantSetIds' end end @@ -664,37 +599,13 @@ module Google class SearchReadsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :read_group_set_ids, as: 'readGroupSetIds' collection :read_group_ids, as: 'readGroupIds' property :end, as: 'end' property :page_token, as: 'pageToken' property :page_size, as: 'pageSize' property :start, as: 'start' property :reference_name, as: 'referenceName' - end - end - - class Annotation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :reference_name, as: 'referenceName' - property :type, as: 'type' - hash :info, as: 'info', :class => Array do - include Representable::JSON::Collection - items - end - - property :end, as: 'end' - property :transcript, as: 'transcript', class: Google::Apis::GenomicsV1::Transcript, decorator: Google::Apis::GenomicsV1::Transcript::Representation - - property :start, as: 'start' - property :annotation_set_id, as: 'annotationSetId' - property :name, as: 'name' - property :variant, as: 'variant', class: Google::Apis::GenomicsV1::VariantAnnotation, decorator: Google::Apis::GenomicsV1::VariantAnnotation::Representation - - property :id, as: 'id' - property :reference_id, as: 'referenceId' - property :reverse_strand, as: 'reverseStrand' + collection :read_group_set_ids, as: 'readGroupSetIds' end end @@ -704,23 +615,47 @@ module Google end end - class RuntimeMetadata + class Annotation # @private class Representation < Google::Apis::Core::JsonRepresentation - property :compute_engine, as: 'computeEngine', class: Google::Apis::GenomicsV1::ComputeEngine, decorator: Google::Apis::GenomicsV1::ComputeEngine::Representation + property :reverse_strand, as: 'reverseStrand' + property :reference_name, as: 'referenceName' + hash :info, as: 'info', :class => Array do + include Representable::JSON::Collection + items + end + property :type, as: 'type' + property :end, as: 'end' + property :transcript, as: 'transcript', class: Google::Apis::GenomicsV1::Transcript, decorator: Google::Apis::GenomicsV1::Transcript::Representation + + property :start, as: 'start' + property :annotation_set_id, as: 'annotationSetId' + property :name, as: 'name' + property :variant, as: 'variant', class: Google::Apis::GenomicsV1::VariantAnnotation, decorator: Google::Apis::GenomicsV1::VariantAnnotation::Representation + + property :reference_id, as: 'referenceId' + property :id, as: 'id' 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::GenomicsV1::Status, decorator: Google::Apis::GenomicsV1::Status::Representation hash :metadata, as: 'metadata' + property :done, as: 'done' + end + end + + class RuntimeMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :compute_engine, as: 'computeEngine', class: Google::Apis::GenomicsV1::ComputeEngine, decorator: Google::Apis::GenomicsV1::ComputeEngine::Representation + end end @@ -734,6 +669,9 @@ module Google class VariantCall # @private class Representation < Google::Apis::Core::JsonRepresentation + property :call_set_name, as: 'callSetName' + collection :genotype_likelihood, as: 'genotypeLikelihood' + property :call_set_id, as: 'callSetId' collection :genotype, as: 'genotype' property :phaseset, as: 'phaseset' hash :info, as: 'info', :class => Array do @@ -741,9 +679,6 @@ module Google items end - property :call_set_name, as: 'callSetName' - collection :genotype_likelihood, as: 'genotypeLikelihood' - property :call_set_id, as: 'callSetId' end end @@ -759,9 +694,9 @@ module Google class ListBasesResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :offset, as: 'offset' property :next_page_token, as: 'nextPageToken' property :sequence, as: 'sequence' + property :offset, as: 'offset' end end @@ -774,12 +709,6 @@ module Google end end - class UndeleteDatasetRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - class Binding # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -788,12 +717,18 @@ module Google end end + class UndeleteDatasetRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + class Range # @private class Representation < Google::Apis::Core::JsonRepresentation + property :reference_name, as: 'referenceName' property :start, as: 'start' property :end, as: 'end' - property :reference_name, as: 'referenceName' end end @@ -831,25 +766,26 @@ module Google class SearchCallSetsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' collection :call_sets, as: 'callSets', class: Google::Apis::GenomicsV1::CallSet, decorator: Google::Apis::GenomicsV1::CallSet::Representation - property :next_page_token, as: 'nextPageToken' end end class Variant # @private class Representation < Google::Apis::Core::JsonRepresentation + property :reference_name, as: 'referenceName' hash :info, as: 'info', :class => Array do include Representable::JSON::Collection items end property :reference_bases, as: 'referenceBases' - collection :names, as: 'names' collection :alternate_bases, as: 'alternateBases' - property :end, as: 'end' + collection :names, as: 'names' collection :filter, as: 'filter' + property :end, as: 'end' collection :calls, as: 'calls', class: Google::Apis::GenomicsV1::VariantCall, decorator: Google::Apis::GenomicsV1::VariantCall::Representation property :created, as: 'created' @@ -857,31 +793,15 @@ module Google property :quality, as: 'quality' property :id, as: 'id' property :variant_set_id, as: 'variantSetId' - property :reference_name, as: 'referenceName' end end class ListOperationsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' collection :operations, as: 'operations', class: Google::Apis::GenomicsV1::Operation, decorator: Google::Apis::GenomicsV1::Operation::Representation - property :next_page_token, as: 'nextPageToken' - end - end - - class SearchVariantsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :variant_set_ids, as: 'variantSetIds' - property :end, as: 'end' - property :max_calls, as: 'maxCalls' - property :page_token, as: 'pageToken' - property :page_size, as: 'pageSize' - collection :call_set_ids, as: 'callSetIds' - property :start, as: 'start' - property :variant_name, as: 'variantName' - property :reference_name, as: 'referenceName' end end @@ -901,13 +821,28 @@ module Google end end + class SearchVariantsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :variant_set_ids, as: 'variantSetIds' + property :end, as: 'end' + property :page_token, as: 'pageToken' + property :max_calls, as: 'maxCalls' + property :page_size, as: 'pageSize' + collection :call_set_ids, as: 'callSetIds' + property :variant_name, as: 'variantName' + property :start, as: 'start' + property :reference_name, as: 'referenceName' + end + end + class SearchReadGroupSetsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :dataset_ids, as: 'datasetIds' property :name, as: 'name' property :page_token, as: 'pageToken' property :page_size, as: 'pageSize' - collection :dataset_ids, as: 'datasetIds' end end @@ -923,31 +858,41 @@ module Google class SearchReadsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' collection :alignments, as: 'alignments', class: Google::Apis::GenomicsV1::Read, decorator: Google::Apis::GenomicsV1::Read::Representation - property :next_page_token, as: 'nextPageToken' end end class ClinicalCondition # @private class Representation < Google::Apis::Core::JsonRepresentation + property :concept_id, as: 'conceptId' collection :names, as: 'names' property :omim_id, as: 'omimId' collection :external_ids, as: 'externalIds', class: Google::Apis::GenomicsV1::ExternalId, decorator: Google::Apis::GenomicsV1::ExternalId::Representation - property :concept_id, as: 'conceptId' end end class Program # @private class Representation < Google::Apis::Core::JsonRepresentation + property :command_line, as: 'commandLine' + property :prev_program_id, as: 'prevProgramId' property :id, as: 'id' property :version, as: 'version' property :name, as: 'name' - property :command_line, as: 'commandLine' - property :prev_program_id, as: 'prevProgramId' + end + end + + class ComputeEngine + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :machine_type, as: 'machineType' + collection :disk_names, as: 'diskNames' + property :instance_name, as: 'instanceName' + property :zone, as: 'zone' end end @@ -960,21 +905,11 @@ module Google end end - class ComputeEngine - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :instance_name, as: 'instanceName' - property :zone, as: 'zone' - property :machine_type, as: 'machineType' - collection :disk_names, as: 'diskNames' - end - end - class ExternalId # @private class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' property :source_name, as: 'sourceName' + property :id, as: 'id' end end @@ -990,41 +925,41 @@ module Google class VariantSetMetadata # @private class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - hash :info, as: 'info', :class => Array do - include Representable::JSON::Collection - items - end - property :number, as: 'number' property :id, as: 'id' property :value, as: 'value' property :key, as: 'key' property :description, as: 'description' + hash :info, as: 'info', :class => Array do + include Representable::JSON::Collection + items + end + + property :type, as: 'type' end end class Reference # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :source_accessions, as: 'sourceAccessions' - property :ncbi_taxon_id, as: 'ncbiTaxonId' - property :source_uri, as: 'sourceUri' - property :name, as: 'name' - property :md5checksum, as: 'md5checksum' property :id, as: 'id' property :length, as: 'length' + collection :source_accessions, as: 'sourceAccessions' + property :source_uri, as: 'sourceUri' + property :ncbi_taxon_id, as: 'ncbiTaxonId' + property :name, as: 'name' + property :md5checksum, as: 'md5checksum' end end class SearchReferenceSetsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :md5checksums, as: 'md5checksums' collection :accessions, as: 'accessions' property :page_token, as: 'pageToken' property :page_size, as: 'pageSize' property :assembly_id, as: 'assemblyId' - collection :md5checksums, as: 'md5checksums' end end @@ -1046,23 +981,20 @@ module Google end end - class BatchCreateAnnotationsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :annotations, as: 'annotations', class: Google::Apis::GenomicsV1::Annotation, decorator: Google::Apis::GenomicsV1::Annotation::Representation - - property :request_id, as: 'requestId' - end - end - class Read # @private class Representation < Google::Apis::Core::JsonRepresentation + property :alignment, as: 'alignment', class: Google::Apis::GenomicsV1::LinearAlignment, decorator: Google::Apis::GenomicsV1::LinearAlignment::Representation + + property :id, as: 'id' + property :number_reads, as: 'numberReads' + property :secondary_alignment, as: 'secondaryAlignment' + property :fragment_name, as: 'fragmentName' property :read_group_set_id, as: 'readGroupSetId' property :duplicate_fragment, as: 'duplicateFragment' property :read_number, as: 'readNumber' - property :aligned_sequence, as: 'alignedSequence' property :read_group_id, as: 'readGroupId' + property :aligned_sequence, as: 'alignedSequence' property :next_mate_position, as: 'nextMatePosition', class: Google::Apis::GenomicsV1::Position, decorator: Google::Apis::GenomicsV1::Position::Representation hash :info, as: 'info', :class => Array do @@ -1075,26 +1007,15 @@ module Google property :fragment_length, as: 'fragmentLength' property :failed_vendor_quality_checks, as: 'failedVendorQualityChecks' collection :aligned_quality, as: 'alignedQuality' - property :alignment, as: 'alignment', class: Google::Apis::GenomicsV1::LinearAlignment, decorator: Google::Apis::GenomicsV1::LinearAlignment::Representation - - property :number_reads, as: 'numberReads' - property :id, as: 'id' - property :secondary_alignment, as: 'secondaryAlignment' - property :fragment_name, as: 'fragmentName' end end - class ReferenceSet + class BatchCreateAnnotationsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :reference_ids, as: 'referenceIds' - property :md5checksum, as: 'md5checksum' - property :assembly_id, as: 'assemblyId' - property :id, as: 'id' - property :description, as: 'description' - collection :source_accessions, as: 'sourceAccessions' - property :source_uri, as: 'sourceUri' - property :ncbi_taxon_id, as: 'ncbiTaxonId' + property :request_id, as: 'requestId' + collection :annotations, as: 'annotations', class: Google::Apis::GenomicsV1::Annotation, decorator: Google::Apis::GenomicsV1::Annotation::Representation + end end @@ -1107,12 +1028,36 @@ module Google end end + class ReferenceSet + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :ncbi_taxon_id, as: 'ncbiTaxonId' + property :source_uri, as: 'sourceUri' + collection :reference_ids, as: 'referenceIds' + property :md5checksum, as: 'md5checksum' + property :assembly_id, as: 'assemblyId' + property :id, as: 'id' + collection :source_accessions, as: 'sourceAccessions' + property :description, as: 'description' + end + end + + class Transcript + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :coding_sequence, as: 'codingSequence', class: Google::Apis::GenomicsV1::CodingSequence, decorator: Google::Apis::GenomicsV1::CodingSequence::Representation + + property :gene_id, as: 'geneId' + collection :exons, as: 'exons', class: Google::Apis::GenomicsV1::Exon, decorator: Google::Apis::GenomicsV1::Exon::Representation + + end + end + class AnnotationSet # @private class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :dataset_id, as: 'datasetId' property :source_uri, as: 'sourceUri' + property :dataset_id, as: 'datasetId' property :name, as: 'name' property :reference_set_id, as: 'referenceSetId' hash :info, as: 'info', :class => Array do @@ -1121,27 +1066,17 @@ module Google end property :type, as: 'type' - end - end - - class Transcript - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :gene_id, as: 'geneId' - collection :exons, as: 'exons', class: Google::Apis::GenomicsV1::Exon, decorator: Google::Apis::GenomicsV1::Exon::Representation - - property :coding_sequence, as: 'codingSequence', class: Google::Apis::GenomicsV1::CodingSequence, decorator: Google::Apis::GenomicsV1::CodingSequence::Representation - + property :id, as: 'id' end end class Experiment # @private class Representation < Google::Apis::Core::JsonRepresentation - property :sequencing_center, as: 'sequencingCenter' - property :platform_unit, as: 'platformUnit' property :library_id, as: 'libraryId' property :instrument_model, as: 'instrumentModel' + property :sequencing_center, as: 'sequencingCenter' + property :platform_unit, as: 'platformUnit' end end @@ -1182,6 +1117,8 @@ module Google class CallSet # @private class Representation < Google::Apis::Core::JsonRepresentation + property :created, as: 'created' + property :sample_id, as: 'sampleId' property :name, as: 'name' hash :info, as: 'info', :class => Array do include Representable::JSON::Collection @@ -1190,28 +1127,36 @@ module Google collection :variant_set_ids, as: 'variantSetIds' property :id, as: 'id' - property :created, as: 'created' - property :sample_id, as: 'sampleId' end end class SearchAnnotationSetsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' collection :annotation_sets, as: 'annotationSets', class: Google::Apis::GenomicsV1::AnnotationSet, decorator: Google::Apis::GenomicsV1::AnnotationSet::Representation - property :next_page_token, as: 'nextPageToken' end end class ImportVariantsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + property :normalize_reference_names, as: 'normalizeReferenceNames' property :format, as: 'format' hash :info_merge_config, as: 'infoMergeConfig' property :variant_set_id, as: 'variantSetId' collection :source_uris, as: 'sourceUris' - property :normalize_reference_names, as: 'normalizeReferenceNames' + end + end + + class ListCoverageBucketsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + property :bucket_width, as: 'bucketWidth' + collection :coverage_buckets, as: 'coverageBuckets', class: Google::Apis::GenomicsV1::CoverageBucket, decorator: Google::Apis::GenomicsV1::CoverageBucket::Representation + end end @@ -1229,16 +1174,6 @@ module Google end end - class ListCoverageBucketsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - property :bucket_width, as: 'bucketWidth' - collection :coverage_buckets, as: 'coverageBuckets', class: Google::Apis::GenomicsV1::CoverageBucket, decorator: Google::Apis::GenomicsV1::CoverageBucket::Representation - - end - end - class ExportVariantSetRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1253,22 +1188,22 @@ module Google class SearchAnnotationsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + property :start, as: 'start' + collection :annotation_set_ids, as: 'annotationSetIds' + property :reference_name, as: 'referenceName' property :reference_id, as: 'referenceId' property :end, as: 'end' property :page_token, as: 'pageToken' property :page_size, as: 'pageSize' - property :start, as: 'start' - collection :annotation_set_ids, as: 'annotationSetIds' - property :reference_name, as: 'referenceName' end end class OperationEvent # @private class Representation < Google::Apis::Core::JsonRepresentation + property :end_time, as: 'endTime' property :start_time, as: 'startTime' property :description, as: 'description' - property :end_time, as: 'endTime' end end @@ -1279,6 +1214,71 @@ module Google property :end, as: 'end' end end + + class GetIamPolicyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class TestIamPermissionsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' + end + end + + class SearchReferencesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :references, as: 'references', class: Google::Apis::GenomicsV1::Reference, decorator: Google::Apis::GenomicsV1::Reference::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class SearchAnnotationSetsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :page_token, as: 'pageToken' + property :page_size, as: 'pageSize' + collection :dataset_ids, as: 'datasetIds' + collection :types, as: 'types' + property :name, as: 'name' + property :reference_set_id, as: 'referenceSetId' + end + end + + class SearchReadGroupSetsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :read_group_sets, as: 'readGroupSets', class: Google::Apis::GenomicsV1::ReadGroupSet, decorator: Google::Apis::GenomicsV1::ReadGroupSet::Representation + + end + end + + class LinearAlignment + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :position, as: 'position', class: Google::Apis::GenomicsV1::Position, decorator: Google::Apis::GenomicsV1::Position::Representation + + collection :cigar, as: 'cigar', class: Google::Apis::GenomicsV1::CigarUnit, decorator: Google::Apis::GenomicsV1::CigarUnit::Representation + + property :mapping_quality, as: 'mappingQuality' + end + end + + class SearchReferencesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :accessions, as: 'accessions' + property :page_token, as: 'pageToken' + property :reference_set_id, as: 'referenceSetId' + property :page_size, as: 'pageSize' + collection :md5checksums, as: 'md5checksums' + end + end end end end diff --git a/generated/google/apis/genomics_v1/service.rb b/generated/google/apis/genomics_v1/service.rb index d4b6e1539..2a1ac2d9f 100644 --- a/generated/google/apis/genomics_v1/service.rb +++ b/generated/google/apis/genomics_v1/service.rb @@ -46,193 +46,18 @@ module Google super('https://genomics.googleapis.com/', '') end - # Searches for reference sets which match the given criteria. - # For the definitions of references and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # Implements - # [GlobalAllianceApi.searchReferenceSets](https://github.com/ga4gh/schemas/blob/ - # v0.5.1/src/main/resources/avro/referencemethods.avdl#L71) - # @param [Google::Apis::GenomicsV1::SearchReferenceSetsRequest] search_reference_sets_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::SearchReferenceSetsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::SearchReferenceSetsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def search_reference_sets(search_reference_sets_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/referencesets/search', options) - command.request_representation = Google::Apis::GenomicsV1::SearchReferenceSetsRequest::Representation - command.request_object = search_reference_sets_request_object - command.response_representation = Google::Apis::GenomicsV1::SearchReferenceSetsResponse::Representation - command.response_class = Google::Apis::GenomicsV1::SearchReferenceSetsResponse - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets a reference set. - # For the definitions of references and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # Implements - # [GlobalAllianceApi.getReferenceSet](https://github.com/ga4gh/schemas/blob/v0.5. - # 1/src/main/resources/avro/referencemethods.avdl#L83). - # @param [String] reference_set_id - # The ID of the reference set. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::ReferenceSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::ReferenceSet] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_reference_set(reference_set_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/referencesets/{referenceSetId}', options) - command.response_representation = Google::Apis::GenomicsV1::ReferenceSet::Representation - command.response_class = Google::Apis::GenomicsV1::ReferenceSet - command.params['referenceSetId'] = reference_set_id unless reference_set_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates a new call set. - # For the definitions of call sets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # @param [Google::Apis::GenomicsV1::CallSet] call_set_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::CallSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::CallSet] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_call_set(call_set_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/callsets', options) - command.request_representation = Google::Apis::GenomicsV1::CallSet::Representation - command.request_object = call_set_object - command.response_representation = Google::Apis::GenomicsV1::CallSet::Representation - command.response_class = Google::Apis::GenomicsV1::CallSet - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a call set. - # For the definitions of call sets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # @param [String] call_set_id - # The ID of the call set to be deleted. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_call_set(call_set_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/callsets/{callSetId}', options) - command.response_representation = Google::Apis::GenomicsV1::Empty::Representation - command.response_class = Google::Apis::GenomicsV1::Empty - command.params['callSetId'] = call_set_id unless call_set_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets a list of call sets matching the criteria. - # For the definitions of call sets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # Implements - # [GlobalAllianceApi.searchCallSets](https://github.com/ga4gh/schemas/blob/v0.5. - # 1/src/main/resources/avro/variantmethods.avdl#L178). - # @param [Google::Apis::GenomicsV1::SearchCallSetsRequest] search_call_sets_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::SearchCallSetsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::SearchCallSetsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def search_call_sets(search_call_sets_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/callsets/search', options) - command.request_representation = Google::Apis::GenomicsV1::SearchCallSetsRequest::Representation - command.request_object = search_call_sets_request_object - command.response_representation = Google::Apis::GenomicsV1::SearchCallSetsResponse::Representation - command.response_class = Google::Apis::GenomicsV1::SearchCallSetsResponse - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Updates a call set. - # For the definitions of call sets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # This method supports patch semantics. - # @param [String] call_set_id - # The ID of the call set to be updated. - # @param [Google::Apis::GenomicsV1::CallSet] call_set_object + # Updates an annotation set. The update must respect all mutability + # restrictions and other invariants described on the annotation set resource. + # Caller must have WRITE permission for the associated dataset. + # @param [String] annotation_set_id + # The ID of the annotation set to be updated. + # @param [Google::Apis::GenomicsV1::AnnotationSet] annotation_set_object # @param [String] update_mask - # An optional mask specifying which fields to update. At this time, the only - # mutable field is name. The only - # acceptable value is "name". If unspecified, all mutable fields will be - # updated. + # An optional mask specifying which fields to update. Mutable fields are + # name, + # source_uri, and + # info. If unspecified, all + # mutable fields will be updated. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -242,33 +67,35 @@ module Google # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::CallSet] parsed result object + # @yieldparam result [Google::Apis::GenomicsV1::AnnotationSet] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::GenomicsV1::CallSet] + # @return [Google::Apis::GenomicsV1::AnnotationSet] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def patch_call_set(call_set_id, call_set_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:patch, 'v1/callsets/{callSetId}', options) - command.request_representation = Google::Apis::GenomicsV1::CallSet::Representation - command.request_object = call_set_object - command.response_representation = Google::Apis::GenomicsV1::CallSet::Representation - command.response_class = Google::Apis::GenomicsV1::CallSet - command.params['callSetId'] = call_set_id unless call_set_id.nil? + def update_annotationset(annotation_set_id, annotation_set_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'v1/annotationsets/{annotationSetId}', options) + command.request_representation = Google::Apis::GenomicsV1::AnnotationSet::Representation + command.request_object = annotation_set_object + command.response_representation = Google::Apis::GenomicsV1::AnnotationSet::Representation + command.response_class = Google::Apis::GenomicsV1::AnnotationSet + command.params['annotationSetId'] = annotation_set_id unless annotation_set_id.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - # Gets a call set by ID. - # For the definitions of call sets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # @param [String] call_set_id - # The ID of the call set. + # Creates a new annotation set. Caller must have WRITE permission for the + # associated dataset. + # The following fields are required: + # * datasetId + # * referenceSetId + # All other fields may be optionally specified, unless documented as being + # server-generated (for example, the `id` field). + # @param [Google::Apis::GenomicsV1::AnnotationSet] annotation_set_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -278,371 +105,20 @@ module Google # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::CallSet] parsed result object + # @yieldparam result [Google::Apis::GenomicsV1::AnnotationSet] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::GenomicsV1::CallSet] + # @return [Google::Apis::GenomicsV1::AnnotationSet] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_call_set(call_set_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/callsets/{callSetId}', options) - command.response_representation = Google::Apis::GenomicsV1::CallSet::Representation - command.response_class = Google::Apis::GenomicsV1::CallSet - command.params['callSetId'] = call_set_id unless call_set_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets a list of reads for one or more read group sets. - # For the definitions of read group sets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # Reads search operates over a genomic coordinate space of reference sequence - # & position defined over the reference sequences to which the requested - # read group sets are aligned. - # If a target positional range is specified, search returns all reads whose - # alignment to the reference genome overlap the range. A query which - # specifies only read group set IDs yields all reads in those read group - # sets, including unmapped reads. - # All reads returned (including reads on subsequent pages) are ordered by - # genomic coordinate (by reference sequence, then position). Reads with - # equivalent genomic coordinates are returned in an unspecified order. This - # order is consistent, such that two queries for the same content (regardless - # of page size) yield reads in the same order across their respective streams - # of paginated responses. - # Implements - # [GlobalAllianceApi.searchReads](https://github.com/ga4gh/schemas/blob/v0.5.1/ - # src/main/resources/avro/readmethods.avdl#L85). - # @param [Google::Apis::GenomicsV1::SearchReadsRequest] search_reads_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::SearchReadsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::SearchReadsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def search_reads(search_reads_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/reads/search', options) - command.request_representation = Google::Apis::GenomicsV1::SearchReadsRequest::Representation - command.request_object = search_reads_request_object - command.response_representation = Google::Apis::GenomicsV1::SearchReadsResponse::Representation - command.response_class = Google::Apis::GenomicsV1::SearchReadsResponse - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Exports a read group set to a BAM file in Google Cloud Storage. - # For the definitions of read group sets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # Note that currently there may be some differences between exported BAM - # files and the original BAM file at the time of import. See - # ImportReadGroupSets - # for caveats. - # @param [String] read_group_set_id - # Required. The ID of the read group set to export. The caller must have - # READ access to this read group set. - # @param [Google::Apis::GenomicsV1::ExportReadGroupSetRequest] export_read_group_set_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def export_read_group_sets(read_group_set_id, export_read_group_set_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/readgroupsets/{readGroupSetId}:export', options) - command.request_representation = Google::Apis::GenomicsV1::ExportReadGroupSetRequest::Representation - command.request_object = export_read_group_set_request_object - command.response_representation = Google::Apis::GenomicsV1::Operation::Representation - command.response_class = Google::Apis::GenomicsV1::Operation - command.params['readGroupSetId'] = read_group_set_id unless read_group_set_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Searches for read group sets matching the criteria. - # For the definitions of read group sets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # Implements - # [GlobalAllianceApi.searchReadGroupSets](https://github.com/ga4gh/schemas/blob/ - # v0.5.1/src/main/resources/avro/readmethods.avdl#L135). - # @param [Google::Apis::GenomicsV1::SearchReadGroupSetsRequest] search_read_group_sets_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::SearchReadGroupSetsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::SearchReadGroupSetsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def search_read_group_sets(search_read_group_sets_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/readgroupsets/search', options) - command.request_representation = Google::Apis::GenomicsV1::SearchReadGroupSetsRequest::Representation - command.request_object = search_read_group_sets_request_object - command.response_representation = Google::Apis::GenomicsV1::SearchReadGroupSetsResponse::Representation - command.response_class = Google::Apis::GenomicsV1::SearchReadGroupSetsResponse - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Updates a read group set. - # For the definitions of read group sets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # This method supports patch semantics. - # @param [String] read_group_set_id - # The ID of the read group set to be updated. The caller must have WRITE - # permissions to the dataset associated with this read group set. - # @param [Google::Apis::GenomicsV1::ReadGroupSet] read_group_set_object - # @param [String] update_mask - # An optional mask specifying which fields to update. Supported fields: - # * name. - # * referenceSetId. - # Leaving `updateMask` unset is equivalent to specifying all mutable - # fields. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::ReadGroupSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::ReadGroupSet] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def patch_read_group_set(read_group_set_id, read_group_set_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:patch, 'v1/readgroupsets/{readGroupSetId}', options) - command.request_representation = Google::Apis::GenomicsV1::ReadGroupSet::Representation - command.request_object = read_group_set_object - command.response_representation = Google::Apis::GenomicsV1::ReadGroupSet::Representation - command.response_class = Google::Apis::GenomicsV1::ReadGroupSet - command.params['readGroupSetId'] = read_group_set_id unless read_group_set_id.nil? - command.query['updateMask'] = update_mask unless update_mask.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets a read group set by ID. - # For the definitions of read group sets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # @param [String] read_group_set_id - # The ID of the read group set. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::ReadGroupSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::ReadGroupSet] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_read_group_set(read_group_set_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/readgroupsets/{readGroupSetId}', options) - command.response_representation = Google::Apis::GenomicsV1::ReadGroupSet::Representation - command.response_class = Google::Apis::GenomicsV1::ReadGroupSet - command.params['readGroupSetId'] = read_group_set_id unless read_group_set_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates read group sets by asynchronously importing the provided - # information. - # For the definitions of read group sets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # The caller must have WRITE permissions to the dataset. - # ## Notes on [BAM](https://samtools.github.io/hts-specs/SAMv1.pdf) import - # - Tags will be converted to strings - tag types are not preserved - # - Comments (`@CO`) in the input file header will not be preserved - # - Original header order of references (`@SQ`) will not be preserved - # - Any reverse stranded unmapped reads will be reverse complemented, and - # their qualities (also the "BQ" and "OQ" tags, if any) will be reversed - # - Unmapped reads will be stripped of positional information (reference name - # and position) - # @param [Google::Apis::GenomicsV1::ImportReadGroupSetsRequest] import_read_group_sets_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Operation] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Operation] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def import_read_group_sets(import_read_group_sets_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/readgroupsets:import', options) - command.request_representation = Google::Apis::GenomicsV1::ImportReadGroupSetsRequest::Representation - command.request_object = import_read_group_sets_request_object - command.response_representation = Google::Apis::GenomicsV1::Operation::Representation - command.response_class = Google::Apis::GenomicsV1::Operation - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a read group set. - # For the definitions of read group sets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # @param [String] read_group_set_id - # The ID of the read group set to be deleted. The caller must have WRITE - # permissions to the dataset associated with this read group set. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_read_group_set(read_group_set_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/readgroupsets/{readGroupSetId}', options) - command.response_representation = Google::Apis::GenomicsV1::Empty::Representation - command.response_class = Google::Apis::GenomicsV1::Empty - command.params['readGroupSetId'] = read_group_set_id unless read_group_set_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Lists fixed width coverage buckets for a read group set, each of which - # correspond to a range of a reference sequence. Each bucket summarizes - # coverage information across its corresponding genomic range. - # For the definitions of read group sets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # Coverage is defined as the number of reads which are aligned to a given - # base in the reference sequence. Coverage buckets are available at several - # precomputed bucket widths, enabling retrieval of various coverage 'zoom - # levels'. The caller must have READ permissions for the target read group - # set. - # @param [String] read_group_set_id - # Required. The ID of the read group set over which coverage is requested. - # @param [String] page_token - # The continuation token, which is used to page through large result sets. - # To get the next page of results, set this parameter to the value of - # `nextPageToken` from the previous response. - # @param [Fixnum] page_size - # The maximum number of results to return in a single page. If unspecified, - # defaults to 1024. The maximum value is 2048. - # @param [String] start - # The start position of the range on the reference, 0-based inclusive. If - # specified, `referenceName` must also be specified. Defaults to 0. - # @param [String] target_bucket_width - # The desired width of each reported coverage bucket in base pairs. This - # will be rounded down to the nearest precomputed bucket width; the value - # of which is returned as `bucketWidth` in the response. Defaults - # to infinity (each bucket spans an entire reference sequence) or the length - # of the target range, if specified. The smallest precomputed - # `bucketWidth` is currently 2048 base pairs; this is subject to - # change. - # @param [String] reference_name - # The name of the reference to query, within the reference set associated - # with this query. Optional. - # @param [String] end_ - # The end position of the range on the reference, 0-based exclusive. If - # specified, `referenceName` must also be specified. If unset or 0, defaults - # to the length of the reference. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::ListCoverageBucketsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::ListCoverageBucketsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_coverage_buckets(read_group_set_id, page_token: nil, page_size: nil, start: nil, target_bucket_width: nil, reference_name: nil, end_: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/readgroupsets/{readGroupSetId}/coveragebuckets', options) - command.response_representation = Google::Apis::GenomicsV1::ListCoverageBucketsResponse::Representation - command.response_class = Google::Apis::GenomicsV1::ListCoverageBucketsResponse - command.params['readGroupSetId'] = read_group_set_id unless read_group_set_id.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['start'] = start unless start.nil? - command.query['targetBucketWidth'] = target_bucket_width unless target_bucket_width.nil? - command.query['referenceName'] = reference_name unless reference_name.nil? - command.query['end'] = end_ unless end_.nil? + def create_annotation_set(annotation_set_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/annotationsets', options) + command.request_representation = Google::Apis::GenomicsV1::AnnotationSet::Representation + command.request_object = annotation_set_object + command.response_representation = Google::Apis::GenomicsV1::AnnotationSet::Representation + command.response_class = Google::Apis::GenomicsV1::AnnotationSet command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) @@ -744,18 +220,14 @@ module Google execute_or_queue_command(command, &block) end - # Updates an annotation set. The update must respect all mutability - # restrictions and other invariants described on the annotation set resource. - # Caller must have WRITE permission for the associated dataset. - # @param [String] annotation_set_id - # The ID of the annotation set to be updated. - # @param [Google::Apis::GenomicsV1::AnnotationSet] annotation_set_object - # @param [String] update_mask - # An optional mask specifying which fields to update. Mutable fields are - # name, - # source_uri, and - # info. If unspecified, all - # mutable fields will be updated. + # Gets a list of variants matching the criteria. + # For the definitions of variants and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # Implements + # [GlobalAllianceApi.searchVariants](https://github.com/ga4gh/schemas/blob/v0.5. + # 1/src/main/resources/avro/variantmethods.avdl#L126). + # @param [Google::Apis::GenomicsV1::SearchVariantsRequest] search_variants_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -765,69 +237,75 @@ module Google # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::AnnotationSet] parsed result object + # @yieldparam result [Google::Apis::GenomicsV1::SearchVariantsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::GenomicsV1::AnnotationSet] + # @return [Google::Apis::GenomicsV1::SearchVariantsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_annotationset(annotation_set_id, annotation_set_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:put, 'v1/annotationsets/{annotationSetId}', options) - command.request_representation = Google::Apis::GenomicsV1::AnnotationSet::Representation - command.request_object = annotation_set_object - command.response_representation = Google::Apis::GenomicsV1::AnnotationSet::Representation - command.response_class = Google::Apis::GenomicsV1::AnnotationSet - command.params['annotationSetId'] = annotation_set_id unless annotation_set_id.nil? + def search_variants(search_variants_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/variants/search', options) + command.request_representation = Google::Apis::GenomicsV1::SearchVariantsRequest::Representation + command.request_object = search_variants_request_object + command.response_representation = Google::Apis::GenomicsV1::SearchVariantsResponse::Representation + command.response_class = Google::Apis::GenomicsV1::SearchVariantsResponse + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a variant. + # For the definitions of variants and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # This method supports patch semantics. Returns the modified variant without + # its calls. + # @param [String] variant_id + # The ID of the variant to be updated. + # @param [Google::Apis::GenomicsV1::Variant] variant_object + # @param [String] update_mask + # An optional mask specifying which fields to update. At this time, mutable + # fields are names and + # info. Acceptable values are "names" and + # "info". If unspecified, all mutable fields will be updated. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Variant] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Variant] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_variant(variant_id, variant_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/variants/{variantId}', options) + command.request_representation = Google::Apis::GenomicsV1::Variant::Representation + command.request_object = variant_object + command.response_representation = Google::Apis::GenomicsV1::Variant::Representation + command.response_class = Google::Apis::GenomicsV1::Variant + command.params['variantId'] = variant_id unless variant_id.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - # Creates a new annotation set. Caller must have WRITE permission for the - # associated dataset. - # The following fields are required: - # * datasetId - # * referenceSetId - # All other fields may be optionally specified, unless documented as being - # server-generated (for example, the `id` field). - # @param [Google::Apis::GenomicsV1::AnnotationSet] annotation_set_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::AnnotationSet] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::AnnotationSet] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_annotation_set(annotation_set_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/annotationsets', options) - command.request_representation = Google::Apis::GenomicsV1::AnnotationSet::Representation - command.request_object = annotation_set_object - command.response_representation = Google::Apis::GenomicsV1::AnnotationSet::Representation - command.response_class = Google::Apis::GenomicsV1::AnnotationSet - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a variant. + # Gets a variant by ID. # For the definitions of variants and other genomics resources, see # [Fundamentals of Google # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) # @param [String] variant_id - # The ID of the variant to be deleted. + # The ID of the variant. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -837,18 +315,18 @@ module Google # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Empty] parsed result object + # @yieldparam result [Google::Apis::GenomicsV1::Variant] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::GenomicsV1::Empty] + # @return [Google::Apis::GenomicsV1::Variant] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_variant(variant_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/variants/{variantId}', options) - command.response_representation = Google::Apis::GenomicsV1::Empty::Representation - command.response_class = Google::Apis::GenomicsV1::Empty + def get_variant(variant_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/variants/{variantId}', options) + command.response_representation = Google::Apis::GenomicsV1::Variant::Representation + command.response_class = Google::Apis::GenomicsV1::Variant command.params['variantId'] = variant_id unless variant_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? @@ -899,6 +377,39 @@ module Google execute_or_queue_command(command, &block) end + # Deletes a variant. + # For the definitions of variants and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] variant_id + # The ID of the variant to be deleted. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_variant(variant_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/variants/{variantId}', options) + command.response_representation = Google::Apis::GenomicsV1::Empty::Representation + command.response_class = Google::Apis::GenomicsV1::Empty + command.params['variantId'] = variant_id unless variant_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Merges the given variants with existing variants. # For the definitions of variants and other genomics resources, see # [Fundamentals of Google @@ -1043,119 +554,6 @@ module Google execute_or_queue_command(command, &block) end - # Gets a list of variants matching the criteria. - # For the definitions of variants and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # Implements - # [GlobalAllianceApi.searchVariants](https://github.com/ga4gh/schemas/blob/v0.5. - # 1/src/main/resources/avro/variantmethods.avdl#L126). - # @param [Google::Apis::GenomicsV1::SearchVariantsRequest] search_variants_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::SearchVariantsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::SearchVariantsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def search_variants(search_variants_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/variants/search', options) - command.request_representation = Google::Apis::GenomicsV1::SearchVariantsRequest::Representation - command.request_object = search_variants_request_object - command.response_representation = Google::Apis::GenomicsV1::SearchVariantsResponse::Representation - command.response_class = Google::Apis::GenomicsV1::SearchVariantsResponse - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Updates a variant. - # For the definitions of variants and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # This method supports patch semantics. Returns the modified variant without - # its calls. - # @param [String] variant_id - # The ID of the variant to be updated. - # @param [Google::Apis::GenomicsV1::Variant] variant_object - # @param [String] update_mask - # An optional mask specifying which fields to update. At this time, mutable - # fields are names and - # info. Acceptable values are "names" and - # "info". If unspecified, all mutable fields will be updated. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Variant] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Variant] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def patch_variant(variant_id, variant_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:patch, 'v1/variants/{variantId}', options) - command.request_representation = Google::Apis::GenomicsV1::Variant::Representation - command.request_object = variant_object - command.response_representation = Google::Apis::GenomicsV1::Variant::Representation - command.response_class = Google::Apis::GenomicsV1::Variant - command.params['variantId'] = variant_id unless variant_id.nil? - command.query['updateMask'] = update_mask unless update_mask.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets a variant by ID. - # For the definitions of variants and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # @param [String] variant_id - # The ID of the variant. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Variant] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Variant] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_variant(variant_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/variants/{variantId}', options) - command.response_representation = Google::Apis::GenomicsV1::Variant::Representation - command.response_class = Google::Apis::GenomicsV1::Variant - command.params['variantId'] = variant_id unless variant_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - # Searches for references which match the given criteria. # For the definitions of references and other genomics resources, see # [Fundamentals of Google @@ -1237,6 +635,11 @@ module Google # 5.1/src/main/resources/avro/referencemethods.avdl#L221). # @param [String] reference_id # The ID of the reference. + # @param [String] start_position + # The start position (0-based) of this query. Defaults to 0. + # @param [String] end_position + # The end position (0-based, exclusive) of this query. Defaults to the length + # of this reference. # @param [String] page_token # The continuation token, which is used to page through large result sets. # To get the next page of results, set this parameter to the value of @@ -1245,11 +648,6 @@ module Google # The maximum number of bases to return in a single page. If unspecified, # defaults to 200Kbp (kilo base pairs). The maximum value is 10Mbp (mega base # pairs). - # @param [String] start_position - # The start position (0-based) of this query. Defaults to 0. - # @param [String] end_position - # The end position (0-based, exclusive) of this query. Defaults to the length - # of this reference. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -1267,15 +665,241 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_reference_bases(reference_id, page_token: nil, page_size: nil, start_position: nil, end_position: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_reference_bases(reference_id, start_position: nil, end_position: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/references/{referenceId}/bases', options) command.response_representation = Google::Apis::GenomicsV1::ListBasesResponse::Representation command.response_class = Google::Apis::GenomicsV1::ListBasesResponse command.params['referenceId'] = reference_id unless reference_id.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? command.query['start'] = start_position unless start_position.nil? command.query['end'] = end_position unless end_position.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a new dataset. + # For the definitions of datasets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [Google::Apis::GenomicsV1::Dataset] dataset_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Dataset] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Dataset] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_dataset(dataset_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/datasets', options) + command.request_representation = Google::Apis::GenomicsV1::Dataset::Representation + command.request_object = dataset_object + command.response_representation = Google::Apis::GenomicsV1::Dataset::Representation + command.response_class = Google::Apis::GenomicsV1::Dataset + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Sets the access control policy on the specified dataset. Replaces any + # existing policy. + # For the definitions of datasets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # See Setting a + # Policy for more information. + # @param [String] resource + # REQUIRED: The resource for which policy is being specified. Format is + # `datasets/`. + # @param [Google::Apis::GenomicsV1::SetIamPolicyRequest] set_iam_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Policy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def set_dataset_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options) + command.request_representation = Google::Apis::GenomicsV1::SetIamPolicyRequest::Representation + command.request_object = set_iam_policy_request_object + command.response_representation = Google::Apis::GenomicsV1::Policy::Representation + command.response_class = Google::Apis::GenomicsV1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets the access control policy for the dataset. This is empty if the + # policy or resource does not exist. + # See Getting a + # Policy for more information. + # For the definitions of datasets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] resource + # REQUIRED: The resource for which policy is being specified. Format is + # `datasets/`. + # @param [Google::Apis::GenomicsV1::GetIamPolicyRequest] get_iam_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Policy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_dataset_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options) + command.request_representation = Google::Apis::GenomicsV1::GetIamPolicyRequest::Representation + command.request_object = get_iam_policy_request_object + command.response_representation = Google::Apis::GenomicsV1::Policy::Representation + command.response_class = Google::Apis::GenomicsV1::Policy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Undeletes a dataset by restoring a dataset which was deleted via this API. + # For the definitions of datasets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # This operation is only possible for a week after the deletion occurred. + # @param [String] dataset_id + # The ID of the dataset to be undeleted. + # @param [Google::Apis::GenomicsV1::UndeleteDatasetRequest] undelete_dataset_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Dataset] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Dataset] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def undelete_dataset(dataset_id, undelete_dataset_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/datasets/{datasetId}:undelete', options) + command.request_representation = Google::Apis::GenomicsV1::UndeleteDatasetRequest::Representation + command.request_object = undelete_dataset_request_object + command.response_representation = Google::Apis::GenomicsV1::Dataset::Representation + command.response_class = Google::Apis::GenomicsV1::Dataset + command.params['datasetId'] = dataset_id unless dataset_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a dataset. + # For the definitions of datasets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # This method supports patch semantics. + # @param [String] dataset_id + # The ID of the dataset to be updated. + # @param [Google::Apis::GenomicsV1::Dataset] dataset_object + # @param [String] update_mask + # An optional mask specifying which fields to update. At this time, the only + # mutable field is name. The only + # acceptable value is "name". If unspecified, all mutable fields will be + # updated. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Dataset] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Dataset] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_dataset(dataset_id, dataset_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/datasets/{datasetId}', options) + command.request_representation = Google::Apis::GenomicsV1::Dataset::Representation + command.request_object = dataset_object + command.response_representation = Google::Apis::GenomicsV1::Dataset::Representation + command.response_class = Google::Apis::GenomicsV1::Dataset + command.params['datasetId'] = dataset_id unless dataset_id.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a dataset by ID. + # For the definitions of datasets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] dataset_id + # The ID of the dataset. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Dataset] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Dataset] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_dataset(dataset_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/datasets/{datasetId}', options) + command.response_representation = Google::Apis::GenomicsV1::Dataset::Representation + command.response_class = Google::Apis::GenomicsV1::Dataset + command.params['datasetId'] = dataset_id unless dataset_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) @@ -1400,232 +1024,6 @@ module Google execute_or_queue_command(command, &block) end - # Sets the access control policy on the specified dataset. Replaces any - # existing policy. - # For the definitions of datasets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # See Setting a - # Policy for more information. - # @param [String] resource - # REQUIRED: The resource for which policy is being specified. Format is - # `datasets/`. - # @param [Google::Apis::GenomicsV1::SetIamPolicyRequest] set_iam_policy_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Policy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Policy] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_dataset_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options) - command.request_representation = Google::Apis::GenomicsV1::SetIamPolicyRequest::Representation - command.request_object = set_iam_policy_request_object - command.response_representation = Google::Apis::GenomicsV1::Policy::Representation - command.response_class = Google::Apis::GenomicsV1::Policy - command.params['resource'] = resource unless resource.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates a new dataset. - # For the definitions of datasets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # @param [Google::Apis::GenomicsV1::Dataset] dataset_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Dataset] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Dataset] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_dataset(dataset_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/datasets', options) - command.request_representation = Google::Apis::GenomicsV1::Dataset::Representation - command.request_object = dataset_object - command.response_representation = Google::Apis::GenomicsV1::Dataset::Representation - command.response_class = Google::Apis::GenomicsV1::Dataset - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets the access control policy for the dataset. This is empty if the - # policy or resource does not exist. - # See Getting a - # Policy for more information. - # For the definitions of datasets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # @param [String] resource - # REQUIRED: The resource for which policy is being specified. Format is - # `datasets/`. - # @param [Google::Apis::GenomicsV1::GetIamPolicyRequest] get_iam_policy_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Policy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Policy] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_dataset_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options) - command.request_representation = Google::Apis::GenomicsV1::GetIamPolicyRequest::Representation - command.request_object = get_iam_policy_request_object - command.response_representation = Google::Apis::GenomicsV1::Policy::Representation - command.response_class = Google::Apis::GenomicsV1::Policy - command.params['resource'] = resource unless resource.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets a dataset by ID. - # For the definitions of datasets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # @param [String] dataset_id - # The ID of the dataset. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Dataset] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Dataset] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_dataset(dataset_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/datasets/{datasetId}', options) - command.response_representation = Google::Apis::GenomicsV1::Dataset::Representation - command.response_class = Google::Apis::GenomicsV1::Dataset - command.params['datasetId'] = dataset_id unless dataset_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Updates a dataset. - # For the definitions of datasets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # This method supports patch semantics. - # @param [String] dataset_id - # The ID of the dataset to be updated. - # @param [Google::Apis::GenomicsV1::Dataset] dataset_object - # @param [String] update_mask - # An optional mask specifying which fields to update. At this time, the only - # mutable field is name. The only - # acceptable value is "name". If unspecified, all mutable fields will be - # updated. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Dataset] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Dataset] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def patch_dataset(dataset_id, dataset_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:patch, 'v1/datasets/{datasetId}', options) - command.request_representation = Google::Apis::GenomicsV1::Dataset::Representation - command.request_object = dataset_object - command.response_representation = Google::Apis::GenomicsV1::Dataset::Representation - command.response_class = Google::Apis::GenomicsV1::Dataset - command.params['datasetId'] = dataset_id unless dataset_id.nil? - command.query['updateMask'] = update_mask unless update_mask.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Undeletes a dataset by restoring a dataset which was deleted via this API. - # For the definitions of datasets and other genomics resources, see - # [Fundamentals of Google - # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) - # This operation is only possible for a week after the deletion occurred. - # @param [String] dataset_id - # The ID of the dataset to be undeleted. - # @param [Google::Apis::GenomicsV1::UndeleteDatasetRequest] undelete_dataset_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GenomicsV1::Dataset] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::GenomicsV1::Dataset] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def undelete_dataset(dataset_id, undelete_dataset_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/datasets/{datasetId}:undelete', options) - command.request_representation = Google::Apis::GenomicsV1::UndeleteDatasetRequest::Representation - command.request_object = undelete_dataset_request_object - command.response_representation = Google::Apis::GenomicsV1::Dataset::Representation - command.response_class = Google::Apis::GenomicsV1::Dataset - command.params['datasetId'] = dataset_id unless dataset_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - # Deletes a variant set including all variants, call sets, and calls within. # This is not reversible. # For the definitions of variant sets and other genomics resources, see @@ -2072,9 +1470,50 @@ module Google execute_or_queue_command(command, &block) end + # Starts asynchronous cancellation on a long-running operation. The server makes + # a best effort to cancel the operation, but success is not guaranteed. Clients + # may use Operations.GetOperation or Operations.ListOperations to check whether + # the cancellation succeeded or the operation completed despite cancellation. + # @param [String] name + # The name of the operation resource to be cancelled. + # @param [Google::Apis::GenomicsV1::CancelOperationRequest] cancel_operation_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+name}:cancel', options) + command.request_representation = Google::Apis::GenomicsV1::CancelOperationRequest::Representation + command.request_object = cancel_operation_request_object + command.response_representation = Google::Apis::GenomicsV1::Empty::Representation + command.response_class = Google::Apis::GenomicsV1::Empty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Lists operations that match the specified filter in the request. # @param [String] name # The name of the operation collection. + # @param [String] page_token + # The standard list page token. + # @param [Fixnum] page_size + # The maximum number of results to return. If unspecified, defaults to + # 256. The maximum value is 2048. # @param [String] filter # A string for filtering Operations. # The following filter fields are supported: @@ -2092,11 +1531,6 @@ module Google # 1432150000 AND status = RUNNING` # * `projectId = my-project AND labels.color = *` # * `projectId = my-project AND labels.color = red` - # @param [String] page_token - # The standard list page token. - # @param [Fixnum] page_size - # The maximum number of results to return. If unspecified, defaults to - # 256. The maximum value is 2048. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -2114,14 +1548,14 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_operations(name, filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_operations(name, page_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::GenomicsV1::ListOperationsResponse::Representation command.response_class = Google::Apis::GenomicsV1::ListOperationsResponse command.params['name'] = name unless name.nil? - command.query['filter'] = filter unless filter.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? + command.query['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) @@ -2159,13 +1593,283 @@ module Google execute_or_queue_command(command, &block) end - # Starts asynchronous cancellation on a long-running operation. The server makes - # a best effort to cancel the operation, but success is not guaranteed. Clients - # may use Operations.GetOperation or Operations.ListOperations to check whether - # the cancellation succeeded or the operation completed despite cancellation. - # @param [String] name - # The name of the operation resource to be cancelled. - # @param [Google::Apis::GenomicsV1::CancelOperationRequest] cancel_operation_request_object + # Searches for reference sets which match the given criteria. + # For the definitions of references and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # Implements + # [GlobalAllianceApi.searchReferenceSets](https://github.com/ga4gh/schemas/blob/ + # v0.5.1/src/main/resources/avro/referencemethods.avdl#L71) + # @param [Google::Apis::GenomicsV1::SearchReferenceSetsRequest] search_reference_sets_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::SearchReferenceSetsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::SearchReferenceSetsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def search_reference_sets(search_reference_sets_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/referencesets/search', options) + command.request_representation = Google::Apis::GenomicsV1::SearchReferenceSetsRequest::Representation + command.request_object = search_reference_sets_request_object + command.response_representation = Google::Apis::GenomicsV1::SearchReferenceSetsResponse::Representation + command.response_class = Google::Apis::GenomicsV1::SearchReferenceSetsResponse + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a reference set. + # For the definitions of references and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # Implements + # [GlobalAllianceApi.getReferenceSet](https://github.com/ga4gh/schemas/blob/v0.5. + # 1/src/main/resources/avro/referencemethods.avdl#L83). + # @param [String] reference_set_id + # The ID of the reference set. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::ReferenceSet] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::ReferenceSet] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_reference_set(reference_set_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/referencesets/{referenceSetId}', options) + command.response_representation = Google::Apis::GenomicsV1::ReferenceSet::Representation + command.response_class = Google::Apis::GenomicsV1::ReferenceSet + command.params['referenceSetId'] = reference_set_id unless reference_set_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Exports a read group set to a BAM file in Google Cloud Storage. + # For the definitions of read group sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # Note that currently there may be some differences between exported BAM + # files and the original BAM file at the time of import. See + # ImportReadGroupSets + # for caveats. + # @param [String] read_group_set_id + # Required. The ID of the read group set to export. The caller must have + # READ access to this read group set. + # @param [Google::Apis::GenomicsV1::ExportReadGroupSetRequest] export_read_group_set_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def export_read_group_sets(read_group_set_id, export_read_group_set_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/readgroupsets/{readGroupSetId}:export', options) + command.request_representation = Google::Apis::GenomicsV1::ExportReadGroupSetRequest::Representation + command.request_object = export_read_group_set_request_object + command.response_representation = Google::Apis::GenomicsV1::Operation::Representation + command.response_class = Google::Apis::GenomicsV1::Operation + command.params['readGroupSetId'] = read_group_set_id unless read_group_set_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Searches for read group sets matching the criteria. + # For the definitions of read group sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # Implements + # [GlobalAllianceApi.searchReadGroupSets](https://github.com/ga4gh/schemas/blob/ + # v0.5.1/src/main/resources/avro/readmethods.avdl#L135). + # @param [Google::Apis::GenomicsV1::SearchReadGroupSetsRequest] search_read_group_sets_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::SearchReadGroupSetsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::SearchReadGroupSetsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def search_read_group_sets(search_read_group_sets_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/readgroupsets/search', options) + command.request_representation = Google::Apis::GenomicsV1::SearchReadGroupSetsRequest::Representation + command.request_object = search_read_group_sets_request_object + command.response_representation = Google::Apis::GenomicsV1::SearchReadGroupSetsResponse::Representation + command.response_class = Google::Apis::GenomicsV1::SearchReadGroupSetsResponse + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a read group set. + # For the definitions of read group sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # This method supports patch semantics. + # @param [String] read_group_set_id + # The ID of the read group set to be updated. The caller must have WRITE + # permissions to the dataset associated with this read group set. + # @param [Google::Apis::GenomicsV1::ReadGroupSet] read_group_set_object + # @param [String] update_mask + # An optional mask specifying which fields to update. Supported fields: + # * name. + # * referenceSetId. + # Leaving `updateMask` unset is equivalent to specifying all mutable + # fields. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::ReadGroupSet] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::ReadGroupSet] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_read_group_set(read_group_set_id, read_group_set_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/readgroupsets/{readGroupSetId}', options) + command.request_representation = Google::Apis::GenomicsV1::ReadGroupSet::Representation + command.request_object = read_group_set_object + command.response_representation = Google::Apis::GenomicsV1::ReadGroupSet::Representation + command.response_class = Google::Apis::GenomicsV1::ReadGroupSet + command.params['readGroupSetId'] = read_group_set_id unless read_group_set_id.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a read group set by ID. + # For the definitions of read group sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] read_group_set_id + # The ID of the read group set. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::ReadGroupSet] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::ReadGroupSet] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_read_group_set(read_group_set_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/readgroupsets/{readGroupSetId}', options) + command.response_representation = Google::Apis::GenomicsV1::ReadGroupSet::Representation + command.response_class = Google::Apis::GenomicsV1::ReadGroupSet + command.params['readGroupSetId'] = read_group_set_id unless read_group_set_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates read group sets by asynchronously importing the provided + # information. + # For the definitions of read group sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # The caller must have WRITE permissions to the dataset. + # ## Notes on [BAM](https://samtools.github.io/hts-specs/SAMv1.pdf) import + # - Tags will be converted to strings - tag types are not preserved + # - Comments (`@CO`) in the input file header will not be preserved + # - Original header order of references (`@SQ`) will not be preserved + # - Any reverse stranded unmapped reads will be reverse complemented, and + # their qualities (also the "BQ" and "OQ" tags, if any) will be reversed + # - Unmapped reads will be stripped of positional information (reference name + # and position) + # @param [Google::Apis::GenomicsV1::ImportReadGroupSetsRequest] import_read_group_sets_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def import_read_group_sets(import_read_group_sets_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/readgroupsets:import', options) + command.request_representation = Google::Apis::GenomicsV1::ImportReadGroupSetsRequest::Representation + command.request_object = import_read_group_sets_request_object + command.response_representation = Google::Apis::GenomicsV1::Operation::Representation + command.response_class = Google::Apis::GenomicsV1::Operation + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a read group set. + # For the definitions of read group sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] read_group_set_id + # The ID of the read group set to be deleted. The caller must have WRITE + # permissions to the dataset associated with this read group set. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -2183,13 +1887,309 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+name}:cancel', options) - command.request_representation = Google::Apis::GenomicsV1::CancelOperationRequest::Representation - command.request_object = cancel_operation_request_object + def delete_read_group_set(read_group_set_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/readgroupsets/{readGroupSetId}', options) command.response_representation = Google::Apis::GenomicsV1::Empty::Representation command.response_class = Google::Apis::GenomicsV1::Empty - command.params['name'] = name unless name.nil? + command.params['readGroupSetId'] = read_group_set_id unless read_group_set_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists fixed width coverage buckets for a read group set, each of which + # correspond to a range of a reference sequence. Each bucket summarizes + # coverage information across its corresponding genomic range. + # For the definitions of read group sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # Coverage is defined as the number of reads which are aligned to a given + # base in the reference sequence. Coverage buckets are available at several + # precomputed bucket widths, enabling retrieval of various coverage 'zoom + # levels'. The caller must have READ permissions for the target read group + # set. + # @param [String] read_group_set_id + # Required. The ID of the read group set over which coverage is requested. + # @param [String] reference_name + # The name of the reference to query, within the reference set associated + # with this query. Optional. + # @param [String] end_ + # The end position of the range on the reference, 0-based exclusive. If + # specified, `referenceName` must also be specified. If unset or 0, defaults + # to the length of the reference. + # @param [String] page_token + # The continuation token, which is used to page through large result sets. + # To get the next page of results, set this parameter to the value of + # `nextPageToken` from the previous response. + # @param [Fixnum] page_size + # The maximum number of results to return in a single page. If unspecified, + # defaults to 1024. The maximum value is 2048. + # @param [String] start + # The start position of the range on the reference, 0-based inclusive. If + # specified, `referenceName` must also be specified. Defaults to 0. + # @param [String] target_bucket_width + # The desired width of each reported coverage bucket in base pairs. This + # will be rounded down to the nearest precomputed bucket width; the value + # of which is returned as `bucketWidth` in the response. Defaults + # to infinity (each bucket spans an entire reference sequence) or the length + # of the target range, if specified. The smallest precomputed + # `bucketWidth` is currently 2048 base pairs; this is subject to + # change. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::ListCoverageBucketsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::ListCoverageBucketsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_coverage_buckets(read_group_set_id, reference_name: nil, end_: nil, page_token: nil, page_size: nil, start: nil, target_bucket_width: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/readgroupsets/{readGroupSetId}/coveragebuckets', options) + command.response_representation = Google::Apis::GenomicsV1::ListCoverageBucketsResponse::Representation + command.response_class = Google::Apis::GenomicsV1::ListCoverageBucketsResponse + command.params['readGroupSetId'] = read_group_set_id unless read_group_set_id.nil? + command.query['referenceName'] = reference_name unless reference_name.nil? + command.query['end'] = end_ unless end_.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['start'] = start unless start.nil? + command.query['targetBucketWidth'] = target_bucket_width unless target_bucket_width.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a list of reads for one or more read group sets. + # For the definitions of read group sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # Reads search operates over a genomic coordinate space of reference sequence + # & position defined over the reference sequences to which the requested + # read group sets are aligned. + # If a target positional range is specified, search returns all reads whose + # alignment to the reference genome overlap the range. A query which + # specifies only read group set IDs yields all reads in those read group + # sets, including unmapped reads. + # All reads returned (including reads on subsequent pages) are ordered by + # genomic coordinate (by reference sequence, then position). Reads with + # equivalent genomic coordinates are returned in an unspecified order. This + # order is consistent, such that two queries for the same content (regardless + # of page size) yield reads in the same order across their respective streams + # of paginated responses. + # Implements + # [GlobalAllianceApi.searchReads](https://github.com/ga4gh/schemas/blob/v0.5.1/ + # src/main/resources/avro/readmethods.avdl#L85). + # @param [Google::Apis::GenomicsV1::SearchReadsRequest] search_reads_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::SearchReadsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::SearchReadsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def search_reads(search_reads_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/reads/search', options) + command.request_representation = Google::Apis::GenomicsV1::SearchReadsRequest::Representation + command.request_object = search_reads_request_object + command.response_representation = Google::Apis::GenomicsV1::SearchReadsResponse::Representation + command.response_class = Google::Apis::GenomicsV1::SearchReadsResponse + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a call set. + # For the definitions of call sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] call_set_id + # The ID of the call set to be deleted. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_call_set(call_set_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/callsets/{callSetId}', options) + command.response_representation = Google::Apis::GenomicsV1::Empty::Representation + command.response_class = Google::Apis::GenomicsV1::Empty + command.params['callSetId'] = call_set_id unless call_set_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a list of call sets matching the criteria. + # For the definitions of call sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # Implements + # [GlobalAllianceApi.searchCallSets](https://github.com/ga4gh/schemas/blob/v0.5. + # 1/src/main/resources/avro/variantmethods.avdl#L178). + # @param [Google::Apis::GenomicsV1::SearchCallSetsRequest] search_call_sets_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::SearchCallSetsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::SearchCallSetsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def search_call_sets(search_call_sets_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/callsets/search', options) + command.request_representation = Google::Apis::GenomicsV1::SearchCallSetsRequest::Representation + command.request_object = search_call_sets_request_object + command.response_representation = Google::Apis::GenomicsV1::SearchCallSetsResponse::Representation + command.response_class = Google::Apis::GenomicsV1::SearchCallSetsResponse + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a call set. + # For the definitions of call sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # This method supports patch semantics. + # @param [String] call_set_id + # The ID of the call set to be updated. + # @param [Google::Apis::GenomicsV1::CallSet] call_set_object + # @param [String] update_mask + # An optional mask specifying which fields to update. At this time, the only + # mutable field is name. The only + # acceptable value is "name". If unspecified, all mutable fields will be + # updated. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::CallSet] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::CallSet] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_call_set(call_set_id, call_set_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/callsets/{callSetId}', options) + command.request_representation = Google::Apis::GenomicsV1::CallSet::Representation + command.request_object = call_set_object + command.response_representation = Google::Apis::GenomicsV1::CallSet::Representation + command.response_class = Google::Apis::GenomicsV1::CallSet + command.params['callSetId'] = call_set_id unless call_set_id.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a call set by ID. + # For the definitions of call sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [String] call_set_id + # The ID of the call set. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::CallSet] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::CallSet] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_call_set(call_set_id, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/callsets/{callSetId}', options) + command.response_representation = Google::Apis::GenomicsV1::CallSet::Representation + command.response_class = Google::Apis::GenomicsV1::CallSet + command.params['callSetId'] = call_set_id unless call_set_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a new call set. + # For the definitions of call sets and other genomics resources, see + # [Fundamentals of Google + # Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics) + # @param [Google::Apis::GenomicsV1::CallSet] call_set_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GenomicsV1::CallSet] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GenomicsV1::CallSet] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_call_set(call_set_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/callsets', options) + command.request_representation = Google::Apis::GenomicsV1::CallSet::Representation + command.request_object = call_set_object + command.response_representation = Google::Apis::GenomicsV1::CallSet::Representation + command.response_class = Google::Apis::GenomicsV1::CallSet command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) diff --git a/generated/google/apis/iam_v1.rb b/generated/google/apis/iam_v1.rb index 357804e59..c5c6cdbb3 100644 --- a/generated/google/apis/iam_v1.rb +++ b/generated/google/apis/iam_v1.rb @@ -27,7 +27,7 @@ module Google # @see https://cloud.google.com/iam/ module IamV1 VERSION = 'V1' - REVISION = '20170217' + REVISION = '20170317' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/iam_v1/classes.rb b/generated/google/apis/iam_v1/classes.rb index f1e186f9e..3243737c0 100644 --- a/generated/google/apis/iam_v1/classes.rb +++ b/generated/google/apis/iam_v1/classes.rb @@ -22,406 +22,6 @@ module Google module Apis module IamV1 - # Response message for `TestIamPermissions` method. - class TestIamPermissionsResponse - include Google::Apis::Core::Hashable - - # A subset of `TestPermissionsRequest.permissions` that the caller is - # allowed. - # Corresponds to the JSON property `permissions` - # @return [Array] - attr_accessor :permissions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @permissions = args[:permissions] if args.key?(:permissions) - end - end - - # The service account keys list response. - class ListServiceAccountKeysResponse - include Google::Apis::Core::Hashable - - # The public keys for the service account. - # Corresponds to the JSON property `keys` - # @return [Array] - attr_accessor :keys - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @keys = args[:keys] if args.key?(:keys) - end - end - - # Represents a service account key. - # A service account has two sets of key-pairs: user-managed, and - # system-managed. - # User-managed key-pairs can be created and deleted by users. Users are - # responsible for rotating these keys periodically to ensure security of - # their service accounts. Users retain the private key of these key-pairs, - # and Google retains ONLY the public key. - # System-managed key-pairs are managed automatically by Google, and rotated - # daily without user intervention. The private key never leaves Google's - # servers to maximize security. - # Public keys for all service accounts are also published at the OAuth2 - # Service Account API. - class ServiceAccountKey - include Google::Apis::Core::Hashable - - # The private key data. Only provided in `CreateServiceAccountKey` - # responses. - # Corresponds to the JSON property `privateKeyData` - # @return [String] - attr_accessor :private_key_data - - # The public key data. Only provided in `GetServiceAccountKey` responses. - # Corresponds to the JSON property `publicKeyData` - # @return [String] - attr_accessor :public_key_data - - # The resource name of the service account key in the following format - # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL`/keys/`key``. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The key can be used before this timestamp. - # Corresponds to the JSON property `validBeforeTime` - # @return [String] - attr_accessor :valid_before_time - - # Specifies the algorithm (and possibly key size) for the key. - # Corresponds to the JSON property `keyAlgorithm` - # @return [String] - attr_accessor :key_algorithm - - # The output format for the private key. - # Only provided in `CreateServiceAccountKey` responses, not - # in `GetServiceAccountKey` or `ListServiceAccountKey` responses. - # Google never exposes system-managed private keys, and never retains - # user-managed private keys. - # Corresponds to the JSON property `privateKeyType` - # @return [String] - attr_accessor :private_key_type - - # The key can be used after this timestamp. - # Corresponds to the JSON property `validAfterTime` - # @return [String] - attr_accessor :valid_after_time - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @private_key_data = args[:private_key_data] if args.key?(:private_key_data) - @public_key_data = args[:public_key_data] if args.key?(:public_key_data) - @name = args[:name] if args.key?(:name) - @valid_before_time = args[:valid_before_time] if args.key?(:valid_before_time) - @key_algorithm = args[:key_algorithm] if args.key?(:key_algorithm) - @private_key_type = args[:private_key_type] if args.key?(:private_key_type) - @valid_after_time = args[:valid_after_time] if args.key?(:valid_after_time) - end - end - - # The service account key create request. - class CreateServiceAccountKeyRequest - include Google::Apis::Core::Hashable - - # Which type of key and algorithm to use for the key. - # The default is currently a 2K RSA key. However this may change in the - # future. - # Corresponds to the JSON property `keyAlgorithm` - # @return [String] - attr_accessor :key_algorithm - - # The output format of the private key. `GOOGLE_CREDENTIALS_FILE` is the - # default output format. - # Corresponds to the JSON property `privateKeyType` - # @return [String] - attr_accessor :private_key_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @key_algorithm = args[:key_algorithm] if args.key?(:key_algorithm) - @private_key_type = args[:private_key_type] if args.key?(:private_key_type) - end - end - - # Request message for `TestIamPermissions` method. - class TestIamPermissionsRequest - include Google::Apis::Core::Hashable - - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # Corresponds to the JSON property `permissions` - # @return [Array] - attr_accessor :permissions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @permissions = args[:permissions] if args.key?(:permissions) - end - end - - # The service account sign blob response. - class SignBlobResponse - include Google::Apis::Core::Hashable - - # The id of the key used to sign the blob. - # Corresponds to the JSON property `keyId` - # @return [String] - attr_accessor :key_id - - # The signed blob. - # Corresponds to the JSON property `signature` - # @return [String] - attr_accessor :signature - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @key_id = args[:key_id] if args.key?(:key_id) - @signature = args[:signature] if args.key?(:signature) - end - end - - # The service account sign JWT response. - class SignJwtResponse - include Google::Apis::Core::Hashable - - # The id of the key used to sign the JWT. - # Corresponds to the JSON property `keyId` - # @return [String] - attr_accessor :key_id - - # The signed JWT. - # Corresponds to the JSON property `signedJwt` - # @return [String] - attr_accessor :signed_jwt - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @key_id = args[:key_id] if args.key?(:key_id) - @signed_jwt = args[:signed_jwt] if args.key?(:signed_jwt) - end - end - - # The service account sign JWT request. - class SignJwtRequest - include Google::Apis::Core::Hashable - - # The JWT payload to sign, a JSON JWT Claim set. - # Corresponds to the JSON property `payload` - # @return [String] - attr_accessor :payload - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @payload = args[:payload] if args.key?(:payload) - end - end - - # Defines an Identity and Access Management (IAM) policy. It is used to - # specify access control policies for Cloud Platform resources. - # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of - # `members` to a `role`, where the members can be user accounts, Google groups, - # Google domains, and service accounts. A `role` is a named list of permissions - # defined by IAM. - # **Example** - # ` - # "bindings": [ - # ` - # "role": "roles/owner", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-other-app@appspot.gserviceaccount.com", - # ] - # `, - # ` - # "role": "roles/viewer", - # "members": ["user:sean@example.com"] - # ` - # ] - # ` - # For a description of IAM and its features, see the - # [IAM developer's guide](https://cloud.google.com/iam). - class Policy - include Google::Apis::Core::Hashable - - # `etag` is used for optimistic concurrency control as a way to help - # prevent simultaneous updates of a policy from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform policy updates in order to avoid race - # conditions: An `etag` is returned in the response to `getIamPolicy`, and - # systems are expected to put that etag in the request to `setIamPolicy` to - # ensure that their change will be applied to the same version of the policy. - # If no `etag` is provided in the call to `setIamPolicy`, then the existing - # policy is overwritten blindly. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # Version of the `Policy`. The default version is 0. - # Corresponds to the JSON property `version` - # @return [Fixnum] - attr_accessor :version - - # Associates a list of `members` to a `role`. - # Multiple `bindings` must not be specified for the same `role`. - # `bindings` with no members will result in an error. - # Corresponds to the JSON property `bindings` - # @return [Array] - attr_accessor :bindings - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @etag = args[:etag] if args.key?(:etag) - @version = args[:version] if args.key?(:version) - @bindings = args[:bindings] if args.key?(:bindings) - end - end - - # Audit log information specific to Cloud IAM. This message is serialized - # as an `Any` type in the `ServiceData` message of an - # `AuditLog` message. - class AuditData - include Google::Apis::Core::Hashable - - # The difference delta between two policies. - # Corresponds to the JSON property `policyDelta` - # @return [Google::Apis::IamV1::PolicyDelta] - attr_accessor :policy_delta - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @policy_delta = args[:policy_delta] if args.key?(:policy_delta) - end - end - - # One delta entry for Binding. Each individual change (only one member in each - # entry) to a binding will be a separate entry. - class BindingDelta - include Google::Apis::Core::Hashable - - # 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 - - # The action that was performed on a Binding. - # Required - # Corresponds to the JSON property `action` - # @return [String] - attr_accessor :action - - # A single identity requesting access for a Cloud Platform resource. - # Follows the same format of Binding.members. - # Required - # Corresponds to the JSON property `member` - # @return [String] - attr_accessor :member - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @role = args[:role] if args.key?(:role) - @action = args[:action] if args.key?(:action) - @member = args[:member] if args.key?(:member) - end - end - - # The difference delta between two policies. - class PolicyDelta - include Google::Apis::Core::Hashable - - # The delta for Bindings between two policies. - # Corresponds to the JSON property `bindingDeltas` - # @return [Array] - attr_accessor :binding_deltas - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @binding_deltas = args[:binding_deltas] if args.key?(:binding_deltas) - end - end - - # The service account list response. - class ListServiceAccountsResponse - include Google::Apis::Core::Hashable - - # To retrieve the next page of results, set - # ListServiceAccountsRequest.page_token - # to this value. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The list of matching service accounts. - # Corresponds to the JSON property `accounts` - # @return [Array] - attr_accessor :accounts - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @accounts = args[:accounts] if args.key?(:accounts) - end - end - # The service account create request. class CreateServiceAccountRequest include Google::Apis::Core::Hashable @@ -463,6 +63,33 @@ module Google end end + # The service account list response. + class ListServiceAccountsResponse + include Google::Apis::Core::Hashable + + # To retrieve the next page of results, set + # ListServiceAccountsRequest.page_token + # to this value. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The list of matching service accounts. + # Corresponds to the JSON property `accounts` + # @return [Array] + attr_accessor :accounts + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @accounts = args[:accounts] if args.key?(:accounts) + end + end + # The grantable role query response. class QueryGrantableRolesResponse include Google::Apis::Core::Hashable @@ -585,13 +212,6 @@ module Google class Binding include Google::Apis::Core::Hashable - # Role that is assigned to `members`. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # Required - # Corresponds to the JSON property `role` - # @return [String] - attr_accessor :role - # Specifies the identities requesting access for a Cloud Platform resource. # `members` can have the following values: # * `allUsers`: A special identifier that represents anyone who is @@ -610,110 +230,21 @@ module Google # @return [Array] attr_accessor :members + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # Corresponds to the JSON property `role` + # @return [String] + attr_accessor :role + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @role = args[:role] if args.key?(:role) @members = args[:members] if args.key?(:members) - end - end - - # A service account in the Identity and Access Management API. - # To create a service account, specify the `project_id` and the `account_id` - # for the account. The `account_id` is unique within the project, and is used - # to generate the service account email address and a stable - # `unique_id`. - # If the account already exists, the account's resource name is returned - # in util::Status's ResourceInfo.resource_name in the format of - # projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL`. The caller can - # use the name in other methods to access the account. - # All other methods can identify the service account using the format - # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``. - # Using `-` as a wildcard for the project will infer the project from - # the account. The `account` value can be the `email` address or the - # `unique_id` of the service account. - class ServiceAccount - include Google::Apis::Core::Hashable - - # @OutputOnly The id of the project that owns the service account. - # Corresponds to the JSON property `projectId` - # @return [String] - attr_accessor :project_id - - # @OutputOnly The unique and stable id of the service account. - # Corresponds to the JSON property `uniqueId` - # @return [String] - attr_accessor :unique_id - - # @OutputOnly. The OAuth2 client id for the service account. - # This is used in conjunction with the OAuth2 clientconfig API to make - # three legged OAuth2 (3LO) flows to access the data of Google users. - # Corresponds to the JSON property `oauth2ClientId` - # @return [String] - attr_accessor :oauth2_client_id - - # Optional. A user-specified description of the service account. Must be - # fewer than 100 UTF-8 bytes. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # Used to perform a consistent read-modify-write. - # Corresponds to the JSON property `etag` - # @return [String] - attr_accessor :etag - - # @OutputOnly The email address of the service account. - # Corresponds to the JSON property `email` - # @return [String] - attr_accessor :email - - # The resource name of the service account in the following format: - # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``. - # Requests using `-` as a wildcard for the project will infer the project - # from the `account` and the `account` value can be the `email` address or - # the `unique_id` of the service account. - # In responses the resource name will always be in the format - # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @project_id = args[:project_id] if args.key?(:project_id) - @unique_id = args[:unique_id] if args.key?(:unique_id) - @oauth2_client_id = args[:oauth2_client_id] if args.key?(:oauth2_client_id) - @display_name = args[:display_name] if args.key?(:display_name) - @etag = args[:etag] if args.key?(:etag) - @email = args[:email] if args.key?(:email) - @name = args[:name] if args.key?(:name) - 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) + @role = args[:role] if args.key?(:role) end end @@ -738,6 +269,475 @@ module Google @full_resource_name = args[:full_resource_name] if args.key?(:full_resource_name) end end + + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # service Foo ` + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # ` + # The JSON representation for `Empty` is empty JSON object ````. + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # A service account in the Identity and Access Management API. + # To create a service account, specify the `project_id` and the `account_id` + # for the account. The `account_id` is unique within the project, and is used + # to generate the service account email address and a stable + # `unique_id`. + # If the account already exists, the account's resource name is returned + # in util::Status's ResourceInfo.resource_name in the format of + # projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL`. The caller can + # use the name in other methods to access the account. + # All other methods can identify the service account using the format + # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``. + # Using `-` as a wildcard for the project will infer the project from + # the account. The `account` value can be the `email` address or the + # `unique_id` of the service account. + class ServiceAccount + include Google::Apis::Core::Hashable + + # @OutputOnly The email address of the service account. + # Corresponds to the JSON property `email` + # @return [String] + attr_accessor :email + + # The resource name of the service account in the following format: + # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``. + # Requests using `-` as a wildcard for the project will infer the project + # from the `account` and the `account` value can be the `email` address or + # the `unique_id` of the service account. + # In responses the resource name will always be in the format + # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # @OutputOnly The id of the project that owns the service account. + # Corresponds to the JSON property `projectId` + # @return [String] + attr_accessor :project_id + + # @OutputOnly. The OAuth2 client id for the service account. + # This is used in conjunction with the OAuth2 clientconfig API to make + # three legged OAuth2 (3LO) flows to access the data of Google users. + # Corresponds to the JSON property `oauth2ClientId` + # @return [String] + attr_accessor :oauth2_client_id + + # @OutputOnly The unique and stable id of the service account. + # Corresponds to the JSON property `uniqueId` + # @return [String] + attr_accessor :unique_id + + # Optional. A user-specified description of the service account. Must be + # fewer than 100 UTF-8 bytes. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Used to perform a consistent read-modify-write. + # 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) + @email = args[:email] if args.key?(:email) + @name = args[:name] if args.key?(:name) + @project_id = args[:project_id] if args.key?(:project_id) + @oauth2_client_id = args[:oauth2_client_id] if args.key?(:oauth2_client_id) + @unique_id = args[:unique_id] if args.key?(:unique_id) + @display_name = args[:display_name] if args.key?(:display_name) + @etag = args[:etag] if args.key?(:etag) + end + end + + # Response message for `TestIamPermissions` method. + class TestIamPermissionsResponse + include Google::Apis::Core::Hashable + + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @permissions = args[:permissions] if args.key?(:permissions) + end + end + + # The service account keys list response. + class ListServiceAccountKeysResponse + include Google::Apis::Core::Hashable + + # The public keys for the service account. + # Corresponds to the JSON property `keys` + # @return [Array] + attr_accessor :keys + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @keys = args[:keys] if args.key?(:keys) + end + end + + # Represents a service account key. + # A service account has two sets of key-pairs: user-managed, and + # system-managed. + # User-managed key-pairs can be created and deleted by users. Users are + # responsible for rotating these keys periodically to ensure security of + # their service accounts. Users retain the private key of these key-pairs, + # and Google retains ONLY the public key. + # System-managed key-pairs are managed automatically by Google, and rotated + # daily without user intervention. The private key never leaves Google's + # servers to maximize security. + # Public keys for all service accounts are also published at the OAuth2 + # Service Account API. + class ServiceAccountKey + include Google::Apis::Core::Hashable + + # The key can be used after this timestamp. + # Corresponds to the JSON property `validAfterTime` + # @return [String] + attr_accessor :valid_after_time + + # The output format for the private key. + # Only provided in `CreateServiceAccountKey` responses, not + # in `GetServiceAccountKey` or `ListServiceAccountKey` responses. + # Google never exposes system-managed private keys, and never retains + # user-managed private keys. + # Corresponds to the JSON property `privateKeyType` + # @return [String] + attr_accessor :private_key_type + + # The private key data. Only provided in `CreateServiceAccountKey` + # responses. + # Corresponds to the JSON property `privateKeyData` + # @return [String] + attr_accessor :private_key_data + + # The public key data. Only provided in `GetServiceAccountKey` responses. + # Corresponds to the JSON property `publicKeyData` + # @return [String] + attr_accessor :public_key_data + + # The resource name of the service account key in the following format + # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL`/keys/`key``. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The key can be used before this timestamp. + # Corresponds to the JSON property `validBeforeTime` + # @return [String] + attr_accessor :valid_before_time + + # Specifies the algorithm (and possibly key size) for the key. + # Corresponds to the JSON property `keyAlgorithm` + # @return [String] + attr_accessor :key_algorithm + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @valid_after_time = args[:valid_after_time] if args.key?(:valid_after_time) + @private_key_type = args[:private_key_type] if args.key?(:private_key_type) + @private_key_data = args[:private_key_data] if args.key?(:private_key_data) + @public_key_data = args[:public_key_data] if args.key?(:public_key_data) + @name = args[:name] if args.key?(:name) + @valid_before_time = args[:valid_before_time] if args.key?(:valid_before_time) + @key_algorithm = args[:key_algorithm] if args.key?(:key_algorithm) + end + end + + # The service account key create request. + class CreateServiceAccountKeyRequest + include Google::Apis::Core::Hashable + + # Which type of key and algorithm to use for the key. + # The default is currently a 2K RSA key. However this may change in the + # future. + # Corresponds to the JSON property `keyAlgorithm` + # @return [String] + attr_accessor :key_algorithm + + # The output format of the private key. `GOOGLE_CREDENTIALS_FILE` is the + # default output format. + # Corresponds to the JSON property `privateKeyType` + # @return [String] + attr_accessor :private_key_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @key_algorithm = args[:key_algorithm] if args.key?(:key_algorithm) + @private_key_type = args[:private_key_type] if args.key?(:private_key_type) + end + end + + # Request message for `TestIamPermissions` method. + class TestIamPermissionsRequest + include Google::Apis::Core::Hashable + + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @permissions = args[:permissions] if args.key?(:permissions) + end + end + + # The service account sign blob response. + class SignBlobResponse + include Google::Apis::Core::Hashable + + # The signed blob. + # Corresponds to the JSON property `signature` + # @return [String] + attr_accessor :signature + + # The id of the key used to sign the blob. + # Corresponds to the JSON property `keyId` + # @return [String] + attr_accessor :key_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @signature = args[:signature] if args.key?(:signature) + @key_id = args[:key_id] if args.key?(:key_id) + end + end + + # The service account sign JWT response. + class SignJwtResponse + include Google::Apis::Core::Hashable + + # The id of the key used to sign the JWT. + # Corresponds to the JSON property `keyId` + # @return [String] + attr_accessor :key_id + + # The signed JWT. + # Corresponds to the JSON property `signedJwt` + # @return [String] + attr_accessor :signed_jwt + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @key_id = args[:key_id] if args.key?(:key_id) + @signed_jwt = args[:signed_jwt] if args.key?(:signed_jwt) + end + end + + # Defines an Identity and Access Management (IAM) policy. It is used to + # specify access control policies for Cloud Platform resources. + # A `Policy` consists of a list of `bindings`. A `Binding` binds a list of + # `members` to a `role`, where the members can be user accounts, Google groups, + # Google domains, and service accounts. A `role` is a named list of permissions + # defined by IAM. + # **Example** + # ` + # "bindings": [ + # ` + # "role": "roles/owner", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-other-app@appspot.gserviceaccount.com", + # ] + # `, + # ` + # "role": "roles/viewer", + # "members": ["user:sean@example.com"] + # ` + # ] + # ` + # For a description of IAM and its features, see the + # [IAM developer's guide](https://cloud.google.com/iam). + class Policy + include Google::Apis::Core::Hashable + + # Associates a list of `members` to a `role`. + # Multiple `bindings` must not be specified for the same `role`. + # `bindings` with no members will result in an error. + # Corresponds to the JSON property `bindings` + # @return [Array] + attr_accessor :bindings + + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # If no `etag` is provided in the call to `setIamPolicy`, then the existing + # policy is overwritten blindly. + # Corresponds to the JSON property `etag` + # @return [String] + attr_accessor :etag + + # Version of the `Policy`. The default version is 0. + # Corresponds to the JSON property `version` + # @return [Fixnum] + attr_accessor :version + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @bindings = args[:bindings] if args.key?(:bindings) + @etag = args[:etag] if args.key?(:etag) + @version = args[:version] if args.key?(:version) + end + end + + # The service account sign JWT request. + class SignJwtRequest + include Google::Apis::Core::Hashable + + # The JWT payload to sign, a JSON JWT Claim set. + # Corresponds to the JSON property `payload` + # @return [String] + attr_accessor :payload + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @payload = args[:payload] if args.key?(:payload) + end + end + + # Audit log information specific to Cloud IAM. This message is serialized + # as an `Any` type in the `ServiceData` message of an + # `AuditLog` message. + class AuditData + include Google::Apis::Core::Hashable + + # The difference delta between two policies. + # Corresponds to the JSON property `policyDelta` + # @return [Google::Apis::IamV1::PolicyDelta] + attr_accessor :policy_delta + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @policy_delta = args[:policy_delta] if args.key?(:policy_delta) + end + end + + # One delta entry for Binding. Each individual change (only one member in each + # entry) to a binding will be a separate entry. + class BindingDelta + include Google::Apis::Core::Hashable + + # 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 + + # The action that was performed on a Binding. + # Required + # Corresponds to the JSON property `action` + # @return [String] + attr_accessor :action + + # A single identity requesting access for a Cloud Platform resource. + # Follows the same format of Binding.members. + # Required + # Corresponds to the JSON property `member` + # @return [String] + attr_accessor :member + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @role = args[:role] if args.key?(:role) + @action = args[:action] if args.key?(:action) + @member = args[:member] if args.key?(:member) + end + end + + # The difference delta between two policies. + class PolicyDelta + include Google::Apis::Core::Hashable + + # The delta for Bindings between two policies. + # Corresponds to the JSON property `bindingDeltas` + # @return [Array] + attr_accessor :binding_deltas + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @binding_deltas = args[:binding_deltas] if args.key?(:binding_deltas) + end + end end end end diff --git a/generated/google/apis/iam_v1/representations.rb b/generated/google/apis/iam_v1/representations.rb index d67eeeba7..3e64f8f73 100644 --- a/generated/google/apis/iam_v1/representations.rb +++ b/generated/google/apis/iam_v1/representations.rb @@ -22,73 +22,7 @@ module Google module Apis module IamV1 - class TestIamPermissionsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListServiceAccountKeysResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ServiceAccountKey - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CreateServiceAccountKeyRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TestIamPermissionsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SignBlobResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SignJwtResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SignJwtRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Policy - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AuditData - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BindingDelta - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PolicyDelta + class CreateServiceAccountRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -100,12 +34,6 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class CreateServiceAccountRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class QueryGrantableRolesResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -136,7 +64,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class ServiceAccount + class QueryGrantableRolesRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -148,110 +76,90 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class QueryGrantableRolesRequest + class ServiceAccount class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end class TestIamPermissionsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :permissions, as: 'permissions' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ListServiceAccountKeysResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :keys, as: 'keys', class: Google::Apis::IamV1::ServiceAccountKey, decorator: Google::Apis::IamV1::ServiceAccountKey::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class ServiceAccountKey - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :private_key_data, :base64 => true, as: 'privateKeyData' - property :public_key_data, :base64 => true, as: 'publicKeyData' - property :name, as: 'name' - property :valid_before_time, as: 'validBeforeTime' - property :key_algorithm, as: 'keyAlgorithm' - property :private_key_type, as: 'privateKeyType' - property :valid_after_time, as: 'validAfterTime' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class CreateServiceAccountKeyRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :key_algorithm, as: 'keyAlgorithm' - property :private_key_type, as: 'privateKeyType' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class TestIamPermissionsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :permissions, as: 'permissions' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class SignBlobResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :key_id, as: 'keyId' - property :signature, :base64 => true, as: 'signature' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class SignJwtResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :key_id, as: 'keyId' - property :signed_jwt, as: 'signedJwt' - end - end + class Representation < Google::Apis::Core::JsonRepresentation; end - class SignJwtRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :payload, as: 'payload' - end + include Google::Apis::Core::JsonObjectSupport end class Policy - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :etag, :base64 => true, as: 'etag' - property :version, as: 'version' - collection :bindings, as: 'bindings', class: Google::Apis::IamV1::Binding, decorator: Google::Apis::IamV1::Binding::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport + end + + class SignJwtRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class AuditData - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :policy_delta, as: 'policyDelta', class: Google::Apis::IamV1::PolicyDelta, decorator: Google::Apis::IamV1::PolicyDelta::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class BindingDelta - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :role, as: 'role' - property :action, as: 'action' - property :member, as: 'member' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class PolicyDelta + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CreateServiceAccountRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :binding_deltas, as: 'bindingDeltas', class: Google::Apis::IamV1::BindingDelta, decorator: Google::Apis::IamV1::BindingDelta::Representation + property :service_account, as: 'serviceAccount', class: Google::Apis::IamV1::ServiceAccount, decorator: Google::Apis::IamV1::ServiceAccount::Representation + property :account_id, as: 'accountId' end end @@ -264,15 +172,6 @@ module Google end end - class CreateServiceAccountRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :service_account, as: 'serviceAccount', class: Google::Apis::IamV1::ServiceAccount, decorator: Google::Apis::IamV1::ServiceAccount::Representation - - property :account_id, as: 'accountId' - end - end - class QueryGrantableRolesResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -308,27 +207,8 @@ module Google class Binding # @private class Representation < Google::Apis::Core::JsonRepresentation - property :role, as: 'role' collection :members, as: 'members' - end - end - - class ServiceAccount - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :project_id, as: 'projectId' - property :unique_id, as: 'uniqueId' - property :oauth2_client_id, as: 'oauth2ClientId' - property :display_name, as: 'displayName' - property :etag, :base64 => true, as: 'etag' - property :email, as: 'email' - property :name, as: 'name' - end - end - - class Empty - # @private - class Representation < Google::Apis::Core::JsonRepresentation + property :role, as: 'role' end end @@ -338,6 +218,126 @@ module Google property :full_resource_name, as: 'fullResourceName' end end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class ServiceAccount + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :email, as: 'email' + property :name, as: 'name' + property :project_id, as: 'projectId' + property :oauth2_client_id, as: 'oauth2ClientId' + property :unique_id, as: 'uniqueId' + property :display_name, as: 'displayName' + property :etag, :base64 => true, as: 'etag' + end + end + + class TestIamPermissionsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' + end + end + + class ListServiceAccountKeysResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :keys, as: 'keys', class: Google::Apis::IamV1::ServiceAccountKey, decorator: Google::Apis::IamV1::ServiceAccountKey::Representation + + end + end + + class ServiceAccountKey + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :valid_after_time, as: 'validAfterTime' + property :private_key_type, as: 'privateKeyType' + property :private_key_data, :base64 => true, as: 'privateKeyData' + property :public_key_data, :base64 => true, as: 'publicKeyData' + property :name, as: 'name' + property :valid_before_time, as: 'validBeforeTime' + property :key_algorithm, as: 'keyAlgorithm' + end + end + + class CreateServiceAccountKeyRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :key_algorithm, as: 'keyAlgorithm' + property :private_key_type, as: 'privateKeyType' + end + end + + class TestIamPermissionsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :permissions, as: 'permissions' + end + end + + class SignBlobResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :signature, :base64 => true, as: 'signature' + property :key_id, as: 'keyId' + end + end + + class SignJwtResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :key_id, as: 'keyId' + property :signed_jwt, as: 'signedJwt' + end + end + + class Policy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :bindings, as: 'bindings', class: Google::Apis::IamV1::Binding, decorator: Google::Apis::IamV1::Binding::Representation + + property :etag, :base64 => true, as: 'etag' + property :version, as: 'version' + end + end + + class SignJwtRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :payload, as: 'payload' + end + end + + class AuditData + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :policy_delta, as: 'policyDelta', class: Google::Apis::IamV1::PolicyDelta, decorator: Google::Apis::IamV1::PolicyDelta::Representation + + end + end + + class BindingDelta + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :role, as: 'role' + property :action, as: 'action' + property :member, as: 'member' + end + end + + class PolicyDelta + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :binding_deltas, as: 'bindingDeltas', class: Google::Apis::IamV1::BindingDelta, decorator: Google::Apis::IamV1::BindingDelta::Representation + + end + end end end end diff --git a/generated/google/apis/iam_v1/service.rb b/generated/google/apis/iam_v1/service.rb index e18a40dd0..7dc93dbaf 100644 --- a/generated/google/apis/iam_v1/service.rb +++ b/generated/google/apis/iam_v1/service.rb @@ -48,6 +48,115 @@ module Google super('https://iam.googleapis.com/', '') end + # Queries roles that can be granted on a particular resource. + # A role is grantable if it can be used as the role in a binding for a policy + # for that resource. + # @param [Google::Apis::IamV1::QueryGrantableRolesRequest] query_grantable_roles_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::IamV1::QueryGrantableRolesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::IamV1::QueryGrantableRolesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def query_grantable_roles(query_grantable_roles_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/roles:queryGrantableRoles', options) + command.request_representation = Google::Apis::IamV1::QueryGrantableRolesRequest::Representation + command.request_object = query_grantable_roles_request_object + command.response_representation = Google::Apis::IamV1::QueryGrantableRolesResponse::Representation + command.response_class = Google::Apis::IamV1::QueryGrantableRolesResponse + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates a ServiceAccount. + # Currently, only the following fields are updatable: + # `display_name` . + # The `etag` is mandatory. + # @param [String] name + # The resource name of the service account in the following format: + # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``. + # Requests using `-` as a wildcard for the project will infer the project + # from the `account` and the `account` value can be the `email` address or + # the `unique_id` of the service account. + # In responses the resource name will always be in the format + # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``. + # @param [Google::Apis::IamV1::ServiceAccount] service_account_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::IamV1::ServiceAccount] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::IamV1::ServiceAccount] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_project_service_account(name, service_account_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'v1/{+name}', options) + command.request_representation = Google::Apis::IamV1::ServiceAccount::Representation + command.request_object = service_account_object + command.response_representation = Google::Apis::IamV1::ServiceAccount::Representation + command.response_class = Google::Apis::IamV1::ServiceAccount + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Tests the specified permissions against the IAM access control policy + # for a ServiceAccount. + # @param [String] resource + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param [Google::Apis::IamV1::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::IamV1::TestIamPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::IamV1::TestIamPermissionsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def test_service_account_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options) + command.request_representation = Google::Apis::IamV1::TestIamPermissionsRequest::Representation + command.request_object = test_iam_permissions_request_object + command.response_representation = Google::Apis::IamV1::TestIamPermissionsResponse::Representation + command.response_class = Google::Apis::IamV1::TestIamPermissionsResponse + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Deletes a ServiceAccount. # @param [String] name # The resource name of the service account in the following format: @@ -82,6 +191,43 @@ module Google execute_or_queue_command(command, &block) end + # Signs a blob using a service account's system-managed private key. + # @param [String] name + # The resource name of the service account in the following format: + # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``. + # Using `-` as a wildcard for the project will infer the project from + # the account. The `account` value can be the `email` address or the + # `unique_id` of the service account. + # @param [Google::Apis::IamV1::SignBlobRequest] sign_blob_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::IamV1::SignBlobResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::IamV1::SignBlobResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def sign_service_account_blob(name, sign_blob_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+name}:signBlob', options) + command.request_representation = Google::Apis::IamV1::SignBlobRequest::Representation + command.request_object = sign_blob_request_object + command.response_representation = Google::Apis::IamV1::SignBlobResponse::Representation + command.response_class = Google::Apis::IamV1::SignBlobResponse + 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 ServiceAccounts for a project. # @param [String] name # Required. The resource name of the project associated with the service @@ -123,14 +269,12 @@ module Google execute_or_queue_command(command, &block) end - # Signs a blob using a service account's system-managed private key. + # Creates a ServiceAccount + # and returns it. # @param [String] name - # The resource name of the service account in the following format: - # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``. - # Using `-` as a wildcard for the project will infer the project from - # the account. The `account` value can be the `email` address or the - # `unique_id` of the service account. - # @param [Google::Apis::IamV1::SignBlobRequest] sign_blob_request_object + # Required. The resource name of the project associated with the service + # accounts, such as `projects/my-project-123`. + # @param [Google::Apis::IamV1::CreateServiceAccountRequest] create_service_account_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -140,20 +284,20 @@ module Google # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::IamV1::SignBlobResponse] parsed result object + # @yieldparam result [Google::Apis::IamV1::ServiceAccount] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::IamV1::SignBlobResponse] + # @return [Google::Apis::IamV1::ServiceAccount] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def sign_service_account_blob(name, sign_blob_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+name}:signBlob', options) - command.request_representation = Google::Apis::IamV1::SignBlobRequest::Representation - command.request_object = sign_blob_request_object - command.response_representation = Google::Apis::IamV1::SignBlobResponse::Representation - command.response_class = Google::Apis::IamV1::SignBlobResponse + def create_service_account(name, create_service_account_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+name}/serviceAccounts', options) + command.request_representation = Google::Apis::IamV1::CreateServiceAccountRequest::Representation + command.request_object = create_service_account_request_object + command.response_representation = Google::Apis::IamV1::ServiceAccount::Representation + command.response_class = Google::Apis::IamV1::ServiceAccount command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? @@ -200,47 +344,11 @@ module Google execute_or_queue_command(command, &block) end - # Creates a ServiceAccount - # and returns it. - # @param [String] name - # Required. The resource name of the project associated with the service - # accounts, such as `projects/my-project-123`. - # @param [Google::Apis::IamV1::CreateServiceAccountRequest] create_service_account_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::IamV1::ServiceAccount] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::IamV1::ServiceAccount] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_service_account(name, create_service_account_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+name}/serviceAccounts', options) - command.request_representation = Google::Apis::IamV1::CreateServiceAccountRequest::Representation - command.request_object = create_service_account_request_object - command.response_representation = Google::Apis::IamV1::ServiceAccount::Representation - command.response_class = Google::Apis::IamV1::ServiceAccount - command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - # Sets the IAM access control policy for a # ServiceAccount. # @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``. + # See the operation documentation for the appropriate value for this field. # @param [Google::Apis::IamV1::SetIamPolicyRequest] set_iam_policy_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. @@ -275,8 +383,7 @@ module Google # ServiceAccount. # @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``. + # See the operation documentation for the appropriate value for this field. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -338,19 +445,13 @@ module Google execute_or_queue_command(command, &block) end - # Updates a ServiceAccount. - # Currently, only the following fields are updatable: - # `display_name` . - # The `etag` is mandatory. + # Deletes a ServiceAccountKey. # @param [String] name - # The resource name of the service account in the following format: - # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``. - # Requests using `-` as a wildcard for the project will infer the project - # from the `account` and the `account` value can be the `email` address or - # the `unique_id` of the service account. - # In responses the resource name will always be in the format - # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL``. - # @param [Google::Apis::IamV1::ServiceAccount] service_account_object + # The resource name of the service account key in the following format: + # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL`/keys/`key``. + # Using `-` as a wildcard for the project will infer the project from + # the account. The `account` value can be the `email` address or the + # `unique_id` of the service account. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -360,62 +461,24 @@ module Google # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::IamV1::ServiceAccount] parsed result object + # @yieldparam result [Google::Apis::IamV1::Empty] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::IamV1::ServiceAccount] + # @return [Google::Apis::IamV1::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 update_project_service_account(name, service_account_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:put, 'v1/{+name}', options) - command.request_representation = Google::Apis::IamV1::ServiceAccount::Representation - command.request_object = service_account_object - command.response_representation = Google::Apis::IamV1::ServiceAccount::Representation - command.response_class = Google::Apis::IamV1::ServiceAccount + def delete_project_service_account_key(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/{+name}', options) + command.response_representation = Google::Apis::IamV1::Empty::Representation + command.response_class = Google::Apis::IamV1::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 - # Tests the specified permissions against the IAM access control policy - # for a ServiceAccount. - # @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::IamV1::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::IamV1::TestIamPermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::IamV1::TestIamPermissionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def test_service_account_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options) - command.request_representation = Google::Apis::IamV1::TestIamPermissionsRequest::Representation - command.request_object = test_iam_permissions_request_object - command.response_representation = Google::Apis::IamV1::TestIamPermissionsResponse::Representation - command.response_class = Google::Apis::IamV1::TestIamPermissionsResponse - command.params['resource'] = resource unless resource.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - # Lists ServiceAccountKeys. # @param [String] name # The resource name of the service account in the following format: @@ -531,72 +594,6 @@ module Google command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - - # Deletes a ServiceAccountKey. - # @param [String] name - # The resource name of the service account key in the following format: - # `projects/`PROJECT_ID`/serviceAccounts/`SERVICE_ACCOUNT_EMAIL`/keys/`key``. - # Using `-` as a wildcard for the project will infer the project from - # the account. The `account` value can be the `email` address or the - # `unique_id` of the service account. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::IamV1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::IamV1::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_service_account_key(name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/{+name}', options) - command.response_representation = Google::Apis::IamV1::Empty::Representation - command.response_class = Google::Apis::IamV1::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 - - # Queries roles that can be granted on a particular resource. - # A role is grantable if it can be used as the role in a binding for a policy - # for that resource. - # @param [Google::Apis::IamV1::QueryGrantableRolesRequest] query_grantable_roles_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::IamV1::QueryGrantableRolesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::IamV1::QueryGrantableRolesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def query_grantable_roles(query_grantable_roles_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/roles:queryGrantableRoles', options) - command.request_representation = Google::Apis::IamV1::QueryGrantableRolesRequest::Representation - command.request_object = query_grantable_roles_request_object - command.response_representation = Google::Apis::IamV1::QueryGrantableRolesResponse::Representation - command.response_class = Google::Apis::IamV1::QueryGrantableRolesResponse - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end protected diff --git a/generated/google/apis/identitytoolkit_v3.rb b/generated/google/apis/identitytoolkit_v3.rb index 557570715..5ece84b98 100644 --- a/generated/google/apis/identitytoolkit_v3.rb +++ b/generated/google/apis/identitytoolkit_v3.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/identity-toolkit/v3/ module IdentitytoolkitV3 VERSION = 'V3' - REVISION = '20170203' + REVISION = '20170308' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/identitytoolkit_v3/classes.rb b/generated/google/apis/identitytoolkit_v3/classes.rb index 90824d037..ffdae51f5 100644 --- a/generated/google/apis/identitytoolkit_v3/classes.rb +++ b/generated/google/apis/identitytoolkit_v3/classes.rb @@ -1067,6 +1067,14 @@ module Google class VerifyAssertionRequest include Google::Apis::Core::Hashable + # When it's true, automatically creates a new account if the user doesn't exist. + # When it's false, allows existing user to sign in normally and throws exception + # if the user doesn't exist. + # Corresponds to the JSON property `autoCreate` + # @return [Boolean] + attr_accessor :auto_create + alias_method :auto_create?, :auto_create + # GCP project number of the requesting delegated app. Currently only intended # for Firebase V1 migration. # Corresponds to the JSON property `delegatedProjectNumber` @@ -1129,6 +1137,7 @@ module Google # Update properties of this object def update!(**args) + @auto_create = args[:auto_create] if args.key?(:auto_create) @delegated_project_number = args[:delegated_project_number] if args.key?(:delegated_project_number) @id_token = args[:id_token] if args.key?(:id_token) @instance_id = args[:instance_id] if args.key?(:instance_id) @@ -1305,6 +1314,30 @@ module Google class Relyingparty include Google::Apis::Core::Hashable + # whether or not to install the android app on the device where the link is + # opened + # Corresponds to the JSON property `androidInstallApp` + # @return [Boolean] + attr_accessor :android_install_app + alias_method :android_install_app?, :android_install_app + + # minimum version of the app. if the version on the device is lower than this + # version then the user is taken to the play store to upgrade the app + # Corresponds to the JSON property `androidMinimumVersion` + # @return [String] + attr_accessor :android_minimum_version + + # android package name of the android app to handle the action code + # Corresponds to the JSON property `androidPackageName` + # @return [String] + attr_accessor :android_package_name + + # whether or not the app can handle the oob code without first going to web + # Corresponds to the JSON property `canHandleCodeInApp` + # @return [Boolean] + attr_accessor :can_handle_code_in_app + alias_method :can_handle_code_in_app?, :can_handle_code_in_app + # The recaptcha response from the user. # Corresponds to the JSON property `captchaResp` # @return [String] @@ -1315,11 +1348,26 @@ module Google # @return [String] attr_accessor :challenge + # The url to continue to the Gitkit app + # Corresponds to the JSON property `continueUrl` + # @return [String] + attr_accessor :continue_url + # The email of the user. # Corresponds to the JSON property `email` # @return [String] attr_accessor :email + # iOS app store id to download the app if it's not already installed + # Corresponds to the JSON property `iOSAppStoreId` + # @return [String] + attr_accessor :i_os_app_store_id + + # the iOS bundle id of iOS app to handle the action code + # Corresponds to the JSON property `iOSBundleId` + # @return [String] + attr_accessor :i_os_bundle_id + # The user's Gitkit login token for email change. # Corresponds to the JSON property `idToken` # @return [String] @@ -1351,9 +1399,16 @@ module Google # Update properties of this object def update!(**args) + @android_install_app = args[:android_install_app] if args.key?(:android_install_app) + @android_minimum_version = args[:android_minimum_version] if args.key?(:android_minimum_version) + @android_package_name = args[:android_package_name] if args.key?(:android_package_name) + @can_handle_code_in_app = args[:can_handle_code_in_app] if args.key?(:can_handle_code_in_app) @captcha_resp = args[:captcha_resp] if args.key?(:captcha_resp) @challenge = args[:challenge] if args.key?(:challenge) + @continue_url = args[:continue_url] if args.key?(:continue_url) @email = args[:email] if args.key?(:email) + @i_os_app_store_id = args[:i_os_app_store_id] if args.key?(:i_os_app_store_id) + @i_os_bundle_id = args[:i_os_bundle_id] if args.key?(:i_os_bundle_id) @id_token = args[:id_token] if args.key?(:id_token) @kind = args[:kind] if args.key?(:kind) @new_email = args[:new_email] if args.key?(:new_email) diff --git a/generated/google/apis/identitytoolkit_v3/representations.rb b/generated/google/apis/identitytoolkit_v3/representations.rb index d4603231f..37592a723 100644 --- a/generated/google/apis/identitytoolkit_v3/representations.rb +++ b/generated/google/apis/identitytoolkit_v3/representations.rb @@ -498,6 +498,7 @@ module Google class VerifyAssertionRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + property :auto_create, as: 'autoCreate' property :delegated_project_number, as: 'delegatedProjectNumber' property :id_token, as: 'idToken' property :instance_id, as: 'instanceId' @@ -551,9 +552,16 @@ module Google class Relyingparty # @private class Representation < Google::Apis::Core::JsonRepresentation + property :android_install_app, as: 'androidInstallApp' + property :android_minimum_version, as: 'androidMinimumVersion' + property :android_package_name, as: 'androidPackageName' + property :can_handle_code_in_app, as: 'canHandleCodeInApp' property :captcha_resp, as: 'captchaResp' property :challenge, as: 'challenge' + property :continue_url, as: 'continueUrl' property :email, as: 'email' + property :i_os_app_store_id, as: 'iOSAppStoreId' + property :i_os_bundle_id, as: 'iOSBundleId' property :id_token, as: 'idToken' property :kind, as: 'kind' property :new_email, as: 'newEmail' diff --git a/generated/google/apis/kgsearch_v1/service.rb b/generated/google/apis/kgsearch_v1/service.rb index a65a6ca0b..f5e66d2e2 100644 --- a/generated/google/apis/kgsearch_v1/service.rb +++ b/generated/google/apis/kgsearch_v1/service.rb @@ -68,11 +68,11 @@ module Google # returned entities will contain one or more of these types. # @param [Boolean] indent # Enables indenting of json results. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -85,7 +85,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 search_entities(languages: nil, ids: nil, limit: nil, prefix: nil, query: nil, types: nil, indent: nil, fields: nil, quota_user: nil, options: nil, &block) + def search_entities(languages: nil, ids: nil, limit: nil, prefix: nil, query: nil, types: nil, indent: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/entities:search', options) command.response_representation = Google::Apis::KgsearchV1::SearchResponse::Representation command.response_class = Google::Apis::KgsearchV1::SearchResponse @@ -96,8 +96,8 @@ module Google command.query['query'] = query unless query.nil? command.query['types'] = types unless types.nil? command.query['indent'] = indent unless indent.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/language_v1beta1.rb b/generated/google/apis/language_v1beta1.rb index ec9102b8a..2fdd19797 100644 --- a/generated/google/apis/language_v1beta1.rb +++ b/generated/google/apis/language_v1beta1.rb @@ -27,7 +27,7 @@ module Google # @see https://cloud.google.com/natural-language/ module LanguageV1beta1 VERSION = 'V1beta1' - REVISION = '20170301' + REVISION = '20170320' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/language_v1beta1/classes.rb b/generated/google/apis/language_v1beta1/classes.rb index c1b4453b3..e78e98c37 100644 --- a/generated/google/apis/language_v1beta1/classes.rb +++ b/generated/google/apis/language_v1beta1/classes.rb @@ -22,21 +22,263 @@ module Google module Apis module LanguageV1beta1 - # The entity analysis response message. - class AnalyzeEntitiesResponse + # Represents the smallest syntactic building block of the text. + class Token include Google::Apis::Core::Hashable - # The language of the text, which will be the same as the language specified - # in the request or, if not specified, the automatically-detected language. - # See Document.language field for more details. + # Represents part of speech information for a token. + # Corresponds to the JSON property `partOfSpeech` + # @return [Google::Apis::LanguageV1beta1::PartOfSpeech] + attr_accessor :part_of_speech + + # Represents an output piece of text. + # Corresponds to the JSON property `text` + # @return [Google::Apis::LanguageV1beta1::TextSpan] + attr_accessor :text + + # Represents dependency parse tree information for a token. + # Corresponds to the JSON property `dependencyEdge` + # @return [Google::Apis::LanguageV1beta1::DependencyEdge] + attr_accessor :dependency_edge + + # [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. + # Corresponds to the JSON property `lemma` + # @return [String] + attr_accessor :lemma + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @part_of_speech = args[:part_of_speech] if args.key?(:part_of_speech) + @text = args[:text] if args.key?(:text) + @dependency_edge = args[:dependency_edge] if args.key?(:dependency_edge) + @lemma = args[:lemma] if args.key?(:lemma) + end + end + + # Represents an output piece of text. + class TextSpan + include Google::Apis::Core::Hashable + + # The content of the output text. + # Corresponds to the JSON property `content` + # @return [String] + attr_accessor :content + + # The API calculates the beginning offset of the content in the original + # document according to the EncodingType specified in the API request. + # Corresponds to the JSON property `beginOffset` + # @return [Fixnum] + attr_accessor :begin_offset + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @content = args[:content] if args.key?(:content) + @begin_offset = args[:begin_offset] if args.key?(:begin_offset) + end + end + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` which can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting purpose. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + class Status + include Google::Apis::Core::Hashable + + # A list of messages that carry the error details. There will be a + # common set of message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # google.rpc.Status.details field, or localized by the client. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @details = args[:details] if args.key?(:details) + @code = args[:code] if args.key?(:code) + @message = args[:message] if args.key?(:message) + end + end + + # Represents a mention for an entity in the text. Currently, proper noun + # mentions are supported. + class EntityMention + include Google::Apis::Core::Hashable + + # Represents an output piece of text. + # Corresponds to the JSON property `text` + # @return [Google::Apis::LanguageV1beta1::TextSpan] + attr_accessor :text + + # The type of the entity mention. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @text = args[:text] if args.key?(:text) + @type = args[:type] if args.key?(:type) + end + end + + # All available features for sentiment, syntax, and semantic analysis. + # Setting each one to true will enable that specific analysis for the input. + class Features + include Google::Apis::Core::Hashable + + # Extract syntax information. + # Corresponds to the JSON property `extractSyntax` + # @return [Boolean] + attr_accessor :extract_syntax + alias_method :extract_syntax?, :extract_syntax + + # Extract document-level sentiment. + # Corresponds to the JSON property `extractDocumentSentiment` + # @return [Boolean] + attr_accessor :extract_document_sentiment + alias_method :extract_document_sentiment?, :extract_document_sentiment + + # Extract entities. + # Corresponds to the JSON property `extractEntities` + # @return [Boolean] + attr_accessor :extract_entities + alias_method :extract_entities?, :extract_entities + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @extract_syntax = args[:extract_syntax] if args.key?(:extract_syntax) + @extract_document_sentiment = args[:extract_document_sentiment] if args.key?(:extract_document_sentiment) + @extract_entities = args[:extract_entities] if args.key?(:extract_entities) + end + end + + # Represents a sentence in the input document. + class Sentence + include Google::Apis::Core::Hashable + + # Represents an output piece of text. + # Corresponds to the JSON property `text` + # @return [Google::Apis::LanguageV1beta1::TextSpan] + attr_accessor :text + + # Represents the feeling associated with the entire text or entities in + # the text. + # Corresponds to the JSON property `sentiment` + # @return [Google::Apis::LanguageV1beta1::Sentiment] + attr_accessor :sentiment + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @text = args[:text] if args.key?(:text) + @sentiment = args[:sentiment] if args.key?(:sentiment) + end + end + + # ################################################################ # + # Represents the input to API methods. + class Document + include Google::Apis::Core::Hashable + + # The language of the document (if not specified, the language is + # automatically detected). Both ISO and BCP-47 language codes are + # accepted.
+ # **Current Language Restrictions:** + # * Only English, Spanish, and Japanese textual content are supported. + # If the language (either specified by the caller or automatically detected) + # is not supported by the called API method, an `INVALID_ARGUMENT` error + # is returned. # Corresponds to the JSON property `language` # @return [String] attr_accessor :language - # The recognized entities in the input document. - # Corresponds to the JSON property `entities` - # @return [Array] - attr_accessor :entities + # Required. If the type is not set or is `TYPE_UNSPECIFIED`, + # returns an `INVALID_ARGUMENT` error. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The content of the input in string format. + # Corresponds to the JSON property `content` + # @return [String] + attr_accessor :content + + # The Google Cloud Storage URI where the file content is located. + # This URI must be of the form: gs://bucket_name/object_name. For more + # details, see https://cloud.google.com/storage/docs/reference-uris. + # NOTE: Cloud Storage object versioning is not supported. + # Corresponds to the JSON property `gcsContentUri` + # @return [String] + attr_accessor :gcs_content_uri def initialize(**args) update!(**args) @@ -45,7 +287,243 @@ module Google # Update properties of this object def update!(**args) @language = args[:language] if args.key?(:language) + @type = args[:type] if args.key?(:type) + @content = args[:content] if args.key?(:content) + @gcs_content_uri = args[:gcs_content_uri] if args.key?(:gcs_content_uri) + end + end + + # Represents the feeling associated with the entire text or entities in + # the text. + class Sentiment + include Google::Apis::Core::Hashable + + # DEPRECATED FIELD - This field is being deprecated in + # favor of score. Please refer to our documentation at + # https://cloud.google.com/natural-language/docs for more information. + # Corresponds to the JSON property `polarity` + # @return [Float] + attr_accessor :polarity + + # Sentiment score between -1.0 (negative sentiment) and 1.0 + # (positive sentiment). + # Corresponds to the JSON property `score` + # @return [Float] + attr_accessor :score + + # A non-negative number in the [0, +inf) range, which represents + # the absolute magnitude of sentiment regardless of score (positive or + # negative). + # Corresponds to the JSON property `magnitude` + # @return [Float] + attr_accessor :magnitude + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @polarity = args[:polarity] if args.key?(:polarity) + @score = args[:score] if args.key?(:score) + @magnitude = args[:magnitude] if args.key?(:magnitude) + end + end + + # The entity analysis request message. + class AnalyzeEntitiesRequest + include Google::Apis::Core::Hashable + + # ################################################################ # + # Represents the input to API methods. + # Corresponds to the JSON property `document` + # @return [Google::Apis::LanguageV1beta1::Document] + attr_accessor :document + + # The encoding type used by the API to calculate offsets. + # Corresponds to the JSON property `encodingType` + # @return [String] + attr_accessor :encoding_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @document = args[:document] if args.key?(:document) + @encoding_type = args[:encoding_type] if args.key?(:encoding_type) + end + end + + # Represents part of speech information for a token. + class PartOfSpeech + include Google::Apis::Core::Hashable + + # The grammatical form. + # Corresponds to the JSON property `form` + # @return [String] + attr_accessor :form + + # The grammatical number. + # Corresponds to the JSON property `number` + # @return [String] + attr_accessor :number + + # The grammatical voice. + # Corresponds to the JSON property `voice` + # @return [String] + attr_accessor :voice + + # The grammatical aspect. + # Corresponds to the JSON property `aspect` + # @return [String] + attr_accessor :aspect + + # The grammatical mood. + # Corresponds to the JSON property `mood` + # @return [String] + attr_accessor :mood + + # The part of speech tag. + # Corresponds to the JSON property `tag` + # @return [String] + attr_accessor :tag + + # The grammatical gender. + # Corresponds to the JSON property `gender` + # @return [String] + attr_accessor :gender + + # The grammatical person. + # Corresponds to the JSON property `person` + # @return [String] + attr_accessor :person + + # The grammatical properness. + # Corresponds to the JSON property `proper` + # @return [String] + attr_accessor :proper + + # The grammatical case. + # Corresponds to the JSON property `case` + # @return [String] + attr_accessor :case + + # The grammatical tense. + # Corresponds to the JSON property `tense` + # @return [String] + attr_accessor :tense + + # The grammatical reciprocity. + # Corresponds to the JSON property `reciprocity` + # @return [String] + attr_accessor :reciprocity + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @form = args[:form] if args.key?(:form) + @number = args[:number] if args.key?(:number) + @voice = args[:voice] if args.key?(:voice) + @aspect = args[:aspect] if args.key?(:aspect) + @mood = args[:mood] if args.key?(:mood) + @tag = args[:tag] if args.key?(:tag) + @gender = args[:gender] if args.key?(:gender) + @person = args[:person] if args.key?(:person) + @proper = args[:proper] if args.key?(:proper) + @case = args[:case] if args.key?(:case) + @tense = args[:tense] if args.key?(:tense) + @reciprocity = args[:reciprocity] if args.key?(:reciprocity) + end + end + + # The syntax analysis request message. + class AnalyzeSyntaxRequest + include Google::Apis::Core::Hashable + + # The encoding type used by the API to calculate offsets. + # Corresponds to the JSON property `encodingType` + # @return [String] + attr_accessor :encoding_type + + # ################################################################ # + # Represents the input to API methods. + # Corresponds to the JSON property `document` + # @return [Google::Apis::LanguageV1beta1::Document] + attr_accessor :document + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @encoding_type = args[:encoding_type] if args.key?(:encoding_type) + @document = args[:document] if args.key?(:document) + end + end + + # The sentiment analysis response message. + class AnalyzeSentimentResponse + include Google::Apis::Core::Hashable + + # The language of the text, which will be the same as the language specified + # in the request or, if not specified, the automatically-detected language. + # Corresponds to the JSON property `language` + # @return [String] + attr_accessor :language + + # The sentiment for all the sentences in the document. + # Corresponds to the JSON property `sentences` + # @return [Array] + attr_accessor :sentences + + # Represents the feeling associated with the entire text or entities in + # the text. + # Corresponds to the JSON property `documentSentiment` + # @return [Google::Apis::LanguageV1beta1::Sentiment] + attr_accessor :document_sentiment + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @language = args[:language] if args.key?(:language) + @sentences = args[:sentences] if args.key?(:sentences) + @document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment) + end + end + + # The entity analysis response message. + class AnalyzeEntitiesResponse + include Google::Apis::Core::Hashable + + # The recognized entities in the input document. + # Corresponds to the JSON property `entities` + # @return [Array] + attr_accessor :entities + + # The language of the text, which will be the same as the language specified + # in the request or, if not specified, the automatically-detected language. + # See Document.language field for more details. + # Corresponds to the JSON property `language` + # @return [String] + attr_accessor :language + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) @entities = args[:entities] if args.key?(:entities) + @language = args[:language] if args.key?(:language) end end @@ -199,12 +677,6 @@ module Google class AnnotateTextResponse include Google::Apis::Core::Hashable - # Represents the feeling associated with the entire text or entities in - # the text. - # Corresponds to the JSON property `documentSentiment` - # @return [Google::Apis::LanguageV1beta1::Sentiment] - attr_accessor :document_sentiment - # The language of the text, which will be the same as the language specified # in the request or, if not specified, the automatically-detected language. # See Document.language field for more details. @@ -232,17 +704,23 @@ module Google # @return [Array] attr_accessor :entities + # Represents the feeling associated with the entire text or entities in + # the text. + # Corresponds to the JSON property `documentSentiment` + # @return [Google::Apis::LanguageV1beta1::Sentiment] + attr_accessor :document_sentiment + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment) @language = args[:language] if args.key?(:language) @sentences = args[:sentences] if args.key?(:sentences) @tokens = args[:tokens] if args.key?(:tokens) @entities = args[:entities] if args.key?(:entities) + @document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment) end end @@ -250,11 +728,6 @@ module Google class DependencyEdge include Google::Apis::Core::Hashable - # The parse label for the token. - # Corresponds to the JSON property `label` - # @return [String] - attr_accessor :label - # Represents the head of this token in the dependency tree. # This is the index of the token which has an arc going to this token. # The index is the position of the token in the array of tokens returned @@ -264,492 +737,19 @@ module Google # @return [Fixnum] attr_accessor :head_token_index + # The parse label for the token. + # Corresponds to the JSON property `label` + # @return [String] + attr_accessor :label + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @label = args[:label] if args.key?(:label) @head_token_index = args[:head_token_index] if args.key?(:head_token_index) - end - end - - # Represents an output piece of text. - class TextSpan - include Google::Apis::Core::Hashable - - # The API calculates the beginning offset of the content in the original - # document according to the EncodingType specified in the API request. - # Corresponds to the JSON property `beginOffset` - # @return [Fixnum] - attr_accessor :begin_offset - - # The content of the output text. - # Corresponds to the JSON property `content` - # @return [String] - attr_accessor :content - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @begin_offset = args[:begin_offset] if args.key?(:begin_offset) - @content = args[:content] if args.key?(:content) - end - end - - # Represents the smallest syntactic building block of the text. - class Token - include Google::Apis::Core::Hashable - - # Represents an output piece of text. - # Corresponds to the JSON property `text` - # @return [Google::Apis::LanguageV1beta1::TextSpan] - attr_accessor :text - - # Represents dependency parse tree information for a token. - # Corresponds to the JSON property `dependencyEdge` - # @return [Google::Apis::LanguageV1beta1::DependencyEdge] - attr_accessor :dependency_edge - - # [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token. - # Corresponds to the JSON property `lemma` - # @return [String] - attr_accessor :lemma - - # Represents part of speech information for a token. - # Corresponds to the JSON property `partOfSpeech` - # @return [Google::Apis::LanguageV1beta1::PartOfSpeech] - attr_accessor :part_of_speech - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @text = args[:text] if args.key?(:text) - @dependency_edge = args[:dependency_edge] if args.key?(:dependency_edge) - @lemma = args[:lemma] if args.key?(:lemma) - @part_of_speech = args[:part_of_speech] if args.key?(:part_of_speech) - end - end - - # The `Status` type defines a logical error model that is suitable for different - # programming environments, including REST APIs and RPC APIs. It is used by - # [gRPC](https://github.com/grpc). The error model is designed to be: - # - Simple to use and understand for most users - # - Flexible enough to meet unexpected needs - # # Overview - # The `Status` message contains three pieces of data: error code, error message, - # and error details. The error code should be an enum value of - # google.rpc.Code, but it may accept additional error codes if needed. The - # error message should be a developer-facing English message that helps - # developers *understand* and *resolve* the error. If a localized user-facing - # error message is needed, put the localized message in the error details or - # localize it in the client. The optional error details may contain arbitrary - # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. - # # Language mapping - # The `Status` message is the logical representation of the error model, but it - # is not necessarily the actual wire format. When the `Status` message is - # exposed in different client libraries and different wire protocols, it can be - # mapped differently. For example, it will likely be mapped to some exceptions - # in Java, but more likely mapped to some error codes in C. - # # Other uses - # The error model and the `Status` message can be used in a variety of - # environments, either with or without APIs, to provide a - # consistent developer experience across different environments. - # Example uses of this error model include: - # - Partial errors. If a service needs to return partial errors to the client, - # it may embed the `Status` in the normal response to indicate the partial - # errors. - # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. - # - Batch operations. If a client uses batch request and batch response, the - # `Status` message should be used directly inside batch response, one for - # each error sub-response. - # - Asynchronous operations. If an API call embeds asynchronous operation - # results in its response, the status of those operations should be - # represented directly using the `Status` message. - # - Logging. If some API errors are stored in logs, the message `Status` could - # be used directly after any stripping needed for security/privacy reasons. - class Status - include Google::Apis::Core::Hashable - - # The status code, which should be an enum value of google.rpc.Code. - # Corresponds to the JSON property `code` - # @return [Fixnum] - attr_accessor :code - - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # google.rpc.Status.details field, or localized by the client. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - # A list of messages that carry the error details. There will be a - # common set of message types for APIs to use. - # Corresponds to the JSON property `details` - # @return [Array>] - attr_accessor :details - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @code = args[:code] if args.key?(:code) - @message = args[:message] if args.key?(:message) - @details = args[:details] if args.key?(:details) - end - end - - # All available features for sentiment, syntax, and semantic analysis. - # Setting each one to true will enable that specific analysis for the input. - class Features - include Google::Apis::Core::Hashable - - # Extract syntax information. - # Corresponds to the JSON property `extractSyntax` - # @return [Boolean] - attr_accessor :extract_syntax - alias_method :extract_syntax?, :extract_syntax - - # Extract document-level sentiment. - # Corresponds to the JSON property `extractDocumentSentiment` - # @return [Boolean] - attr_accessor :extract_document_sentiment - alias_method :extract_document_sentiment?, :extract_document_sentiment - - # Extract entities. - # Corresponds to the JSON property `extractEntities` - # @return [Boolean] - attr_accessor :extract_entities - alias_method :extract_entities?, :extract_entities - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @extract_syntax = args[:extract_syntax] if args.key?(:extract_syntax) - @extract_document_sentiment = args[:extract_document_sentiment] if args.key?(:extract_document_sentiment) - @extract_entities = args[:extract_entities] if args.key?(:extract_entities) - end - end - - # Represents a mention for an entity in the text. Currently, proper noun - # mentions are supported. - class EntityMention - include Google::Apis::Core::Hashable - - # Represents an output piece of text. - # Corresponds to the JSON property `text` - # @return [Google::Apis::LanguageV1beta1::TextSpan] - attr_accessor :text - - # The type of the entity mention. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @text = args[:text] if args.key?(:text) - @type = args[:type] if args.key?(:type) - end - end - - # ################################################################ # - # Represents the input to API methods. - class Document - include Google::Apis::Core::Hashable - - # Required. If the type is not set or is `TYPE_UNSPECIFIED`, - # returns an `INVALID_ARGUMENT` error. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The content of the input in string format. - # Corresponds to the JSON property `content` - # @return [String] - attr_accessor :content - - # The Google Cloud Storage URI where the file content is located. - # This URI must be of the form: gs://bucket_name/object_name. For more - # details, see https://cloud.google.com/storage/docs/reference-uris. - # NOTE: Cloud Storage object versioning is not supported. - # Corresponds to the JSON property `gcsContentUri` - # @return [String] - attr_accessor :gcs_content_uri - - # The language of the document (if not specified, the language is - # automatically detected). Both ISO and BCP-47 language codes are - # accepted.
- # **Current Language Restrictions:** - # * Only English, Spanish, and Japanese textual content are supported. - # If the language (either specified by the caller or automatically detected) - # is not supported by the called API method, an `INVALID_ARGUMENT` error - # is returned. - # Corresponds to the JSON property `language` - # @return [String] - attr_accessor :language - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] if args.key?(:type) - @content = args[:content] if args.key?(:content) - @gcs_content_uri = args[:gcs_content_uri] if args.key?(:gcs_content_uri) - @language = args[:language] if args.key?(:language) - end - end - - # Represents a sentence in the input document. - class Sentence - include Google::Apis::Core::Hashable - - # Represents an output piece of text. - # Corresponds to the JSON property `text` - # @return [Google::Apis::LanguageV1beta1::TextSpan] - attr_accessor :text - - # Represents the feeling associated with the entire text or entities in - # the text. - # Corresponds to the JSON property `sentiment` - # @return [Google::Apis::LanguageV1beta1::Sentiment] - attr_accessor :sentiment - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @text = args[:text] if args.key?(:text) - @sentiment = args[:sentiment] if args.key?(:sentiment) - end - end - - # The entity analysis request message. - class AnalyzeEntitiesRequest - include Google::Apis::Core::Hashable - - # ################################################################ # - # Represents the input to API methods. - # Corresponds to the JSON property `document` - # @return [Google::Apis::LanguageV1beta1::Document] - attr_accessor :document - - # The encoding type used by the API to calculate offsets. - # Corresponds to the JSON property `encodingType` - # @return [String] - attr_accessor :encoding_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @document = args[:document] if args.key?(:document) - @encoding_type = args[:encoding_type] if args.key?(:encoding_type) - end - end - - # Represents the feeling associated with the entire text or entities in - # the text. - class Sentiment - include Google::Apis::Core::Hashable - - # DEPRECATED FIELD - This field is being deprecated in - # favor of score. Please refer to our documentation at - # https://cloud.google.com/natural-language/docs for more information. - # Corresponds to the JSON property `polarity` - # @return [Float] - attr_accessor :polarity - - # Sentiment score between -1.0 (negative sentiment) and 1.0 - # (positive sentiment). - # Corresponds to the JSON property `score` - # @return [Float] - attr_accessor :score - - # A non-negative number in the [0, +inf) range, which represents - # the absolute magnitude of sentiment regardless of score (positive or - # negative). - # Corresponds to the JSON property `magnitude` - # @return [Float] - attr_accessor :magnitude - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @polarity = args[:polarity] if args.key?(:polarity) - @score = args[:score] if args.key?(:score) - @magnitude = args[:magnitude] if args.key?(:magnitude) - end - end - - # Represents part of speech information for a token. - class PartOfSpeech - include Google::Apis::Core::Hashable - - # The grammatical voice. - # Corresponds to the JSON property `voice` - # @return [String] - attr_accessor :voice - - # The grammatical aspect. - # Corresponds to the JSON property `aspect` - # @return [String] - attr_accessor :aspect - - # The grammatical mood. - # Corresponds to the JSON property `mood` - # @return [String] - attr_accessor :mood - - # The part of speech tag. - # Corresponds to the JSON property `tag` - # @return [String] - attr_accessor :tag - - # The grammatical gender. - # Corresponds to the JSON property `gender` - # @return [String] - attr_accessor :gender - - # The grammatical person. - # Corresponds to the JSON property `person` - # @return [String] - attr_accessor :person - - # The grammatical properness. - # Corresponds to the JSON property `proper` - # @return [String] - attr_accessor :proper - - # The grammatical case. - # Corresponds to the JSON property `case` - # @return [String] - attr_accessor :case - - # The grammatical tense. - # Corresponds to the JSON property `tense` - # @return [String] - attr_accessor :tense - - # The grammatical reciprocity. - # Corresponds to the JSON property `reciprocity` - # @return [String] - attr_accessor :reciprocity - - # The grammatical form. - # Corresponds to the JSON property `form` - # @return [String] - attr_accessor :form - - # The grammatical number. - # Corresponds to the JSON property `number` - # @return [String] - attr_accessor :number - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @voice = args[:voice] if args.key?(:voice) - @aspect = args[:aspect] if args.key?(:aspect) - @mood = args[:mood] if args.key?(:mood) - @tag = args[:tag] if args.key?(:tag) - @gender = args[:gender] if args.key?(:gender) - @person = args[:person] if args.key?(:person) - @proper = args[:proper] if args.key?(:proper) - @case = args[:case] if args.key?(:case) - @tense = args[:tense] if args.key?(:tense) - @reciprocity = args[:reciprocity] if args.key?(:reciprocity) - @form = args[:form] if args.key?(:form) - @number = args[:number] if args.key?(:number) - end - end - - # The syntax analysis request message. - class AnalyzeSyntaxRequest - include Google::Apis::Core::Hashable - - # ################################################################ # - # Represents the input to API methods. - # Corresponds to the JSON property `document` - # @return [Google::Apis::LanguageV1beta1::Document] - attr_accessor :document - - # The encoding type used by the API to calculate offsets. - # Corresponds to the JSON property `encodingType` - # @return [String] - attr_accessor :encoding_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @document = args[:document] if args.key?(:document) - @encoding_type = args[:encoding_type] if args.key?(:encoding_type) - end - end - - # The sentiment analysis response message. - class AnalyzeSentimentResponse - include Google::Apis::Core::Hashable - - # Represents the feeling associated with the entire text or entities in - # the text. - # Corresponds to the JSON property `documentSentiment` - # @return [Google::Apis::LanguageV1beta1::Sentiment] - attr_accessor :document_sentiment - - # The language of the text, which will be the same as the language specified - # in the request or, if not specified, the automatically-detected language. - # Corresponds to the JSON property `language` - # @return [String] - attr_accessor :language - - # The sentiment for all the sentences in the document. - # Corresponds to the JSON property `sentences` - # @return [Array] - attr_accessor :sentences - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @document_sentiment = args[:document_sentiment] if args.key?(:document_sentiment) - @language = args[:language] if args.key?(:language) - @sentences = args[:sentences] if args.key?(:sentences) + @label = args[:label] if args.key?(:label) end end end diff --git a/generated/google/apis/language_v1beta1/representations.rb b/generated/google/apis/language_v1beta1/representations.rb index 71d1e583a..97c10adf8 100644 --- a/generated/google/apis/language_v1beta1/representations.rb +++ b/generated/google/apis/language_v1beta1/representations.rb @@ -22,6 +22,78 @@ module Google module Apis module LanguageV1beta1 + class Token + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TextSpan + 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 EntityMention + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Features + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Sentence + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Document + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Sentiment + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AnalyzeEntitiesRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PartOfSpeech + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AnalyzeSyntaxRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AnalyzeSentimentResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class AnalyzeEntitiesResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -64,84 +136,136 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class TextSpan - class Representation < Google::Apis::Core::JsonRepresentation; end + class Token + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :part_of_speech, as: 'partOfSpeech', class: Google::Apis::LanguageV1beta1::PartOfSpeech, decorator: Google::Apis::LanguageV1beta1::PartOfSpeech::Representation - include Google::Apis::Core::JsonObjectSupport + property :text, as: 'text', class: Google::Apis::LanguageV1beta1::TextSpan, decorator: Google::Apis::LanguageV1beta1::TextSpan::Representation + + property :dependency_edge, as: 'dependencyEdge', class: Google::Apis::LanguageV1beta1::DependencyEdge, decorator: Google::Apis::LanguageV1beta1::DependencyEdge::Representation + + property :lemma, as: 'lemma' + end end - class Token - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + class TextSpan + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :content, as: 'content' + property :begin_offset, as: 'beginOffset' + end end class Status - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Features - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :details, as: 'details' + property :code, as: 'code' + property :message, as: 'message' + end end class EntityMention - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :text, as: 'text', class: Google::Apis::LanguageV1beta1::TextSpan, decorator: Google::Apis::LanguageV1beta1::TextSpan::Representation - include Google::Apis::Core::JsonObjectSupport + property :type, as: 'type' + end end - class Document - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + class Features + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :extract_syntax, as: 'extractSyntax' + property :extract_document_sentiment, as: 'extractDocumentSentiment' + property :extract_entities, as: 'extractEntities' + end end class Sentence - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :text, as: 'text', class: Google::Apis::LanguageV1beta1::TextSpan, decorator: Google::Apis::LanguageV1beta1::TextSpan::Representation - include Google::Apis::Core::JsonObjectSupport + property :sentiment, as: 'sentiment', class: Google::Apis::LanguageV1beta1::Sentiment, decorator: Google::Apis::LanguageV1beta1::Sentiment::Representation + + end end - class AnalyzeEntitiesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + class Document + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :language, as: 'language' + property :type, as: 'type' + property :content, as: 'content' + property :gcs_content_uri, as: 'gcsContentUri' + end end class Sentiment - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :polarity, as: 'polarity' + property :score, as: 'score' + property :magnitude, as: 'magnitude' + end + end - include Google::Apis::Core::JsonObjectSupport + class AnalyzeEntitiesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :document, as: 'document', class: Google::Apis::LanguageV1beta1::Document, decorator: Google::Apis::LanguageV1beta1::Document::Representation + + property :encoding_type, as: 'encodingType' + end end class PartOfSpeech - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :form, as: 'form' + property :number, as: 'number' + property :voice, as: 'voice' + property :aspect, as: 'aspect' + property :mood, as: 'mood' + property :tag, as: 'tag' + property :gender, as: 'gender' + property :person, as: 'person' + property :proper, as: 'proper' + property :case, as: 'case' + property :tense, as: 'tense' + property :reciprocity, as: 'reciprocity' + end end class AnalyzeSyntaxRequest - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :encoding_type, as: 'encodingType' + property :document, as: 'document', class: Google::Apis::LanguageV1beta1::Document, decorator: Google::Apis::LanguageV1beta1::Document::Representation - include Google::Apis::Core::JsonObjectSupport + end end class AnalyzeSentimentResponse - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :language, as: 'language' + collection :sentences, as: 'sentences', class: Google::Apis::LanguageV1beta1::Sentence, decorator: Google::Apis::LanguageV1beta1::Sentence::Representation - include Google::Apis::Core::JsonObjectSupport + property :document_sentiment, as: 'documentSentiment', class: Google::Apis::LanguageV1beta1::Sentiment, decorator: Google::Apis::LanguageV1beta1::Sentiment::Representation + + end end class AnalyzeEntitiesResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :language, as: 'language' collection :entities, as: 'entities', class: Google::Apis::LanguageV1beta1::Entity, decorator: Google::Apis::LanguageV1beta1::Entity::Representation + property :language, as: 'language' end end @@ -191,8 +315,6 @@ module Google class AnnotateTextResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :document_sentiment, as: 'documentSentiment', class: Google::Apis::LanguageV1beta1::Sentiment, decorator: Google::Apis::LanguageV1beta1::Sentiment::Representation - property :language, as: 'language' collection :sentences, as: 'sentences', class: Google::Apis::LanguageV1beta1::Sentence, decorator: Google::Apis::LanguageV1beta1::Sentence::Representation @@ -200,138 +322,16 @@ module Google collection :entities, as: 'entities', class: Google::Apis::LanguageV1beta1::Entity, decorator: Google::Apis::LanguageV1beta1::Entity::Representation + property :document_sentiment, as: 'documentSentiment', class: Google::Apis::LanguageV1beta1::Sentiment, decorator: Google::Apis::LanguageV1beta1::Sentiment::Representation + end end class DependencyEdge # @private class Representation < Google::Apis::Core::JsonRepresentation - property :label, as: 'label' property :head_token_index, as: 'headTokenIndex' - end - end - - class TextSpan - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :begin_offset, as: 'beginOffset' - property :content, as: 'content' - end - end - - class Token - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :text, as: 'text', class: Google::Apis::LanguageV1beta1::TextSpan, decorator: Google::Apis::LanguageV1beta1::TextSpan::Representation - - property :dependency_edge, as: 'dependencyEdge', class: Google::Apis::LanguageV1beta1::DependencyEdge, decorator: Google::Apis::LanguageV1beta1::DependencyEdge::Representation - - property :lemma, as: 'lemma' - property :part_of_speech, as: 'partOfSpeech', class: Google::Apis::LanguageV1beta1::PartOfSpeech, decorator: Google::Apis::LanguageV1beta1::PartOfSpeech::Representation - - end - end - - class Status - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :code, as: 'code' - property :message, as: 'message' - collection :details, as: 'details' - end - end - - class Features - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :extract_syntax, as: 'extractSyntax' - property :extract_document_sentiment, as: 'extractDocumentSentiment' - property :extract_entities, as: 'extractEntities' - end - end - - class EntityMention - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :text, as: 'text', class: Google::Apis::LanguageV1beta1::TextSpan, decorator: Google::Apis::LanguageV1beta1::TextSpan::Representation - - property :type, as: 'type' - end - end - - class Document - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - property :content, as: 'content' - property :gcs_content_uri, as: 'gcsContentUri' - property :language, as: 'language' - end - end - - class Sentence - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :text, as: 'text', class: Google::Apis::LanguageV1beta1::TextSpan, decorator: Google::Apis::LanguageV1beta1::TextSpan::Representation - - property :sentiment, as: 'sentiment', class: Google::Apis::LanguageV1beta1::Sentiment, decorator: Google::Apis::LanguageV1beta1::Sentiment::Representation - - end - end - - class AnalyzeEntitiesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :document, as: 'document', class: Google::Apis::LanguageV1beta1::Document, decorator: Google::Apis::LanguageV1beta1::Document::Representation - - property :encoding_type, as: 'encodingType' - end - end - - class Sentiment - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :polarity, as: 'polarity' - property :score, as: 'score' - property :magnitude, as: 'magnitude' - end - end - - class PartOfSpeech - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :voice, as: 'voice' - property :aspect, as: 'aspect' - property :mood, as: 'mood' - property :tag, as: 'tag' - property :gender, as: 'gender' - property :person, as: 'person' - property :proper, as: 'proper' - property :case, as: 'case' - property :tense, as: 'tense' - property :reciprocity, as: 'reciprocity' - property :form, as: 'form' - property :number, as: 'number' - end - end - - class AnalyzeSyntaxRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :document, as: 'document', class: Google::Apis::LanguageV1beta1::Document, decorator: Google::Apis::LanguageV1beta1::Document::Representation - - property :encoding_type, as: 'encodingType' - end - end - - class AnalyzeSentimentResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :document_sentiment, as: 'documentSentiment', class: Google::Apis::LanguageV1beta1::Sentiment, decorator: Google::Apis::LanguageV1beta1::Sentiment::Representation - - property :language, as: 'language' - collection :sentences, as: 'sentences', class: Google::Apis::LanguageV1beta1::Sentence, decorator: Google::Apis::LanguageV1beta1::Sentence::Representation - + property :label, as: 'label' end end end diff --git a/generated/google/apis/language_v1beta1/service.rb b/generated/google/apis/language_v1beta1/service.rb index a80667cb2..e87b60079 100644 --- a/generated/google/apis/language_v1beta1/service.rb +++ b/generated/google/apis/language_v1beta1/service.rb @@ -34,16 +34,16 @@ module Google # # @see https://cloud.google.com/natural-language/ class CloudNaturalLanguageService < 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://language.googleapis.com/', '') end @@ -52,11 +52,11 @@ module Google # tokenization along with part of speech tags, dependency trees, and other # properties. # @param [Google::Apis::LanguageV1beta1::AnalyzeSyntaxRequest] analyze_syntax_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 # @@ -69,24 +69,24 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def analyze_document_syntax(analyze_syntax_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def analyze_document_syntax(analyze_syntax_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/documents:analyzeSyntax', options) command.request_representation = Google::Apis::LanguageV1beta1::AnalyzeSyntaxRequest::Representation command.request_object = analyze_syntax_request_object command.response_representation = Google::Apis::LanguageV1beta1::AnalyzeSyntaxResponse::Representation command.response_class = Google::Apis::LanguageV1beta1::AnalyzeSyntaxResponse - 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 # Analyzes the sentiment of the provided text. # @param [Google::Apis::LanguageV1beta1::AnalyzeSentimentRequest] analyze_sentiment_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -99,25 +99,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 analyze_document_sentiment(analyze_sentiment_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def analyze_document_sentiment(analyze_sentiment_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/documents:analyzeSentiment', options) command.request_representation = Google::Apis::LanguageV1beta1::AnalyzeSentimentRequest::Representation command.request_object = analyze_sentiment_request_object command.response_representation = Google::Apis::LanguageV1beta1::AnalyzeSentimentResponse::Representation command.response_class = Google::Apis::LanguageV1beta1::AnalyzeSentimentResponse - 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 # A convenience method that provides all the features that analyzeSentiment, # analyzeEntities, and analyzeSyntax provide in one call. # @param [Google::Apis::LanguageV1beta1::AnnotateTextRequest] annotate_text_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -130,25 +130,26 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def annotate_document_text(annotate_text_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def annotate_document_text(annotate_text_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/documents:annotateText', options) command.request_representation = Google::Apis::LanguageV1beta1::AnnotateTextRequest::Representation command.request_object = annotate_text_request_object command.response_representation = Google::Apis::LanguageV1beta1::AnnotateTextResponse::Representation command.response_class = Google::Apis::LanguageV1beta1::AnnotateTextResponse - 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 - # Finds named entities (currently finds proper names) in the text, - # entity types, salience, mentions for each entity, and other properties. + # Finds named entities (currently proper names and common nouns) in the text + # along with entity types, salience, mentions for each entity, and + # other properties. # @param [Google::Apis::LanguageV1beta1::AnalyzeEntitiesRequest] analyze_entities_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 # @@ -161,22 +162,22 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def analyze_document_entities(analyze_entities_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def analyze_document_entities(analyze_entities_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/documents:analyzeEntities', options) command.request_representation = Google::Apis::LanguageV1beta1::AnalyzeEntitiesRequest::Representation command.request_object = analyze_entities_request_object command.response_representation = Google::Apis::LanguageV1beta1::AnalyzeEntitiesResponse::Representation command.response_class = Google::Apis::LanguageV1beta1::AnalyzeEntitiesResponse - 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 protected def apply_command_defaults(command) - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? end end end diff --git a/generated/google/apis/licensing_v1.rb b/generated/google/apis/licensing_v1.rb index bbbf7bdfd..a942672af 100644 --- a/generated/google/apis/licensing_v1.rb +++ b/generated/google/apis/licensing_v1.rb @@ -20,12 +20,12 @@ module Google module Apis # Enterprise License Manager API # - # Licensing API to view and manage license for your domain. + # Views and manages licenses for your domain. # # @see https://developers.google.com/google-apps/licensing/ module LicensingV1 VERSION = 'V1' - REVISION = '20150901' + REVISION = '20170213' # View and manage G Suite licenses for your domain AUTH_APPS_LICENSING = 'https://www.googleapis.com/auth/apps.licensing' diff --git a/generated/google/apis/licensing_v1/classes.rb b/generated/google/apis/licensing_v1/classes.rb index 2b77e8b89..d127b563c 100644 --- a/generated/google/apis/licensing_v1/classes.rb +++ b/generated/google/apis/licensing_v1/classes.rb @@ -36,21 +36,31 @@ module Google # @return [String] attr_accessor :kind - # Name of the product. + # Id of the product. # Corresponds to the JSON property `productId` # @return [String] attr_accessor :product_id + # Display Name of the product. + # Corresponds to the JSON property `productName` + # @return [String] + attr_accessor :product_name + # Link to this page. # Corresponds to the JSON property `selfLink` # @return [String] attr_accessor :self_link - # Name of the sku of the product. + # Id of the sku of the product. # Corresponds to the JSON property `skuId` # @return [String] attr_accessor :sku_id + # Display Name of the sku of the product. + # Corresponds to the JSON property `skuName` + # @return [String] + attr_accessor :sku_name + # Email id of the user. # Corresponds to the JSON property `userId` # @return [String] @@ -65,8 +75,10 @@ module Google @etags = args[:etags] if args.key?(:etags) @kind = args[:kind] if args.key?(:kind) @product_id = args[:product_id] if args.key?(:product_id) + @product_name = args[:product_name] if args.key?(:product_name) @self_link = args[:self_link] if args.key?(:self_link) @sku_id = args[:sku_id] if args.key?(:sku_id) + @sku_name = args[:sku_name] if args.key?(:sku_name) @user_id = args[:user_id] if args.key?(:user_id) end end diff --git a/generated/google/apis/licensing_v1/representations.rb b/generated/google/apis/licensing_v1/representations.rb index 3c7fb4fcf..7e6645248 100644 --- a/generated/google/apis/licensing_v1/representations.rb +++ b/generated/google/apis/licensing_v1/representations.rb @@ -46,8 +46,10 @@ module Google property :etags, as: 'etags' property :kind, as: 'kind' property :product_id, as: 'productId' + property :product_name, as: 'productName' property :self_link, as: 'selfLink' property :sku_id, as: 'skuId' + property :sku_name, as: 'skuName' property :user_id, as: 'userId' end end diff --git a/generated/google/apis/licensing_v1/service.rb b/generated/google/apis/licensing_v1/service.rb index d9610ad48..bd9e40291 100644 --- a/generated/google/apis/licensing_v1/service.rb +++ b/generated/google/apis/licensing_v1/service.rb @@ -22,7 +22,7 @@ module Google module LicensingV1 # Enterprise License Manager API # - # Licensing API to view and manage license for your domain. + # Views and manages licenses for your domain. # # @example # require 'google/apis/licensing_v1' diff --git a/generated/google/apis/logging_v2beta1.rb b/generated/google/apis/logging_v2beta1.rb index 63c0d63e7..7294d328b 100644 --- a/generated/google/apis/logging_v2beta1.rb +++ b/generated/google/apis/logging_v2beta1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/logging/docs/ module LoggingV2beta1 VERSION = 'V2beta1' - REVISION = '20170306' + REVISION = '20170320' # View your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM_READ_ONLY = 'https://www.googleapis.com/auth/cloud-platform.read-only' diff --git a/generated/google/apis/logging_v2beta1/classes.rb b/generated/google/apis/logging_v2beta1/classes.rb index 132c50275..2850c66de 100644 --- a/generated/google/apis/logging_v2beta1/classes.rb +++ b/generated/google/apis/logging_v2beta1/classes.rb @@ -22,667 +22,55 @@ module Google module Apis module LoggingV2beta1 - # Result returned from ListLogs. - class ListLogsResponse - include Google::Apis::Core::Hashable - - # If there might be more results than those appearing in this response, then - # nextPageToken is included. To get the next set of results, call this method - # again using the value of nextPageToken as pageToken. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # A list of log names. For example, "projects/my-project/syslog" or " - # organizations/123/cloudresourcemanager.googleapis.com%2Factivity". - # Corresponds to the JSON property `logNames` - # @return [Array] - attr_accessor :log_names - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @log_names = args[:log_names] if args.key?(:log_names) - end - end - - # A common proto for logging HTTP requests. Only contains semantics defined by - # the HTTP specification. Product-specific logging information MUST be defined - # in a separate message. - class HttpRequest - include Google::Apis::Core::Hashable - - # The request processing latency on the server, from the time the request was - # received until the response was sent. - # Corresponds to the JSON property `latency` - # @return [String] - attr_accessor :latency - - # The user agent sent by the client. Example: "Mozilla/4.0 (compatible; MSIE 6.0; - # Windows 98; Q312461; .NET CLR 1.0.3705)". - # Corresponds to the JSON property `userAgent` - # @return [String] - attr_accessor :user_agent - - # The number of HTTP response bytes inserted into cache. Set only when a cache - # fill was attempted. - # Corresponds to the JSON property `cacheFillBytes` - # @return [String] - attr_accessor :cache_fill_bytes - - # The request method. Examples: "GET", "HEAD", "PUT", "POST". - # Corresponds to the JSON property `requestMethod` - # @return [String] - attr_accessor :request_method - - # The size of the HTTP request message in bytes, including the request headers - # and the request body. - # Corresponds to the JSON property `requestSize` - # @return [String] - attr_accessor :request_size - - # The size of the HTTP response message sent back to the client, in bytes, - # including the response headers and the response body. - # Corresponds to the JSON property `responseSize` - # @return [String] - attr_accessor :response_size - - # The scheme (http, https), the host name, the path and the query portion of the - # URL that was requested. Example: "http://example.com/some/info?color=red". - # Corresponds to the JSON property `requestUrl` - # @return [String] - attr_accessor :request_url - - # The IP address (IPv4 or IPv6) of the client that issued the HTTP request. - # Examples: "192.168.1.1", "FE80::0202:B3FF:FE1E:8329". - # Corresponds to the JSON property `remoteIp` - # @return [String] - attr_accessor :remote_ip - - # The IP address (IPv4 or IPv6) of the origin server that the request was sent - # to. - # Corresponds to the JSON property `serverIp` - # @return [String] - attr_accessor :server_ip - - # Whether or not a cache lookup was attempted. - # Corresponds to the JSON property `cacheLookup` - # @return [Boolean] - attr_accessor :cache_lookup - alias_method :cache_lookup?, :cache_lookup - - # Whether or not an entity was served from cache (with or without validation). - # Corresponds to the JSON property `cacheHit` - # @return [Boolean] - attr_accessor :cache_hit - alias_method :cache_hit?, :cache_hit - - # Whether or not the response was validated with the origin server before being - # served from cache. This field is only meaningful if cache_hit is True. - # Corresponds to the JSON property `cacheValidatedWithOriginServer` - # @return [Boolean] - attr_accessor :cache_validated_with_origin_server - alias_method :cache_validated_with_origin_server?, :cache_validated_with_origin_server - - # The response code indicating the status of response. Examples: 200, 404. - # Corresponds to the JSON property `status` - # @return [Fixnum] - attr_accessor :status - - # The referer URL of the request, as defined in HTTP/1.1 Header Field - # Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). - # Corresponds to the JSON property `referer` - # @return [String] - attr_accessor :referer - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @latency = args[:latency] if args.key?(:latency) - @user_agent = args[:user_agent] if args.key?(:user_agent) - @cache_fill_bytes = args[:cache_fill_bytes] if args.key?(:cache_fill_bytes) - @request_method = args[:request_method] if args.key?(:request_method) - @request_size = args[:request_size] if args.key?(:request_size) - @response_size = args[:response_size] if args.key?(:response_size) - @request_url = args[:request_url] if args.key?(:request_url) - @remote_ip = args[:remote_ip] if args.key?(:remote_ip) - @server_ip = args[:server_ip] if args.key?(:server_ip) - @cache_lookup = args[:cache_lookup] if args.key?(:cache_lookup) - @cache_hit = args[:cache_hit] if args.key?(:cache_hit) - @cache_validated_with_origin_server = args[:cache_validated_with_origin_server] if args.key?(:cache_validated_with_origin_server) - @status = args[:status] if args.key?(:status) - @referer = args[:referer] if args.key?(:referer) - end - end - - # Result returned from ListSinks. - class ListSinksResponse - include Google::Apis::Core::Hashable - - # A list of sinks. - # Corresponds to the JSON property `sinks` - # @return [Array] - attr_accessor :sinks - - # If there might be more results than appear in this response, then - # nextPageToken is included. To get the next set of results, call the same - # method again using the value of nextPageToken as pageToken. - # 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) - @sinks = args[:sinks] if args.key?(:sinks) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # A description of a label. - class LabelDescriptor - include Google::Apis::Core::Hashable - - # The label key. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - - # A human-readable description for the label. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The type of data that can be assigned to the label. - # Corresponds to the JSON property `valueType` - # @return [String] - attr_accessor :value_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @key = args[:key] if args.key?(:key) - @description = args[:description] if args.key?(:description) - @value_type = args[:value_type] if args.key?(:value_type) - end - end - - # An object that describes the schema of a MonitoredResource object using a type - # name and a set of labels. For example, the monitored resource descriptor for - # Google Compute Engine VM instances has a type of "gce_instance" and specifies - # the use of the labels "instance_id" and "zone" to identify particular VM - # instances.Different APIs can support different monitored resource types. APIs - # generally provide a list method that returns the monitored resource - # descriptors used by the API. - class MonitoredResourceDescriptor - include Google::Apis::Core::Hashable - - # Optional. The resource name of the monitored resource descriptor: "projects/` - # project_id`/monitoredResourceDescriptors/`type`" where `type` is the value of - # the type field in this object and `project_id` is a project ID that provides - # API-specific context for accessing the type. APIs that do not use project - # information can use the resource name format "monitoredResourceDescriptors/` - # type`". - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Optional. A concise name for the monitored resource type that might be - # displayed in user interfaces. It should be a Title Cased Noun Phrase, without - # any article or other determiners. For example, "Google Cloud SQL Database". - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # Optional. A detailed description of the monitored resource type that might be - # used in documentation. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Required. The monitored resource type. For example, the type " - # cloudsql_database" represents databases in Google Cloud SQL. The maximum - # length of this value is 256 characters. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Required. A set of labels used to describe instances of this monitored - # resource type. For example, an individual Google Cloud SQL database is - # identified by values for the labels "database_id" and "zone". - # Corresponds to the JSON property `labels` - # @return [Array] - attr_accessor :labels - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - @display_name = args[:display_name] if args.key?(:display_name) - @description = args[:description] if args.key?(:description) - @type = args[:type] if args.key?(:type) - @labels = args[:labels] if args.key?(:labels) - end - end - - # Additional information about the source code location that produced the log - # entry. - class LogEntrySourceLocation - include Google::Apis::Core::Hashable - - # Optional. Human-readable name of the function or method being invoked, with - # optional context such as the class or package name. This information may be - # used in contexts such as the logs viewer, where a file and line number are - # less meaningful. The format can vary by language. For example: qual.if.ied. - # Class.method (Java), dir/package.func (Go), function (Python). - # Corresponds to the JSON property `function` - # @return [String] - attr_accessor :function - - # Optional. Line within the source file. 1-based; 0 indicates no line number - # available. - # Corresponds to the JSON property `line` - # @return [String] - attr_accessor :line - - # Optional. Source file name. Depending on the runtime environment, this might - # be a simple name or a fully-qualified name. - # Corresponds to the JSON property `file` - # @return [String] - attr_accessor :file - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @function = args[:function] if args.key?(:function) - @line = args[:line] if args.key?(:line) - @file = args[:file] if args.key?(:file) - end - end - - # Result returned from ListLogEntries. - class ListLogEntriesResponse - include Google::Apis::Core::Hashable - - # A list of log entries. - # Corresponds to the JSON property `entries` - # @return [Array] - attr_accessor :entries - - # If there might be more results than those appearing in this response, then - # nextPageToken is included. To get the next set of results, call this method - # again using the value of nextPageToken as pageToken.If a value for - # next_page_token appears and the entries field is empty, it means that the - # search found no log entries so far but it did not have time to search all the - # possible log entries. Retry the method with this value for page_token to - # continue the search. Alternatively, consider speeding up the search by - # changing your filter to specify a single log name or resource type, or to - # narrow the time range of the search. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @entries = args[:entries] if args.key?(:entries) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # Application log line emitted while processing a request. - class LogLine - include Google::Apis::Core::Hashable - - # Approximate time when this log entry was made. - # Corresponds to the JSON property `time` - # @return [String] - attr_accessor :time - - # Severity of this log entry. - # Corresponds to the JSON property `severity` - # @return [String] - attr_accessor :severity - - # App-provided log message. - # Corresponds to the JSON property `logMessage` - # @return [String] - attr_accessor :log_message - - # Specifies a location in a source code file. - # Corresponds to the JSON property `sourceLocation` - # @return [Google::Apis::LoggingV2beta1::SourceLocation] - attr_accessor :source_location - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @time = args[:time] if args.key?(:time) - @severity = args[:severity] if args.key?(:severity) - @log_message = args[:log_message] if args.key?(:log_message) - @source_location = args[:source_location] if args.key?(:source_location) - end - end - - # Result returned from ListLogMetrics. - class ListLogMetricsResponse - include Google::Apis::Core::Hashable - - # A list of logs-based metrics. - # Corresponds to the JSON property `metrics` - # @return [Array] - attr_accessor :metrics - - # If there might be more results than appear in this response, then - # nextPageToken is included. To get the next set of results, call this method - # again using the value of nextPageToken as pageToken. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @metrics = args[:metrics] if args.key?(:metrics) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # A generic empty message that you can re-use to avoid defining duplicated empty - # messages in your APIs. A typical example is to use it as the request or the - # response type of an API method. For instance: - # service Foo ` - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # ` - # The JSON representation for Empty is empty JSON object ``. - class Empty - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # An individual entry in a log. - class LogEntry - include Google::Apis::Core::Hashable - - # Optional. Resource name of the trace associated with the log entry, if any. If - # it contains a relative resource name, the name is assumed to be relative to // - # tracing.googleapis.com. Example: projects/my-projectid/traces/ - # 06796866738c859f2f19b7cfb3214824 - # Corresponds to the JSON property `trace` - # @return [String] - attr_accessor :trace - - # Optional. A set of user-defined (key, value) data that provides additional - # information about the log entry. - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels - - # Optional. The severity of the log entry. The default value is LogSeverity. - # DEFAULT. - # Corresponds to the JSON property `severity` - # @return [String] - attr_accessor :severity - - # Additional information about the source code location that produced the log - # entry. - # Corresponds to the JSON property `sourceLocation` - # @return [Google::Apis::LoggingV2beta1::LogEntrySourceLocation] - attr_accessor :source_location - - # Optional. The time the event described by the log entry occurred. If omitted - # in a new log entry, Stackdriver Logging will insert the time the log entry is - # received. Stackdriver Logging might reject log entries whose time stamps are - # more than a couple of hours in the future. Log entries with time stamps in the - # past are accepted. - # Corresponds to the JSON property `timestamp` - # @return [String] - attr_accessor :timestamp - - # Required. The resource name of the log to which this log entry belongs: - # "projects/[PROJECT_ID]/logs/[LOG_ID]" - # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - # "folders/[FOLDER_ID]/logs/[LOG_ID]" - # [LOG_ID] must be URL-encoded within log_name. Example: "organizations/ - # 1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". [LOG_ID] must - # be less than 512 characters long and can only include the following characters: - # upper and lower case alphanumeric characters, forward-slash, underscore, - # hyphen, and period.For backward compatibility, if log_name begins with a - # forward-slash, such as /projects/..., then the log entry is ingested as usual - # but the forward-slash is removed. Listing the log entry will not show the - # leading slash and filtering for a log name with a leading slash will never - # return any results. - # Corresponds to the JSON property `logName` - # @return [String] - attr_accessor :log_name - - # A common proto for logging HTTP requests. Only contains semantics defined by - # the HTTP specification. Product-specific logging information MUST be defined - # in a separate message. - # Corresponds to the JSON property `httpRequest` - # @return [Google::Apis::LoggingV2beta1::HttpRequest] - attr_accessor :http_request - - # An object representing a resource that can be used for monitoring, logging, - # billing, or other purposes. Examples include virtual machine instances, - # databases, and storage devices such as disks. The type field identifies a - # MonitoredResourceDescriptor object that describes the resource's schema. - # Information in the labels field identifies the actual resource and its - # attributes according to the schema. For example, a particular Compute Engine - # VM instance could be represented by the following object, because the - # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and " - # zone": - # ` "type": "gce_instance", - # "labels": ` "instance_id": "12345678901234", - # "zone": "us-central1-a" `` - # Corresponds to the JSON property `resource` - # @return [Google::Apis::LoggingV2beta1::MonitoredResource] - attr_accessor :resource - - # The log entry payload, represented as a structure that is expressed as a JSON - # object. - # Corresponds to the JSON property `jsonPayload` - # @return [Hash] - attr_accessor :json_payload - - # Additional information about a potentially long-running operation with which a - # log entry is associated. - # Corresponds to the JSON property `operation` - # @return [Google::Apis::LoggingV2beta1::LogEntryOperation] - attr_accessor :operation - - # Optional. A unique identifier for the log entry. If you provide a value, then - # Stackdriver Logging considers other log entries in the same project, with the - # same timestamp, and with the same insert_id to be duplicates which can be - # removed. If omitted in new log entries, then Stackdriver Logging will insert - # its own unique identifier. The insert_id is used to order log entries that - # have the same timestamp value. - # Corresponds to the JSON property `insertId` - # @return [String] - attr_accessor :insert_id - - # The log entry payload, represented as a Unicode string (UTF-8). - # Corresponds to the JSON property `textPayload` - # @return [String] - attr_accessor :text_payload - - # The log entry payload, represented as a protocol buffer. Some Google Cloud - # Platform services use this field for their log entry payloads. - # Corresponds to the JSON property `protoPayload` - # @return [Hash] - attr_accessor :proto_payload - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @trace = args[:trace] if args.key?(:trace) - @labels = args[:labels] if args.key?(:labels) - @severity = args[:severity] if args.key?(:severity) - @source_location = args[:source_location] if args.key?(:source_location) - @timestamp = args[:timestamp] if args.key?(:timestamp) - @log_name = args[:log_name] if args.key?(:log_name) - @http_request = args[:http_request] if args.key?(:http_request) - @resource = args[:resource] if args.key?(:resource) - @json_payload = args[:json_payload] if args.key?(:json_payload) - @operation = args[:operation] if args.key?(:operation) - @insert_id = args[:insert_id] if args.key?(:insert_id) - @text_payload = args[:text_payload] if args.key?(:text_payload) - @proto_payload = args[:proto_payload] if args.key?(:proto_payload) - end - end - - # Specifies a location in a source code file. - class SourceLocation - include Google::Apis::Core::Hashable - - # Source file name. Depending on the runtime environment, this might be a simple - # name or a fully-qualified name. - # Corresponds to the JSON property `file` - # @return [String] - attr_accessor :file - - # Human-readable name of the function or method being invoked, with optional - # context such as the class or package name. This information is used in - # contexts such as the logs viewer, where a file and line number are less - # meaningful. The format can vary by language. For example: qual.if.ied.Class. - # method (Java), dir/package.func (Go), function (Python). - # Corresponds to the JSON property `functionName` - # @return [String] - attr_accessor :function_name - - # Line within the source file. - # Corresponds to the JSON property `line` - # @return [String] - attr_accessor :line - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @file = args[:file] if args.key?(:file) - @function_name = args[:function_name] if args.key?(:function_name) - @line = args[:line] if args.key?(:line) - end - end - - # The parameters to ListLogEntries. - class ListLogEntriesRequest - include Google::Apis::Core::Hashable - - # Optional. If present, then retrieve the next batch of results from the - # preceding call to this method. page_token must be the value of next_page_token - # from the previous response. The values of other method parameters should be - # identical to those in the previous call. - # Corresponds to the JSON property `pageToken` - # @return [String] - attr_accessor :page_token - - # Optional. The maximum number of results to return from this request. Non- - # positive values are ignored. The presence of next_page_token in the response - # indicates that more results might be available. - # Corresponds to the JSON property `pageSize` - # @return [Fixnum] - attr_accessor :page_size - - # Optional. How the results should be sorted. Presently, the only permitted - # values are "timestamp asc" (default) and "timestamp desc". The first option - # returns entries in order of increasing values of LogEntry.timestamp (oldest - # first), and the second option returns entries in order of decreasing - # timestamps (newest first). Entries with equal timestamps are returned in order - # of their insert_id values. - # Corresponds to the JSON property `orderBy` - # @return [String] - attr_accessor :order_by - - # Required. Names of one or more parent resources from which to retrieve log - # entries: - # "projects/[PROJECT_ID]" - # "organizations/[ORGANIZATION_ID]" - # "billingAccounts/[BILLING_ACCOUNT_ID]" - # "folders/[FOLDER_ID]" - # Projects listed in the project_ids field are added to this list. - # Corresponds to the JSON property `resourceNames` - # @return [Array] - attr_accessor :resource_names - - # Optional. A filter that chooses which log entries to return. See Advanced Logs - # Filters. Only log entries that match the filter are returned. An empty filter - # matches all log entries in the resources listed in resource_names. Referencing - # a parent resource that is not listed in resource_names will cause the filter - # to return no results. The maximum length of the filter is 20000 characters. - # Corresponds to the JSON property `filter` - # @return [String] - attr_accessor :filter - - # Deprecated. Use resource_names instead. One or more project identifiers or - # project numbers from which to retrieve log entries. Example: "my-project-1A". - # If present, these project identifiers are converted to resource name format - # and added to the list of resources in resource_names. - # Corresponds to the JSON property `projectIds` - # @return [Array] - attr_accessor :project_ids - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @page_token = args[:page_token] if args.key?(:page_token) - @page_size = args[:page_size] if args.key?(:page_size) - @order_by = args[:order_by] if args.key?(:order_by) - @resource_names = args[:resource_names] if args.key?(:resource_names) - @filter = args[:filter] if args.key?(:filter) - @project_ids = args[:project_ids] if args.key?(:project_ids) - end - end - # Complete log information about a single HTTP request to an App Engine # application. class RequestLog include Google::Apis::Core::Hashable + # Globally unique identifier for a request, which is based on the request start + # time. Request IDs for requests which started later will compare greater as + # strings than those for requests which started earlier. + # Corresponds to the JSON property `requestId` + # @return [String] + attr_accessor :request_id + + # The logged-in user who made the request.Most likely, this is the part of the + # user's email before the @ sign. The field value is the same for different + # requests from the same user, but different users can have similar names. This + # information is also available to the application via the App Engine Users API. + # This field will be populated starting with App Engine 1.9.21. + # Corresponds to the JSON property `nickname` + # @return [String] + attr_accessor :nickname + + # Time this request spent in the pending request queue. + # Corresponds to the JSON property `pendingTime` + # @return [String] + attr_accessor :pending_time + + # Contains the path and query portion of the URL that was requested. For example, + # if the URL was "http://example.com/app?name=val", the resource would be "/app? + # name=val". The fragment identifier, which is identified by the # character, is + # not included. + # Corresponds to the JSON property `resource` + # @return [String] + attr_accessor :resource + + # HTTP response status code. Example: 200, 404. + # Corresponds to the JSON property `status` + # @return [Fixnum] + attr_accessor :status + + # Task name of the request, in the case of an offline request. + # Corresponds to the JSON property `taskName` + # @return [String] + attr_accessor :task_name + + # File or class that handled the request. + # Corresponds to the JSON property `urlMapEntry` + # @return [String] + attr_accessor :url_map_entry + # If the instance processing this request belongs to a manually scaled module, # then this is the 0-based index of the instance. Otherwise, this value is -1. # Corresponds to the JSON property `instanceIndex` @@ -816,56 +204,19 @@ module Google # @return [String] attr_accessor :referrer - # Globally unique identifier for a request, which is based on the request start - # time. Request IDs for requests which started later will compare greater as - # strings than those for requests which started earlier. - # Corresponds to the JSON property `requestId` - # @return [String] - attr_accessor :request_id - - # The logged-in user who made the request.Most likely, this is the part of the - # user's email before the @ sign. The field value is the same for different - # requests from the same user, but different users can have similar names. This - # information is also available to the application via the App Engine Users API. - # This field will be populated starting with App Engine 1.9.21. - # Corresponds to the JSON property `nickname` - # @return [String] - attr_accessor :nickname - - # HTTP response status code. Example: 200, 404. - # Corresponds to the JSON property `status` - # @return [Fixnum] - attr_accessor :status - - # Contains the path and query portion of the URL that was requested. For example, - # if the URL was "http://example.com/app?name=val", the resource would be "/app? - # name=val". The fragment identifier, which is identified by the # character, is - # not included. - # Corresponds to the JSON property `resource` - # @return [String] - attr_accessor :resource - - # Time this request spent in the pending request queue. - # Corresponds to the JSON property `pendingTime` - # @return [String] - attr_accessor :pending_time - - # Task name of the request, in the case of an offline request. - # Corresponds to the JSON property `taskName` - # @return [String] - attr_accessor :task_name - - # File or class that handled the request. - # Corresponds to the JSON property `urlMapEntry` - # @return [String] - attr_accessor :url_map_entry - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @request_id = args[:request_id] if args.key?(:request_id) + @nickname = args[:nickname] if args.key?(:nickname) + @pending_time = args[:pending_time] if args.key?(:pending_time) + @resource = args[:resource] if args.key?(:resource) + @status = args[:status] if args.key?(:status) + @task_name = args[:task_name] if args.key?(:task_name) + @url_map_entry = args[:url_map_entry] if args.key?(:url_map_entry) @instance_index = args[:instance_index] if args.key?(:instance_index) @finished = args[:finished] if args.key?(:finished) @host = args[:host] if args.key?(:host) @@ -891,13 +242,6 @@ module Google @line = args[:line] if args.key?(:line) @task_queue_name = args[:task_queue_name] if args.key?(:task_queue_name) @referrer = args[:referrer] if args.key?(:referrer) - @request_id = args[:request_id] if args.key?(:request_id) - @nickname = args[:nickname] if args.key?(:nickname) - @status = args[:status] if args.key?(:status) - @resource = args[:resource] if args.key?(:resource) - @pending_time = args[:pending_time] if args.key?(:pending_time) - @task_name = args[:task_name] if args.key?(:task_name) - @url_map_entry = args[:url_map_entry] if args.key?(:url_map_entry) end end @@ -905,11 +249,6 @@ module Google class ListMonitoredResourceDescriptorsResponse include Google::Apis::Core::Hashable - # A list of resource descriptors. - # Corresponds to the JSON property `resourceDescriptors` - # @return [Array] - attr_accessor :resource_descriptors - # If there might be more results than those appearing in this response, then # nextPageToken is included. To get the next set of results, call this method # again using the value of nextPageToken as pageToken. @@ -917,14 +256,19 @@ module Google # @return [String] attr_accessor :next_page_token + # A list of resource descriptors. + # Corresponds to the JSON property `resourceDescriptors` + # @return [Array] + attr_accessor :resource_descriptors + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @resource_descriptors = args[:resource_descriptors] if args.key?(:resource_descriptors) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @resource_descriptors = args[:resource_descriptors] if args.key?(:resource_descriptors) end end @@ -1006,6 +350,19 @@ module Google end end + # Result returned from WriteLogEntries. empty + class WriteLogEntriesResponse + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + # Additional information about a potentially long-running operation with which a # log entry is associated. class LogEntryOperation @@ -1049,19 +406,6 @@ module Google end end - # Result returned from WriteLogEntries. empty - class WriteLogEntriesResponse - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - # An object representing a resource that can be used for monitoring, logging, # billing, or other purposes. Examples include virtual machine instances, # databases, and storage devices such as disks. The type field identifies a @@ -1102,113 +446,10 @@ module Google end end - # Describes a sink used to export log entries to one of the following - # destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a - # Cloud Pub/Sub topic. A logs filter controls which log entries are exported. - # The sink must be created within a project, organization, billing account, or - # folder. - class LogSink - include Google::Apis::Core::Hashable - - # Required. The client-assigned sink identifier, unique within the project. - # Example: "my-syslog-errors-to-pubsub". Sink identifiers are limited to 100 - # characters and can include only the following characters: upper and lower-case - # alphanumeric characters, underscores, hyphens, and periods. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # Required. The export destination: - # "storage.googleapis.com/[GCS_BUCKET]" - # "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" - # "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" - # The sink's writer_identity, set when the sink is created, must have permission - # to write to the destination or else the log entries are not exported. For more - # information, see Exporting Logs With Sinks. - # Corresponds to the JSON property `destination` - # @return [String] - attr_accessor :destination - - # Optional. An advanced logs filter. The only exported log entries are those - # that are in the resource owning the sink and that match the filter. The filter - # must use the log entry format specified by the output_version_format parameter. - # For example, in the v2 format: - # logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR - # Corresponds to the JSON property `filter` - # @return [String] - attr_accessor :filter - - # Optional. The time at which this sink will stop exporting log entries. Log - # entries are exported only if their timestamp is earlier than the end time. If - # this field is not supplied, there is no end time. If both a start time and an - # end time are provided, then the end time must be later than the start time. - # Corresponds to the JSON property `endTime` - # @return [String] - attr_accessor :end_time - - # Output only. An IAM identity—a service account or group—under - # which Stackdriver Logging writes the exported log entries to the sink's - # destination. This field is set by sinks.create and sinks.update, based on the - # setting of unique_writer_identity in those methods.Until you grant this - # identity write-access to the destination, log entry exports from this sink - # will fail. For more information, see Granting access for a resource. Consult - # the destination service's documentation to determine the appropriate IAM roles - # to assign to the identity. - # Corresponds to the JSON property `writerIdentity` - # @return [String] - attr_accessor :writer_identity - - # Optional. The time at which this sink will begin exporting log entries. Log - # entries are exported only if their timestamp is not earlier than the start - # time. The default value of this field is the time the sink is created or - # updated. - # Corresponds to the JSON property `startTime` - # @return [String] - attr_accessor :start_time - - # Optional. The log entry format to use for this sink's exported log entries. - # The v2 format is used by default. The v1 format is deprecated and should be - # used only as part of a migration effort to v2. See Migration to the v2 API. - # Corresponds to the JSON property `outputVersionFormat` - # @return [String] - attr_accessor :output_version_format - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - @destination = args[:destination] if args.key?(:destination) - @filter = args[:filter] if args.key?(:filter) - @end_time = args[:end_time] if args.key?(:end_time) - @writer_identity = args[:writer_identity] if args.key?(:writer_identity) - @start_time = args[:start_time] if args.key?(:start_time) - @output_version_format = args[:output_version_format] if args.key?(:output_version_format) - end - end - # The parameters to WriteLogEntries. class WriteLogEntriesRequest include Google::Apis::Core::Hashable - # An object representing a resource that can be used for monitoring, logging, - # billing, or other purposes. Examples include virtual machine instances, - # databases, and storage devices such as disks. The type field identifies a - # MonitoredResourceDescriptor object that describes the resource's schema. - # Information in the labels field identifies the actual resource and its - # attributes according to the schema. For example, a particular Compute Engine - # VM instance could be represented by the following object, because the - # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and " - # zone": - # ` "type": "gce_instance", - # "labels": ` "instance_id": "12345678901234", - # "zone": "us-central1-a" `` - # Corresponds to the JSON property `resource` - # @return [Google::Apis::LoggingV2beta1::MonitoredResource] - attr_accessor :resource - # Optional. A default log resource name that is assigned to all log entries in # entries that do not specify a value for log_name: # "projects/[PROJECT_ID]/logs/[LOG_ID]" @@ -1253,17 +494,776 @@ module Google # @return [Hash] attr_accessor :labels + # An object representing a resource that can be used for monitoring, logging, + # billing, or other purposes. Examples include virtual machine instances, + # databases, and storage devices such as disks. The type field identifies a + # MonitoredResourceDescriptor object that describes the resource's schema. + # Information in the labels field identifies the actual resource and its + # attributes according to the schema. For example, a particular Compute Engine + # VM instance could be represented by the following object, because the + # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and " + # zone": + # ` "type": "gce_instance", + # "labels": ` "instance_id": "12345678901234", + # "zone": "us-central1-a" `` + # Corresponds to the JSON property `resource` + # @return [Google::Apis::LoggingV2beta1::MonitoredResource] + attr_accessor :resource + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @resource = args[:resource] if args.key?(:resource) @log_name = args[:log_name] if args.key?(:log_name) @entries = args[:entries] if args.key?(:entries) @partial_success = args[:partial_success] if args.key?(:partial_success) @labels = args[:labels] if args.key?(:labels) + @resource = args[:resource] if args.key?(:resource) + end + end + + # Describes a sink used to export log entries to one of the following + # destinations in any project: a Cloud Storage bucket, a BigQuery dataset, or a + # Cloud Pub/Sub topic. A logs filter controls which log entries are exported. + # The sink must be created within a project, organization, billing account, or + # folder. + class LogSink + include Google::Apis::Core::Hashable + + # Required. The export destination: + # "storage.googleapis.com/[GCS_BUCKET]" + # "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" + # "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" + # The sink's writer_identity, set when the sink is created, must have permission + # to write to the destination or else the log entries are not exported. For more + # information, see Exporting Logs With Sinks. + # Corresponds to the JSON property `destination` + # @return [String] + attr_accessor :destination + + # Optional. An advanced logs filter. The only exported log entries are those + # that are in the resource owning the sink and that match the filter. The filter + # must use the log entry format specified by the output_version_format parameter. + # For example, in the v2 format: + # logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR + # Corresponds to the JSON property `filter` + # @return [String] + attr_accessor :filter + + # Optional. The time at which this sink will stop exporting log entries. Log + # entries are exported only if their timestamp is earlier than the end time. If + # this field is not supplied, there is no end time. If both a start time and an + # end time are provided, then the end time must be later than the start time. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # Optional. The time at which this sink will begin exporting log entries. Log + # entries are exported only if their timestamp is not earlier than the start + # time. The default value of this field is the time the sink is created or + # updated. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + # Output only. An IAM identity—a service account or group—under + # which Stackdriver Logging writes the exported log entries to the sink's + # destination. This field is set by sinks.create and sinks.update, based on the + # setting of unique_writer_identity in those methods.Until you grant this + # identity write-access to the destination, log entry exports from this sink + # will fail. For more information, see Granting access for a resource. Consult + # the destination service's documentation to determine the appropriate IAM roles + # to assign to the identity. + # Corresponds to the JSON property `writerIdentity` + # @return [String] + attr_accessor :writer_identity + + # Optional. The log entry format to use for this sink's exported log entries. + # The v2 format is used by default. The v1 format is deprecated and should be + # used only as part of a migration effort to v2. See Migration to the v2 API. + # Corresponds to the JSON property `outputVersionFormat` + # @return [String] + attr_accessor :output_version_format + + # Required. The client-assigned sink identifier, unique within the project. + # Example: "my-syslog-errors-to-pubsub". Sink identifiers are limited to 100 + # characters and can include only the following characters: upper and lower-case + # alphanumeric characters, underscores, hyphens, and periods. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @destination = args[:destination] if args.key?(:destination) + @filter = args[:filter] if args.key?(:filter) + @end_time = args[:end_time] if args.key?(:end_time) + @start_time = args[:start_time] if args.key?(:start_time) + @writer_identity = args[:writer_identity] if args.key?(:writer_identity) + @output_version_format = args[:output_version_format] if args.key?(:output_version_format) + @name = args[:name] if args.key?(:name) + end + end + + # Result returned from ListLogs. + class ListLogsResponse + include Google::Apis::Core::Hashable + + # If there might be more results than those appearing in this response, then + # nextPageToken is included. To get the next set of results, call this method + # again using the value of nextPageToken as pageToken. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # A list of log names. For example, "projects/my-project/syslog" or " + # organizations/123/cloudresourcemanager.googleapis.com%2Factivity". + # Corresponds to the JSON property `logNames` + # @return [Array] + attr_accessor :log_names + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @log_names = args[:log_names] if args.key?(:log_names) + end + end + + # Result returned from ListSinks. + class ListSinksResponse + include Google::Apis::Core::Hashable + + # If there might be more results than appear in this response, then + # nextPageToken is included. To get the next set of results, call the same + # method again using the value of nextPageToken as pageToken. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # A list of sinks. + # Corresponds to the JSON property `sinks` + # @return [Array] + attr_accessor :sinks + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @sinks = args[:sinks] if args.key?(:sinks) + end + end + + # A common proto for logging HTTP requests. Only contains semantics defined by + # the HTTP specification. Product-specific logging information MUST be defined + # in a separate message. + class HttpRequest + include Google::Apis::Core::Hashable + + # Whether or not a cache lookup was attempted. + # Corresponds to the JSON property `cacheLookup` + # @return [Boolean] + attr_accessor :cache_lookup + alias_method :cache_lookup?, :cache_lookup + + # Whether or not an entity was served from cache (with or without validation). + # Corresponds to the JSON property `cacheHit` + # @return [Boolean] + attr_accessor :cache_hit + alias_method :cache_hit?, :cache_hit + + # Whether or not the response was validated with the origin server before being + # served from cache. This field is only meaningful if cache_hit is True. + # Corresponds to the JSON property `cacheValidatedWithOriginServer` + # @return [Boolean] + attr_accessor :cache_validated_with_origin_server + alias_method :cache_validated_with_origin_server?, :cache_validated_with_origin_server + + # The response code indicating the status of response. Examples: 200, 404. + # Corresponds to the JSON property `status` + # @return [Fixnum] + attr_accessor :status + + # The referer URL of the request, as defined in HTTP/1.1 Header Field + # Definitions (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). + # Corresponds to the JSON property `referer` + # @return [String] + attr_accessor :referer + + # The request processing latency on the server, from the time the request was + # received until the response was sent. + # Corresponds to the JSON property `latency` + # @return [String] + attr_accessor :latency + + # The user agent sent by the client. Example: "Mozilla/4.0 (compatible; MSIE 6.0; + # Windows 98; Q312461; .NET CLR 1.0.3705)". + # Corresponds to the JSON property `userAgent` + # @return [String] + attr_accessor :user_agent + + # The number of HTTP response bytes inserted into cache. Set only when a cache + # fill was attempted. + # Corresponds to the JSON property `cacheFillBytes` + # @return [String] + attr_accessor :cache_fill_bytes + + # The request method. Examples: "GET", "HEAD", "PUT", "POST". + # Corresponds to the JSON property `requestMethod` + # @return [String] + attr_accessor :request_method + + # The size of the HTTP request message in bytes, including the request headers + # and the request body. + # Corresponds to the JSON property `requestSize` + # @return [String] + attr_accessor :request_size + + # The size of the HTTP response message sent back to the client, in bytes, + # including the response headers and the response body. + # Corresponds to the JSON property `responseSize` + # @return [String] + attr_accessor :response_size + + # The scheme (http, https), the host name, the path and the query portion of the + # URL that was requested. Example: "http://example.com/some/info?color=red". + # Corresponds to the JSON property `requestUrl` + # @return [String] + attr_accessor :request_url + + # The IP address (IPv4 or IPv6) of the client that issued the HTTP request. + # Examples: "192.168.1.1", "FE80::0202:B3FF:FE1E:8329". + # Corresponds to the JSON property `remoteIp` + # @return [String] + attr_accessor :remote_ip + + # The IP address (IPv4 or IPv6) of the origin server that the request was sent + # to. + # Corresponds to the JSON property `serverIp` + # @return [String] + attr_accessor :server_ip + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @cache_lookup = args[:cache_lookup] if args.key?(:cache_lookup) + @cache_hit = args[:cache_hit] if args.key?(:cache_hit) + @cache_validated_with_origin_server = args[:cache_validated_with_origin_server] if args.key?(:cache_validated_with_origin_server) + @status = args[:status] if args.key?(:status) + @referer = args[:referer] if args.key?(:referer) + @latency = args[:latency] if args.key?(:latency) + @user_agent = args[:user_agent] if args.key?(:user_agent) + @cache_fill_bytes = args[:cache_fill_bytes] if args.key?(:cache_fill_bytes) + @request_method = args[:request_method] if args.key?(:request_method) + @request_size = args[:request_size] if args.key?(:request_size) + @response_size = args[:response_size] if args.key?(:response_size) + @request_url = args[:request_url] if args.key?(:request_url) + @remote_ip = args[:remote_ip] if args.key?(:remote_ip) + @server_ip = args[:server_ip] if args.key?(:server_ip) + end + end + + # A description of a label. + class LabelDescriptor + include Google::Apis::Core::Hashable + + # The type of data that can be assigned to the label. + # Corresponds to the JSON property `valueType` + # @return [String] + attr_accessor :value_type + + # The label key. + # Corresponds to the JSON property `key` + # @return [String] + attr_accessor :key + + # A human-readable description for the label. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @value_type = args[:value_type] if args.key?(:value_type) + @key = args[:key] if args.key?(:key) + @description = args[:description] if args.key?(:description) + end + end + + # An object that describes the schema of a MonitoredResource object using a type + # name and a set of labels. For example, the monitored resource descriptor for + # Google Compute Engine VM instances has a type of "gce_instance" and specifies + # the use of the labels "instance_id" and "zone" to identify particular VM + # instances.Different APIs can support different monitored resource types. APIs + # generally provide a list method that returns the monitored resource + # descriptors used by the API. + class MonitoredResourceDescriptor + include Google::Apis::Core::Hashable + + # Required. A set of labels used to describe instances of this monitored + # resource type. For example, an individual Google Cloud SQL database is + # identified by values for the labels "database_id" and "zone". + # Corresponds to the JSON property `labels` + # @return [Array] + attr_accessor :labels + + # Optional. The resource name of the monitored resource descriptor: "projects/` + # project_id`/monitoredResourceDescriptors/`type`" where `type` is the value of + # the type field in this object and `project_id` is a project ID that provides + # API-specific context for accessing the type. APIs that do not use project + # information can use the resource name format "monitoredResourceDescriptors/` + # type`". + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Optional. A concise name for the monitored resource type that might be + # displayed in user interfaces. It should be a Title Cased Noun Phrase, without + # any article or other determiners. For example, "Google Cloud SQL Database". + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Optional. A detailed description of the monitored resource type that might be + # used in documentation. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Required. The monitored resource type. For example, the type " + # cloudsql_database" represents databases in Google Cloud SQL. The maximum + # length of this value is 256 characters. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @labels = args[:labels] if args.key?(:labels) + @name = args[:name] if args.key?(:name) + @display_name = args[:display_name] if args.key?(:display_name) + @description = args[:description] if args.key?(:description) + @type = args[:type] if args.key?(:type) + end + end + + # Additional information about the source code location that produced the log + # entry. + class LogEntrySourceLocation + include Google::Apis::Core::Hashable + + # Optional. Human-readable name of the function or method being invoked, with + # optional context such as the class or package name. This information may be + # used in contexts such as the logs viewer, where a file and line number are + # less meaningful. The format can vary by language. For example: qual.if.ied. + # Class.method (Java), dir/package.func (Go), function (Python). + # Corresponds to the JSON property `function` + # @return [String] + attr_accessor :function + + # Optional. Line within the source file. 1-based; 0 indicates no line number + # available. + # Corresponds to the JSON property `line` + # @return [String] + attr_accessor :line + + # Optional. Source file name. Depending on the runtime environment, this might + # be a simple name or a fully-qualified name. + # Corresponds to the JSON property `file` + # @return [String] + attr_accessor :file + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @function = args[:function] if args.key?(:function) + @line = args[:line] if args.key?(:line) + @file = args[:file] if args.key?(:file) + end + end + + # Result returned from ListLogEntries. + class ListLogEntriesResponse + include Google::Apis::Core::Hashable + + # If there might be more results than those appearing in this response, then + # nextPageToken is included. To get the next set of results, call this method + # again using the value of nextPageToken as pageToken.If a value for + # next_page_token appears and the entries field is empty, it means that the + # search found no log entries so far but it did not have time to search all the + # possible log entries. Retry the method with this value for page_token to + # continue the search. Alternatively, consider speeding up the search by + # changing your filter to specify a single log name or resource type, or to + # narrow the time range of the search. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # A list of log entries. + # Corresponds to the JSON property `entries` + # @return [Array] + attr_accessor :entries + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @entries = args[:entries] if args.key?(:entries) + end + end + + # Application log line emitted while processing a request. + class LogLine + include Google::Apis::Core::Hashable + + # Severity of this log entry. + # Corresponds to the JSON property `severity` + # @return [String] + attr_accessor :severity + + # App-provided log message. + # Corresponds to the JSON property `logMessage` + # @return [String] + attr_accessor :log_message + + # Specifies a location in a source code file. + # Corresponds to the JSON property `sourceLocation` + # @return [Google::Apis::LoggingV2beta1::SourceLocation] + attr_accessor :source_location + + # Approximate time when this log entry was made. + # Corresponds to the JSON property `time` + # @return [String] + attr_accessor :time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @severity = args[:severity] if args.key?(:severity) + @log_message = args[:log_message] if args.key?(:log_message) + @source_location = args[:source_location] if args.key?(:source_location) + @time = args[:time] if args.key?(:time) + end + end + + # Result returned from ListLogMetrics. + class ListLogMetricsResponse + include Google::Apis::Core::Hashable + + # If there might be more results than appear in this response, then + # nextPageToken is included. To get the next set of results, call this method + # again using the value of nextPageToken as pageToken. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # A list of logs-based metrics. + # Corresponds to the JSON property `metrics` + # @return [Array] + attr_accessor :metrics + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @metrics = args[:metrics] if args.key?(:metrics) + end + end + + # A generic empty message that you can re-use to avoid defining duplicated empty + # messages in your APIs. A typical example is to use it as the request or the + # response type of an API method. For instance: + # service Foo ` + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # ` + # The JSON representation for Empty is empty JSON object ``. + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # An individual entry in a log. + class LogEntry + include Google::Apis::Core::Hashable + + # Required. The resource name of the log to which this log entry belongs: + # "projects/[PROJECT_ID]/logs/[LOG_ID]" + # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + # "folders/[FOLDER_ID]/logs/[LOG_ID]" + # [LOG_ID] must be URL-encoded within log_name. Example: "organizations/ + # 1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity". [LOG_ID] must + # be less than 512 characters long and can only include the following characters: + # upper and lower case alphanumeric characters, forward-slash, underscore, + # hyphen, and period.For backward compatibility, if log_name begins with a + # forward-slash, such as /projects/..., then the log entry is ingested as usual + # but the forward-slash is removed. Listing the log entry will not show the + # leading slash and filtering for a log name with a leading slash will never + # return any results. + # Corresponds to the JSON property `logName` + # @return [String] + attr_accessor :log_name + + # A common proto for logging HTTP requests. Only contains semantics defined by + # the HTTP specification. Product-specific logging information MUST be defined + # in a separate message. + # Corresponds to the JSON property `httpRequest` + # @return [Google::Apis::LoggingV2beta1::HttpRequest] + attr_accessor :http_request + + # An object representing a resource that can be used for monitoring, logging, + # billing, or other purposes. Examples include virtual machine instances, + # databases, and storage devices such as disks. The type field identifies a + # MonitoredResourceDescriptor object that describes the resource's schema. + # Information in the labels field identifies the actual resource and its + # attributes according to the schema. For example, a particular Compute Engine + # VM instance could be represented by the following object, because the + # MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and " + # zone": + # ` "type": "gce_instance", + # "labels": ` "instance_id": "12345678901234", + # "zone": "us-central1-a" `` + # Corresponds to the JSON property `resource` + # @return [Google::Apis::LoggingV2beta1::MonitoredResource] + attr_accessor :resource + + # The log entry payload, represented as a structure that is expressed as a JSON + # object. + # Corresponds to the JSON property `jsonPayload` + # @return [Hash] + attr_accessor :json_payload + + # Additional information about a potentially long-running operation with which a + # log entry is associated. + # Corresponds to the JSON property `operation` + # @return [Google::Apis::LoggingV2beta1::LogEntryOperation] + attr_accessor :operation + + # Optional. A unique identifier for the log entry. If you provide a value, then + # Stackdriver Logging considers other log entries in the same project, with the + # same timestamp, and with the same insert_id to be duplicates which can be + # removed. If omitted in new log entries, then Stackdriver Logging will insert + # its own unique identifier. The insert_id is used to order log entries that + # have the same timestamp value. + # Corresponds to the JSON property `insertId` + # @return [String] + attr_accessor :insert_id + + # The log entry payload, represented as a Unicode string (UTF-8). + # Corresponds to the JSON property `textPayload` + # @return [String] + attr_accessor :text_payload + + # The log entry payload, represented as a protocol buffer. Some Google Cloud + # Platform services use this field for their log entry payloads. + # Corresponds to the JSON property `protoPayload` + # @return [Hash] + attr_accessor :proto_payload + + # Optional. Resource name of the trace associated with the log entry, if any. If + # it contains a relative resource name, the name is assumed to be relative to // + # tracing.googleapis.com. Example: projects/my-projectid/traces/ + # 06796866738c859f2f19b7cfb3214824 + # Corresponds to the JSON property `trace` + # @return [String] + attr_accessor :trace + + # Optional. A set of user-defined (key, value) data that provides additional + # information about the log entry. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # Optional. The severity of the log entry. The default value is LogSeverity. + # DEFAULT. + # Corresponds to the JSON property `severity` + # @return [String] + attr_accessor :severity + + # Additional information about the source code location that produced the log + # entry. + # Corresponds to the JSON property `sourceLocation` + # @return [Google::Apis::LoggingV2beta1::LogEntrySourceLocation] + attr_accessor :source_location + + # Optional. The time the event described by the log entry occurred. If omitted + # in a new log entry, Stackdriver Logging will insert the time the log entry is + # received. Stackdriver Logging might reject log entries whose time stamps are + # more than a couple of hours in the future. Log entries with time stamps in the + # past are accepted. + # Corresponds to the JSON property `timestamp` + # @return [String] + attr_accessor :timestamp + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @log_name = args[:log_name] if args.key?(:log_name) + @http_request = args[:http_request] if args.key?(:http_request) + @resource = args[:resource] if args.key?(:resource) + @json_payload = args[:json_payload] if args.key?(:json_payload) + @operation = args[:operation] if args.key?(:operation) + @insert_id = args[:insert_id] if args.key?(:insert_id) + @text_payload = args[:text_payload] if args.key?(:text_payload) + @proto_payload = args[:proto_payload] if args.key?(:proto_payload) + @trace = args[:trace] if args.key?(:trace) + @labels = args[:labels] if args.key?(:labels) + @severity = args[:severity] if args.key?(:severity) + @source_location = args[:source_location] if args.key?(:source_location) + @timestamp = args[:timestamp] if args.key?(:timestamp) + end + end + + # Specifies a location in a source code file. + class SourceLocation + include Google::Apis::Core::Hashable + + # Human-readable name of the function or method being invoked, with optional + # context such as the class or package name. This information is used in + # contexts such as the logs viewer, where a file and line number are less + # meaningful. The format can vary by language. For example: qual.if.ied.Class. + # method (Java), dir/package.func (Go), function (Python). + # Corresponds to the JSON property `functionName` + # @return [String] + attr_accessor :function_name + + # Line within the source file. + # Corresponds to the JSON property `line` + # @return [String] + attr_accessor :line + + # Source file name. Depending on the runtime environment, this might be a simple + # name or a fully-qualified name. + # Corresponds to the JSON property `file` + # @return [String] + attr_accessor :file + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @function_name = args[:function_name] if args.key?(:function_name) + @line = args[:line] if args.key?(:line) + @file = args[:file] if args.key?(:file) + end + end + + # The parameters to ListLogEntries. + class ListLogEntriesRequest + include Google::Apis::Core::Hashable + + # Optional. How the results should be sorted. Presently, the only permitted + # values are "timestamp asc" (default) and "timestamp desc". The first option + # returns entries in order of increasing values of LogEntry.timestamp (oldest + # first), and the second option returns entries in order of decreasing + # timestamps (newest first). Entries with equal timestamps are returned in order + # of their insert_id values. + # Corresponds to the JSON property `orderBy` + # @return [String] + attr_accessor :order_by + + # Required. Names of one or more parent resources from which to retrieve log + # entries: + # "projects/[PROJECT_ID]" + # "organizations/[ORGANIZATION_ID]" + # "billingAccounts/[BILLING_ACCOUNT_ID]" + # "folders/[FOLDER_ID]" + # Projects listed in the project_ids field are added to this list. + # Corresponds to the JSON property `resourceNames` + # @return [Array] + attr_accessor :resource_names + + # Optional. A filter that chooses which log entries to return. See Advanced Logs + # Filters. Only log entries that match the filter are returned. An empty filter + # matches all log entries in the resources listed in resource_names. Referencing + # a parent resource that is not listed in resource_names will cause the filter + # to return no results. The maximum length of the filter is 20000 characters. + # Corresponds to the JSON property `filter` + # @return [String] + attr_accessor :filter + + # Deprecated. Use resource_names instead. One or more project identifiers or + # project numbers from which to retrieve log entries. Example: "my-project-1A". + # If present, these project identifiers are converted to resource name format + # and added to the list of resources in resource_names. + # Corresponds to the JSON property `projectIds` + # @return [Array] + attr_accessor :project_ids + + # Optional. If present, then retrieve the next batch of results from the + # preceding call to this method. page_token must be the value of next_page_token + # from the previous response. The values of other method parameters should be + # identical to those in the previous call. + # Corresponds to the JSON property `pageToken` + # @return [String] + attr_accessor :page_token + + # Optional. The maximum number of results to return from this request. Non- + # positive values are ignored. The presence of next_page_token in the response + # indicates that more results might be available. + # Corresponds to the JSON property `pageSize` + # @return [Fixnum] + attr_accessor :page_size + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @order_by = args[:order_by] if args.key?(:order_by) + @resource_names = args[:resource_names] if args.key?(:resource_names) + @filter = args[:filter] if args.key?(:filter) + @project_ids = args[:project_ids] if args.key?(:project_ids) + @page_token = args[:page_token] if args.key?(:page_token) + @page_size = args[:page_size] if args.key?(:page_size) end end end diff --git a/generated/google/apis/logging_v2beta1/representations.rb b/generated/google/apis/logging_v2beta1/representations.rb index 1063127e0..01335af09 100644 --- a/generated/google/apis/logging_v2beta1/representations.rb +++ b/generated/google/apis/logging_v2beta1/representations.rb @@ -22,84 +22,6 @@ module Google module Apis module LoggingV2beta1 - class ListLogsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class HttpRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListSinksResponse - 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 LogEntrySourceLocation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListLogEntriesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class LogLine - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListLogMetricsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Empty - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class LogEntry - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SourceLocation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListLogEntriesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class RequestLog class Representation < Google::Apis::Core::JsonRepresentation; end @@ -124,13 +46,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class LogEntryOperation + class WriteLogEntriesResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class WriteLogEntriesResponse + class LogEntryOperation class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -142,167 +64,106 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class LogSink - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class WriteLogEntriesRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ListLogsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :log_names, as: 'logNames' - end + class LogSink + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end - class HttpRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :latency, as: 'latency' - property :user_agent, as: 'userAgent' - property :cache_fill_bytes, as: 'cacheFillBytes' - property :request_method, as: 'requestMethod' - property :request_size, as: 'requestSize' - property :response_size, as: 'responseSize' - property :request_url, as: 'requestUrl' - property :remote_ip, as: 'remoteIp' - property :server_ip, as: 'serverIp' - property :cache_lookup, as: 'cacheLookup' - property :cache_hit, as: 'cacheHit' - property :cache_validated_with_origin_server, as: 'cacheValidatedWithOriginServer' - property :status, as: 'status' - property :referer, as: 'referer' - end + class ListLogsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ListSinksResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :sinks, as: 'sinks', class: Google::Apis::LoggingV2beta1::LogSink, decorator: Google::Apis::LoggingV2beta1::LogSink::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :next_page_token, as: 'nextPageToken' - end + include Google::Apis::Core::JsonObjectSupport + end + + class HttpRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class LabelDescriptor - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :key, as: 'key' - property :description, as: 'description' - property :value_type, as: 'valueType' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class MonitoredResourceDescriptor - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :display_name, as: 'displayName' - property :description, as: 'description' - property :type, as: 'type' - collection :labels, as: 'labels', class: Google::Apis::LoggingV2beta1::LabelDescriptor, decorator: Google::Apis::LoggingV2beta1::LabelDescriptor::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class LogEntrySourceLocation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :function, as: 'function' - property :line, as: 'line' - property :file, as: 'file' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ListLogEntriesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :entries, as: 'entries', class: Google::Apis::LoggingV2beta1::LogEntry, decorator: Google::Apis::LoggingV2beta1::LogEntry::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :next_page_token, as: 'nextPageToken' - end + include Google::Apis::Core::JsonObjectSupport end class LogLine - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :time, as: 'time' - 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 + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class ListLogMetricsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :metrics, as: 'metrics', class: Google::Apis::LoggingV2beta1::LogMetric, decorator: Google::Apis::LoggingV2beta1::LogMetric::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :next_page_token, as: 'nextPageToken' - end + include Google::Apis::Core::JsonObjectSupport end class Empty - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class LogEntry - # @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 + class Representation < Google::Apis::Core::JsonRepresentation; end - 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 + include Google::Apis::Core::JsonObjectSupport end class SourceLocation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :file, as: 'file' - property :function_name, as: 'functionName' - property :line, as: 'line' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ListLogEntriesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :page_token, as: 'pageToken' - property :page_size, as: 'pageSize' - property :order_by, as: 'orderBy' - collection :resource_names, as: 'resourceNames' - property :filter, as: 'filter' - collection :project_ids, as: 'projectIds' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class RequestLog # @private class Representation < Google::Apis::Core::JsonRepresentation + property :request_id, as: 'requestId' + property :nickname, as: 'nickname' + property :pending_time, as: 'pendingTime' + property :resource, as: 'resource' + property :status, as: 'status' + property :task_name, as: 'taskName' + property :url_map_entry, as: 'urlMapEntry' property :instance_index, as: 'instanceIndex' property :finished, as: 'finished' property :host, as: 'host' @@ -330,22 +191,15 @@ module Google property :task_queue_name, as: 'taskQueueName' property :referrer, as: 'referrer' - property :request_id, as: 'requestId' - property :nickname, as: 'nickname' - property :status, as: 'status' - property :resource, as: 'resource' - property :pending_time, as: 'pendingTime' - property :task_name, as: 'taskName' - property :url_map_entry, as: 'urlMapEntry' end end class ListMonitoredResourceDescriptorsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' collection :resource_descriptors, as: 'resourceDescriptors', class: Google::Apis::LoggingV2beta1::MonitoredResourceDescriptor, decorator: Google::Apis::LoggingV2beta1::MonitoredResourceDescriptor::Representation - property :next_page_token, as: 'nextPageToken' end end @@ -367,6 +221,12 @@ module Google end end + class WriteLogEntriesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + class LogEntryOperation # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -377,12 +237,6 @@ module Google end end - class WriteLogEntriesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end - end - class MonitoredResource # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -391,29 +245,175 @@ module Google end end - class LogSink - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - property :destination, as: 'destination' - property :filter, as: 'filter' - property :end_time, as: 'endTime' - property :writer_identity, as: 'writerIdentity' - property :start_time, as: 'startTime' - property :output_version_format, as: 'outputVersionFormat' - end - end - class WriteLogEntriesRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - 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 + property :next_page_token, as: 'nextPageToken' + collection :log_names, as: 'logNames' + end + end + + class ListSinksResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :sinks, as: 'sinks', class: Google::Apis::LoggingV2beta1::LogSink, decorator: Google::Apis::LoggingV2beta1::LogSink::Representation + + end + end + + class HttpRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + 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 :cache_fill_bytes, as: 'cacheFillBytes' + property :request_method, as: 'requestMethod' + property :request_size, as: 'requestSize' + property :response_size, as: 'responseSize' + property :request_url, as: 'requestUrl' + property :remote_ip, as: 'remoteIp' + property :server_ip, as: 'serverIp' + end + end + + class LabelDescriptor + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :value_type, as: 'valueType' + property :key, as: 'key' + property :description, as: 'description' + end + end + + class 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' + end + end + + class LogEntrySourceLocation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :function, as: 'function' + property :line, as: 'line' + property :file, as: 'file' + 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 + + 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 + property :next_page_token, as: 'nextPageToken' + collection :metrics, as: 'metrics', class: Google::Apis::LoggingV2beta1::LogMetric, decorator: Google::Apis::LoggingV2beta1::LogMetric::Representation + + end + end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class LogEntry + # @private + class Representation < Google::Apis::Core::JsonRepresentation + 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' + 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 + + property :timestamp, as: 'timestamp' + end + end + + class SourceLocation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :function_name, as: 'functionName' + property :line, as: 'line' + property :file, as: 'file' + 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 end diff --git a/generated/google/apis/logging_v2beta1/service.rb b/generated/google/apis/logging_v2beta1/service.rb index a0e638b3f..6eddbc787 100644 --- a/generated/google/apis/logging_v2beta1/service.rb +++ b/generated/google/apis/logging_v2beta1/service.rb @@ -84,6 +84,45 @@ module Google execute_or_queue_command(command, &block) end + # Deletes all the log entries in a log. The log reappears if it receives new + # entries. Log entries written shortly before the delete operation might not be + # deleted. + # @param [String] log_name + # Required. The resource name of the log to delete: + # "projects/[PROJECT_ID]/logs/[LOG_ID]" + # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + # "folders/[FOLDER_ID]/logs/[LOG_ID]" + # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog" + # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com% + # 2Factivity". For more information about log names, see LogEntry. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::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, organizations, folders, or billing accounts. Only # logs that have entries are listed. # @param [String] parent @@ -130,18 +169,8 @@ module Google execute_or_queue_command(command, &block) end - # Deletes all the log entries in a log. The log reappears if it receives new - # entries. Log entries written shortly before the delete operation might not be - # deleted. - # @param [String] log_name - # Required. The resource name of the log to delete: - # "projects/[PROJECT_ID]/logs/[LOG_ID]" - # "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - # "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - # "folders/[FOLDER_ID]/logs/[LOG_ID]" - # [LOG_ID] must be URL-encoded. For example, "projects/my-project-id/logs/syslog" - # , "organizations/1234567890/logs/cloudresourcemanager.googleapis.com% - # 2Factivity". For more information about log names, see LogEntry. + # Writes log entries to Stackdriver Logging. + # @param [Google::Apis::LoggingV2beta1::WriteLogEntriesRequest] write_log_entries_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -151,19 +180,20 @@ module Google # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2beta1::Empty] parsed result object + # @yieldparam result [Google::Apis::LoggingV2beta1::WriteLogEntriesResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::LoggingV2beta1::Empty] + # @return [Google::Apis::LoggingV2beta1::WriteLogEntriesResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def 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? + def write_entry_log_entries(write_log_entries_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2beta1/entries:write', options) + command.request_representation = Google::Apis::LoggingV2beta1::WriteLogEntriesRequest::Representation + command.request_object = write_log_entries_request_object + command.response_representation = Google::Apis::LoggingV2beta1::WriteLogEntriesResponse::Representation + command.response_class = Google::Apis::LoggingV2beta1::WriteLogEntriesResponse command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) @@ -200,212 +230,6 @@ module Google execute_or_queue_command(command, &block) end - # Writes log entries to Stackdriver Logging. - # @param [Google::Apis::LoggingV2beta1::WriteLogEntriesRequest] write_log_entries_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2beta1::WriteLogEntriesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2beta1::WriteLogEntriesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def write_entry_log_entries(write_log_entries_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v2beta1/entries:write', options) - command.request_representation = Google::Apis::LoggingV2beta1::WriteLogEntriesRequest::Representation - command.request_object = write_log_entries_request_object - command.response_representation = Google::Apis::LoggingV2beta1::WriteLogEntriesResponse::Representation - command.response_class = Google::Apis::LoggingV2beta1::WriteLogEntriesResponse - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates a logs-based metric. - # @param [String] parent - # The resource name of the project in which to create the metric: - # "projects/[PROJECT_ID]" - # The new metric must be provided in the request. - # @param [Google::Apis::LoggingV2beta1::LogMetric] log_metric_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2beta1::LogMetric] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_project_metric(parent, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v2beta1/{+parent}/metrics', options) - command.request_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation - command.request_object = log_metric_object - command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation - command.response_class = Google::Apis::LoggingV2beta1::LogMetric - command.params['parent'] = parent unless parent.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes a logs-based metric. - # @param [String] metric_name - # The resource name of the metric to delete: - # "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2beta1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2beta1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v2beta1/{+metricName}', options) - command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation - command.response_class = Google::Apis::LoggingV2beta1::Empty - command.params['metricName'] = metric_name unless metric_name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Lists logs-based metrics. - # @param [String] parent - # Required. The name of the project containing the metrics: - # "projects/[PROJECT_ID]" - # @param [String] page_token - # Optional. If present, then retrieve the next batch of results from the - # preceding call to this method. pageToken must be the value of nextPageToken - # from the previous response. The values of other method parameters should be - # identical to those in the previous call. - # @param [Fixnum] page_size - # Optional. The maximum number of results to return from this request. Non- - # positive values are ignored. The presence of nextPageToken in the response - # indicates that more results might be available. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::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, 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['pageToken'] = page_token unless page_token.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets a logs-based metric. - # @param [String] metric_name - # The resource name of the desired metric: - # "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::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. Log entries written shortly before the delete operation might not be # deleted. @@ -491,86 +315,6 @@ module Google execute_or_queue_command(command, &block) end - # Lists sinks. - # @param [String] parent - # Required. The parent resource whose sinks are to be listed: - # "projects/[PROJECT_ID]" - # "organizations/[ORGANIZATION_ID]" - # "billingAccounts/[BILLING_ACCOUNT_ID]" - # "folders/[FOLDER_ID]" - # @param [Fixnum] page_size - # Optional. The maximum number of results to return from this request. Non- - # positive values are ignored. The presence of nextPageToken in the response - # indicates that more results might be available. - # @param [String] page_token - # Optional. If present, then retrieve the next batch of results from the - # preceding call to this method. pageToken must be the value of nextPageToken - # from the previous response. The values of other method parameters should be - # identical to those in the previous call. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2beta1::ListSinksResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2beta1::ListSinksResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_project_sinks(parent, page_size: nil, page_token: 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['pageSize'] = page_size unless page_size.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets a sink. - # @param [String] sink_name - # Required. The resource name of the sink: - # "projects/[PROJECT_ID]/sinks/[SINK_ID]" - # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - # "folders/[FOLDER_ID]/sinks/[SINK_ID]" - # Example: "projects/my-project-id/sinks/my-sink-id". - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::LoggingV2beta1::LogSink] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::LoggingV2beta1::LogSink] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v2beta1/{+sinkName}', options) - command.response_representation = Google::Apis::LoggingV2beta1::LogSink::Representation - command.response_class = Google::Apis::LoggingV2beta1::LogSink - command.params['sinkName'] = sink_name unless sink_name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - # Updates a sink. If the named sink doesn't exist, then this method is identical # to sinks.create. If the named sink does exist, then this method replaces the # following fields in the existing sink with values from the new sink: @@ -715,6 +459,262 @@ module Google execute_or_queue_command(command, &block) end + # Lists sinks. + # @param [String] parent + # Required. The parent resource whose sinks are to be listed: + # "projects/[PROJECT_ID]" + # "organizations/[ORGANIZATION_ID]" + # "billingAccounts/[BILLING_ACCOUNT_ID]" + # "folders/[FOLDER_ID]" + # @param [String] page_token + # Optional. If present, then retrieve the next batch of results from the + # preceding call to this method. pageToken must be the value of nextPageToken + # from the previous response. The values of other method parameters should be + # identical to those in the previous call. + # @param [Fixnum] page_size + # Optional. The maximum number of results to return from this request. Non- + # positive values are ignored. The presence of nextPageToken in the response + # indicates that more results might be available. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::LoggingV2beta1::ListSinksResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2beta1::ListSinksResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_sinks(parent, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2beta1/{+parent}/sinks', options) + command.response_representation = Google::Apis::LoggingV2beta1::ListSinksResponse::Representation + command.response_class = Google::Apis::LoggingV2beta1::ListSinksResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a sink. + # @param [String] sink_name + # Required. The resource name of the sink: + # "projects/[PROJECT_ID]/sinks/[SINK_ID]" + # "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + # "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + # "folders/[FOLDER_ID]/sinks/[SINK_ID]" + # Example: "projects/my-project-id/sinks/my-sink-id". + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::LoggingV2beta1::LogSink] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2beta1::LogSink] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_sink(sink_name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2beta1/{+sinkName}', options) + command.response_representation = Google::Apis::LoggingV2beta1::LogSink::Representation + command.response_class = Google::Apis::LoggingV2beta1::LogSink + command.params['sinkName'] = sink_name unless sink_name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a logs-based metric. + # @param [String] metric_name + # The resource name of the metric to delete: + # "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::LoggingV2beta1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2beta1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v2beta1/{+metricName}', options) + command.response_representation = Google::Apis::LoggingV2beta1::Empty::Representation + command.response_class = Google::Apis::LoggingV2beta1::Empty + command.params['metricName'] = metric_name unless metric_name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists logs-based metrics. + # @param [String] parent + # Required. The name of the project containing the metrics: + # "projects/[PROJECT_ID]" + # @param [String] page_token + # Optional. If present, then retrieve the next batch of results from the + # preceding call to this method. pageToken must be the value of nextPageToken + # from the previous response. The values of other method parameters should be + # identical to those in the previous call. + # @param [Fixnum] page_size + # Optional. The maximum number of results to return from this request. Non- + # positive values are ignored. The presence of nextPageToken in the response + # indicates that more results might be available. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::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, 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['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a logs-based metric. + # @param [String] metric_name + # The resource name of the desired metric: + # "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2beta1::LogMetric] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_metric(metric_name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v2beta1/{+metricName}', options) + command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation + command.response_class = Google::Apis::LoggingV2beta1::LogMetric + command.params['metricName'] = metric_name unless metric_name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates or updates a logs-based metric. + # @param [String] metric_name + # The resource name of the metric to update: + # "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + # The updated metric must be provided in the request and it's name field must be + # the same as [METRIC_ID] If the metric does not exist in [PROJECT_ID], then a + # new metric is created. + # @param [Google::Apis::LoggingV2beta1::LogMetric] log_metric_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2beta1::LogMetric] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_project_metric(metric_name, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'v2beta1/{+metricName}', options) + command.request_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation + command.request_object = log_metric_object + command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation + command.response_class = Google::Apis::LoggingV2beta1::LogMetric + command.params['metricName'] = metric_name unless metric_name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a logs-based metric. + # @param [String] parent + # The resource name of the project in which to create the metric: + # "projects/[PROJECT_ID]" + # The new metric must be provided in the request. + # @param [Google::Apis::LoggingV2beta1::LogMetric] log_metric_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::LoggingV2beta1::LogMetric] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::LoggingV2beta1::LogMetric] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_metric(parent, log_metric_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v2beta1/{+parent}/metrics', options) + command.request_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation + command.request_object = log_metric_object + command.response_representation = Google::Apis::LoggingV2beta1::LogMetric::Representation + command.response_class = Google::Apis::LoggingV2beta1::LogMetric + command.params['parent'] = parent unless parent.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Deletes all the log entries in a log. The log reappears if it receives new # entries. Log entries written shortly before the delete operation might not be # deleted. diff --git a/generated/google/apis/manufacturers_v1.rb b/generated/google/apis/manufacturers_v1.rb index 1db89133b..726007bf8 100644 --- a/generated/google/apis/manufacturers_v1.rb +++ b/generated/google/apis/manufacturers_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/manufacturers/ module ManufacturersV1 VERSION = 'V1' - REVISION = '20161028' + REVISION = '20170322' # Manage your product listings for Google Manufacturer Center AUTH_MANUFACTURERCENTER = 'https://www.googleapis.com/auth/manufacturercenter' diff --git a/generated/google/apis/manufacturers_v1/classes.rb b/generated/google/apis/manufacturers_v1/classes.rb index 07df91f39..67f11d967 100644 --- a/generated/google/apis/manufacturers_v1/classes.rb +++ b/generated/google/apis/manufacturers_v1/classes.rb @@ -22,32 +22,20 @@ module Google module Apis module ManufacturersV1 - # Product issue. - class Issue + # The number of products in a single package. For more information, see + # https://support.google.com/manufacturers/answer/6124116#count. + class Count include Google::Apis::Core::Hashable - # Description of the issue. - # Corresponds to the JSON property `description` + # The numeric value of the number of products in a package. + # Corresponds to the JSON property `value` # @return [String] - attr_accessor :description + attr_accessor :value - # The server-generated type of the issue, for example, - # “INCORRECT_TEXT_FORMATTING”, “IMAGE_NOT_SERVEABLE”, etc. - # Corresponds to the JSON property `type` + # The unit in which these products are counted. + # Corresponds to the JSON property `unit` # @return [String] - attr_accessor :type - - # If present, the attribute that triggered the issue. For more information - # about attributes, see - # https://support.google.com/manufacturers/answer/6124116. - # Corresponds to the JSON property `attribute` - # @return [String] - attr_accessor :attribute - - # The severity of the issue. - # Corresponds to the JSON property `severity` - # @return [String] - attr_accessor :severity + attr_accessor :unit def initialize(**args) update!(**args) @@ -55,10 +43,8 @@ module Google # Update properties of this object def update!(**args) - @description = args[:description] if args.key?(:description) - @type = args[:type] if args.key?(:type) - @attribute = args[:attribute] if args.key?(:attribute) - @severity = args[:severity] if args.key?(:severity) + @value = args[:value] if args.key?(:value) + @unit = args[:unit] if args.key?(:unit) end end @@ -66,6 +52,33 @@ module Google class Product include Google::Apis::Core::Hashable + # 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 + + # 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 + # Names of the attributes of the product deleted manually via the # Manufacturer Center UI. # @OutputOnly @@ -111,39 +124,15 @@ module Google # @return [Google::Apis::ManufacturersV1::Attributes] attr_accessor :manually_provided_attributes - # 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 - - # 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 - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @target_country = args[:target_country] if args.key?(:target_country) + @content_language = args[:content_language] if args.key?(:content_language) + @name = args[:name] if args.key?(:name) @manually_deleted_attributes = args[:manually_deleted_attributes] if args.key?(:manually_deleted_attributes) @issues = args[:issues] if args.key?(:issues) @final_attributes = args[:final_attributes] if args.key?(:final_attributes) @@ -151,66 +140,23 @@ module Google @uploaded_attributes = args[:uploaded_attributes] if args.key?(:uploaded_attributes) @parent = args[:parent] if args.key?(:parent) @manually_provided_attributes = args[:manually_provided_attributes] if args.key?(:manually_provided_attributes) - @target_country = args[:target_country] if args.key?(:target_country) - @content_language = args[:content_language] if args.key?(:content_language) - @name = args[:name] if args.key?(:name) end end - # Attributes of the product. For more information, see - # https://support.google.com/manufacturers/answer/6124116. - class Attributes + # The capacity of a product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#capacity. + class Capacity include Google::Apis::Core::Hashable - # The Global Trade Item Number (GTIN) of the product. For more information, - # see https://support.google.com/manufacturers/answer/6124116#gtin. - # Corresponds to the JSON property `gtin` - # @return [Array] - attr_accessor :gtin - - # The title of the product. For more information, see - # https://support.google.com/manufacturers/answer/6124116#title. - # Corresponds to the JSON property `title` + # The numeric value of the capacity. + # Corresponds to the JSON property `value` # @return [String] - attr_accessor :title + attr_accessor :value - # 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` + # The unit of the capacity, i.e., MB, GB, or TB. + # Corresponds to the JSON property `unit` # @return [String] - attr_accessor :product_line - - # 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 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 manufacturer's category of the product. For more information, see - # https://support.google.com/manufacturers/answer/6124116#producttype. - # Corresponds to the JSON property `productType` - # @return [Array] - attr_accessor :product_type - - # The Manufacturer Part Number (MPN) of the product. For more information, - # see https://support.google.com/manufacturers/answer/6124116#mpn. - # Corresponds to the JSON property `mpn` - # @return [String] - attr_accessor :mpn - - # The URL of the 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 + attr_accessor :unit def initialize(**args) update!(**args) @@ -218,14 +164,8 @@ module Google # Update properties of this object def update!(**args) - @gtin = args[:gtin] if args.key?(:gtin) - @title = args[:title] if args.key?(:title) - @product_line = args[:product_line] if args.key?(:product_line) - @brand = args[:brand] if args.key?(:brand) - @product_name = args[:product_name] if args.key?(:product_name) - @product_type = args[:product_type] if args.key?(:product_type) - @mpn = args[:mpn] if args.key?(:mpn) - @product_page_url = args[:product_page_url] if args.key?(:product_page_url) + @value = args[:value] if args.key?(:value) + @unit = args[:unit] if args.key?(:unit) end end @@ -253,6 +193,413 @@ module Google @next_page_token = args[:next_page_token] if args.key?(:next_page_token) end end + + # A product detail of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#productdetail. + class ProductDetail + include Google::Apis::Core::Hashable + + # The value of the attribute. + # Corresponds to the JSON property `attributeValue` + # @return [String] + attr_accessor :attribute_value + + # A short section name that can be reused between multiple product details. + # Corresponds to the JSON property `sectionName` + # @return [String] + attr_accessor :section_name + + # The name of the attribute. + # Corresponds to the JSON property `attributeName` + # @return [String] + attr_accessor :attribute_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @attribute_value = args[:attribute_value] if args.key?(:attribute_value) + @section_name = args[:section_name] if args.key?(:section_name) + @attribute_name = args[:attribute_name] if args.key?(:attribute_name) + end + end + + # A feature description of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#featuredesc. + class FeatureDescription + include Google::Apis::Core::Hashable + + # A detailed description of the feature. + # Corresponds to the JSON property `text` + # @return [String] + attr_accessor :text + + # An image. + # Corresponds to the JSON property `image` + # @return [Google::Apis::ManufacturersV1::Image] + attr_accessor :image + + # A short description of the feature. + # Corresponds to the JSON property `headline` + # @return [String] + attr_accessor :headline + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @text = args[:text] if args.key?(:text) + @image = args[:image] if args.key?(:image) + @headline = args[:headline] if args.key?(:headline) + end + end + + # Product issue. + class Issue + include Google::Apis::Core::Hashable + + # The timestamp when this issue appeared. + # Corresponds to the JSON property `timestamp` + # @return [String] + attr_accessor :timestamp + + # 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 + + # The server-generated type of the issue, for example, + # “INCORRECT_TEXT_FORMATTING”, “IMAGE_NOT_SERVEABLE”, etc. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # If present, the attribute that triggered the issue. For more information + # about attributes, see + # https://support.google.com/manufacturers/answer/6124116. + # Corresponds to the JSON property `attribute` + # @return [String] + attr_accessor :attribute + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @timestamp = args[:timestamp] if args.key?(:timestamp) + @severity = args[:severity] if args.key?(:severity) + @description = args[:description] if args.key?(:description) + @type = args[:type] if args.key?(:type) + @attribute = args[:attribute] if args.key?(:attribute) + end + end + + # A price. + class Price + include Google::Apis::Core::Hashable + + # The numeric value of the price. + # Corresponds to the JSON property `amount` + # @return [String] + attr_accessor :amount + + # The currency in which the price is denoted. + # Corresponds to the JSON property `currency` + # @return [String] + attr_accessor :currency + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @amount = args[:amount] if args.key?(:amount) + @currency = args[:currency] if args.key?(:currency) + end + end + + # An image. + class Image + include Google::Apis::Core::Hashable + + # The type of the image, i.e., crawled or uploaded. + # @OutputOnly + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The URL of the image. For crawled images, this is the provided URL. For + # uploaded images, this is a serving URL from Google if the image has been + # processed successfully. + # Corresponds to the JSON property `imageUrl` + # @return [String] + attr_accessor :image_url + + # The status of the image. + # @OutputOnly + # Corresponds to the JSON property `status` + # @return [String] + attr_accessor :status + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type = args[:type] if args.key?(:type) + @image_url = args[:image_url] if args.key?(:image_url) + @status = args[:status] if args.key?(:status) + 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 size system of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#sizesystem. + # Corresponds to the JSON property `sizeSystem` + # @return [String] + attr_accessor :size_system + + # The theme of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#theme. + # Corresponds to the JSON property `theme` + # @return [String] + attr_accessor :theme + + # The pattern of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#pattern. + # Corresponds to the JSON property `pattern` + # @return [String] + attr_accessor :pattern + + # An image. + # Corresponds to the JSON property `imageLink` + # @return [Google::Apis::ManufacturersV1::Image] + attr_accessor :image_link + + # The category of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#producttype. + # Corresponds to the JSON property `productType` + # @return [Array] + attr_accessor :product_type + + # The format of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#format. + # Corresponds to the JSON property `format` + # @return [String] + attr_accessor :format + + # The additional images of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#addlimage. + # Corresponds to the JSON property `additionalImageLink` + # @return [Array] + attr_accessor :additional_image_link + + # The videos of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#video. + # Corresponds to the JSON property `videoLink` + # @return [Array] + attr_accessor :video_link + + # The color of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#color. + # Corresponds to the JSON property `color` + # @return [String] + attr_accessor :color + + # The canonical name of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#productname. + # Corresponds to the JSON property `productName` + # @return [String] + attr_accessor :product_name + + # The size type of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#sizetype. + # Corresponds to the JSON property `sizeType` + # @return [String] + attr_accessor :size_type + + # A price. + # Corresponds to the JSON property `suggestedRetailPrice` + # @return [Google::Apis::ManufacturersV1::Price] + attr_accessor :suggested_retail_price + + # The rich format description of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#featuredesc. + # Corresponds to the JSON property `featureDescription` + # @return [Array] + attr_accessor :feature_description + + # The size of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#size. + # Corresponds to the JSON property `size` + # @return [String] + attr_accessor :size + + # The title of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#title. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # The number of products in a single package. For more information, see + # https://support.google.com/manufacturers/answer/6124116#count. + # Corresponds to the JSON property `count` + # @return [Google::Apis::ManufacturersV1::Count] + attr_accessor :count + + # The brand name of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#brand. + # Corresponds to the JSON property `brand` + # @return [String] + attr_accessor :brand + + # The disclosure date of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#disclosure. + # Corresponds to the JSON property `disclosureDate` + # @return [String] + attr_accessor :disclosure_date + + # The material of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#material. + # Corresponds to the JSON property `material` + # @return [String] + attr_accessor :material + + # The scent of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#scent. + # Corresponds to the JSON property `scent` + # @return [String] + attr_accessor :scent + + # The target age group of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#agegroup. + # Corresponds to the JSON property `ageGroup` + # @return [String] + attr_accessor :age_group + + # The details of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#productdetail. + # Corresponds to the JSON property `productDetail` + # @return [Array] + attr_accessor :product_detail + + # The flavor of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#flavor. + # Corresponds to the JSON property `flavor` + # @return [String] + attr_accessor :flavor + + # The URL of the detail page of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#productpage. + # Corresponds to the JSON property `productPageUrl` + # @return [String] + attr_accessor :product_page_url + + # The 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 release date of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#release. + # Corresponds to the JSON property `releaseDate` + # @return [String] + attr_accessor :release_date + + # The Global Trade Item Number (GTIN) of the product. For more information, + # see https://support.google.com/manufacturers/answer/6124116#gtin. + # Corresponds to the JSON property `gtin` + # @return [Array] + attr_accessor :gtin + + # The item group id of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#itemgroupid. + # Corresponds to the JSON property `itemGroupId` + # @return [String] + attr_accessor :item_group_id + + # The name of the group of products related to the product. For more + # information, see + # https://support.google.com/manufacturers/answer/6124116#productline. + # Corresponds to the JSON property `productLine` + # @return [String] + attr_accessor :product_line + + # The capacity of a product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#capacity. + # Corresponds to the JSON property `capacity` + # @return [Google::Apis::ManufacturersV1::Capacity] + attr_accessor :capacity + + # The description of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#description. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The target gender of the product. For more information, see + # https://support.google.com/manufacturers/answer/6124116#gender. + # Corresponds to the JSON property `gender` + # @return [String] + attr_accessor :gender + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @size_system = args[:size_system] if args.key?(:size_system) + @theme = args[:theme] if args.key?(:theme) + @pattern = args[:pattern] if args.key?(:pattern) + @image_link = args[:image_link] if args.key?(:image_link) + @product_type = args[:product_type] if args.key?(:product_type) + @format = args[:format] if args.key?(:format) + @additional_image_link = args[:additional_image_link] if args.key?(:additional_image_link) + @video_link = args[:video_link] if args.key?(:video_link) + @color = args[:color] if args.key?(:color) + @product_name = args[:product_name] if args.key?(:product_name) + @size_type = args[:size_type] if args.key?(:size_type) + @suggested_retail_price = args[:suggested_retail_price] if args.key?(:suggested_retail_price) + @feature_description = args[:feature_description] if args.key?(:feature_description) + @size = args[:size] if args.key?(:size) + @title = args[:title] if args.key?(:title) + @count = args[:count] if args.key?(:count) + @brand = args[:brand] if args.key?(:brand) + @disclosure_date = args[:disclosure_date] if args.key?(:disclosure_date) + @material = args[:material] if args.key?(:material) + @scent = args[:scent] if args.key?(:scent) + @age_group = args[:age_group] if args.key?(:age_group) + @product_detail = args[:product_detail] if args.key?(:product_detail) + @flavor = args[:flavor] if args.key?(:flavor) + @product_page_url = args[:product_page_url] if args.key?(:product_page_url) + @mpn = args[:mpn] if args.key?(:mpn) + @release_date = args[:release_date] if args.key?(:release_date) + @gtin = args[:gtin] if args.key?(:gtin) + @item_group_id = args[:item_group_id] if args.key?(:item_group_id) + @product_line = args[:product_line] if args.key?(:product_line) + @capacity = args[:capacity] if args.key?(:capacity) + @description = args[:description] if args.key?(:description) + @gender = args[:gender] if args.key?(:gender) + end + end end end end diff --git a/generated/google/apis/manufacturers_v1/representations.rb b/generated/google/apis/manufacturers_v1/representations.rb index 4d290c070..85d9cba61 100644 --- a/generated/google/apis/manufacturers_v1/representations.rb +++ b/generated/google/apis/manufacturers_v1/representations.rb @@ -22,7 +22,7 @@ module Google module Apis module ManufacturersV1 - class Issue + class Count class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -34,7 +34,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Attributes + class Capacity class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -46,19 +46,56 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class ProductDetail + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class FeatureDescription + 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 Price + 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 Attributes + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Count # @private class Representation < Google::Apis::Core::JsonRepresentation - property :description, as: 'description' - property :type, as: 'type' - property :attribute, as: 'attribute' - property :severity, as: 'severity' + property :value, as: 'value' + property :unit, as: 'unit' end end class Product # @private class Representation < Google::Apis::Core::JsonRepresentation + property :target_country, as: 'targetCountry' + property :content_language, as: 'contentLanguage' + property :name, as: 'name' collection :manually_deleted_attributes, as: 'manuallyDeletedAttributes' collection :issues, as: 'issues', class: Google::Apis::ManufacturersV1::Issue, decorator: Google::Apis::ManufacturersV1::Issue::Representation @@ -70,23 +107,14 @@ module Google property :parent, as: 'parent' property :manually_provided_attributes, as: 'manuallyProvidedAttributes', class: Google::Apis::ManufacturersV1::Attributes, decorator: Google::Apis::ManufacturersV1::Attributes::Representation - property :target_country, as: 'targetCountry' - property :content_language, as: 'contentLanguage' - property :name, as: 'name' end end - class Attributes + class Capacity # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :gtin, as: 'gtin' - property :title, as: 'title' - property :product_line, as: 'productLine' - property :brand, as: 'brand' - property :product_name, as: 'productName' - collection :product_type, as: 'productType' - property :mpn, as: 'mpn' - property :product_page_url, as: 'productPageUrl' + property :value, as: 'value' + property :unit, as: 'unit' end end @@ -98,6 +126,98 @@ module Google property :next_page_token, as: 'nextPageToken' end end + + class ProductDetail + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :attribute_value, as: 'attributeValue' + property :section_name, as: 'sectionName' + property :attribute_name, as: 'attributeName' + end + end + + class FeatureDescription + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :text, as: 'text' + property :image, as: 'image', class: Google::Apis::ManufacturersV1::Image, decorator: Google::Apis::ManufacturersV1::Image::Representation + + property :headline, as: 'headline' + end + end + + class Issue + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :timestamp, as: 'timestamp' + property :severity, as: 'severity' + property :description, as: 'description' + property :type, as: 'type' + property :attribute, as: 'attribute' + end + end + + class Price + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :amount, as: 'amount' + property :currency, as: 'currency' + end + end + + class Image + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' + property :image_url, as: 'imageUrl' + property :status, as: 'status' + end + end + + class Attributes + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :size_system, as: 'sizeSystem' + property :theme, as: 'theme' + property :pattern, as: 'pattern' + property :image_link, as: 'imageLink', class: Google::Apis::ManufacturersV1::Image, decorator: Google::Apis::ManufacturersV1::Image::Representation + + collection :product_type, as: 'productType' + property :format, as: 'format' + collection :additional_image_link, as: 'additionalImageLink', class: Google::Apis::ManufacturersV1::Image, decorator: Google::Apis::ManufacturersV1::Image::Representation + + collection :video_link, as: 'videoLink' + property :color, as: 'color' + property :product_name, as: 'productName' + property :size_type, as: 'sizeType' + property :suggested_retail_price, as: 'suggestedRetailPrice', class: Google::Apis::ManufacturersV1::Price, decorator: Google::Apis::ManufacturersV1::Price::Representation + + collection :feature_description, as: 'featureDescription', class: Google::Apis::ManufacturersV1::FeatureDescription, decorator: Google::Apis::ManufacturersV1::FeatureDescription::Representation + + property :size, as: 'size' + property :title, as: 'title' + property :count, as: 'count', class: Google::Apis::ManufacturersV1::Count, decorator: Google::Apis::ManufacturersV1::Count::Representation + + property :brand, as: 'brand' + property :disclosure_date, as: 'disclosureDate' + property :material, as: 'material' + property :scent, as: 'scent' + property :age_group, as: 'ageGroup' + collection :product_detail, as: 'productDetail', class: Google::Apis::ManufacturersV1::ProductDetail, decorator: Google::Apis::ManufacturersV1::ProductDetail::Representation + + property :flavor, as: 'flavor' + property :product_page_url, as: 'productPageUrl' + property :mpn, as: 'mpn' + property :release_date, as: 'releaseDate' + collection :gtin, as: 'gtin' + property :item_group_id, as: 'itemGroupId' + property :product_line, as: 'productLine' + property :capacity, as: 'capacity', class: Google::Apis::ManufacturersV1::Capacity, decorator: Google::Apis::ManufacturersV1::Capacity::Representation + + property :description, as: 'description' + property :gender, as: 'gender' + end + end end end end diff --git a/generated/google/apis/manufacturers_v1/service.rb b/generated/google/apis/manufacturers_v1/service.rb index 440707739..3e2cce9d0 100644 --- a/generated/google/apis/manufacturers_v1/service.rb +++ b/generated/google/apis/manufacturers_v1/service.rb @@ -50,16 +50,16 @@ module Google # @param [String] parent # Parent ID in the format `accounts/`account_id``. # `account_id` - The ID of the Manufacturer Center account. + # @param [String] page_token + # The token returned by the previous request. # @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] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -72,15 +72,15 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_account_products(parent, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_account_products(parent, page_token: nil, page_size: nil, fields: nil, quota_user: 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['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 +98,11 @@ module Google # `product_id` - The ID of the product. For more information, see # https://support.google.com/manufacturers/answer/6124116# # 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 # @@ -115,14 +115,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_product(parent, name, quota_user: nil, fields: nil, options: nil, &block) + def get_account_product(parent, name, fields: nil, quota_user: 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? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/mirror_v1.rb b/generated/google/apis/mirror_v1.rb index 8b85aaac8..814a02010 100644 --- a/generated/google/apis/mirror_v1.rb +++ b/generated/google/apis/mirror_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/glass module MirrorV1 VERSION = 'V1' - REVISION = '20160616' + REVISION = '20170314' # View your location AUTH_GLASS_LOCATION = 'https://www.googleapis.com/auth/glass.location' diff --git a/generated/google/apis/monitoring_v3.rb b/generated/google/apis/monitoring_v3.rb index 447d8f195..846887a88 100644 --- a/generated/google/apis/monitoring_v3.rb +++ b/generated/google/apis/monitoring_v3.rb @@ -27,19 +27,19 @@ module Google # @see https://cloud.google.com/monitoring/api/ module MonitoringV3 VERSION = 'V3' - REVISION = '20170306' - - # 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' + REVISION = '20170320' # 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' + + # 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' end end end diff --git a/generated/google/apis/monitoring_v3/classes.rb b/generated/google/apis/monitoring_v3/classes.rb index b5ebcdef8..6154ed964 100644 --- a/generated/google/apis/monitoring_v3/classes.rb +++ b/generated/google/apis/monitoring_v3/classes.rb @@ -22,6 +22,328 @@ module Google module Apis module MonitoringV3 + # BucketOptions describes the bucket boundaries used to create a histogram for + # the distribution. The buckets can be in a linear sequence, an exponential + # sequence, or each bucket can be specified explicitly. BucketOptions does not + # include the number of values in each bucket.A bucket has an inclusive lower + # bound and exclusive upper bound for the values that are counted for that + # bucket. The upper bound of a bucket must be strictly greater than the lower + # bound. The sequence of N buckets for a distribution consists of an underflow + # bucket (number 0), zero or more finite buckets (number 1 through N - 2) and an + # overflow bucket (number N - 1). The buckets are contiguous: the lower bound of + # bucket i (i > 0) is the same as the upper bound of bucket i - 1. The buckets + # span the whole range of finite values: lower bound of the underflow bucket is - + # infinity and the upper bound of the overflow bucket is +infinity. The finite + # buckets are so-called because both bounds are finite. + class BucketOptions + include Google::Apis::Core::Hashable + + # Specifies an exponential sequence of buckets that have a width that is + # proportional to the value of the lower bound. Each bucket represents a + # constant relative uncertainty on a specific value in the bucket.There are + # num_finite_buckets + 2 (= N) buckets. Bucket i has the following boundaries: + # Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). Lower bound (1 <= i < + # N): scale * (growth_factor ^ (i - 1)). + # Corresponds to the JSON property `exponentialBuckets` + # @return [Google::Apis::MonitoringV3::Exponential] + attr_accessor :exponential_buckets + + # Specifies a linear sequence of buckets that all have the same width (except + # overflow and underflow). Each bucket represents a constant absolute + # uncertainty on the specific value in the bucket.There are num_finite_buckets + + # 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N- + # 1): offset + (width * i). Lower bound (1 <= i < N): offset + (width * (i - 1)) + # . + # Corresponds to the JSON property `linearBuckets` + # @return [Google::Apis::MonitoringV3::Linear] + attr_accessor :linear_buckets + + # Specifies a set of buckets with arbitrary widths.There are size(bounds) + 1 (= + # N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N-1): + # boundsi Lower bound (1 <= i < N); boundsi - 1The bounds field must contain at + # least one element. If bounds has only one element, then there are no finite + # buckets, and that single element is the common boundary of the overflow and + # underflow buckets. + # Corresponds to the JSON property `explicitBuckets` + # @return [Google::Apis::MonitoringV3::Explicit] + attr_accessor :explicit_buckets + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @exponential_buckets = args[:exponential_buckets] if args.key?(:exponential_buckets) + @linear_buckets = args[:linear_buckets] if args.key?(:linear_buckets) + @explicit_buckets = args[:explicit_buckets] if args.key?(:explicit_buckets) + end + end + + # A single data point from a collectd-based plugin. + class CollectdValue + include Google::Apis::Core::Hashable + + # The data source for the collectd value. For example there are two data sources + # for network measurements: "rx" and "tx". + # Corresponds to the JSON property `dataSourceName` + # @return [String] + attr_accessor :data_source_name + + # A single strongly-typed value. + # Corresponds to the JSON property `value` + # @return [Google::Apis::MonitoringV3::TypedValue] + attr_accessor :value + + # The type of measurement. + # Corresponds to the JSON property `dataSourceType` + # @return [String] + attr_accessor :data_source_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @data_source_name = args[:data_source_name] if args.key?(:data_source_name) + @value = args[:value] if args.key?(:value) + @data_source_type = args[:data_source_type] if args.key?(:data_source_type) + end + end + + # SourceContext represents information about the source of a protobuf element, + # like the file in which it is defined. + class SourceContext + include Google::Apis::Core::Hashable + + # The path-qualified name of the .proto file that contained the associated + # protobuf element. For example: "google/protobuf/source_context.proto". + # Corresponds to the JSON property `fileName` + # @return [String] + attr_accessor :file_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @file_name = args[:file_name] if args.key?(:file_name) + end + end + + # Defines a metric type and its schema. Once a metric descriptor is created, + # deleting or altering it stops data collection and makes the metric type's + # existing data unusable. + class MetricDescriptor + include Google::Apis::Core::Hashable + + # Whether the measurement is an integer, a floating-point number, etc. Some + # combinations of metric_kind and value_type might not be supported. + # Corresponds to the JSON property `valueType` + # @return [String] + attr_accessor :value_type + + # Whether the metric records instantaneous values, changes to a value, etc. Some + # combinations of metric_kind and value_type might not be supported. + # Corresponds to the JSON property `metricKind` + # @return [String] + attr_accessor :metric_kind + + # A concise name for the metric, which can be displayed in user interfaces. Use + # sentence case without an ending period, for example "Request count". + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # A detailed description of the metric, which can be used in documentation. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The unit in which the metric value is reported. It is only applicable if the + # value_type is INT64, DOUBLE, or DISTRIBUTION. The supported units are a subset + # of The Unified Code for Units of Measure (http://unitsofmeasure.org/ucum.html) + # standard:Basic units (UNIT) + # bit bit + # By byte + # s second + # min minute + # h hour + # d dayPrefixes (PREFIX) + # k kilo (10**3) + # M mega (10**6) + # G giga (10**9) + # T tera (10**12) + # P peta (10**15) + # E exa (10**18) + # Z zetta (10**21) + # Y yotta (10**24) + # m milli (10**-3) + # u micro (10**-6) + # n nano (10**-9) + # p pico (10**-12) + # f femto (10**-15) + # a atto (10**-18) + # z zepto (10**-21) + # y yocto (10**-24) + # Ki kibi (2**10) + # Mi mebi (2**20) + # Gi gibi (2**30) + # Ti tebi (2**40)GrammarThe grammar includes the dimensionless unit 1, such as 1/ + # s.The grammar also includes these connectors: + # / division (as an infix operator, e.g. 1/s). + # . multiplication (as an infix operator, e.g. GBy.d)The grammar for a unit is + # as follows: + # Expression = Component ` "." Component ` ` "/" Component ` ; + # Component = [ PREFIX ] UNIT [ Annotation ] + # | Annotation + # | "1" + # ; + # Annotation = "`" NAME "`" ; + # Notes: + # Annotation is just a comment if it follows a UNIT and is equivalent to 1 if + # it is used alone. For examples, `requests`/s == 1/s, By`transmitted`/s == By/ + # s. + # NAME is a sequence of non-blank printable ASCII characters not containing '`' + # or '`'. + # Corresponds to the JSON property `unit` + # @return [String] + attr_accessor :unit + + # The set of labels that can be used to describe a specific instance of this + # metric type. For example, the appengine.googleapis.com/http/server/ + # response_latencies metric type has a label for the HTTP response code, + # response_code, so you can look at latencies for successful responses or just + # for responses that failed. + # Corresponds to the JSON property `labels` + # @return [Array] + attr_accessor :labels + + # The resource name of the metric descriptor. Depending on the implementation, + # the name typically includes: (1) the parent resource name that defines the + # scope of the metric type or of its data; and (2) the metric's URL-encoded type, + # which also appears in the type field of this descriptor. For example, + # following is the resource name of a custom metric within the GCP project my- + # project-id: + # "projects/my-project-id/metricDescriptors/custom.googleapis.com%2Finvoice% + # 2Fpaid%2Famount" + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The metric type, including its DNS name prefix. The type is not URL-encoded. + # All user-defined custom metric types have the DNS name custom.googleapis.com. + # Metric types should use a natural hierarchical grouping. For example: + # "custom.googleapis.com/invoice/paid/amount" + # "appengine.googleapis.com/http/server/response_latencies" + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @value_type = args[:value_type] if args.key?(:value_type) + @metric_kind = args[:metric_kind] if args.key?(:metric_kind) + @display_name = args[:display_name] if args.key?(:display_name) + @description = args[:description] if args.key?(:description) + @unit = args[:unit] if args.key?(:unit) + @labels = args[:labels] if args.key?(:labels) + @name = args[:name] if args.key?(:name) + @type = args[:type] if args.key?(:type) + end + end + + # The range of the population values. + class Range + include Google::Apis::Core::Hashable + + # The minimum of the population values. + # Corresponds to the JSON property `min` + # @return [Float] + attr_accessor :min + + # The maximum of the population values. + # Corresponds to the JSON property `max` + # @return [Float] + attr_accessor :max + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @min = args[:min] if args.key?(:min) + @max = args[:max] if args.key?(:max) + end + end + + # The ListGroups response. + class ListGroupsResponse + include Google::Apis::Core::Hashable + + # If there are more results than have been returned, then this field is set to a + # non-empty value. To see the additional results, use that value as pageToken in + # the next call to this method. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The groups that match the specified filters. + # Corresponds to the JSON property `group` + # @return [Array] + attr_accessor :group + + 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) + @group = args[:group] if args.key?(:group) + end + end + + # The ListGroupMembers response. + class ListGroupMembersResponse + include Google::Apis::Core::Hashable + + # If there are more results than have been returned, then this field is set to a + # non-empty value. To see the additional results, use that value as pageToken in + # the next call to this method. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The total number of elements matching this request. + # Corresponds to the JSON property `totalSize` + # @return [Fixnum] + attr_accessor :total_size + + # A set of monitored resources in the group. + # Corresponds to the JSON property `members` + # @return [Array] + attr_accessor :members + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @total_size = args[:total_size] if args.key?(:total_size) + @members = args[:members] if args.key?(:members) + end + end + # The CreateCollectdTimeSeries request. class CreateCollectdTimeSeriesRequest include Google::Apis::Core::Hashable @@ -67,39 +389,6 @@ module Google end end - # The ListGroupMembers response. - class ListGroupMembersResponse - include Google::Apis::Core::Hashable - - # A set of monitored resources in the group. - # Corresponds to the JSON property `members` - # @return [Array] - attr_accessor :members - - # If there are more results than have been returned, then this field is set to a - # non-empty value. To see the additional results, use that value as pageToken in - # the next call to this method. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The total number of elements matching this request. - # Corresponds to the JSON property `totalSize` - # @return [Fixnum] - attr_accessor :total_size - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @members = args[:members] if args.key?(:members) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @total_size = args[:total_size] if args.key?(:total_size) - end - end - # The ListMonitoredResourcDescriptors response. class ListMonitoredResourceDescriptorsResponse include Google::Apis::Core::Hashable @@ -135,22 +424,6 @@ module Google class TimeSeries include Google::Apis::Core::Hashable - # A specific metric, identified by specifying values for all of the labels of a - # MetricDescriptor. - # Corresponds to the JSON property `metric` - # @return [Google::Apis::MonitoringV3::Metric] - attr_accessor :metric - - # The data points of this time series. When listing time series, the order of - # the points is specified by the list method.When creating a time series, this - # field must contain exactly one point and the point's type must be the same as - # the value type of the associated metric. If the associated metric's descriptor - # must be auto-created, then the value type of the descriptor is determined by - # the point's type, which must be BOOL, INT64, DOUBLE, or DISTRIBUTION. - # Corresponds to the JSON property `points` - # @return [Array] - attr_accessor :points - # The value type of the time series. When listing time series, this value type # might be different from the value type of the associated metric if this time # series is an alignment or reduction of other time series.When creating a time @@ -187,17 +460,33 @@ module Google # @return [String] attr_accessor :metric_kind + # A specific metric, identified by specifying values for all of the labels of a + # MetricDescriptor. + # Corresponds to the JSON property `metric` + # @return [Google::Apis::MonitoringV3::Metric] + attr_accessor :metric + + # The data points of this time series. When listing time series, the order of + # the points is specified by the list method.When creating a time series, this + # field must contain exactly one point and the point's type must be the same as + # the value type of the associated metric. If the associated metric's descriptor + # must be auto-created, then the value type of the descriptor is determined by + # the point's type, which must be BOOL, INT64, DOUBLE, or DISTRIBUTION. + # Corresponds to the JSON property `points` + # @return [Array] + attr_accessor :points + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @metric = args[:metric] if args.key?(:metric) - @points = args[:points] if args.key?(:points) @value_type = args[:value_type] if args.key?(:value_type) @resource = args[:resource] if args.key?(:resource) @metric_kind = args[:metric_kind] if args.key?(:metric_kind) + @metric = args[:metric] if args.key?(:metric) + @points = args[:points] if args.key?(:points) end end @@ -224,20 +513,61 @@ module Google end end - # Distribution contains summary statistics for a population of values and, - # optionally, a histogram representing the distribution of those values across a - # specified set of histogram buckets.The summary statistics are the count, mean, - # sum of the squared deviation from the mean, the minimum, and the maximum of - # the set of population of values.The histogram is based on a sequence of - # buckets and gives a count of values that fall into each bucket. The boundaries - # of the buckets are given either explicitly or by specifying parameters for a - # method of computing them (buckets of fixed width or buckets of exponentially - # increasing width).Although it is not forbidden, it is generally a bad idea to - # include non-finite values (infinities or NaNs) in the population of values, as - # this will render the mean and sum_of_squared_deviation fields meaningless. + # Distribution contains summary statistics for a population of values. It + # optionally contains a histogram representing the distribution of those values + # across a set of buckets.The summary statistics are the count, mean, sum of the + # squared deviation from the mean, the minimum, and the maximum of the set of + # population of values. The histogram is based on a sequence of buckets and + # gives a count of values that fall into each bucket. The boundaries of the + # buckets are given either explicitly or by formulas for buckets of fixed or + # exponentially increasing widths.Although it is not forbidden, it is generally + # a bad idea to include non-finite values (infinities or NaNs) in the population + # of values, as this will render the mean and sum_of_squared_deviation fields + # meaningless. class Distribution include Google::Apis::Core::Hashable + # The number of values in the population. Must be non-negative. This value must + # equal the sum of the values in bucket_counts if a histogram is provided. + # Corresponds to the JSON property `count` + # @return [String] + attr_accessor :count + + # The arithmetic mean of the values in the population. If count is zero then + # this field must be zero. + # Corresponds to the JSON property `mean` + # @return [Float] + attr_accessor :mean + + # Required in the Stackdriver Monitoring API v3. The values for each bucket + # specified in bucket_options. The sum of the values in bucketCounts must equal + # the value in the count field of the Distribution object. The order of the + # bucket counts follows the numbering schemes described for the three bucket + # types. The underflow bucket has number 0; the finite buckets, if any, have + # numbers 1 through N-2; and the overflow bucket has number N-1. The size of + # bucket_counts must not be greater than N. If the size is less than N, then the + # remaining buckets are assigned values of zero. + # Corresponds to the JSON property `bucketCounts` + # @return [Array] + attr_accessor :bucket_counts + + # BucketOptions describes the bucket boundaries used to create a histogram for + # the distribution. The buckets can be in a linear sequence, an exponential + # sequence, or each bucket can be specified explicitly. BucketOptions does not + # include the number of values in each bucket.A bucket has an inclusive lower + # bound and exclusive upper bound for the values that are counted for that + # bucket. The upper bound of a bucket must be strictly greater than the lower + # bound. The sequence of N buckets for a distribution consists of an underflow + # bucket (number 0), zero or more finite buckets (number 1 through N - 2) and an + # overflow bucket (number N - 1). The buckets are contiguous: the lower bound of + # bucket i (i > 0) is the same as the upper bound of bucket i - 1. The buckets + # span the whole range of finite values: lower bound of the underflow bucket is - + # infinity and the upper bound of the overflow bucket is +infinity. The finite + # buckets are so-called because both bounds are finite. + # Corresponds to the JSON property `bucketOptions` + # @return [Google::Apis::MonitoringV3::BucketOptions] + attr_accessor :bucket_options + # The sum of squared deviations from the mean of the values in the population. # For values x_i this is: # Sum[i=1..n]((x_i - mean)^2) @@ -253,61 +583,18 @@ module Google # @return [Google::Apis::MonitoringV3::Range] attr_accessor :range - # The number of values in the population. Must be non-negative. - # Corresponds to the JSON property `count` - # @return [String] - attr_accessor :count - - # The arithmetic mean of the values in the population. If count is zero then - # this field must be zero. - # Corresponds to the JSON property `mean` - # @return [Float] - attr_accessor :mean - - # If bucket_options is given, then the sum of the values in bucket_counts must - # equal the value in count. If bucket_options is not given, no bucket_counts - # fields may be given.Bucket counts are given in order under the numbering - # scheme described above (the underflow bucket has number 0; the finite buckets, - # if any, have numbers 1 through N-2; the overflow bucket has number N-1).The - # size of bucket_counts must be no greater than N as defined in bucket_options. - # Any suffix of trailing zero bucket_count fields may be omitted. - # Corresponds to the JSON property `bucketCounts` - # @return [Array] - attr_accessor :bucket_counts - - # A Distribution may optionally contain a histogram of the values in the - # population. The histogram is given in bucket_counts as counts of values that - # fall into one of a sequence of non-overlapping buckets. The sequence of - # buckets is described by bucket_options.A bucket specifies an inclusive lower - # bound and exclusive upper bound for the values that are counted for that - # bucket. The upper bound of a bucket is strictly greater than the lower bound. - # The sequence of N buckets for a Distribution consists of an underflow bucket ( - # number 0), zero or more finite buckets (number 1 through N - 2) and an - # overflow bucket (number N - 1). The buckets are contiguous: the lower bound of - # bucket i (i > 0) is the same as the upper bound of bucket i - 1. The buckets - # span the whole range of finite values: lower bound of the underflow bucket is - - # infinity and the upper bound of the overflow bucket is +infinity. The finite - # buckets are so-called because both bounds are finite.BucketOptions describes - # bucket boundaries in one of three ways. Two describe the boundaries by giving - # parameters for a formula to generate boundaries and one gives the bucket - # boundaries explicitly.If bucket_options is not given, then no bucket_counts - # may be given. - # Corresponds to the JSON property `bucketOptions` - # @return [Google::Apis::MonitoringV3::BucketOptions] - attr_accessor :bucket_options - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @sum_of_squared_deviation = args[:sum_of_squared_deviation] if args.key?(:sum_of_squared_deviation) - @range = args[:range] if args.key?(:range) @count = args[:count] if args.key?(:count) @mean = args[:mean] if args.key?(:mean) @bucket_counts = args[:bucket_counts] if args.key?(:bucket_counts) @bucket_options = args[:bucket_options] if args.key?(:bucket_options) + @sum_of_squared_deviation = args[:sum_of_squared_deviation] if args.key?(:sum_of_squared_deviation) + @range = args[:range] if args.key?(:range) end end @@ -389,6 +676,23 @@ module Google class MonitoredResourceDescriptor include Google::Apis::Core::Hashable + # Required. A set of labels used to describe instances of this monitored + # resource type. For example, an individual Google Cloud SQL database is + # identified by values for the labels "database_id" and "zone". + # Corresponds to the JSON property `labels` + # @return [Array] + attr_accessor :labels + + # Optional. The resource name of the monitored resource descriptor: "projects/` + # project_id`/monitoredResourceDescriptors/`type`" where `type` is the value of + # the type field in this object and `project_id` is a project ID that provides + # API-specific context for accessing the type. APIs that do not use project + # information can use the resource name format "monitoredResourceDescriptors/` + # type`". + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + # Optional. A concise name for the monitored resource type that might be # displayed in user interfaces. It should be a Title Cased Noun Phrase, without # any article or other determiners. For example, "Google Cloud SQL Database". @@ -409,34 +713,17 @@ module Google # @return [String] attr_accessor :type - # Required. A set of labels used to describe instances of this monitored - # resource type. For example, an individual Google Cloud SQL database is - # identified by values for the labels "database_id" and "zone". - # Corresponds to the JSON property `labels` - # @return [Array] - attr_accessor :labels - - # Optional. The resource name of the monitored resource descriptor: "projects/` - # project_id`/monitoredResourceDescriptors/`type`" where `type` is the value of - # the type field in this object and `project_id` is a project ID that provides - # API-specific context for accessing the type. APIs that do not use project - # information can use the resource name format "monitoredResourceDescriptors/` - # type`". - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @labels = args[:labels] if args.key?(:labels) + @name = args[:name] if args.key?(:name) @display_name = args[:display_name] if args.key?(:display_name) @description = args[:description] if args.key?(:description) @type = args[:type] if args.key?(:type) - @labels = args[:labels] if args.key?(:labels) - @name = args[:name] if args.key?(:name) end end @@ -444,29 +731,22 @@ module Google class TypedValue include Google::Apis::Core::Hashable - # A 64-bit double-precision floating-point number. Its magnitude is - # approximately ±10±300 and it has 16 significant - # digits of precision. - # Corresponds to the JSON property `doubleValue` - # @return [Float] - attr_accessor :double_value - # A 64-bit integer. Its range is approximately ±9.2x1018. # Corresponds to the JSON property `int64Value` # @return [String] attr_accessor :int64_value - # Distribution contains summary statistics for a population of values and, - # optionally, a histogram representing the distribution of those values across a - # specified set of histogram buckets.The summary statistics are the count, mean, - # sum of the squared deviation from the mean, the minimum, and the maximum of - # the set of population of values.The histogram is based on a sequence of - # buckets and gives a count of values that fall into each bucket. The boundaries - # of the buckets are given either explicitly or by specifying parameters for a - # method of computing them (buckets of fixed width or buckets of exponentially - # increasing width).Although it is not forbidden, it is generally a bad idea to - # include non-finite values (infinities or NaNs) in the population of values, as - # this will render the mean and sum_of_squared_deviation fields meaningless. + # Distribution contains summary statistics for a population of values. It + # optionally contains a histogram representing the distribution of those values + # across a set of buckets.The summary statistics are the count, mean, sum of the + # squared deviation from the mean, the minimum, and the maximum of the set of + # population of values. The histogram is based on a sequence of buckets and + # gives a count of values that fall into each bucket. The boundaries of the + # buckets are given either explicitly or by formulas for buckets of fixed or + # exponentially increasing widths.Although it is not forbidden, it is generally + # a bad idea to include non-finite values (infinities or NaNs) in the population + # of values, as this will render the mean and sum_of_squared_deviation fields + # meaningless. # Corresponds to the JSON property `distributionValue` # @return [Google::Apis::MonitoringV3::Distribution] attr_accessor :distribution_value @@ -482,17 +762,24 @@ module Google # @return [String] attr_accessor :string_value + # A 64-bit double-precision floating-point number. Its magnitude is + # approximately ±10±300 and it has 16 significant + # digits of precision. + # Corresponds to the JSON property `doubleValue` + # @return [Float] + attr_accessor :double_value + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @double_value = args[:double_value] if args.key?(:double_value) @int64_value = args[:int64_value] if args.key?(:int64_value) @distribution_value = args[:distribution_value] if args.key?(:distribution_value) @bool_value = args[:bool_value] if args.key?(:bool_value) @string_value = args[:string_value] if args.key?(:string_value) + @double_value = args[:double_value] if args.key?(:double_value) end end @@ -501,16 +788,6 @@ module Google class CollectdPayload include Google::Apis::Core::Hashable - # The measurement metadata. Example: "process_id" -> 12345 - # Corresponds to the JSON property `metadata` - # @return [Hash] - attr_accessor :metadata - - # The measurement type. Example: "memory". - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - # The name of the plugin. Example: "disk". # Corresponds to the JSON property `plugin` # @return [String] @@ -542,31 +819,47 @@ module Google # @return [String] attr_accessor :type_instance + # The measurement metadata. Example: "process_id" -> 12345 + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # The measurement type. Example: "memory". + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @metadata = args[:metadata] if args.key?(:metadata) - @type = args[:type] if args.key?(:type) @plugin = args[:plugin] if args.key?(:plugin) @plugin_instance = args[:plugin_instance] if args.key?(:plugin_instance) @end_time = args[:end_time] if args.key?(:end_time) @start_time = args[:start_time] if args.key?(:start_time) @values = args[:values] if args.key?(:values) @type_instance = args[:type_instance] if args.key?(:type_instance) + @metadata = args[:metadata] if args.key?(:metadata) + @type = args[:type] if args.key?(:type) end end - # Specify a sequence of buckets that all have the same width (except overflow - # and underflow). Each bucket represents a constant absolute uncertainty on the - # specific value in the bucket.Defines num_finite_buckets + 2 (= N) buckets with - # these boundaries for bucket i:Upper bound (0 <= i < N-1): offset + (width * i). - # Lower bound (1 <= i < N): offset + (width * (i - 1)). + # Specifies a linear sequence of buckets that all have the same width (except + # overflow and underflow). Each bucket represents a constant absolute + # uncertainty on the specific value in the bucket.There are num_finite_buckets + + # 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N- + # 1): offset + (width * i). Lower bound (1 <= i < N): offset + (width * (i - 1)) + # . class Linear include Google::Apis::Core::Hashable + # Must be greater than 0. + # Corresponds to the JSON property `width` + # @return [Float] + attr_accessor :width + # Lower bound of the first bucket. # Corresponds to the JSON property `offset` # @return [Float] @@ -577,20 +870,15 @@ module Google # @return [Fixnum] attr_accessor :num_finite_buckets - # Must be greater than 0. - # Corresponds to the JSON property `width` - # @return [Float] - attr_accessor :width - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @width = args[:width] if args.key?(:width) @offset = args[:offset] if args.key?(:offset) @num_finite_buckets = args[:num_finite_buckets] if args.key?(:num_finite_buckets) - @width = args[:width] if args.key?(:width) end end @@ -645,29 +933,6 @@ module Google end end - # A set of buckets with arbitrary widths.Defines size(bounds) + 1 (= N) buckets - # with these boundaries for bucket i:Upper bound (0 <= i < N-1): boundsi Lower - # bound (1 <= i < N); boundsi - 1There must be at least one element in bounds. - # If bounds has only one element, there are no finite buckets, and that single - # element is the common boundary of the overflow and underflow buckets. - class Explicit - include Google::Apis::Core::Hashable - - # The values must be monotonically increasing. - # Corresponds to the JSON property `bounds` - # @return [Array] - attr_accessor :bounds - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @bounds = args[:bounds] if args.key?(:bounds) - end - end - # A time interval extending just after a start time through an end time. If the # start time is the same as the end time, then the interval represents a single # point in time. @@ -696,15 +961,44 @@ module Google end end - # Specify a sequence of buckets that have a width that is proportional to the - # value of the lower bound. Each bucket represents a constant relative - # uncertainty on a specific value in the bucket.Defines num_finite_buckets + 2 (= - # N) buckets with these boundaries for bucket i:Upper bound (0 <= i < N-1): - # scale * (growth_factor ^ i). Lower bound (1 <= i < N): scale * (growth_factor - # ^ (i - 1)). + # Specifies a set of buckets with arbitrary widths.There are size(bounds) + 1 (= + # N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N-1): + # boundsi Lower bound (1 <= i < N); boundsi - 1The bounds field must contain at + # least one element. If bounds has only one element, then there are no finite + # buckets, and that single element is the common boundary of the overflow and + # underflow buckets. + class Explicit + include Google::Apis::Core::Hashable + + # The values must be monotonically increasing. + # Corresponds to the JSON property `bounds` + # @return [Array] + attr_accessor :bounds + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @bounds = args[:bounds] if args.key?(:bounds) + end + end + + # Specifies an exponential sequence of buckets that have a width that is + # proportional to the value of the lower bound. Each bucket represents a + # constant relative uncertainty on a specific value in the bucket.There are + # num_finite_buckets + 2 (= N) buckets. Bucket i has the following boundaries: + # Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). Lower bound (1 <= i < + # N): scale * (growth_factor ^ (i - 1)). class Exponential include Google::Apis::Core::Hashable + # Must be greater than 0. + # Corresponds to the JSON property `scale` + # @return [Float] + attr_accessor :scale + # Must be greater than 0. # Corresponds to the JSON property `numFiniteBuckets` # @return [Fixnum] @@ -715,20 +1009,15 @@ module Google # @return [Float] attr_accessor :growth_factor - # Must be greater than 0. - # Corresponds to the JSON property `scale` - # @return [Float] - attr_accessor :scale - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @scale = args[:scale] if args.key?(:scale) @num_finite_buckets = args[:num_finite_buckets] if args.key?(:num_finite_buckets) @growth_factor = args[:growth_factor] if args.key?(:growth_factor) - @scale = args[:scale] if args.key?(:scale) end end @@ -759,36 +1048,38 @@ module Google end end + # A specific metric, identified by specifying values for all of the labels of a + # MetricDescriptor. + class Metric + include Google::Apis::Core::Hashable + + # The set of label values that uniquely identify this metric. All labels listed + # in the MetricDescriptor must be assigned values. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # An existing metric type, see google.api.MetricDescriptor. For example, custom. + # googleapis.com/invoice/paid/amount. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @labels = args[:labels] if args.key?(:labels) + @type = args[:type] if args.key?(:type) + end + end + # A single field of a message type. class Field include Google::Apis::Core::Hashable - # The field type URL, without the scheme, for message or enumeration types. - # Example: "type.googleapis.com/google.protobuf.Timestamp". - # Corresponds to the JSON property `typeUrl` - # @return [String] - attr_accessor :type_url - - # The field number. - # Corresponds to the JSON property `number` - # @return [Fixnum] - attr_accessor :number - - # The field type. - # Corresponds to the JSON property `kind` - # @return [String] - attr_accessor :kind - - # The field JSON name. - # Corresponds to the JSON property `jsonName` - # @return [String] - attr_accessor :json_name - - # The protocol buffer options. - # Corresponds to the JSON property `options` - # @return [Array] - attr_accessor :options - # The index of the field type in Type.oneofs, for message or enumeration types. # The first type has index 1; zero means the type is not in the list. # Corresponds to the JSON property `oneofIndex` @@ -816,41 +1107,66 @@ module Google # @return [String] attr_accessor :name + # The field type URL, without the scheme, for message or enumeration types. + # Example: "type.googleapis.com/google.protobuf.Timestamp". + # Corresponds to the JSON property `typeUrl` + # @return [String] + attr_accessor :type_url + + # The field number. + # Corresponds to the JSON property `number` + # @return [Fixnum] + attr_accessor :number + + # The field JSON name. + # Corresponds to the JSON property `jsonName` + # @return [String] + attr_accessor :json_name + + # The field type. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The protocol buffer options. + # Corresponds to the JSON property `options` + # @return [Array] + attr_accessor :options + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @type_url = args[:type_url] if args.key?(:type_url) - @number = args[:number] if args.key?(:number) - @kind = args[:kind] if args.key?(:kind) - @json_name = args[:json_name] if args.key?(:json_name) - @options = args[:options] if args.key?(:options) @oneof_index = args[:oneof_index] if args.key?(:oneof_index) @cardinality = args[:cardinality] if args.key?(:cardinality) @packed = args[:packed] if args.key?(:packed) @default_value = args[:default_value] if args.key?(:default_value) @name = args[:name] if args.key?(:name) + @type_url = args[:type_url] if args.key?(:type_url) + @number = args[:number] if args.key?(:number) + @json_name = args[:json_name] if args.key?(:json_name) + @kind = args[:kind] if args.key?(:kind) + @options = args[:options] if args.key?(:options) end end - # A specific metric, identified by specifying values for all of the labels of a - # MetricDescriptor. - class Metric + # The ListTimeSeries response. + class ListTimeSeriesResponse include Google::Apis::Core::Hashable - # An existing metric type, see google.api.MetricDescriptor. For example, custom. - # googleapis.com/invoice/paid/amount. - # Corresponds to the JSON property `type` + # If there are more results than have been returned, then this field is set to a + # non-empty value. To see the additional results, use that value as pageToken in + # the next call to this method. + # Corresponds to the JSON property `nextPageToken` # @return [String] - attr_accessor :type + attr_accessor :next_page_token - # The set of label values that uniquely identify this metric. All labels listed - # in the MetricDescriptor must be assigned values. - # Corresponds to the JSON property `labels` - # @return [Hash] - attr_accessor :labels + # One or more time series that match the filter included in the request. + # Corresponds to the JSON property `timeSeries` + # @return [Array] + attr_accessor :time_series def initialize(**args) update!(**args) @@ -858,8 +1174,8 @@ module Google # Update properties of this object def update!(**args) - @type = args[:type] if args.key?(:type) - @labels = args[:labels] if args.key?(:labels) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @time_series = args[:time_series] if args.key?(:time_series) end end @@ -867,6 +1183,11 @@ module Google class LabelDescriptor include Google::Apis::Core::Hashable + # The label key. + # Corresponds to the JSON property `key` + # @return [String] + attr_accessor :key + # A human-readable description for the label. # Corresponds to the JSON property `description` # @return [String] @@ -877,97 +1198,15 @@ module Google # @return [String] attr_accessor :value_type - # The label key. - # Corresponds to the JSON property `key` - # @return [String] - attr_accessor :key - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @key = args[:key] if args.key?(:key) @description = args[:description] if args.key?(:description) @value_type = args[:value_type] if args.key?(:value_type) - @key = args[:key] if args.key?(:key) - end - end - - # The ListTimeSeries response. - class ListTimeSeriesResponse - include Google::Apis::Core::Hashable - - # One or more time series that match the filter included in the request. - # Corresponds to the JSON property `timeSeries` - # @return [Array] - attr_accessor :time_series - - # If there are more results than have been returned, then this field is set to a - # non-empty value. To see the additional results, use that value as pageToken in - # the next call to this method. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @time_series = args[:time_series] if args.key?(:time_series) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - end - end - - # A protocol buffer message type. - class Type - include Google::Apis::Core::Hashable - - # The list of types appearing in oneof definitions in this type. - # Corresponds to the JSON property `oneofs` - # @return [Array] - attr_accessor :oneofs - - # The source syntax. - # Corresponds to the JSON property `syntax` - # @return [String] - attr_accessor :syntax - - # SourceContext represents information about the source of a protobuf element, - # like the file in which it is defined. - # Corresponds to the JSON property `sourceContext` - # @return [Google::Apis::MonitoringV3::SourceContext] - attr_accessor :source_context - - # The protocol buffer options. - # Corresponds to the JSON property `options` - # @return [Array] - attr_accessor :options - - # The list of fields. - # Corresponds to the JSON property `fields` - # @return [Array] - attr_accessor :fields - - # The fully qualified message name. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @oneofs = args[:oneofs] if args.key?(:oneofs) - @syntax = args[:syntax] if args.key?(:syntax) - @source_context = args[:source_context] if args.key?(:source_context) - @options = args[:options] if args.key?(:options) - @fields = args[:fields] if args.key?(:fields) - @name = args[:name] if args.key?(:name) end end @@ -994,18 +1233,6 @@ module Google class Group include Google::Apis::Core::Hashable - # A user-assigned name for this group, used only for display purposes. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # If true, the members of this group are considered to be a cluster. The system - # can perform additional analysis on groups that are clusters. - # Corresponds to the JSON property `isCluster` - # @return [Boolean] - attr_accessor :is_cluster - alias_method :is_cluster?, :is_cluster - # The filter used to determine which monitored resources belong to this group. # Corresponds to the JSON property `filter` # @return [String] @@ -1026,241 +1253,17 @@ module Google # @return [String] attr_accessor :parent_name - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @display_name = args[:display_name] if args.key?(:display_name) - @is_cluster = args[:is_cluster] if args.key?(:is_cluster) - @filter = args[:filter] if args.key?(:filter) - @name = args[:name] if args.key?(:name) - @parent_name = args[:parent_name] if args.key?(:parent_name) - end - end - - # A Distribution may optionally contain a histogram of the values in the - # population. The histogram is given in bucket_counts as counts of values that - # fall into one of a sequence of non-overlapping buckets. The sequence of - # buckets is described by bucket_options.A bucket specifies an inclusive lower - # bound and exclusive upper bound for the values that are counted for that - # bucket. The upper bound of a bucket is strictly greater than the lower bound. - # The sequence of N buckets for a Distribution consists of an underflow bucket ( - # number 0), zero or more finite buckets (number 1 through N - 2) and an - # overflow bucket (number N - 1). The buckets are contiguous: the lower bound of - # bucket i (i > 0) is the same as the upper bound of bucket i - 1. The buckets - # span the whole range of finite values: lower bound of the underflow bucket is - - # infinity and the upper bound of the overflow bucket is +infinity. The finite - # buckets are so-called because both bounds are finite.BucketOptions describes - # bucket boundaries in one of three ways. Two describe the boundaries by giving - # parameters for a formula to generate boundaries and one gives the bucket - # boundaries explicitly.If bucket_options is not given, then no bucket_counts - # may be given. - class BucketOptions - include Google::Apis::Core::Hashable - - # Specify a sequence of buckets that have a width that is proportional to the - # value of the lower bound. Each bucket represents a constant relative - # uncertainty on a specific value in the bucket.Defines num_finite_buckets + 2 (= - # N) buckets with these boundaries for bucket i:Upper bound (0 <= i < N-1): - # scale * (growth_factor ^ i). Lower bound (1 <= i < N): scale * (growth_factor - # ^ (i - 1)). - # Corresponds to the JSON property `exponentialBuckets` - # @return [Google::Apis::MonitoringV3::Exponential] - attr_accessor :exponential_buckets - - # Specify a sequence of buckets that all have the same width (except overflow - # and underflow). Each bucket represents a constant absolute uncertainty on the - # specific value in the bucket.Defines num_finite_buckets + 2 (= N) buckets with - # these boundaries for bucket i:Upper bound (0 <= i < N-1): offset + (width * i). - # Lower bound (1 <= i < N): offset + (width * (i - 1)). - # Corresponds to the JSON property `linearBuckets` - # @return [Google::Apis::MonitoringV3::Linear] - attr_accessor :linear_buckets - - # A set of buckets with arbitrary widths.Defines size(bounds) + 1 (= N) buckets - # with these boundaries for bucket i:Upper bound (0 <= i < N-1): boundsi Lower - # bound (1 <= i < N); boundsi - 1There must be at least one element in bounds. - # If bounds has only one element, there are no finite buckets, and that single - # element is the common boundary of the overflow and underflow buckets. - # Corresponds to the JSON property `explicitBuckets` - # @return [Google::Apis::MonitoringV3::Explicit] - attr_accessor :explicit_buckets - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @exponential_buckets = args[:exponential_buckets] if args.key?(:exponential_buckets) - @linear_buckets = args[:linear_buckets] if args.key?(:linear_buckets) - @explicit_buckets = args[:explicit_buckets] if args.key?(:explicit_buckets) - end - end - - # A single data point from a collectd-based plugin. - class CollectdValue - include Google::Apis::Core::Hashable - - # The type of measurement. - # Corresponds to the JSON property `dataSourceType` - # @return [String] - attr_accessor :data_source_type - - # The data source for the collectd value. For example there are two data sources - # for network measurements: "rx" and "tx". - # Corresponds to the JSON property `dataSourceName` - # @return [String] - attr_accessor :data_source_name - - # A single strongly-typed value. - # Corresponds to the JSON property `value` - # @return [Google::Apis::MonitoringV3::TypedValue] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @data_source_type = args[:data_source_type] if args.key?(:data_source_type) - @data_source_name = args[:data_source_name] if args.key?(:data_source_name) - @value = args[:value] if args.key?(:value) - end - end - - # SourceContext represents information about the source of a protobuf element, - # like the file in which it is defined. - class SourceContext - include Google::Apis::Core::Hashable - - # The path-qualified name of the .proto file that contained the associated - # protobuf element. For example: "google/protobuf/source_context.proto". - # Corresponds to the JSON property `fileName` - # @return [String] - attr_accessor :file_name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @file_name = args[:file_name] if args.key?(:file_name) - end - end - - # Defines a metric type and its schema. Once a metric descriptor is created, - # deleting or altering it stops data collection and makes the metric type's - # existing data unusable. - class MetricDescriptor - include Google::Apis::Core::Hashable - - # The set of labels that can be used to describe a specific instance of this - # metric type. For example, the appengine.googleapis.com/http/server/ - # response_latencies metric type has a label for the HTTP response code, - # response_code, so you can look at latencies for successful responses or just - # for responses that failed. - # Corresponds to the JSON property `labels` - # @return [Array] - attr_accessor :labels - - # The resource name of the metric descriptor. Depending on the implementation, - # the name typically includes: (1) the parent resource name that defines the - # scope of the metric type or of its data; and (2) the metric's URL-encoded type, - # which also appears in the type field of this descriptor. For example, - # following is the resource name of a custom metric within the GCP project my- - # project-id: - # "projects/my-project-id/metricDescriptors/custom.googleapis.com%2Finvoice% - # 2Fpaid%2Famount" - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The metric type, including its DNS name prefix. The type is not URL-encoded. - # All user-defined custom metric types have the DNS name custom.googleapis.com. - # Metric types should use a natural hierarchical grouping. For example: - # "custom.googleapis.com/invoice/paid/amount" - # "appengine.googleapis.com/http/server/response_latencies" - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Whether the measurement is an integer, a floating-point number, etc. Some - # combinations of metric_kind and value_type might not be supported. - # Corresponds to the JSON property `valueType` - # @return [String] - attr_accessor :value_type - - # Whether the metric records instantaneous values, changes to a value, etc. Some - # combinations of metric_kind and value_type might not be supported. - # Corresponds to the JSON property `metricKind` - # @return [String] - attr_accessor :metric_kind - - # A detailed description of the metric, which can be used in documentation. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # A concise name for the metric, which can be displayed in user interfaces. Use - # sentence case without an ending period, for example "Request count". + # A user-assigned name for this group, used only for display purposes. # Corresponds to the JSON property `displayName` # @return [String] attr_accessor :display_name - # The unit in which the metric value is reported. It is only applicable if the - # value_type is INT64, DOUBLE, or DISTRIBUTION. The supported units are a subset - # of The Unified Code for Units of Measure (http://unitsofmeasure.org/ucum.html) - # standard:Basic units (UNIT) - # bit bit - # By byte - # s second - # min minute - # h hour - # d dayPrefixes (PREFIX) - # k kilo (10**3) - # M mega (10**6) - # G giga (10**9) - # T tera (10**12) - # P peta (10**15) - # E exa (10**18) - # Z zetta (10**21) - # Y yotta (10**24) - # m milli (10**-3) - # u micro (10**-6) - # n nano (10**-9) - # p pico (10**-12) - # f femto (10**-15) - # a atto (10**-18) - # z zepto (10**-21) - # y yocto (10**-24) - # Ki kibi (2**10) - # Mi mebi (2**20) - # Gi gibi (2**30) - # Ti tebi (2**40)GrammarThe grammar includes the dimensionless unit 1, such as 1/ - # s.The grammar also includes these connectors: - # / division (as an infix operator, e.g. 1/s). - # . multiplication (as an infix operator, e.g. GBy.d)The grammar for a unit is - # as follows: - # Expression = Component ` "." Component ` ` "/" Component ` ; - # Component = [ PREFIX ] UNIT [ Annotation ] - # | Annotation - # | "1" - # ; - # Annotation = "`" NAME "`" ; - # Notes: - # Annotation is just a comment if it follows a UNIT and is equivalent to 1 if - # it is used alone. For examples, `requests`/s == 1/s, By`transmitted`/s == By/ - # s. - # NAME is a sequence of non-blank printable ASCII characters not containing '`' - # or '`'. - # Corresponds to the JSON property `unit` - # @return [String] - attr_accessor :unit + # If true, the members of this group are considered to be a cluster. The system + # can perform additional analysis on groups that are clusters. + # Corresponds to the JSON property `isCluster` + # @return [Boolean] + attr_accessor :is_cluster + alias_method :is_cluster?, :is_cluster def initialize(**args) update!(**args) @@ -1268,57 +1271,48 @@ module Google # Update properties of this object def update!(**args) - @labels = args[:labels] if args.key?(:labels) + @filter = args[:filter] if args.key?(:filter) @name = args[:name] if args.key?(:name) - @type = args[:type] if args.key?(:type) - @value_type = args[:value_type] if args.key?(:value_type) - @metric_kind = args[:metric_kind] if args.key?(:metric_kind) - @description = args[:description] if args.key?(:description) + @parent_name = args[:parent_name] if args.key?(:parent_name) @display_name = args[:display_name] if args.key?(:display_name) - @unit = args[:unit] if args.key?(:unit) + @is_cluster = args[:is_cluster] if args.key?(:is_cluster) end end - # The range of the population values. - class Range + # A protocol buffer message type. + class Type include Google::Apis::Core::Hashable - # The minimum of the population values. - # Corresponds to the JSON property `min` - # @return [Float] - attr_accessor :min + # The list of fields. + # Corresponds to the JSON property `fields` + # @return [Array] + attr_accessor :fields - # The maximum of the population values. - # Corresponds to the JSON property `max` - # @return [Float] - attr_accessor :max - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @min = args[:min] if args.key?(:min) - @max = args[:max] if args.key?(:max) - end - end - - # The ListGroups response. - class ListGroupsResponse - include Google::Apis::Core::Hashable - - # If there are more results than have been returned, then this field is set to a - # non-empty value. To see the additional results, use that value as pageToken in - # the next call to this method. - # Corresponds to the JSON property `nextPageToken` + # The fully qualified message name. + # Corresponds to the JSON property `name` # @return [String] - attr_accessor :next_page_token + attr_accessor :name - # The groups that match the specified filters. - # Corresponds to the JSON property `group` - # @return [Array] - attr_accessor :group + # The list of types appearing in oneof definitions in this type. + # Corresponds to the JSON property `oneofs` + # @return [Array] + attr_accessor :oneofs + + # The source syntax. + # Corresponds to the JSON property `syntax` + # @return [String] + attr_accessor :syntax + + # SourceContext represents information about the source of a protobuf element, + # like the file in which it is defined. + # Corresponds to the JSON property `sourceContext` + # @return [Google::Apis::MonitoringV3::SourceContext] + attr_accessor :source_context + + # The protocol buffer options. + # Corresponds to the JSON property `options` + # @return [Array] + attr_accessor :options def initialize(**args) update!(**args) @@ -1326,8 +1320,12 @@ module Google # Update properties of this object def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @group = args[:group] if args.key?(:group) + @fields = args[:fields] if args.key?(:fields) + @name = args[:name] if args.key?(:name) + @oneofs = args[:oneofs] if args.key?(:oneofs) + @syntax = args[:syntax] if args.key?(:syntax) + @source_context = args[:source_context] if args.key?(:source_context) + @options = args[:options] if args.key?(:options) end end end diff --git a/generated/google/apis/monitoring_v3/representations.rb b/generated/google/apis/monitoring_v3/representations.rb index ad7a498c7..373a53a7f 100644 --- a/generated/google/apis/monitoring_v3/representations.rb +++ b/generated/google/apis/monitoring_v3/representations.rb @@ -22,7 +22,37 @@ module Google module Apis module MonitoringV3 - class CreateCollectdTimeSeriesRequest + class BucketOptions + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CollectdValue + 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 ListGroupsResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -34,6 +64,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class CreateCollectdTimeSeriesRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ListMonitoredResourceDescriptorsResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -106,13 +142,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Explicit + class TimeInterval class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class TimeInterval + class Explicit class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -130,19 +166,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Field - 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 LabelDescriptor + class Field class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -154,7 +184,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Type + class LabelDescriptor class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -166,40 +196,81 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class BucketOptions + 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 :exponential_buckets, as: 'exponentialBuckets', class: Google::Apis::MonitoringV3::Exponential, decorator: Google::Apis::MonitoringV3::Exponential::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 + class CollectdValue - class Representation < Google::Apis::Core::JsonRepresentation; end + # @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 - include Google::Apis::Core::JsonObjectSupport + property :data_source_type, as: 'dataSourceType' + end end class SourceContext - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :file_name, as: 'fileName' + end end class MetricDescriptor - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :value_type, as: 'valueType' + property :metric_kind, as: 'metricKind' + property :display_name, as: 'displayName' + property :description, as: 'description' + property :unit, as: 'unit' + collection :labels, as: 'labels', class: Google::Apis::MonitoringV3::LabelDescriptor, decorator: Google::Apis::MonitoringV3::LabelDescriptor::Representation - include Google::Apis::Core::JsonObjectSupport + property :name, as: 'name' + property :type, as: 'type' + end end class Range - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :min, as: 'min' + property :max, as: 'max' + end end class ListGroupsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :group, as: 'group', class: Google::Apis::MonitoringV3::Group, decorator: Google::Apis::MonitoringV3::Group::Representation - include Google::Apis::Core::JsonObjectSupport + end + end + + class ListGroupMembersResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + 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 class CreateCollectdTimeSeriesRequest @@ -213,16 +284,6 @@ module Google end 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 - - property :next_page_token, as: 'nextPageToken' - property :total_size, as: 'totalSize' - end - end - class ListMonitoredResourceDescriptorsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -235,14 +296,14 @@ module Google class TimeSeries # @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 :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 + end end @@ -257,14 +318,14 @@ module Google class Distribution # @private class Representation < Google::Apis::Core::JsonRepresentation - property :sum_of_squared_deviation, as: 'sumOfSquaredDeviation' - property :range, as: 'range', class: Google::Apis::MonitoringV3::Range, decorator: Google::Apis::MonitoringV3::Range::Representation - property :count, as: 'count' property :mean, as: 'mean' collection :bucket_counts, as: 'bucketCounts' property :bucket_options, as: 'bucketOptions', class: Google::Apis::MonitoringV3::BucketOptions, decorator: Google::Apis::MonitoringV3::BucketOptions::Representation + property :sum_of_squared_deviation, as: 'sumOfSquaredDeviation' + property :range, as: 'range', class: Google::Apis::MonitoringV3::Range, decorator: Google::Apis::MonitoringV3::Range::Representation + end end @@ -288,33 +349,30 @@ module Google class MonitoredResourceDescriptor # @private class Representation < Google::Apis::Core::JsonRepresentation - property :display_name, as: 'displayName' - property :description, as: 'description' - property :type, as: 'type' collection :labels, as: 'labels', class: Google::Apis::MonitoringV3::LabelDescriptor, decorator: Google::Apis::MonitoringV3::LabelDescriptor::Representation 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 :double_value, as: 'doubleValue' 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 - 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' @@ -322,15 +380,18 @@ module Google collection :values, as: 'values', class: Google::Apis::MonitoringV3::CollectdValue, decorator: Google::Apis::MonitoringV3::CollectdValue::Representation property :type_instance, as: 'typeInstance' + hash :metadata, as: 'metadata', class: Google::Apis::MonitoringV3::TypedValue, decorator: Google::Apis::MonitoringV3::TypedValue::Representation + + property :type, as: 'type' 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' - property :width, as: 'width' end end @@ -348,13 +409,6 @@ module Google end end - class Explicit - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :bounds, as: 'bounds' - end - end - class TimeInterval # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -363,12 +417,19 @@ module Google 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 :scale, as: 'scale' property :num_finite_buckets, as: 'numFiniteBuckets' property :growth_factor, as: 'growthFactor' - property :scale, as: 'scale' end end @@ -382,132 +443,71 @@ module Google 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 :type_url, as: 'typeUrl' - property :number, as: 'number' - property :kind, as: 'kind' - property :json_name, as: 'jsonName' - collection :options, as: 'options', class: Google::Apis::MonitoringV3::Option, decorator: Google::Apis::MonitoringV3::Option::Representation - property :oneof_index, as: 'oneofIndex' property :cardinality, as: 'cardinality' property :packed, as: 'packed' property :default_value, as: 'defaultValue' property :name, as: 'name' - end - end + property :type_url, as: 'typeUrl' + property :number, as: 'number' + property :json_name, as: 'jsonName' + property :kind, as: 'kind' + collection :options, as: 'options', class: Google::Apis::MonitoringV3::Option, decorator: Google::Apis::MonitoringV3::Option::Representation - class Metric - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - hash :labels, as: 'labels' - end - end - - class LabelDescriptor - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :description, as: 'description' - property :value_type, as: 'valueType' - property :key, as: 'key' end end class ListTimeSeriesResponse # @private class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' collection :time_series, as: 'timeSeries', class: Google::Apis::MonitoringV3::TimeSeries, decorator: Google::Apis::MonitoringV3::TimeSeries::Representation - property :next_page_token, as: 'nextPageToken' end end - class Type + class LabelDescriptor # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :oneofs, as: 'oneofs' - property :syntax, as: 'syntax' - property :source_context, as: 'sourceContext', class: Google::Apis::MonitoringV3::SourceContext, decorator: Google::Apis::MonitoringV3::SourceContext::Representation - - collection :options, as: 'options', class: Google::Apis::MonitoringV3::Option, decorator: Google::Apis::MonitoringV3::Option::Representation - - collection :fields, as: 'fields', class: Google::Apis::MonitoringV3::Field, decorator: Google::Apis::MonitoringV3::Field::Representation - - property :name, as: 'name' + 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 :display_name, as: 'displayName' - property :is_cluster, as: 'isCluster' 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 BucketOptions + class Type # @private class Representation < Google::Apis::Core::JsonRepresentation - property :exponential_buckets, as: 'exponentialBuckets', class: Google::Apis::MonitoringV3::Exponential, decorator: Google::Apis::MonitoringV3::Exponential::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 - - class CollectdValue - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :data_source_type, as: 'dataSourceType' - property :data_source_name, as: 'dataSourceName' - property :value, as: 'value', class: Google::Apis::MonitoringV3::TypedValue, decorator: Google::Apis::MonitoringV3::TypedValue::Representation - - end - end - - class SourceContext - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :file_name, as: 'fileName' - end - end - - class MetricDescriptor - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :labels, as: 'labels', class: Google::Apis::MonitoringV3::LabelDescriptor, decorator: Google::Apis::MonitoringV3::LabelDescriptor::Representation + collection :fields, as: 'fields', class: Google::Apis::MonitoringV3::Field, decorator: Google::Apis::MonitoringV3::Field::Representation property :name, as: 'name' - property :type, as: 'type' - property :value_type, as: 'valueType' - property :metric_kind, as: 'metricKind' - property :description, as: 'description' - property :display_name, as: 'displayName' - property :unit, as: 'unit' - end - end + collection :oneofs, as: 'oneofs' + property :syntax, as: 'syntax' + property :source_context, as: 'sourceContext', class: Google::Apis::MonitoringV3::SourceContext, decorator: Google::Apis::MonitoringV3::SourceContext::Representation - class Range - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :min, as: 'min' - property :max, as: 'max' - end - end - - class ListGroupsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :group, as: 'group', class: Google::Apis::MonitoringV3::Group, decorator: Google::Apis::MonitoringV3::Group::Representation + collection :options, as: 'options', class: Google::Apis::MonitoringV3::Option, decorator: Google::Apis::MonitoringV3::Option::Representation end end diff --git a/generated/google/apis/monitoring_v3/service.rb b/generated/google/apis/monitoring_v3/service.rb index 3846647b0..857a565f3 100644 --- a/generated/google/apis/monitoring_v3/service.rb +++ b/generated/google/apis/monitoring_v3/service.rb @@ -48,11 +48,75 @@ module Google super('https://monitoring.googleapis.com/', '') end + # Stackdriver Monitoring Agent only: Creates a new time series. + # @param [String] name + # The project in which to create the time series. The format is "projects/ + # PROJECT_ID_OR_NUMBER". + # @param [Google::Apis::MonitoringV3::CreateCollectdTimeSeriesRequest] create_collectd_time_series_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MonitoringV3::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV3::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_collectd_time_series(name, create_collectd_time_series_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v3/{+name}/collectdTimeSeries', options) + command.request_representation = Google::Apis::MonitoringV3::CreateCollectdTimeSeriesRequest::Representation + command.request_object = create_collectd_time_series_request_object + command.response_representation = Google::Apis::MonitoringV3::Empty::Representation + command.response_class = Google::Apis::MonitoringV3::Empty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Lists time series that match a filter. This method does not require a # Stackdriver account. # @param [String] name # The project on which to execute the request. The format is "projects/` # project_id_or_number`". + # @param [Array, String] aggregation_group_by_fields + # The set of fields to preserve when crossSeriesReducer is specified. The + # groupByFields determine how the time series are partitioned into subsets prior + # to applying the aggregation function. Each subset contains time series that + # have the same value for each of the grouping fields. Each individual time + # series is a member of exactly one subset. The crossSeriesReducer is applied to + # each subset of time series. It is not possible to reduce across different + # resource types, so this field implicitly contains resource.type. Fields not + # specified in groupByFields are aggregated away. If groupByFields is not + # specified and all the time series have the same resource type, then the time + # series are aggregated into a single output time series. If crossSeriesReducer + # is not defined, this field is ignored. + # @param [String] interval_end_time + # Required. The end of the time interval. + # @param [String] aggregation_alignment_period + # The alignment period for per-time series alignment. If present, + # alignmentPeriod must be at least 60 seconds. After per-time series alignment, + # each time series will contain data points only on the period boundaries. If + # perSeriesAligner is not specified or equals ALIGN_NONE, then this field is + # ignored. If perSeriesAligner is specified and does not equal ALIGN_NONE, then + # this field must be defined; otherwise an error is returned. + # @param [Fixnum] page_size + # A positive number that is the maximum number of results to return. When view + # field sets to FULL, it limits the number of Points server will return; if view + # field is HEADERS, it limits the number of TimeSeries server will return. + # @param [String] order_by + # Specifies the order in which the points of the time series should be returned. + # By default, results are not ordered. Currently, this field must be left blank. # @param [String] aggregation_cross_series_reducer # The approach to be used to combine time series. Not all reducer functions may # be applied to all time series, depending on the metric type and the value type @@ -84,34 +148,6 @@ module Google # time is the end time. The start time must not be later than the end time. # @param [String] view # Specifies which information is returned about the time series. - # @param [Array, String] aggregation_group_by_fields - # The set of fields to preserve when crossSeriesReducer is specified. The - # groupByFields determine how the time series are partitioned into subsets prior - # to applying the aggregation function. Each subset contains time series that - # have the same value for each of the grouping fields. Each individual time - # series is a member of exactly one subset. The crossSeriesReducer is applied to - # each subset of time series. It is not possible to reduce across different - # resource types, so this field implicitly contains resource.type. Fields not - # specified in groupByFields are aggregated away. If groupByFields is not - # specified and all the time series have the same resource type, then the time - # series are aggregated into a single output time series. If crossSeriesReducer - # is not defined, this field is ignored. - # @param [String] interval_end_time - # Required. The end of the time interval. - # @param [String] aggregation_alignment_period - # The alignment period for per-time series alignment. If present, - # alignmentPeriod must be at least 60 seconds. After per-time series alignment, - # each time series will contain data points only on the period boundaries. If - # perSeriesAligner is not specified or equals ALIGN_NONE, then this field is - # ignored. If perSeriesAligner is specified and does not equal ALIGN_NONE, then - # this field must be defined; otherwise an error is returned. - # @param [Fixnum] page_size - # A positive number that is the maximum number of results to return. When view - # field sets to FULL, it limits the number of Points server will return; if view - # field is HEADERS, it limits the number of TimeSeries server will return. - # @param [String] order_by - # Specifies the order in which the points of the time series should be returned. - # By default, results are not ordered. Currently, this field must be left blank. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -129,22 +165,22 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_project_time_series(name, aggregation_cross_series_reducer: nil, filter: nil, page_token: nil, aggregation_per_series_aligner: nil, interval_start_time: nil, view: nil, aggregation_group_by_fields: nil, interval_end_time: nil, aggregation_alignment_period: nil, page_size: nil, order_by: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_project_time_series(name, aggregation_group_by_fields: nil, interval_end_time: nil, aggregation_alignment_period: nil, page_size: nil, order_by: nil, aggregation_cross_series_reducer: nil, filter: nil, page_token: nil, aggregation_per_series_aligner: nil, interval_start_time: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v3/{+name}/timeSeries', options) command.response_representation = Google::Apis::MonitoringV3::ListTimeSeriesResponse::Representation command.response_class = Google::Apis::MonitoringV3::ListTimeSeriesResponse command.params['name'] = name unless name.nil? + command.query['aggregation.groupByFields'] = aggregation_group_by_fields unless aggregation_group_by_fields.nil? + command.query['interval.endTime'] = interval_end_time unless interval_end_time.nil? + command.query['aggregation.alignmentPeriod'] = aggregation_alignment_period unless aggregation_alignment_period.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['orderBy'] = order_by unless order_by.nil? command.query['aggregation.crossSeriesReducer'] = aggregation_cross_series_reducer unless aggregation_cross_series_reducer.nil? command.query['filter'] = filter unless filter.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['aggregation.perSeriesAligner'] = aggregation_per_series_aligner unless aggregation_per_series_aligner.nil? command.query['interval.startTime'] = interval_start_time unless interval_start_time.nil? command.query['view'] = view unless view.nil? - command.query['aggregation.groupByFields'] = aggregation_group_by_fields unless aggregation_group_by_fields.nil? - command.query['interval.endTime'] = interval_end_time unless interval_end_time.nil? - command.query['aggregation.alignmentPeriod'] = aggregation_alignment_period unless aggregation_alignment_period.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['orderBy'] = order_by unless order_by.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) @@ -186,85 +222,6 @@ module Google execute_or_queue_command(command, &block) end - # Lists metric descriptors that match a filter. This method does not require a - # Stackdriver account. - # @param [String] name - # The project on which to execute the request. The format is "projects/` - # project_id_or_number`". - # @param [Fixnum] page_size - # A positive number that is the maximum number of results to return. - # @param [String] filter - # If this field is empty, all custom and system-defined metric descriptors are - # returned. Otherwise, the filter specifies which metric descriptors are to be - # returned. For example, the following filter matches all custom metrics: - # metric.type = starts_with("custom.googleapis.com/") - # @param [String] page_token - # If this field is not empty then it must contain the nextPageToken value - # returned by a previous call to this method. Using this field causes the method - # to return additional results from the previous method call. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MonitoringV3::ListMetricDescriptorsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MonitoringV3::ListMetricDescriptorsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_project_metric_descriptors(name, page_size: nil, filter: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v3/{+name}/metricDescriptors', options) - command.response_representation = Google::Apis::MonitoringV3::ListMetricDescriptorsResponse::Representation - command.response_class = Google::Apis::MonitoringV3::ListMetricDescriptorsResponse - command.params['name'] = name unless name.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['filter'] = filter unless filter.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets a single metric descriptor. This method does not require a Stackdriver - # account. - # @param [String] name - # The metric descriptor on which to execute the request. The format is "projects/ - # `project_id_or_number`/metricDescriptors/`metric_id`". An example value of ` - # metric_id` is "compute.googleapis.com/instance/disk/read_bytes_count". - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MonitoringV3::MetricDescriptor] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MonitoringV3::MetricDescriptor] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_metric_descriptor(name, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v3/{+name}', options) - command.response_representation = Google::Apis::MonitoringV3::MetricDescriptor::Representation - command.response_class = Google::Apis::MonitoringV3::MetricDescriptor - command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - # Creates a new metric descriptor. User-created metric descriptors define custom # metrics. # @param [String] name @@ -332,11 +289,94 @@ module Google execute_or_queue_command(command, &block) end + # Lists metric descriptors that match a filter. This method does not require a + # Stackdriver account. + # @param [String] name + # The project on which to execute the request. The format is "projects/` + # project_id_or_number`". + # @param [String] filter + # If this field is empty, all custom and system-defined metric descriptors are + # returned. Otherwise, the filter specifies which metric descriptors are to be + # returned. For example, the following filter matches all custom metrics: + # metric.type = starts_with("custom.googleapis.com/") + # @param [String] page_token + # If this field is not empty then it must contain the nextPageToken value + # returned by a previous call to this method. Using this field causes the method + # to return additional results from the previous method call. + # @param [Fixnum] page_size + # A positive number that is the maximum number of results to return. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MonitoringV3::ListMetricDescriptorsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV3::ListMetricDescriptorsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_metric_descriptors(name, filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v3/{+name}/metricDescriptors', options) + command.response_representation = Google::Apis::MonitoringV3::ListMetricDescriptorsResponse::Representation + command.response_class = Google::Apis::MonitoringV3::ListMetricDescriptorsResponse + command.params['name'] = name unless name.nil? + command.query['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 a single metric descriptor. This method does not require a Stackdriver + # account. + # @param [String] name + # The metric descriptor on which to execute the request. The format is "projects/ + # `project_id_or_number`/metricDescriptors/`metric_id`". An example value of ` + # metric_id` is "compute.googleapis.com/instance/disk/read_bytes_count". + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MonitoringV3::MetricDescriptor] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV3::MetricDescriptor] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_metric_descriptor(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v3/{+name}', options) + command.response_representation = Google::Apis::MonitoringV3::MetricDescriptor::Representation + command.response_class = Google::Apis::MonitoringV3::MetricDescriptor + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Lists monitored resource descriptors that match a filter. This method does not # require a Stackdriver account. # @param [String] name # The project on which to execute the request. The format is "projects/` # project_id_or_number`". + # @param [String] page_token + # If this field is not empty then it must contain the nextPageToken value + # returned by a previous call to this method. Using this field causes the method + # to return additional results from the previous method call. # @param [Fixnum] page_size # A positive number that is the maximum number of results to return. # @param [String] filter @@ -344,10 +384,6 @@ module Google # reference the descriptor's type and labels. For example, the following filter # returns only Google Compute Engine descriptors that have an id label: # resource.type = starts_with("gce_") AND resource.label:id - # @param [String] page_token - # If this field is not empty then it must contain the nextPageToken value - # returned by a previous call to this method. Using this field causes the method - # to return additional results from the previous method call. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -365,14 +401,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_monitored_resource_descriptors(name, page_size: nil, filter: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_project_monitored_resource_descriptors(name, page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v3/{+name}/monitoredResourceDescriptors', options) command.response_representation = Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse::Representation command.response_class = Google::Apis::MonitoringV3::ListMonitoredResourceDescriptorsResponse command.params['name'] = name unless name.nil? + command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['filter'] = filter unless filter.nil? - command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) @@ -411,6 +447,82 @@ module Google execute_or_queue_command(command, &block) end + # Updates an existing group. You can change any group attributes except name. + # @param [String] name + # Output only. The name of this group. The format is "projects/` + # project_id_or_number`/groups/`group_id`". When creating a group, this field is + # ignored and a new name is created consisting of the project specified in the + # call to CreateGroup and a unique `group_id` that is generated automatically. + # @param [Google::Apis::MonitoringV3::Group] group_object + # @param [Boolean] validate_only + # If true, validate this request but do not update the existing group. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MonitoringV3::Group] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV3::Group] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_project_group(name, group_object = nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'v3/{+name}', options) + command.request_representation = Google::Apis::MonitoringV3::Group::Representation + command.request_object = group_object + command.response_representation = Google::Apis::MonitoringV3::Group::Representation + command.response_class = Google::Apis::MonitoringV3::Group + command.params['name'] = name unless name.nil? + command.query['validateOnly'] = validate_only unless validate_only.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a new group. + # @param [String] name + # The project in which to create the group. The format is "projects/` + # project_id_or_number`". + # @param [Google::Apis::MonitoringV3::Group] group_object + # @param [Boolean] validate_only + # If true, validate this request but do not create the group. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MonitoringV3::Group] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MonitoringV3::Group] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def create_project_group(name, group_object = nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v3/{+name}/groups', options) + command.request_representation = Google::Apis::MonitoringV3::Group::Representation + command.request_object = group_object + command.response_representation = Google::Apis::MonitoringV3::Group::Representation + command.response_class = Google::Apis::MonitoringV3::Group + command.params['name'] = name unless name.nil? + command.query['validateOnly'] = validate_only unless validate_only.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Deletes an existing group. # @param [String] name # The group to delete. The format is "projects/`project_id_or_number`/groups/` @@ -529,86 +641,12 @@ module Google execute_or_queue_command(command, &block) end - # Updates an existing group. You can change any group attributes except name. - # @param [String] name - # Output only. The name of this group. The format is "projects/` - # project_id_or_number`/groups/`group_id`". When creating a group, this field is - # ignored and a new name is created consisting of the project specified in the - # call to CreateGroup and a unique `group_id` that is generated automatically. - # @param [Google::Apis::MonitoringV3::Group] group_object - # @param [Boolean] validate_only - # If true, validate this request but do not update the existing group. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MonitoringV3::Group] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MonitoringV3::Group] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_project_group(name, group_object = nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:put, 'v3/{+name}', options) - command.request_representation = Google::Apis::MonitoringV3::Group::Representation - command.request_object = group_object - command.response_representation = Google::Apis::MonitoringV3::Group::Representation - command.response_class = Google::Apis::MonitoringV3::Group - command.params['name'] = name unless name.nil? - command.query['validateOnly'] = validate_only unless validate_only.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates a new group. - # @param [String] name - # The project in which to create the group. The format is "projects/` - # project_id_or_number`". - # @param [Google::Apis::MonitoringV3::Group] group_object - # @param [Boolean] validate_only - # If true, validate this request but do not create the group. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MonitoringV3::Group] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MonitoringV3::Group] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_project_group(name, group_object = nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v3/{+name}/groups', options) - command.request_representation = Google::Apis::MonitoringV3::Group::Representation - command.request_object = group_object - command.response_representation = Google::Apis::MonitoringV3::Group::Representation - command.response_class = Google::Apis::MonitoringV3::Group - command.params['name'] = name unless name.nil? - command.query['validateOnly'] = validate_only unless validate_only.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - # Lists the monitored resources that are members of a group. # @param [String] name # The group whose members are listed. The format is "projects/` # project_id_or_number`/groups/`group_id`". + # @param [String] interval_end_time + # Required. The end of the time interval. # @param [String] filter # An optional list filter describing the members to be returned. The filter may # reference the type, labels, and metadata of monitored resources that comprise @@ -624,8 +662,6 @@ module Google # @param [String] interval_start_time # Optional. The beginning of the time interval. The default value for the start # time is the end time. The start time must not be later than the end time. - # @param [String] interval_end_time - # Required. The end of the time interval. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user @@ -643,52 +679,16 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_project_group_members(name, filter: nil, page_token: nil, page_size: nil, interval_start_time: nil, interval_end_time: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_project_group_members(name, interval_end_time: nil, filter: nil, page_token: nil, page_size: nil, interval_start_time: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v3/{+name}/members', options) command.response_representation = Google::Apis::MonitoringV3::ListGroupMembersResponse::Representation command.response_class = Google::Apis::MonitoringV3::ListGroupMembersResponse command.params['name'] = name unless name.nil? + command.query['interval.endTime'] = interval_end_time unless interval_end_time.nil? command.query['filter'] = filter unless filter.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['interval.startTime'] = interval_start_time unless interval_start_time.nil? - command.query['interval.endTime'] = interval_end_time unless interval_end_time.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Stackdriver Monitoring Agent only: Creates a new time series. - # @param [String] name - # The project in which to create the time series. The format is "projects/ - # PROJECT_ID_OR_NUMBER". - # @param [Google::Apis::MonitoringV3::CreateCollectdTimeSeriesRequest] create_collectd_time_series_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::MonitoringV3::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::MonitoringV3::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_collectd_time_series(name, create_collectd_time_series_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v3/{+name}/collectdTimeSeries', options) - command.request_representation = Google::Apis::MonitoringV3::CreateCollectdTimeSeriesRequest::Representation - command.request_object = create_collectd_time_series_request_object - command.response_representation = Google::Apis::MonitoringV3::Empty::Representation - command.response_class = Google::Apis::MonitoringV3::Empty - command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) diff --git a/generated/google/apis/partners_v2.rb b/generated/google/apis/partners_v2.rb index 0b3a9a798..317be715e 100644 --- a/generated/google/apis/partners_v2.rb +++ b/generated/google/apis/partners_v2.rb @@ -26,7 +26,7 @@ module Google # @see https://developers.google.com/partners/ module PartnersV2 VERSION = 'V2' - REVISION = '20170303' + REVISION = '20170316' end end end diff --git a/generated/google/apis/partners_v2/classes.rb b/generated/google/apis/partners_v2/classes.rb index 6624b761a..453945329 100644 --- a/generated/google/apis/partners_v2/classes.rb +++ b/generated/google/apis/partners_v2/classes.rb @@ -22,6 +22,156 @@ module Google module Apis module PartnersV2 + # A company resource in the Google Partners API. Once certified, it qualifies + # for being searched by advertisers. + class Company + include Google::Apis::Core::Hashable + + # Represents an amount of money with its currency type. + # Corresponds to the JSON property `convertedMinMonthlyBudget` + # @return [Google::Apis::PartnersV2::Money] + attr_accessor :converted_min_monthly_budget + + # Industries the company can help with. + # Corresponds to the JSON property `industries` + # @return [Array] + attr_accessor :industries + + # URL of the company's website. + # Corresponds to the JSON property `websiteUrl` + # @return [String] + attr_accessor :website_url + + # URL of the company's additional websites used to verify the dynamic badges. + # These are stored as full URLs as entered by the user, but only the TLD will + # be used for the actual verification. + # Corresponds to the JSON property `additionalWebsites` + # @return [Array] + attr_accessor :additional_websites + + # The Primary AdWords Manager Account id. + # Corresponds to the JSON property `primaryAdwordsManagerAccountId` + # @return [String] + attr_accessor :primary_adwords_manager_account_id + + # The name of the company. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The list of localized info for the company. + # Corresponds to the JSON property `localizedInfos` + # @return [Array] + attr_accessor :localized_infos + + # The list of Google Partners certification statuses for the company. + # Corresponds to the JSON property `certificationStatuses` + # @return [Array] + attr_accessor :certification_statuses + + # The ID of the company. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Services the company can help with. + # Corresponds to the JSON property `services` + # @return [Array] + attr_accessor :services + + # Represents an amount of money with its currency type. + # Corresponds to the JSON property `originalMinMonthlyBudget` + # @return [Google::Apis::PartnersV2::Money] + attr_accessor :original_min_monthly_budget + + # Basic information from a public profile. + # Corresponds to the JSON property `publicProfile` + # @return [Google::Apis::PartnersV2::PublicProfile] + attr_accessor :public_profile + + # A location with address and geographic coordinates. May optionally contain a + # detailed (multi-field) version of the address. + # Corresponds to the JSON property `primaryLocation` + # @return [Google::Apis::PartnersV2::Location] + attr_accessor :primary_location + + # Information related to the ranking of the company within the list of + # companies. + # Corresponds to the JSON property `ranks` + # @return [Array] + attr_accessor :ranks + + # The list of Google Partners specialization statuses for the company. + # Corresponds to the JSON property `specializationStatus` + # @return [Array] + attr_accessor :specialization_status + + # Partner badge tier + # Corresponds to the JSON property `badgeTier` + # @return [String] + attr_accessor :badge_tier + + # Email domains that allow users with a matching email address to get + # auto-approved for associating with this company. + # Corresponds to the JSON property `autoApprovalEmailDomains` + # @return [Array] + attr_accessor :auto_approval_email_domains + + # Company type labels listed on the company's profile. + # Corresponds to the JSON property `companyTypes` + # @return [Array] + attr_accessor :company_types + + # The public viewability status of the company's profile. + # Corresponds to the JSON property `profileStatus` + # @return [String] + attr_accessor :profile_status + + # The primary language code of the company, as defined by + # BCP 47 + # (IETF BCP 47, "Tags for Identifying Languages"). + # Corresponds to the JSON property `primaryLanguageCode` + # @return [String] + attr_accessor :primary_language_code + + # The list of all company locations. + # If set, must include the + # primary_location + # in the list. + # Corresponds to the JSON property `locations` + # @return [Array] + attr_accessor :locations + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @converted_min_monthly_budget = args[:converted_min_monthly_budget] if args.key?(:converted_min_monthly_budget) + @industries = args[:industries] if args.key?(:industries) + @website_url = args[:website_url] if args.key?(:website_url) + @additional_websites = args[:additional_websites] if args.key?(:additional_websites) + @primary_adwords_manager_account_id = args[:primary_adwords_manager_account_id] if args.key?(:primary_adwords_manager_account_id) + @name = args[:name] if args.key?(:name) + @localized_infos = args[:localized_infos] if args.key?(:localized_infos) + @certification_statuses = args[:certification_statuses] if args.key?(:certification_statuses) + @id = args[:id] if args.key?(:id) + @services = args[:services] if args.key?(:services) + @original_min_monthly_budget = args[:original_min_monthly_budget] if args.key?(:original_min_monthly_budget) + @public_profile = args[:public_profile] if args.key?(:public_profile) + @primary_location = args[:primary_location] if args.key?(:primary_location) + @ranks = args[:ranks] if args.key?(:ranks) + @specialization_status = args[:specialization_status] if args.key?(:specialization_status) + @badge_tier = args[:badge_tier] if args.key?(:badge_tier) + @auto_approval_email_domains = args[:auto_approval_email_domains] if args.key?(:auto_approval_email_domains) + @company_types = args[:company_types] if args.key?(:company_types) + @profile_status = args[:profile_status] if args.key?(:profile_status) + @primary_language_code = args[:primary_language_code] if args.key?(:primary_language_code) + @locations = args[:locations] if args.key?(:locations) + end + end + # Response message for ListLeads. class ListLeadsResponse include Google::Apis::Core::Hashable @@ -63,156 +213,6 @@ module Google end end - # A company resource in the Google Partners API. Once certified, it qualifies - # for being searched by advertisers. - class Company - include Google::Apis::Core::Hashable - - # The list of all company locations. - # If set, must include the - # primary_location - # in the list. - # Corresponds to the JSON property `locations` - # @return [Array] - attr_accessor :locations - - # Represents an amount of money with its currency type. - # Corresponds to the JSON property `convertedMinMonthlyBudget` - # @return [Google::Apis::PartnersV2::Money] - attr_accessor :converted_min_monthly_budget - - # Industries the company can help with. - # Corresponds to the JSON property `industries` - # @return [Array] - attr_accessor :industries - - # URL of the company's website. - # Corresponds to the JSON property `websiteUrl` - # @return [String] - attr_accessor :website_url - - # URL of the company's additional websites used to verify the dynamic badges. - # These are stored as full URLs as entered by the user, but only the TLD will - # be used for the actual verification. - # Corresponds to the JSON property `additionalWebsites` - # @return [Array] - attr_accessor :additional_websites - - # The Primary AdWords Manager Account id. - # Corresponds to the JSON property `primaryAdwordsManagerAccountId` - # @return [String] - attr_accessor :primary_adwords_manager_account_id - - # The name of the company. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # The list of localized info for the company. - # Corresponds to the JSON property `localizedInfos` - # @return [Array] - attr_accessor :localized_infos - - # The ID of the company. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The list of Google Partners certification statuses for the company. - # Corresponds to the JSON property `certificationStatuses` - # @return [Array] - attr_accessor :certification_statuses - - # Basic information from a public profile. - # Corresponds to the JSON property `publicProfile` - # @return [Google::Apis::PartnersV2::PublicProfile] - attr_accessor :public_profile - - # Services the company can help with. - # Corresponds to the JSON property `services` - # @return [Array] - attr_accessor :services - - # A location with address and geographic coordinates. May optionally contain a - # detailed (multi-field) version of the address. - # Corresponds to the JSON property `primaryLocation` - # @return [Google::Apis::PartnersV2::Location] - attr_accessor :primary_location - - # Represents an amount of money with its currency type. - # Corresponds to the JSON property `originalMinMonthlyBudget` - # @return [Google::Apis::PartnersV2::Money] - attr_accessor :original_min_monthly_budget - - # Information related to the ranking of the company within the list of - # companies. - # Corresponds to the JSON property `ranks` - # @return [Array] - attr_accessor :ranks - - # Partner badge tier - # Corresponds to the JSON property `badgeTier` - # @return [String] - attr_accessor :badge_tier - - # The list of Google Partners specialization statuses for the company. - # Corresponds to the JSON property `specializationStatus` - # @return [Array] - attr_accessor :specialization_status - - # Company type labels listed on the company's profile. - # Corresponds to the JSON property `companyTypes` - # @return [Array] - attr_accessor :company_types - - # Email domains that allow users with a matching email address to get - # auto-approved for associating with this company. - # Corresponds to the JSON property `autoApprovalEmailDomains` - # @return [Array] - attr_accessor :auto_approval_email_domains - - # The primary language code of the company, as defined by - # BCP 47 - # (IETF BCP 47, "Tags for Identifying Languages"). - # Corresponds to the JSON property `primaryLanguageCode` - # @return [String] - attr_accessor :primary_language_code - - # The public viewability status of the company's profile. - # Corresponds to the JSON property `profileStatus` - # @return [String] - attr_accessor :profile_status - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @locations = args[:locations] if args.key?(:locations) - @converted_min_monthly_budget = args[:converted_min_monthly_budget] if args.key?(:converted_min_monthly_budget) - @industries = args[:industries] if args.key?(:industries) - @website_url = args[:website_url] if args.key?(:website_url) - @additional_websites = args[:additional_websites] if args.key?(:additional_websites) - @primary_adwords_manager_account_id = args[:primary_adwords_manager_account_id] if args.key?(:primary_adwords_manager_account_id) - @name = args[:name] if args.key?(:name) - @localized_infos = args[:localized_infos] if args.key?(:localized_infos) - @id = args[:id] if args.key?(:id) - @certification_statuses = args[:certification_statuses] if args.key?(:certification_statuses) - @public_profile = args[:public_profile] if args.key?(:public_profile) - @services = args[:services] if args.key?(:services) - @primary_location = args[:primary_location] if args.key?(:primary_location) - @original_min_monthly_budget = args[:original_min_monthly_budget] if args.key?(:original_min_monthly_budget) - @ranks = args[:ranks] if args.key?(:ranks) - @badge_tier = args[:badge_tier] if args.key?(:badge_tier) - @specialization_status = args[:specialization_status] if args.key?(:specialization_status) - @company_types = args[:company_types] if args.key?(:company_types) - @auto_approval_email_domains = args[:auto_approval_email_domains] if args.key?(:auto_approval_email_domains) - @primary_language_code = args[:primary_language_code] if args.key?(:primary_language_code) - @profile_status = args[:profile_status] if args.key?(:profile_status) - end - end - # Response message for CreateLead. class CreateLeadResponse include Google::Apis::Core::Hashable @@ -277,6 +277,28 @@ module Google class Location include Google::Apis::Core::Hashable + # Values are frequently alphanumeric. + # Corresponds to the JSON property `postalCode` + # @return [String] + attr_accessor :postal_code + + # Language code of the address. Should be in BCP 47 format. + # Corresponds to the JSON property `languageCode` + # @return [String] + attr_accessor :language_code + + # Use of this code is very country-specific, but will refer to a secondary + # classification code for sorting mail. + # Corresponds to the JSON property `sortingCode` + # @return [String] + attr_accessor :sorting_code + + # The following address lines represent the most specific part of any + # address. + # Corresponds to the JSON property `addressLine` + # @return [Array] + attr_accessor :address_line + # Top-level administrative subdivision of this country. # Corresponds to the JSON property `administrativeArea` # @return [String] @@ -328,60 +350,63 @@ module Google # @return [Google::Apis::PartnersV2::LatLng] attr_accessor :lat_lng + # The single string version of the address. + # Corresponds to the JSON property `address` + # @return [String] + attr_accessor :address + # Dependent locality or sublocality. Used for UK dependent localities, or # neighborhoods or boroughs in other locations. # Corresponds to the JSON property `dependentLocality` # @return [String] attr_accessor :dependent_locality - # The single string version of the address. - # Corresponds to the JSON property `address` - # @return [String] - attr_accessor :address - # CLDR (Common Locale Data Repository) region code . # Corresponds to the JSON property `regionCode` # @return [String] attr_accessor :region_code - # Values are frequently alphanumeric. - # Corresponds to the JSON property `postalCode` - # @return [String] - attr_accessor :postal_code - - # Use of this code is very country-specific, but will refer to a secondary - # classification code for sorting mail. - # Corresponds to the JSON property `sortingCode` - # @return [String] - attr_accessor :sorting_code - - # Language code of the address. Should be in BCP 47 format. - # Corresponds to the JSON property `languageCode` - # @return [String] - attr_accessor :language_code - - # The following address lines represent the most specific part of any - # address. - # Corresponds to the JSON property `addressLine` - # @return [Array] - attr_accessor :address_line - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @postal_code = args[:postal_code] if args.key?(:postal_code) + @language_code = args[:language_code] if args.key?(:language_code) + @sorting_code = args[:sorting_code] if args.key?(:sorting_code) + @address_line = args[:address_line] if args.key?(:address_line) @administrative_area = args[:administrative_area] if args.key?(:administrative_area) @locality = args[:locality] if args.key?(:locality) @lat_lng = args[:lat_lng] if args.key?(:lat_lng) - @dependent_locality = args[:dependent_locality] if args.key?(:dependent_locality) @address = args[:address] if args.key?(:address) + @dependent_locality = args[:dependent_locality] if args.key?(:dependent_locality) @region_code = args[:region_code] if args.key?(:region_code) - @postal_code = args[:postal_code] if args.key?(:postal_code) - @sorting_code = args[:sorting_code] if args.key?(:sorting_code) - @language_code = args[:language_code] if args.key?(:language_code) - @address_line = args[:address_line] if args.key?(:address_line) + end + end + + # Status for a Google Partners certification exam. + class CertificationExamStatus + include Google::Apis::Core::Hashable + + # The number of people who have passed the certification exam. + # Corresponds to the JSON property `numberUsersPass` + # @return [Fixnum] + attr_accessor :number_users_pass + + # The type of certification exam. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @number_users_pass = args[:number_users_pass] if args.key?(:number_users_pass) + @type = args[:type] if args.key?(:type) end end @@ -416,42 +441,10 @@ module Google end end - # Status for a Google Partners certification exam. - class CertificationExamStatus - include Google::Apis::Core::Hashable - - # The number of people who have passed the certification exam. - # Corresponds to the JSON property `numberUsersPass` - # @return [Fixnum] - attr_accessor :number_users_pass - - # The type of certification exam. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @number_users_pass = args[:number_users_pass] if args.key?(:number_users_pass) - @type = args[:type] if args.key?(:type) - end - end - # A set of opt-ins for a user. class OptIns include Google::Apis::Core::Hashable - # An opt-in about receiving email with customized AdWords campaign management - # tips. - # Corresponds to the JSON property `performanceSuggestions` - # @return [Boolean] - attr_accessor :performance_suggestions - alias_method :performance_suggestions?, :performance_suggestions - # An opt-in to receive special promotional gifts and material in the mail. # Corresponds to the JSON property `physicalMail` # @return [Boolean] @@ -477,17 +470,24 @@ module Google attr_accessor :special_offers alias_method :special_offers?, :special_offers + # An opt-in about receiving email with customized AdWords campaign management + # tips. + # Corresponds to the JSON property `performanceSuggestions` + # @return [Boolean] + attr_accessor :performance_suggestions + alias_method :performance_suggestions?, :performance_suggestions + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @performance_suggestions = args[:performance_suggestions] if args.key?(:performance_suggestions) @physical_mail = args[:physical_mail] if args.key?(:physical_mail) @phone_contact = args[:phone_contact] if args.key?(:phone_contact) @market_comm = args[:market_comm] if args.key?(:market_comm) @special_offers = args[:special_offers] if args.key?(:special_offers) + @performance_suggestions = args[:performance_suggestions] if args.key?(:performance_suggestions) end end @@ -516,26 +516,6 @@ module Google end end - # Response message for - # GetPartnersStatus. - class GetPartnersStatusResponse - include Google::Apis::Core::Hashable - - # Common data that is in each API response. - # Corresponds to the JSON property `responseMetadata` - # @return [Google::Apis::PartnersV2::ResponseMetadata] - attr_accessor :response_metadata - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @response_metadata = args[:response_metadata] if args.key?(:response_metadata) - end - end - # The profile information of a Partners user. class UserProfile include Google::Apis::Core::Hashable @@ -556,6 +536,11 @@ module Google # @return [Array] attr_accessor :industries + # The list of languages this user understands. + # Corresponds to the JSON property `languages` + # @return [Array] + attr_accessor :languages + # The user's family name. # Corresponds to the JSON property `familyName` # @return [String] @@ -566,16 +551,16 @@ module Google # @return [Google::Apis::PartnersV2::OptIns] attr_accessor :email_opt_ins - # The list of languages this user understands. - # Corresponds to the JSON property `languages` - # @return [Array] - attr_accessor :languages - # A list of ids representing which markets the user was interested in. # Corresponds to the JSON property `markets` # @return [Array] attr_accessor :markets + # The user's phone number. + # Corresponds to the JSON property `phoneNumber` + # @return [String] + attr_accessor :phone_number + # If the user has edit access to multiple accounts, the user can choose the # preferred account and it is used when a personal account is needed. Can # be empty. @@ -583,11 +568,6 @@ module Google # @return [String] attr_accessor :adwords_manager_account - # The user's phone number. - # Corresponds to the JSON property `phoneNumber` - # @return [String] - attr_accessor :phone_number - # The user's primary country, an ISO 2-character code. # Corresponds to the JSON property `primaryCountryCode` # @return [String] @@ -598,17 +578,17 @@ module Google # @return [String] attr_accessor :email_address - # A list of ids representing which channels the user selected they were in. - # Corresponds to the JSON property `channels` - # @return [Array] - attr_accessor :channels - # Whether the user's public profile is visible to anyone with the URL. # Corresponds to the JSON property `profilePublic` # @return [Boolean] attr_accessor :profile_public alias_method :profile_public?, :profile_public + # A list of ids representing which channels the user selected they were in. + # Corresponds to the JSON property `channels` + # @return [Array] + attr_accessor :channels + # A list of ids represnting which job categories the user selected. # Corresponds to the JSON property `jobFunctions` # @return [Array] @@ -623,39 +603,44 @@ module Google @given_name = args[:given_name] if args.key?(:given_name) @address = args[:address] if args.key?(:address) @industries = args[:industries] if args.key?(:industries) + @languages = args[:languages] if args.key?(:languages) @family_name = args[:family_name] if args.key?(:family_name) @email_opt_ins = args[:email_opt_ins] if args.key?(:email_opt_ins) - @languages = args[:languages] if args.key?(:languages) @markets = args[:markets] if args.key?(:markets) - @adwords_manager_account = args[:adwords_manager_account] if args.key?(:adwords_manager_account) @phone_number = args[:phone_number] if args.key?(:phone_number) + @adwords_manager_account = args[:adwords_manager_account] if args.key?(:adwords_manager_account) @primary_country_code = args[:primary_country_code] if args.key?(:primary_country_code) @email_address = args[:email_address] if args.key?(:email_address) - @channels = args[:channels] if args.key?(:channels) @profile_public = args[:profile_public] if args.key?(:profile_public) + @channels = args[:channels] if args.key?(:channels) @job_functions = args[:job_functions] if args.key?(:job_functions) end end + # Response message for + # GetPartnersStatus. + class GetPartnersStatusResponse + include Google::Apis::Core::Hashable + + # Common data that is in each API response. + # Corresponds to the JSON property `responseMetadata` + # @return [Google::Apis::PartnersV2::ResponseMetadata] + attr_accessor :response_metadata + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @response_metadata = args[:response_metadata] if args.key?(:response_metadata) + end + end + # Historical information about a Google Partners Offer. class HistoricalOffer include Google::Apis::Core::Hashable - # Time offer was first created. - # Corresponds to the JSON property `creationTime` - # @return [String] - attr_accessor :creation_time - - # Status of the offer. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # Email address for client. - # Corresponds to the JSON property `clientEmail` - # @return [String] - attr_accessor :client_email - # ID of client. # Corresponds to the JSON property `clientId` # @return [String] @@ -701,15 +686,27 @@ module Google # @return [String] attr_accessor :offer_code + # Time offer was first created. + # Corresponds to the JSON property `creationTime` + # @return [String] + attr_accessor :creation_time + + # Email address for client. + # Corresponds to the JSON property `clientEmail` + # @return [String] + attr_accessor :client_email + + # Status of the offer. + # Corresponds to the JSON property `status` + # @return [String] + attr_accessor :status + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @creation_time = args[:creation_time] if args.key?(:creation_time) - @status = args[:status] if args.key?(:status) - @client_email = args[:client_email] if args.key?(:client_email) @client_id = args[:client_id] if args.key?(:client_id) @client_name = args[:client_name] if args.key?(:client_name) @last_modified_time = args[:last_modified_time] if args.key?(:last_modified_time) @@ -719,32 +716,9 @@ module Google @offer_country_code = args[:offer_country_code] if args.key?(:offer_country_code) @expiration_time = args[:expiration_time] if args.key?(:expiration_time) @offer_code = args[:offer_code] if args.key?(:offer_code) - end - end - - # Values to use instead of the user's respective defaults. These are only - # honored by whitelisted products. - class UserOverrides - include Google::Apis::Core::Hashable - - # IP address to use instead of the user's geo-located IP address. - # Corresponds to the JSON property `ipAddress` - # @return [String] - attr_accessor :ip_address - - # Logged-in user ID to impersonate instead of the user's ID. - # Corresponds to the JSON property `userId` - # @return [String] - attr_accessor :user_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @ip_address = args[:ip_address] if args.key?(:ip_address) - @user_id = args[:user_id] if args.key?(:user_id) + @creation_time = args[:creation_time] if args.key?(:creation_time) + @client_email = args[:client_email] if args.key?(:client_email) + @status = args[:status] if args.key?(:status) end end @@ -805,20 +779,46 @@ module Google end end - # Details of the analytics events for a `Company` within a single day. - class AnalyticsDataPoint + # Values to use instead of the user's respective defaults. These are only + # honored by whitelisted products. + class UserOverrides include Google::Apis::Core::Hashable - # Location information of where these events occurred. - # Corresponds to the JSON property `eventLocations` - # @return [Array] - attr_accessor :event_locations + # Logged-in user ID to impersonate instead of the user's ID. + # Corresponds to the JSON property `userId` + # @return [String] + attr_accessor :user_id - # Number of times the type of event occurred. - # Meaning depends on context (e.g. profile views, contacts, etc.). - # Corresponds to the JSON property `eventCount` - # @return [Fixnum] - attr_accessor :event_count + # IP address to use instead of the user's geo-located IP address. + # Corresponds to the JSON property `ipAddress` + # @return [String] + attr_accessor :ip_address + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @user_id = args[:user_id] if args.key?(:user_id) + @ip_address = args[:ip_address] if args.key?(:ip_address) + end + end + + # Details of the analytics events for a `Company` within a single day. + class AnalyticsDataPoint + include Google::Apis::Core::Hashable + + # Number of times the type of event occurred. + # Meaning depends on context (e.g. profile views, contacts, etc.). + # Corresponds to the JSON property `eventCount` + # @return [Fixnum] + attr_accessor :event_count + + # Location information of where these events occurred. + # Corresponds to the JSON property `eventLocations` + # @return [Array] + attr_accessor :event_locations def initialize(**args) update!(**args) @@ -826,8 +826,8 @@ module Google # Update properties of this object def update!(**args) - @event_locations = args[:event_locations] if args.key?(:event_locations) @event_count = args[:event_count] if args.key?(:event_count) + @event_locations = args[:event_locations] if args.key?(:event_locations) end end @@ -874,49 +874,6 @@ module Google end end - # Basic information from a public profile. - class PublicProfile - include Google::Apis::Core::Hashable - - # The ID which can be used to retrieve more details about the public profile. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # The URL of the public profile. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - # The URL to the main profile image of the public profile. - # Corresponds to the JSON property `profileImage` - # @return [String] - attr_accessor :profile_image - - # The display name of the public profile. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The URL to the main display image of the public profile. Being deprecated. - # Corresponds to the JSON property `displayImageUrl` - # @return [String] - attr_accessor :display_image_url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @id = args[:id] if args.key?(:id) - @url = args[:url] if args.key?(:url) - @profile_image = args[:profile_image] if args.key?(:profile_image) - @display_name = args[:display_name] if args.key?(:display_name) - @display_image_url = args[:display_image_url] if args.key?(:display_image_url) - end - end - # Information about a particular AdWords Manager Account. # Read more at https://support.google.com/adwords/answer/6139186 class AdWordsManagerAccountInfo @@ -943,6 +900,49 @@ module Google end end + # Basic information from a public profile. + class PublicProfile + include Google::Apis::Core::Hashable + + # The URL to the main profile image of the public profile. + # Corresponds to the JSON property `profileImage` + # @return [String] + attr_accessor :profile_image + + # The display name of the public profile. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # The URL to the main display image of the public profile. Being deprecated. + # Corresponds to the JSON property `displayImageUrl` + # @return [String] + attr_accessor :display_image_url + + # The ID which can be used to retrieve more details about the public profile. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # The URL of the public profile. + # Corresponds to the JSON property `url` + # @return [String] + attr_accessor :url + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @profile_image = args[:profile_image] if args.key?(:profile_image) + @display_name = args[:display_name] if args.key?(:display_name) + @display_image_url = args[:display_image_url] if args.key?(:display_image_url) + @id = args[:id] if args.key?(:id) + @url = args[:url] if args.key?(:url) + end + end + # Common data that is in each API response. class ResponseMetadata include Google::Apis::Core::Hashable @@ -966,24 +966,24 @@ module Google class RecaptchaChallenge include Google::Apis::Core::Hashable - # The response to the reCaptcha challenge. - # Corresponds to the JSON property `response` - # @return [String] - attr_accessor :response - # The ID of the reCaptcha challenge. # Corresponds to the JSON property `id` # @return [String] attr_accessor :id + # The response to the reCaptcha challenge. + # Corresponds to the JSON property `response` + # @return [String] + attr_accessor :response + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @response = args[:response] if args.key?(:response) @id = args[:id] if args.key?(:id) + @response = args[:response] if args.key?(:response) end end @@ -991,22 +991,6 @@ module Google class AvailableOffer include Google::Apis::Core::Hashable - # Whether or not the list of qualified customers is definitely complete. - # Corresponds to the JSON property `qualifiedCustomersComplete` - # @return [Boolean] - attr_accessor :qualified_customers_complete - alias_method :qualified_customers_complete?, :qualified_customers_complete - - # ID of this offer. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Offer info by country. - # Corresponds to the JSON property `countryOfferInfos` - # @return [Array] - attr_accessor :country_offer_infos - # Type of offer. # Corresponds to the JSON property `offerType` # @return [String] @@ -1053,15 +1037,28 @@ module Google # @return [String] attr_accessor :name + # Whether or not the list of qualified customers is definitely complete. + # Corresponds to the JSON property `qualifiedCustomersComplete` + # @return [Boolean] + attr_accessor :qualified_customers_complete + alias_method :qualified_customers_complete?, :qualified_customers_complete + + # ID of this offer. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Offer info by country. + # Corresponds to the JSON property `countryOfferInfos` + # @return [Array] + attr_accessor :country_offer_infos + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @qualified_customers_complete = args[:qualified_customers_complete] if args.key?(:qualified_customers_complete) - @id = args[:id] if args.key?(:id) - @country_offer_infos = args[:country_offer_infos] if args.key?(:country_offer_infos) @offer_type = args[:offer_type] if args.key?(:offer_type) @max_account_age = args[:max_account_age] if args.key?(:max_account_age) @qualified_customer = args[:qualified_customer] if args.key?(:qualified_customer) @@ -1071,6 +1068,9 @@ module Google @description = args[:description] if args.key?(:description) @offer_level = args[:offer_level] if args.key?(:offer_level) @name = args[:name] if args.key?(:name) + @qualified_customers_complete = args[:qualified_customers_complete] if args.key?(:qualified_customers_complete) + @id = args[:id] if args.key?(:id) + @country_offer_infos = args[:country_offer_infos] if args.key?(:country_offer_infos) end end @@ -1139,6 +1139,16 @@ module Google class Money include Google::Apis::Core::Hashable + # Number of nano (10^-9) units of the amount. + # The value must be between -999,999,999 and +999,999,999 inclusive. + # If `units` is positive, `nanos` must be positive or zero. + # If `units` is zero, `nanos` can be positive, zero, or negative. + # If `units` is negative, `nanos` must be negative or zero. + # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. + # Corresponds to the JSON property `nanos` + # @return [Fixnum] + attr_accessor :nanos + # The whole units of the amount. # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. # Corresponds to the JSON property `units` @@ -1150,25 +1160,15 @@ module Google # @return [String] attr_accessor :currency_code - # Number of nano (10^-9) units of the amount. - # The value must be between -999,999,999 and +999,999,999 inclusive. - # If `units` is positive, `nanos` must be positive or zero. - # If `units` is zero, `nanos` can be positive, zero, or negative. - # If `units` is negative, `nanos` must be negative or zero. - # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. - # Corresponds to the JSON property `nanos` - # @return [Fixnum] - attr_accessor :nanos - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @nanos = args[:nanos] if args.key?(:nanos) @units = args[:units] if args.key?(:units) @currency_code = args[:currency_code] if args.key?(:currency_code) - @nanos = args[:nanos] if args.key?(:nanos) end end @@ -1176,11 +1176,6 @@ module Google class AnalyticsSummary include Google::Apis::Core::Hashable - # Aggregated number of profile views for the `Company` for given date range. - # Corresponds to the JSON property `profileViewsCount` - # @return [Fixnum] - attr_accessor :profile_views_count - # Aggregated number of times users saw the `Company` # in Google Partners Search results for given date range. # Corresponds to the JSON property `searchViewsCount` @@ -1193,15 +1188,20 @@ module Google # @return [Fixnum] attr_accessor :contacts_count + # Aggregated number of profile views for the `Company` for given date range. + # Corresponds to the JSON property `profileViewsCount` + # @return [Fixnum] + attr_accessor :profile_views_count + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @profile_views_count = args[:profile_views_count] if args.key?(:profile_views_count) @search_views_count = args[:search_views_count] if args.key?(:search_views_count) @contacts_count = args[:contacts_count] if args.key?(:contacts_count) + @profile_views_count = args[:profile_views_count] if args.key?(:profile_views_count) end end @@ -1210,16 +1210,6 @@ module Google class LogMessageRequest include Google::Apis::Core::Hashable - # Details about the client message. - # Corresponds to the JSON property `details` - # @return [String] - attr_accessor :details - - # Map of client info, such as URL, browser navigator, browser platform, etc. - # Corresponds to the JSON property `clientInfo` - # @return [Hash] - attr_accessor :client_info - # Common data that is in each API request. # Corresponds to the JSON property `requestMetadata` # @return [Google::Apis::PartnersV2::RequestMetadata] @@ -1230,16 +1220,26 @@ module Google # @return [String] attr_accessor :level + # Details about the client message. + # Corresponds to the JSON property `details` + # @return [String] + attr_accessor :details + + # Map of client info, such as URL, browser navigator, browser platform, etc. + # Corresponds to the JSON property `clientInfo` + # @return [Hash] + attr_accessor :client_info + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @details = args[:details] if args.key?(:details) - @client_info = args[:client_info] if args.key?(:client_info) @request_metadata = args[:request_metadata] if args.key?(:request_metadata) @level = args[:level] if args.key?(:level) + @details = args[:details] if args.key?(:details) + @client_info = args[:client_info] if args.key?(:client_info) end end @@ -1279,15 +1279,20 @@ module Google class Lead include Google::Apis::Core::Hashable + # First name of lead source. + # Corresponds to the JSON property `givenName` + # @return [String] + attr_accessor :given_name + # Represents an amount of money with its currency type. # Corresponds to the JSON property `minMonthlyBudget` # @return [Google::Apis::PartnersV2::Money] attr_accessor :min_monthly_budget - # First name of lead source. - # Corresponds to the JSON property `givenName` + # Website URL of lead source. + # Corresponds to the JSON property `websiteUrl` # @return [String] - attr_accessor :given_name + attr_accessor :website_url # Language code of the lead's language preference, as defined by # BCP 47 @@ -1296,11 +1301,6 @@ module Google # @return [String] attr_accessor :language_code - # Website URL of lead source. - # Corresponds to the JSON property `websiteUrl` - # @return [String] - attr_accessor :website_url - # The lead's state in relation to the company. # Corresponds to the JSON property `state` # @return [String] @@ -1363,10 +1363,10 @@ module Google # Update properties of this object def update!(**args) - @min_monthly_budget = args[:min_monthly_budget] if args.key?(:min_monthly_budget) @given_name = args[:given_name] if args.key?(:given_name) - @language_code = args[:language_code] if args.key?(:language_code) + @min_monthly_budget = args[:min_monthly_budget] if args.key?(:min_monthly_budget) @website_url = args[:website_url] if args.key?(:website_url) + @language_code = args[:language_code] if args.key?(:language_code) @state = args[:state] if args.key?(:state) @gps_motivations = args[:gps_motivations] if args.key?(:gps_motivations) @email = args[:email] if args.key?(:email) @@ -1412,6 +1412,11 @@ module Google class CompanyRelation include Google::Apis::Core::Hashable + # A URL to a profile photo, e.g. a G+ profile photo. + # Corresponds to the JSON property `logoUrl` + # @return [String] + attr_accessor :logo_url + # The timestamp when the user was approved. # @OutputOnly # Corresponds to the JSON property `resolvedTimestamp` @@ -1424,17 +1429,17 @@ module Google attr_accessor :company_admin alias_method :company_admin?, :company_admin + # The primary address for this company. + # Corresponds to the JSON property `address` + # @return [String] + attr_accessor :address + # The flag that indicates if the company is pending verification. # Corresponds to the JSON property `isPending` # @return [Boolean] attr_accessor :is_pending alias_method :is_pending?, :is_pending - # The primary address for this company. - # Corresponds to the JSON property `address` - # @return [String] - attr_accessor :address - # The timestamp of when affiliation was requested. # @OutputOnly # Corresponds to the JSON property `creationTime` @@ -1461,58 +1466,53 @@ module Google # @return [Array] attr_accessor :segment - # Whether the company is a Partner. - # Corresponds to the JSON property `badgeTier` - # @return [String] - attr_accessor :badge_tier - # The list of Google Partners specialization statuses for the company. # Corresponds to the JSON property `specializationStatus` # @return [Array] attr_accessor :specialization_status - # The phone number for the company's primary address. - # Corresponds to the JSON property `phoneNumber` + # Whether the company is a Partner. + # Corresponds to the JSON property `badgeTier` # @return [String] - attr_accessor :phone_number + attr_accessor :badge_tier # The website URL for this company. # Corresponds to the JSON property `website` # @return [String] attr_accessor :website + # The phone number for the company's primary address. + # Corresponds to the JSON property `phoneNumber` + # @return [String] + attr_accessor :phone_number + # The ID of the company. There may be no id if this is a # pending company.5 # Corresponds to the JSON property `companyId` # @return [String] attr_accessor :company_id - # A URL to a profile photo, e.g. a G+ profile photo. - # Corresponds to the JSON property `logoUrl` - # @return [String] - attr_accessor :logo_url - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @logo_url = args[:logo_url] if args.key?(:logo_url) @resolved_timestamp = args[:resolved_timestamp] if args.key?(:resolved_timestamp) @company_admin = args[:company_admin] if args.key?(:company_admin) - @is_pending = args[:is_pending] if args.key?(:is_pending) @address = args[:address] if args.key?(:address) + @is_pending = args[:is_pending] if args.key?(:is_pending) @creation_time = args[:creation_time] if args.key?(:creation_time) @state = args[:state] if args.key?(:state) @manager_account = args[:manager_account] if args.key?(:manager_account) @name = args[:name] if args.key?(:name) @segment = args[:segment] if args.key?(:segment) - @badge_tier = args[:badge_tier] if args.key?(:badge_tier) @specialization_status = args[:specialization_status] if args.key?(:specialization_status) - @phone_number = args[:phone_number] if args.key?(:phone_number) + @badge_tier = args[:badge_tier] if args.key?(:badge_tier) @website = args[:website] if args.key?(:website) + @phone_number = args[:phone_number] if args.key?(:phone_number) @company_id = args[:company_id] if args.key?(:company_id) - @logo_url = args[:logo_url] if args.key?(:logo_url) end end @@ -1526,11 +1526,6 @@ module Google class Date include Google::Apis::Core::Hashable - # Month of year. Must be from 1 to 12. - # Corresponds to the JSON property `month` - # @return [Fixnum] - attr_accessor :month - # Year of date. Must be from 1 to 9999, or 0 if specifying a date without # a year. # Corresponds to the JSON property `year` @@ -1543,15 +1538,20 @@ module Google # @return [Fixnum] attr_accessor :day + # Month of year. Must be from 1 to 12. + # Corresponds to the JSON property `month` + # @return [Fixnum] + attr_accessor :month + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @month = args[:month] if args.key?(:month) @year = args[:year] if args.key?(:year) @day = args[:day] if args.key?(:day) + @month = args[:month] if args.key?(:month) end end @@ -1639,16 +1639,6 @@ module Google class RequestMetadata include Google::Apis::Core::Hashable - # Experiment IDs the current request belongs to. - # Corresponds to the JSON property `experimentIds` - # @return [Array] - attr_accessor :experiment_ids - - # Source of traffic for the current request. - # Corresponds to the JSON property `trafficSource` - # @return [Google::Apis::PartnersV2::TrafficSource] - attr_accessor :traffic_source - # Locale to use for the current request. # Corresponds to the JSON property `locale` # @return [String] @@ -1665,17 +1655,27 @@ module Google # @return [String] attr_accessor :partners_session_id + # Experiment IDs the current request belongs to. + # Corresponds to the JSON property `experimentIds` + # @return [Array] + attr_accessor :experiment_ids + + # Source of traffic for the current request. + # Corresponds to the JSON property `trafficSource` + # @return [Google::Apis::PartnersV2::TrafficSource] + attr_accessor :traffic_source + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @experiment_ids = args[:experiment_ids] if args.key?(:experiment_ids) - @traffic_source = args[:traffic_source] if args.key?(:traffic_source) @locale = args[:locale] if args.key?(:locale) @user_overrides = args[:user_overrides] if args.key?(:user_overrides) @partners_session_id = args[:partners_session_id] if args.key?(:partners_session_id) + @experiment_ids = args[:experiment_ids] if args.key?(:experiment_ids) + @traffic_source = args[:traffic_source] if args.key?(:traffic_source) end end @@ -1708,27 +1708,6 @@ module Google class ExamStatus include Google::Apis::Core::Hashable - # Date this exam is due to expire. - # Corresponds to the JSON property `expiration` - # @return [String] - attr_accessor :expiration - - # Whether this exam is in the state of warning. - # Corresponds to the JSON property `warning` - # @return [Boolean] - attr_accessor :warning - alias_method :warning?, :warning - - # The date the user last passed this exam. - # Corresponds to the JSON property `lastPassed` - # @return [String] - attr_accessor :last_passed - - # The type of the exam. - # Corresponds to the JSON property `examType` - # @return [String] - attr_accessor :exam_type - # Whether this exam has been passed and not expired. # Corresponds to the JSON property `passed` # @return [Boolean] @@ -1740,18 +1719,39 @@ module Google # @return [String] attr_accessor :taken + # Whether this exam is in the state of warning. + # Corresponds to the JSON property `warning` + # @return [Boolean] + attr_accessor :warning + alias_method :warning?, :warning + + # Date this exam is due to expire. + # Corresponds to the JSON property `expiration` + # @return [String] + attr_accessor :expiration + + # The date the user last passed this exam. + # Corresponds to the JSON property `lastPassed` + # @return [String] + attr_accessor :last_passed + + # The type of the exam. + # Corresponds to the JSON property `examType` + # @return [String] + attr_accessor :exam_type + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @expiration = args[:expiration] if args.key?(:expiration) - @warning = args[:warning] if args.key?(:warning) - @last_passed = args[:last_passed] if args.key?(:last_passed) - @exam_type = args[:exam_type] if args.key?(:exam_type) @passed = args[:passed] if args.key?(:passed) @taken = args[:taken] if args.key?(:taken) + @warning = args[:warning] if args.key?(:warning) + @expiration = args[:expiration] if args.key?(:expiration) + @last_passed = args[:last_passed] if args.key?(:last_passed) + @exam_type = args[:exam_type] if args.key?(:exam_type) end end @@ -1759,6 +1759,11 @@ module Google class ListOffersResponse include Google::Apis::Core::Hashable + # Available Offers to be distributed. + # Corresponds to the JSON property `availableOffers` + # @return [Array] + attr_accessor :available_offers + # Common data that is in each API response. # Corresponds to the JSON property `responseMetadata` # @return [Google::Apis::PartnersV2::ResponseMetadata] @@ -1769,20 +1774,15 @@ module Google # @return [String] attr_accessor :no_offer_reason - # Available Offers to be distributed. - # Corresponds to the JSON property `availableOffers` - # @return [Array] - attr_accessor :available_offers - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @available_offers = args[:available_offers] if args.key?(:available_offers) @response_metadata = args[:response_metadata] if args.key?(:response_metadata) @no_offer_reason = args[:no_offer_reason] if args.key?(:no_offer_reason) - @available_offers = args[:available_offers] if args.key?(:available_offers) end end @@ -1828,15 +1828,6 @@ module Google class ListCompaniesResponse include Google::Apis::Core::Hashable - # A token to retrieve next page of results. - # Pass this value in the `ListCompaniesRequest.page_token` field in the - # subsequent call to - # ListCompanies to retrieve the - # next page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - # Common data that is in each API response. # Corresponds to the JSON property `responseMetadata` # @return [Google::Apis::PartnersV2::ResponseMetadata] @@ -1847,15 +1838,24 @@ module Google # @return [Array] attr_accessor :companies + # A token to retrieve next page of results. + # Pass this value in the `ListCompaniesRequest.page_token` field in the + # subsequent call to + # ListCompanies 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) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) @response_metadata = args[:response_metadata] if args.key?(:response_metadata) @companies = args[:companies] if args.key?(:companies) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) end end @@ -1863,16 +1863,21 @@ module Google class OfferCustomer include Google::Apis::Core::Hashable - # URL to the customer's AdWords page. - # Corresponds to the JSON property `adwordsUrl` + # Country code of the customer. + # Corresponds to the JSON property `countryCode` # @return [String] - attr_accessor :adwords_url + attr_accessor :country_code # Time the customer was created. # Corresponds to the JSON property `creationTime` # @return [String] attr_accessor :creation_time + # Days the customer is still eligible. + # Corresponds to the JSON property `eligibilityDaysLeft` + # @return [Fixnum] + attr_accessor :eligibility_days_left + # Type of the offer # Corresponds to the JSON property `offerType` # @return [String] @@ -1883,16 +1888,6 @@ module Google # @return [String] attr_accessor :external_cid - # Country code of the customer. - # Corresponds to the JSON property `countryCode` - # @return [String] - attr_accessor :country_code - - # Days the customer is still eligible. - # Corresponds to the JSON property `eligibilityDaysLeft` - # @return [Fixnum] - attr_accessor :eligibility_days_left - # Formatted Get Y amount with currency code. # Corresponds to the JSON property `getYAmount` # @return [String] @@ -1908,21 +1903,26 @@ module Google # @return [String] attr_accessor :spend_x_amount + # URL to the customer's AdWords page. + # Corresponds to the JSON property `adwordsUrl` + # @return [String] + attr_accessor :adwords_url + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @adwords_url = args[:adwords_url] if args.key?(:adwords_url) + @country_code = args[:country_code] if args.key?(:country_code) @creation_time = args[:creation_time] if args.key?(:creation_time) + @eligibility_days_left = args[:eligibility_days_left] if args.key?(:eligibility_days_left) @offer_type = args[:offer_type] if args.key?(:offer_type) @external_cid = args[:external_cid] if args.key?(:external_cid) - @country_code = args[:country_code] if args.key?(:country_code) - @eligibility_days_left = args[:eligibility_days_left] if args.key?(:eligibility_days_left) @get_y_amount = args[:get_y_amount] if args.key?(:get_y_amount) @name = args[:name] if args.key?(:name) @spend_x_amount = args[:spend_x_amount] if args.key?(:spend_x_amount) + @adwords_url = args[:adwords_url] if args.key?(:adwords_url) end end @@ -1930,6 +1930,16 @@ module Google class CertificationStatus include Google::Apis::Core::Hashable + # List of certification exam statuses. + # Corresponds to the JSON property `examStatuses` + # @return [Array] + attr_accessor :exam_statuses + + # The type of the certification. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + # Number of people who are certified, # Corresponds to the JSON property `userCount` # @return [Fixnum] @@ -1941,26 +1951,16 @@ module Google attr_accessor :is_certified alias_method :is_certified?, :is_certified - # List of certification exam statuses. - # Corresponds to the JSON property `examStatuses` - # @return [Array] - attr_accessor :exam_statuses - - # The type of the certification. - # 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) - @user_count = args[:user_count] if args.key?(:user_count) - @is_certified = args[:is_certified] if args.key?(:is_certified) @exam_statuses = args[:exam_statuses] if args.key?(:exam_statuses) @type = args[:type] if args.key?(:type) + @user_count = args[:user_count] if args.key?(:user_count) + @is_certified = args[:is_certified] if args.key?(:is_certified) end end @@ -2027,16 +2027,6 @@ module Google class ListOffersHistoryResponse include Google::Apis::Core::Hashable - # Historical offers meeting request. - # Corresponds to the JSON property `offers` - # @return [Array] - attr_accessor :offers - - # Supply this token in a ListOffersHistoryRequest to retrieve the next page. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - # Common data that is in each API response. # Corresponds to the JSON property `responseMetadata` # @return [Google::Apis::PartnersV2::ResponseMetadata] @@ -2059,18 +2049,28 @@ module Google attr_accessor :showing_entire_company alias_method :showing_entire_company?, :showing_entire_company + # Historical offers meeting request. + # Corresponds to the JSON property `offers` + # @return [Array] + attr_accessor :offers + + # Supply this token in a ListOffersHistoryRequest to retrieve the next page. + # 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) - @offers = args[:offers] if args.key?(:offers) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) @response_metadata = args[:response_metadata] if args.key?(:response_metadata) @can_show_entire_company = args[:can_show_entire_company] if args.key?(:can_show_entire_company) @total_results = args[:total_results] if args.key?(:total_results) @showing_entire_company = args[:showing_entire_company] if args.key?(:showing_entire_company) + @offers = args[:offers] if args.key?(:offers) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) end end @@ -2123,16 +2123,6 @@ module Google class Certification include Google::Apis::Core::Hashable - # The type of certification, the area of expertise. - # Corresponds to the JSON property `certificationType` - # @return [String] - attr_accessor :certification_type - - # The date the user last achieved certification. - # Corresponds to the JSON property `lastAchieved` - # @return [String] - attr_accessor :last_achieved - # Whether this certification has been achieved. # Corresponds to the JSON property `achieved` # @return [Boolean] @@ -2150,17 +2140,27 @@ module Google attr_accessor :warning alias_method :warning?, :warning + # The type of certification, the area of expertise. + # Corresponds to the JSON property `certificationType` + # @return [String] + attr_accessor :certification_type + + # The date the user last achieved certification. + # Corresponds to the JSON property `lastAchieved` + # @return [String] + attr_accessor :last_achieved + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @certification_type = args[:certification_type] if args.key?(:certification_type) - @last_achieved = args[:last_achieved] if args.key?(:last_achieved) @achieved = args[:achieved] if args.key?(:achieved) @expiration = args[:expiration] if args.key?(:expiration) @warning = args[:warning] if args.key?(:warning) + @certification_type = args[:certification_type] if args.key?(:certification_type) + @last_achieved = args[:last_achieved] if args.key?(:last_achieved) end end @@ -2168,35 +2168,6 @@ module Google class User include Google::Apis::Core::Hashable - # The list of exams the user ever taken. For each type of exam, only one - # entry is listed. - # Corresponds to the JSON property `examStatus` - # @return [Array] - attr_accessor :exam_status - - # The ID of the user. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - # Basic information from a public profile. - # Corresponds to the JSON property `publicProfile` - # @return [Google::Apis::PartnersV2::PublicProfile] - attr_accessor :public_profile - - # The email address used by the user used for company verification. - # @OutputOnly - # Corresponds to the JSON property `companyVerificationEmail` - # @return [String] - attr_accessor :company_verification_email - - # The list of achieved certifications. These are calculated based on exam - # results and other requirements. - # @OutputOnly - # Corresponds to the JSON property `certificationStatus` - # @return [Array] - attr_accessor :certification_status - # A CompanyRelation resource representing information about a user's # affiliation and standing with a company in Partners. # Corresponds to the JSON property `company` @@ -2214,6 +2185,12 @@ module Google # @return [String] attr_accessor :last_access_time + # The list of emails the user has access to/can select as primary. + # @OutputOnly + # Corresponds to the JSON property `primaryEmails` + # @return [Array] + attr_accessor :primary_emails + # This is the list of AdWords Manager Accounts the user has edit access to. # If the user has edit access to multiple accounts, the user can choose the # preferred account and we use this when a personal account is needed. Can @@ -2223,11 +2200,34 @@ module Google # @return [Array] attr_accessor :available_adwords_manager_accounts - # The list of emails the user has access to/can select as primary. + # The list of exams the user ever taken. For each type of exam, only one + # entry is listed. + # Corresponds to the JSON property `examStatus` + # @return [Array] + attr_accessor :exam_status + + # The ID of the user. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Basic information from a public profile. + # Corresponds to the JSON property `publicProfile` + # @return [Google::Apis::PartnersV2::PublicProfile] + attr_accessor :public_profile + + # The list of achieved certifications. These are calculated based on exam + # results and other requirements. # @OutputOnly - # Corresponds to the JSON property `primaryEmails` - # @return [Array] - attr_accessor :primary_emails + # Corresponds to the JSON property `certificationStatus` + # @return [Array] + attr_accessor :certification_status + + # The email address used by the user used for company verification. + # @OutputOnly + # Corresponds to the JSON property `companyVerificationEmail` + # @return [String] + attr_accessor :company_verification_email def initialize(**args) update!(**args) @@ -2235,16 +2235,16 @@ module Google # Update properties of this object def update!(**args) - @exam_status = args[:exam_status] if args.key?(:exam_status) - @id = args[:id] if args.key?(:id) - @public_profile = args[:public_profile] if args.key?(:public_profile) - @company_verification_email = args[:company_verification_email] if args.key?(:company_verification_email) - @certification_status = args[:certification_status] if args.key?(:certification_status) @company = args[:company] if args.key?(:company) @profile = args[:profile] if args.key?(:profile) @last_access_time = args[:last_access_time] if args.key?(:last_access_time) - @available_adwords_manager_accounts = args[:available_adwords_manager_accounts] if args.key?(:available_adwords_manager_accounts) @primary_emails = args[:primary_emails] if args.key?(:primary_emails) + @available_adwords_manager_accounts = args[:available_adwords_manager_accounts] if args.key?(:available_adwords_manager_accounts) + @exam_status = args[:exam_status] if args.key?(:exam_status) + @id = args[:id] if args.key?(:id) + @public_profile = args[:public_profile] if args.key?(:public_profile) + @certification_status = args[:certification_status] if args.key?(:certification_status) + @company_verification_email = args[:company_verification_email] if args.key?(:company_verification_email) end end diff --git a/generated/google/apis/partners_v2/representations.rb b/generated/google/apis/partners_v2/representations.rb index 3375de6ce..3b946173b 100644 --- a/generated/google/apis/partners_v2/representations.rb +++ b/generated/google/apis/partners_v2/representations.rb @@ -22,13 +22,13 @@ module Google module Apis module PartnersV2 - class ListLeadsResponse + class Company class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Company + class ListLeadsResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -52,13 +52,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class ExamToken + class CertificationExamStatus class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class CertificationExamStatus + class ExamToken class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -76,13 +76,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class GetPartnersStatusResponse + class UserProfile class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class UserProfile + class GetPartnersStatusResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -94,13 +94,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class UserOverrides + class LogUserEventRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class LogUserEventRequest + class UserOverrides class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -118,13 +118,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class PublicProfile + class AdWordsManagerAccountInfo class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class AdWordsManagerAccountInfo + class PublicProfile class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -316,23 +316,9 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class ListLeadsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - property :response_metadata, as: 'responseMetadata', class: Google::Apis::PartnersV2::ResponseMetadata, decorator: Google::Apis::PartnersV2::ResponseMetadata::Representation - - property :total_size, as: 'totalSize' - collection :leads, as: 'leads', class: Google::Apis::PartnersV2::Lead, decorator: Google::Apis::PartnersV2::Lead::Representation - - end - end - class Company # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :locations, as: 'locations', class: Google::Apis::PartnersV2::Location, decorator: Google::Apis::PartnersV2::Location::Representation - property :converted_min_monthly_budget, as: 'convertedMinMonthlyBudget', class: Google::Apis::PartnersV2::Money, decorator: Google::Apis::PartnersV2::Money::Representation collection :industries, as: 'industries' @@ -342,25 +328,39 @@ module Google property :name, as: 'name' collection :localized_infos, as: 'localizedInfos', class: Google::Apis::PartnersV2::LocalizedCompanyInfo, decorator: Google::Apis::PartnersV2::LocalizedCompanyInfo::Representation - property :id, as: 'id' collection :certification_statuses, as: 'certificationStatuses', class: Google::Apis::PartnersV2::CertificationStatus, decorator: Google::Apis::PartnersV2::CertificationStatus::Representation + property :id, as: 'id' + collection :services, as: 'services' + property :original_min_monthly_budget, as: 'originalMinMonthlyBudget', class: Google::Apis::PartnersV2::Money, decorator: Google::Apis::PartnersV2::Money::Representation + property :public_profile, as: 'publicProfile', class: Google::Apis::PartnersV2::PublicProfile, decorator: Google::Apis::PartnersV2::PublicProfile::Representation - collection :services, as: 'services' property :primary_location, as: 'primaryLocation', class: Google::Apis::PartnersV2::Location, decorator: Google::Apis::PartnersV2::Location::Representation - property :original_min_monthly_budget, as: 'originalMinMonthlyBudget', class: Google::Apis::PartnersV2::Money, decorator: Google::Apis::PartnersV2::Money::Representation - collection :ranks, as: 'ranks', class: Google::Apis::PartnersV2::Rank, decorator: Google::Apis::PartnersV2::Rank::Representation - property :badge_tier, as: 'badgeTier' collection :specialization_status, as: 'specializationStatus', class: Google::Apis::PartnersV2::SpecializationStatus, decorator: Google::Apis::PartnersV2::SpecializationStatus::Representation - collection :company_types, as: 'companyTypes' + property :badge_tier, as: 'badgeTier' collection :auto_approval_email_domains, as: 'autoApprovalEmailDomains' - property :primary_language_code, as: 'primaryLanguageCode' + collection :company_types, as: 'companyTypes' property :profile_status, as: 'profileStatus' + property :primary_language_code, as: 'primaryLanguageCode' + collection :locations, as: 'locations', class: Google::Apis::PartnersV2::Location, decorator: Google::Apis::PartnersV2::Location::Representation + + end + end + + class ListLeadsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + property :response_metadata, as: 'responseMetadata', class: Google::Apis::PartnersV2::ResponseMetadata, decorator: Google::Apis::PartnersV2::ResponseMetadata::Representation + + property :total_size, as: 'totalSize' + collection :leads, as: 'leads', class: Google::Apis::PartnersV2::Lead, decorator: Google::Apis::PartnersV2::Lead::Representation + end end @@ -388,17 +388,25 @@ module Google class Location # @private class Representation < Google::Apis::Core::JsonRepresentation + property :postal_code, as: 'postalCode' + property :language_code, as: 'languageCode' + property :sorting_code, as: 'sortingCode' + collection :address_line, as: 'addressLine' property :administrative_area, as: 'administrativeArea' property :locality, as: 'locality' property :lat_lng, as: 'latLng', class: Google::Apis::PartnersV2::LatLng, decorator: Google::Apis::PartnersV2::LatLng::Representation - property :dependent_locality, as: 'dependentLocality' property :address, as: 'address' + property :dependent_locality, as: 'dependentLocality' property :region_code, as: 'regionCode' - property :postal_code, as: 'postalCode' - property :sorting_code, as: 'sortingCode' - property :language_code, as: 'languageCode' - collection :address_line, as: 'addressLine' + end + end + + class CertificationExamStatus + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :number_users_pass, as: 'numberUsersPass' + property :type, as: 'type' end end @@ -411,22 +419,14 @@ module Google end end - class CertificationExamStatus - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :number_users_pass, as: 'numberUsersPass' - property :type, as: 'type' - end - end - class OptIns # @private class Representation < Google::Apis::Core::JsonRepresentation - property :performance_suggestions, as: 'performanceSuggestions' property :physical_mail, as: 'physicalMail' property :phone_contact, as: 'phoneContact' property :market_comm, as: 'marketComm' property :special_offers, as: 'specialOffers' + property :performance_suggestions, as: 'performanceSuggestions' end end @@ -438,6 +438,28 @@ module Google end end + class UserProfile + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :given_name, as: 'givenName' + property :address, as: 'address', class: Google::Apis::PartnersV2::Location, decorator: Google::Apis::PartnersV2::Location::Representation + + collection :industries, as: 'industries' + collection :languages, as: 'languages' + property :family_name, as: 'familyName' + property :email_opt_ins, as: 'emailOptIns', class: Google::Apis::PartnersV2::OptIns, decorator: Google::Apis::PartnersV2::OptIns::Representation + + collection :markets, as: 'markets' + property :phone_number, as: 'phoneNumber' + property :adwords_manager_account, as: 'adwordsManagerAccount' + property :primary_country_code, as: 'primaryCountryCode' + property :email_address, as: 'emailAddress' + property :profile_public, as: 'profilePublic' + collection :channels, as: 'channels' + collection :job_functions, as: 'jobFunctions' + end + end + class GetPartnersStatusResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -446,34 +468,9 @@ module Google end end - class UserProfile - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :given_name, as: 'givenName' - property :address, as: 'address', class: Google::Apis::PartnersV2::Location, decorator: Google::Apis::PartnersV2::Location::Representation - - collection :industries, as: 'industries' - property :family_name, as: 'familyName' - property :email_opt_ins, as: 'emailOptIns', class: Google::Apis::PartnersV2::OptIns, decorator: Google::Apis::PartnersV2::OptIns::Representation - - collection :languages, as: 'languages' - collection :markets, as: 'markets' - property :adwords_manager_account, as: 'adwordsManagerAccount' - property :phone_number, as: 'phoneNumber' - property :primary_country_code, as: 'primaryCountryCode' - property :email_address, as: 'emailAddress' - collection :channels, as: 'channels' - property :profile_public, as: 'profilePublic' - collection :job_functions, as: 'jobFunctions' - end - end - class HistoricalOffer # @private class Representation < Google::Apis::Core::JsonRepresentation - property :creation_time, as: 'creationTime' - property :status, as: 'status' - property :client_email, as: 'clientEmail' property :client_id, as: 'clientId' property :client_name, as: 'clientName' property :last_modified_time, as: 'lastModifiedTime' @@ -483,14 +480,9 @@ module Google property :offer_country_code, as: 'offerCountryCode' property :expiration_time, as: 'expirationTime' property :offer_code, as: 'offerCode' - end - end - - class UserOverrides - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :ip_address, as: 'ipAddress' - property :user_id, as: 'userId' + property :creation_time, as: 'creationTime' + property :client_email, as: 'clientEmail' + property :status, as: 'status' end end @@ -510,12 +502,20 @@ module Google end end + class UserOverrides + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :user_id, as: 'userId' + property :ip_address, as: 'ipAddress' + end + end + class AnalyticsDataPoint # @private class Representation < Google::Apis::Core::JsonRepresentation + property :event_count, as: 'eventCount' collection :event_locations, as: 'eventLocations', class: Google::Apis::PartnersV2::LatLng, decorator: Google::Apis::PartnersV2::LatLng::Representation - property :event_count, as: 'eventCount' end end @@ -533,17 +533,6 @@ module Google end end - class PublicProfile - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :id, as: 'id' - property :url, as: 'url' - property :profile_image, as: 'profileImage' - property :display_name, as: 'displayName' - property :display_image_url, as: 'displayImageUrl' - end - end - class AdWordsManagerAccountInfo # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -552,6 +541,17 @@ module Google end end + class PublicProfile + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :profile_image, as: 'profileImage' + property :display_name, as: 'displayName' + property :display_image_url, as: 'displayImageUrl' + property :id, as: 'id' + property :url, as: 'url' + end + end + class ResponseMetadata # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -563,18 +563,14 @@ module Google class RecaptchaChallenge # @private class Representation < Google::Apis::Core::JsonRepresentation - property :response, as: 'response' property :id, as: 'id' + property :response, as: 'response' end end class AvailableOffer # @private class Representation < Google::Apis::Core::JsonRepresentation - property :qualified_customers_complete, as: 'qualifiedCustomersComplete' - property :id, as: 'id' - collection :country_offer_infos, as: 'countryOfferInfos', class: Google::Apis::PartnersV2::CountryOfferInfo, decorator: Google::Apis::PartnersV2::CountryOfferInfo::Representation - property :offer_type, as: 'offerType' property :max_account_age, as: 'maxAccountAge' collection :qualified_customer, as: 'qualifiedCustomer', class: Google::Apis::PartnersV2::OfferCustomer, decorator: Google::Apis::PartnersV2::OfferCustomer::Representation @@ -585,6 +581,10 @@ module Google property :description, as: 'description' property :offer_level, as: 'offerLevel' property :name, as: 'name' + property :qualified_customers_complete, as: 'qualifiedCustomersComplete' + property :id, as: 'id' + collection :country_offer_infos, as: 'countryOfferInfos', class: Google::Apis::PartnersV2::CountryOfferInfo, decorator: Google::Apis::PartnersV2::CountryOfferInfo::Representation + end end @@ -599,29 +599,29 @@ module Google class Money # @private class Representation < Google::Apis::Core::JsonRepresentation + property :nanos, as: 'nanos' property :units, as: 'units' property :currency_code, as: 'currencyCode' - property :nanos, as: 'nanos' end end class AnalyticsSummary # @private class Representation < Google::Apis::Core::JsonRepresentation - property :profile_views_count, as: 'profileViewsCount' property :search_views_count, as: 'searchViewsCount' property :contacts_count, as: 'contactsCount' + property :profile_views_count, as: 'profileViewsCount' end end class LogMessageRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :details, as: 'details' - hash :client_info, as: 'clientInfo' property :request_metadata, as: 'requestMetadata', class: Google::Apis::PartnersV2::RequestMetadata, decorator: Google::Apis::PartnersV2::RequestMetadata::Representation property :level, as: 'level' + property :details, as: 'details' + hash :client_info, as: 'clientInfo' end end @@ -637,11 +637,11 @@ module Google class Lead # @private class Representation < Google::Apis::Core::JsonRepresentation + property :given_name, as: 'givenName' property :min_monthly_budget, as: 'minMonthlyBudget', class: Google::Apis::PartnersV2::Money, decorator: Google::Apis::PartnersV2::Money::Representation - property :given_name, as: 'givenName' - property :language_code, as: 'languageCode' property :website_url, as: 'websiteUrl' + property :language_code, as: 'languageCode' property :state, as: 'state' collection :gps_motivations, as: 'gpsMotivations' property :email, as: 'email' @@ -668,31 +668,31 @@ module Google class CompanyRelation # @private class Representation < Google::Apis::Core::JsonRepresentation + property :logo_url, as: 'logoUrl' property :resolved_timestamp, as: 'resolvedTimestamp' property :company_admin, as: 'companyAdmin' - property :is_pending, as: 'isPending' property :address, as: 'address' + property :is_pending, as: 'isPending' property :creation_time, as: 'creationTime' property :state, as: 'state' property :manager_account, as: 'managerAccount' property :name, as: 'name' collection :segment, as: 'segment' - property :badge_tier, as: 'badgeTier' collection :specialization_status, as: 'specializationStatus', class: Google::Apis::PartnersV2::SpecializationStatus, decorator: Google::Apis::PartnersV2::SpecializationStatus::Representation - property :phone_number, as: 'phoneNumber' + property :badge_tier, as: 'badgeTier' property :website, as: 'website' + property :phone_number, as: 'phoneNumber' property :company_id, as: 'companyId' - property :logo_url, as: 'logoUrl' end end class Date # @private class Representation < Google::Apis::Core::JsonRepresentation - property :month, as: 'month' property :year, as: 'year' property :day, as: 'day' + property :month, as: 'month' end end @@ -725,13 +725,13 @@ module Google class RequestMetadata # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :experiment_ids, as: 'experimentIds' - property :traffic_source, as: 'trafficSource', class: Google::Apis::PartnersV2::TrafficSource, decorator: Google::Apis::PartnersV2::TrafficSource::Representation - property :locale, as: 'locale' property :user_overrides, as: 'userOverrides', class: Google::Apis::PartnersV2::UserOverrides, decorator: Google::Apis::PartnersV2::UserOverrides::Representation property :partners_session_id, as: 'partnersSessionId' + collection :experiment_ids, as: 'experimentIds' + property :traffic_source, as: 'trafficSource', class: Google::Apis::PartnersV2::TrafficSource, decorator: Google::Apis::PartnersV2::TrafficSource::Representation + end end @@ -746,23 +746,23 @@ module Google class ExamStatus # @private class Representation < Google::Apis::Core::JsonRepresentation - property :expiration, as: 'expiration' - property :warning, as: 'warning' - property :last_passed, as: 'lastPassed' - property :exam_type, as: 'examType' property :passed, as: 'passed' property :taken, as: 'taken' + property :warning, as: 'warning' + property :expiration, as: 'expiration' + property :last_passed, as: 'lastPassed' + property :exam_type, as: 'examType' end end class ListOffersResponse # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :available_offers, as: 'availableOffers', class: Google::Apis::PartnersV2::AvailableOffer, decorator: Google::Apis::PartnersV2::AvailableOffer::Representation + property :response_metadata, as: 'responseMetadata', class: Google::Apis::PartnersV2::ResponseMetadata, decorator: Google::Apis::PartnersV2::ResponseMetadata::Representation property :no_offer_reason, as: 'noOfferReason' - collection :available_offers, as: 'availableOffers', class: Google::Apis::PartnersV2::AvailableOffer, decorator: Google::Apis::PartnersV2::AvailableOffer::Representation - end end @@ -779,37 +779,37 @@ module Google class ListCompaniesResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' property :response_metadata, as: 'responseMetadata', class: Google::Apis::PartnersV2::ResponseMetadata, decorator: Google::Apis::PartnersV2::ResponseMetadata::Representation collection :companies, as: 'companies', class: Google::Apis::PartnersV2::Company, decorator: Google::Apis::PartnersV2::Company::Representation + property :next_page_token, as: 'nextPageToken' end end class OfferCustomer # @private class Representation < Google::Apis::Core::JsonRepresentation - property :adwords_url, as: 'adwordsUrl' + property :country_code, as: 'countryCode' property :creation_time, as: 'creationTime' + property :eligibility_days_left, as: 'eligibilityDaysLeft' property :offer_type, as: 'offerType' property :external_cid, as: 'externalCid' - property :country_code, as: 'countryCode' - property :eligibility_days_left, as: 'eligibilityDaysLeft' property :get_y_amount, as: 'getYAmount' property :name, as: 'name' property :spend_x_amount, as: 'spendXAmount' + property :adwords_url, as: 'adwordsUrl' end end class CertificationStatus # @private class Representation < Google::Apis::Core::JsonRepresentation - property :user_count, as: 'userCount' - property :is_certified, as: 'isCertified' collection :exam_statuses, as: 'examStatuses', class: Google::Apis::PartnersV2::CertificationExamStatus, decorator: Google::Apis::PartnersV2::CertificationExamStatus::Representation property :type, as: 'type' + property :user_count, as: 'userCount' + property :is_certified, as: 'isCertified' end end @@ -834,14 +834,14 @@ module Google class ListOffersHistoryResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :offers, as: 'offers', class: Google::Apis::PartnersV2::HistoricalOffer, decorator: Google::Apis::PartnersV2::HistoricalOffer::Representation - - property :next_page_token, as: 'nextPageToken' property :response_metadata, as: 'responseMetadata', class: Google::Apis::PartnersV2::ResponseMetadata, decorator: Google::Apis::PartnersV2::ResponseMetadata::Representation property :can_show_entire_company, as: 'canShowEntireCompany' property :total_results, as: 'totalResults' property :showing_entire_company, as: 'showingEntireCompany' + collection :offers, as: 'offers', class: Google::Apis::PartnersV2::HistoricalOffer, decorator: Google::Apis::PartnersV2::HistoricalOffer::Representation + + property :next_page_token, as: 'nextPageToken' end end @@ -864,33 +864,33 @@ module Google class Certification # @private class Representation < Google::Apis::Core::JsonRepresentation - property :certification_type, as: 'certificationType' - property :last_achieved, as: 'lastAchieved' property :achieved, as: 'achieved' property :expiration, as: 'expiration' property :warning, as: 'warning' + property :certification_type, as: 'certificationType' + property :last_achieved, as: 'lastAchieved' end end class User # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :exam_status, as: 'examStatus', class: Google::Apis::PartnersV2::ExamStatus, decorator: Google::Apis::PartnersV2::ExamStatus::Representation - - property :id, as: 'id' - property :public_profile, as: 'publicProfile', class: Google::Apis::PartnersV2::PublicProfile, decorator: Google::Apis::PartnersV2::PublicProfile::Representation - - property :company_verification_email, as: 'companyVerificationEmail' - collection :certification_status, as: 'certificationStatus', class: Google::Apis::PartnersV2::Certification, decorator: Google::Apis::PartnersV2::Certification::Representation - property :company, as: 'company', class: Google::Apis::PartnersV2::CompanyRelation, decorator: Google::Apis::PartnersV2::CompanyRelation::Representation property :profile, as: 'profile', class: Google::Apis::PartnersV2::UserProfile, decorator: Google::Apis::PartnersV2::UserProfile::Representation property :last_access_time, as: 'lastAccessTime' + collection :primary_emails, as: 'primaryEmails' collection :available_adwords_manager_accounts, as: 'availableAdwordsManagerAccounts', class: Google::Apis::PartnersV2::AdWordsManagerAccountInfo, decorator: Google::Apis::PartnersV2::AdWordsManagerAccountInfo::Representation - collection :primary_emails, as: 'primaryEmails' + collection :exam_status, as: 'examStatus', class: Google::Apis::PartnersV2::ExamStatus, decorator: Google::Apis::PartnersV2::ExamStatus::Representation + + property :id, as: 'id' + property :public_profile, as: 'publicProfile', class: Google::Apis::PartnersV2::PublicProfile, decorator: Google::Apis::PartnersV2::PublicProfile::Representation + + collection :certification_status, as: 'certificationStatus', class: Google::Apis::PartnersV2::Certification, decorator: Google::Apis::PartnersV2::Certification::Representation + + property :company_verification_email, as: 'companyVerificationEmail' end end diff --git a/generated/google/apis/partners_v2/service.rb b/generated/google/apis/partners_v2/service.rb index 09f9208f5..d843e9b53 100644 --- a/generated/google/apis/partners_v2/service.rb +++ b/generated/google/apis/partners_v2/service.rb @@ -49,10 +49,17 @@ module Google # Lists advertiser leads for a user's associated company. # Should only be called within the context of an authorized logged in user. - # @param [String] request_metadata_partners_session_id - # Google Partners session ID. + # @param [String] order_by + # How to order Leads. Currently, only `create_time` + # and `create_time desc` are supported + # @param [String] request_metadata_traffic_source_traffic_sub_id + # Second level identifier to indicate where the traffic comes from. + # An identifier has multiple letters created by a team which redirected the + # traffic to us. # @param [String] request_metadata_user_overrides_user_id # Logged-in user ID to impersonate instead of the user's ID. + # @param [String] request_metadata_partners_session_id + # Google Partners session ID. # @param [String] page_token # A token identifying a page of results that the server returns. # Typically, this is the value of `ListLeadsResponse.next_page_token` @@ -71,18 +78,11 @@ module Google # IP address to use instead of the user's geo-located IP address. # @param [Array, String] request_metadata_experiment_ids # Experiment IDs the current request belongs to. - # @param [String] order_by - # How to order Leads. Currently, only `create_time` - # and `create_time desc` are supported - # @param [String] request_metadata_traffic_source_traffic_sub_id - # Second level identifier to indicate where the traffic comes from. - # An identifier has multiple letters created by a team which redirected the - # traffic to us. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -95,22 +95,22 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_leads(request_metadata_partners_session_id: nil, request_metadata_user_overrides_user_id: nil, page_token: nil, page_size: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, order_by: nil, request_metadata_traffic_source_traffic_sub_id: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_leads(order_by: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, page_token: nil, page_size: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v2/leads', options) command.response_representation = Google::Apis::PartnersV2::ListLeadsResponse::Representation command.response_class = Google::Apis::PartnersV2::ListLeadsResponse - command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? + command.query['orderBy'] = order_by unless order_by.nil? + command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? + command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? - command.query['orderBy'] = order_by unless order_by.nil? - command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -133,11 +133,11 @@ module Google # Second level identifier to indicate where the traffic comes from. # An identifier has multiple letters created by a team which redirected the # traffic to us. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -150,7 +150,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_offers(request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_offers(request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v2/offers', options) command.response_representation = Google::Apis::PartnersV2::ListOffersResponse::Representation command.response_class = Google::Apis::PartnersV2::ListOffersResponse @@ -161,12 +161,22 @@ module Google command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end # Lists the Historical Offers for the current user (or user's entire company) + # @param [String] order_by + # Comma-separated list of fields to order by, e.g.: "foo,bar,baz". + # Use "foo desc" to sort descending. + # List of valid field names is: name, offer_code, expiration_time, status, + # last_modified_time, sender_name, creation_time, country_code, + # offer_type. + # @param [String] request_metadata_traffic_source_traffic_sub_id + # Second level identifier to indicate where the traffic comes from. + # An identifier has multiple letters created by a team which redirected the + # traffic to us. # @param [String] request_metadata_user_overrides_user_id # Logged-in user ID to impersonate instead of the user's ID. # @param [String] request_metadata_partners_session_id @@ -183,25 +193,15 @@ module Google # Locale to use for the current request. # @param [String] request_metadata_user_overrides_ip_address # IP address to use instead of the user's geo-located IP address. - # @param [Array, String] request_metadata_experiment_ids - # Experiment IDs the current request belongs to. # @param [Boolean] entire_company # if true, show history for the entire company. Requires user to be admin. - # @param [String] order_by - # Comma-separated list of fields to order by, e.g.: "foo,bar,baz". - # Use "foo desc" to sort descending. - # List of valid field names is: name, offer_code, expiration_time, status, - # last_modified_time, sender_name, creation_time, country_code, - # offer_type. - # @param [String] request_metadata_traffic_source_traffic_sub_id - # Second level identifier to indicate where the traffic comes from. - # An identifier has multiple letters created by a team which redirected the - # traffic to us. - # @param [String] fields - # Selector specifying which fields to include in a partial response. + # @param [Array, String] request_metadata_experiment_ids + # Experiment IDs the current request belongs to. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -214,10 +214,12 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_offer_histories(request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, page_token: nil, page_size: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, entire_company: nil, order_by: nil, request_metadata_traffic_source_traffic_sub_id: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_offer_histories(order_by: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, page_token: nil, page_size: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, entire_company: nil, request_metadata_experiment_ids: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v2/offers/history', options) command.response_representation = Google::Apis::PartnersV2::ListOffersHistoryResponse::Representation command.response_class = Google::Apis::PartnersV2::ListOffersHistoryResponse + command.query['orderBy'] = order_by unless order_by.nil? + command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? command.query['pageToken'] = page_token unless page_token.nil? @@ -225,21 +227,71 @@ module Google command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? - command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? command.query['entireCompany'] = entire_company unless entire_company.nil? - command.query['orderBy'] = order_by unless order_by.nil? - command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? - command.query['fields'] = fields unless fields.nil? + command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Lists states for current user. + # @param [String] request_metadata_traffic_source_traffic_sub_id + # Second level identifier to indicate where the traffic comes from. + # An identifier has multiple letters created by a team which redirected the + # traffic to us. + # @param [String] request_metadata_user_overrides_user_id + # Logged-in user ID to impersonate instead of the user's ID. + # @param [String] request_metadata_partners_session_id + # Google Partners session ID. + # @param [String] request_metadata_traffic_source_traffic_source_id + # Identifier to indicate where the traffic comes from. + # An identifier has multiple letters created by a team which redirected the + # traffic to us. + # @param [String] request_metadata_locale + # Locale to use for the current request. + # @param [String] request_metadata_user_overrides_ip_address + # IP address to use instead of the user's geo-located IP address. + # @param [Array, String] request_metadata_experiment_ids + # Experiment IDs the current request belongs to. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::PartnersV2::ListUserStatesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::PartnersV2::ListUserStatesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_user_states(request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v2/userStates', options) + command.response_representation = Google::Apis::PartnersV2::ListUserStatesResponse::Representation + command.response_class = Google::Apis::PartnersV2::ListUserStatesResponse + command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? + command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? + command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? + command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? + command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? + command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? + command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end # Lists analytics data for a user's associated company. # Should only be called within the context of an authorized logged in user. - # @param [String] request_metadata_user_overrides_user_id - # Logged-in user ID to impersonate instead of the user's ID. # @param [String] request_metadata_partners_session_id # Google Partners session ID. + # @param [String] request_metadata_user_overrides_user_id + # Logged-in user ID to impersonate instead of the user's ID. # @param [String] page_token # A token identifying a page of results that the server returns. # Typically, this is the value of `ListAnalyticsResponse.next_page_token` @@ -270,11 +322,11 @@ module Google # Second level identifier to indicate where the traffic comes from. # An identifier has multiple letters created by a team which redirected the # traffic to us. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -287,12 +339,12 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_analytics(request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, page_token: nil, page_size: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_analytics(request_metadata_partners_session_id: nil, request_metadata_user_overrides_user_id: nil, page_token: nil, page_size: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v2/analytics', options) command.response_representation = Google::Apis::PartnersV2::ListAnalyticsResponse::Representation command.response_class = Google::Apis::PartnersV2::ListAnalyticsResponse - command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? + command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? @@ -300,125 +352,21 @@ module Google command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_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 states for current user. - # @param [String] request_metadata_user_overrides_user_id - # Logged-in user ID to impersonate instead of the user's ID. - # @param [String] request_metadata_partners_session_id - # Google Partners session ID. - # @param [String] request_metadata_traffic_source_traffic_source_id - # Identifier to indicate where the traffic comes from. - # An identifier has multiple letters created by a team which redirected the - # traffic to us. - # @param [String] request_metadata_locale - # Locale to use for the current request. - # @param [String] request_metadata_user_overrides_ip_address - # IP address to use instead of the user's geo-located IP address. - # @param [Array, String] request_metadata_experiment_ids - # Experiment IDs the current request belongs to. - # @param [String] request_metadata_traffic_source_traffic_sub_id - # Second level identifier to indicate where the traffic comes from. - # An identifier has multiple letters created by a team which redirected the - # traffic to us. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PartnersV2::ListUserStatesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PartnersV2::ListUserStatesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_user_states(request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v2/userStates', options) - command.response_representation = Google::Apis::PartnersV2::ListUserStatesResponse::Representation - command.response_class = Google::Apis::PartnersV2::ListUserStatesResponse - command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? - command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? - command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? - command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? - command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? - command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? - command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Update company. - # Should only be called within the context of an authorized logged in user. - # @param [Google::Apis::PartnersV2::Company] company_object - # @param [String] request_metadata_locale - # Locale to use for the current request. - # @param [String] request_metadata_user_overrides_ip_address - # IP address to use instead of the user's geo-located IP address. - # @param [String] update_mask - # Standard field mask for the set of fields to be updated. - # Required with at least 1 value in FieldMask's paths. - # @param [Array, String] request_metadata_experiment_ids - # Experiment IDs the current request belongs to. - # @param [String] request_metadata_traffic_source_traffic_sub_id - # Second level identifier to indicate where the traffic comes from. - # An identifier has multiple letters created by a team which redirected the - # traffic to us. - # @param [String] request_metadata_partners_session_id - # Google Partners session ID. - # @param [String] request_metadata_user_overrides_user_id - # Logged-in user ID to impersonate instead of the user's ID. - # @param [String] request_metadata_traffic_source_traffic_source_id - # Identifier to indicate where the traffic comes from. - # An identifier has multiple letters created by a team which redirected the - # traffic to us. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PartnersV2::Company] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PartnersV2::Company] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_companies(company_object = nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, update_mask: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_partners_session_id: nil, request_metadata_user_overrides_user_id: nil, request_metadata_traffic_source_traffic_source_id: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:patch, 'v2/companies', options) - command.request_representation = Google::Apis::PartnersV2::Company::Representation - command.request_object = company_object - command.response_representation = Google::Apis::PartnersV2::Company::Representation - command.response_class = Google::Apis::PartnersV2::Company - command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? - command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? - command.query['updateMask'] = update_mask unless update_mask.nil? - command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? - command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? - command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? - command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? - command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Gets Partners Status of the logged in user's agency. # Should only be called if the logged in user is the admin of the agency. + # @param [String] request_metadata_user_overrides_ip_address + # IP address to use instead of the user's geo-located IP address. + # @param [Array, String] request_metadata_experiment_ids + # Experiment IDs the current request belongs to. + # @param [String] request_metadata_traffic_source_traffic_sub_id + # Second level identifier to indicate where the traffic comes from. + # An identifier has multiple letters created by a team which redirected the + # traffic to us. # @param [String] request_metadata_user_overrides_user_id # Logged-in user ID to impersonate instead of the user's ID. # @param [String] request_metadata_partners_session_id @@ -429,19 +377,11 @@ module Google # traffic to us. # @param [String] request_metadata_locale # Locale to use for the current request. - # @param [String] request_metadata_user_overrides_ip_address - # IP address to use instead of the user's geo-located IP address. - # @param [Array, String] request_metadata_experiment_ids - # Experiment IDs the current request belongs to. - # @param [String] request_metadata_traffic_source_traffic_sub_id - # Second level identifier to indicate where the traffic comes from. - # An identifier has multiple letters created by a team which redirected the - # traffic to us. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -454,24 +394,28 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_partnersstatus(request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, fields: nil, quota_user: nil, options: nil, &block) + def get_partnersstatus(request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v2/partnersstatus', options) command.response_representation = Google::Apis::PartnersV2::GetPartnersStatusResponse::Representation command.response_class = Google::Apis::PartnersV2::GetPartnersStatusResponse + command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? + command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? + command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? - command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? - command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? - command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end # Updates the specified lead. # @param [Google::Apis::PartnersV2::Lead] lead_object + # @param [String] request_metadata_traffic_source_traffic_source_id + # Identifier to indicate where the traffic comes from. + # An identifier has multiple letters created by a team which redirected the + # traffic to us. # @param [String] request_metadata_locale # Locale to use for the current request. # @param [String] request_metadata_user_overrides_ip_address @@ -486,19 +430,15 @@ module Google # Second level identifier to indicate where the traffic comes from. # An identifier has multiple letters created by a team which redirected the # traffic to us. - # @param [String] request_metadata_partners_session_id - # Google Partners session ID. # @param [String] request_metadata_user_overrides_user_id # Logged-in user ID to impersonate instead of the user's ID. - # @param [String] request_metadata_traffic_source_traffic_source_id - # Identifier to indicate where the traffic comes from. - # An identifier has multiple letters created by a team which redirected the - # traffic to us. - # @param [String] fields - # Selector specifying which fields to include in a partial response. + # @param [String] request_metadata_partners_session_id + # Google Partners session ID. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -511,12 +451,73 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_leads(lead_object = nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, update_mask: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_partners_session_id: nil, request_metadata_user_overrides_user_id: nil, request_metadata_traffic_source_traffic_source_id: nil, fields: nil, quota_user: nil, options: nil, &block) + def update_leads(lead_object = nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, update_mask: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:patch, 'v2/leads', options) command.request_representation = Google::Apis::PartnersV2::Lead::Representation command.request_object = lead_object command.response_representation = Google::Apis::PartnersV2::Lead::Representation command.response_class = Google::Apis::PartnersV2::Lead + command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? + command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? + command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? + command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? + command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? + command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Update company. + # Should only be called within the context of an authorized logged in user. + # @param [Google::Apis::PartnersV2::Company] company_object + # @param [String] request_metadata_traffic_source_traffic_source_id + # Identifier to indicate where the traffic comes from. + # An identifier has multiple letters created by a team which redirected the + # traffic to us. + # @param [String] request_metadata_locale + # Locale to use for the current request. + # @param [String] request_metadata_user_overrides_ip_address + # IP address to use instead of the user's geo-located IP address. + # @param [String] update_mask + # Standard field mask for the set of fields to be updated. + # Required with at least 1 value in FieldMask's paths. + # @param [Array, String] request_metadata_experiment_ids + # Experiment IDs the current request belongs to. + # @param [String] request_metadata_traffic_source_traffic_sub_id + # Second level identifier to indicate where the traffic comes from. + # An identifier has multiple letters created by a team which redirected the + # traffic to us. + # @param [String] request_metadata_partners_session_id + # Google Partners session ID. + # @param [String] request_metadata_user_overrides_user_id + # Logged-in user ID to impersonate instead of the user's ID. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::PartnersV2::Company] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::PartnersV2::Company] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_companies(company_object = nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, update_mask: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_partners_session_id: nil, request_metadata_user_overrides_user_id: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:patch, 'v2/companies', options) + command.request_representation = Google::Apis::PartnersV2::Company::Representation + command.request_object = company_object + command.response_representation = Google::Apis::PartnersV2::Company::Representation + command.response_class = Google::Apis::PartnersV2::Company + command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? command.query['updateMask'] = update_mask unless update_mask.nil? @@ -524,9 +525,8 @@ module Google command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? - command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -535,6 +535,14 @@ module Google # The ID of the user. Can be set to me to mean # the currently authenticated user. # @param [Google::Apis::PartnersV2::CompanyRelation] company_relation_object + # @param [String] request_metadata_user_overrides_ip_address + # IP address to use instead of the user's geo-located IP address. + # @param [Array, String] request_metadata_experiment_ids + # Experiment IDs the current request belongs to. + # @param [String] request_metadata_traffic_source_traffic_sub_id + # Second level identifier to indicate where the traffic comes from. + # An identifier has multiple letters created by a team which redirected the + # traffic to us. # @param [String] request_metadata_user_overrides_user_id # Logged-in user ID to impersonate instead of the user's ID. # @param [String] request_metadata_partners_session_id @@ -545,19 +553,11 @@ module Google # traffic to us. # @param [String] request_metadata_locale # Locale to use for the current request. - # @param [String] request_metadata_user_overrides_ip_address - # IP address to use instead of the user's geo-located IP address. - # @param [Array, String] request_metadata_experiment_ids - # Experiment IDs the current request belongs to. - # @param [String] request_metadata_traffic_source_traffic_sub_id - # Second level identifier to indicate where the traffic comes from. - # An identifier has multiple letters created by a team which redirected the - # traffic to us. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -570,22 +570,22 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_user_company_relation(user_id, company_relation_object = nil, request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, fields: nil, quota_user: nil, options: nil, &block) + def create_user_company_relation(user_id, company_relation_object = nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:put, 'v2/users/{userId}/companyRelation', options) command.request_representation = Google::Apis::PartnersV2::CompanyRelation::Representation command.request_object = company_relation_object command.response_representation = Google::Apis::PartnersV2::CompanyRelation::Representation command.response_class = Google::Apis::PartnersV2::CompanyRelation command.params['userId'] = user_id unless user_id.nil? + command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? + command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? + command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? - command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? - command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? - command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -593,12 +593,6 @@ module Google # @param [String] user_id # The ID of the user. Can be set to me to mean # the currently authenticated user. - # @param [Array, String] request_metadata_experiment_ids - # Experiment IDs the current request belongs to. - # @param [String] request_metadata_traffic_source_traffic_sub_id - # Second level identifier to indicate where the traffic comes from. - # An identifier has multiple letters created by a team which redirected the - # traffic to us. # @param [String] request_metadata_user_overrides_user_id # Logged-in user ID to impersonate instead of the user's ID. # @param [String] request_metadata_partners_session_id @@ -611,11 +605,17 @@ module Google # Locale to use for the current request. # @param [String] request_metadata_user_overrides_ip_address # IP address to use instead of the user's geo-located IP address. - # @param [String] fields - # Selector specifying which fields to include in a partial response. + # @param [Array, String] request_metadata_experiment_ids + # Experiment IDs the current request belongs to. + # @param [String] request_metadata_traffic_source_traffic_sub_id + # Second level identifier to indicate where the traffic comes from. + # An identifier has multiple letters created by a team which redirected the + # traffic to us. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -628,20 +628,20 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_user_company_relation(user_id, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, fields: nil, quota_user: nil, options: nil, &block) + def delete_user_company_relation(user_id, request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:delete, 'v2/users/{userId}/companyRelation', options) command.response_representation = Google::Apis::PartnersV2::Empty::Representation command.response_class = Google::Apis::PartnersV2::Empty command.params['userId'] = user_id unless user_id.nil? - command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? - command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? - command.query['fields'] = fields unless fields.nil? + command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? + command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -649,16 +649,6 @@ module Google # @param [String] user_id # Identifier of the user. Can be set to me to mean the currently # authenticated user. - # @param [Array, String] request_metadata_experiment_ids - # Experiment IDs the current request belongs to. - # @param [String] request_metadata_traffic_source_traffic_sub_id - # Second level identifier to indicate where the traffic comes from. - # An identifier has multiple letters created by a team which redirected the - # traffic to us. - # @param [String] request_metadata_partners_session_id - # Google Partners session ID. - # @param [String] request_metadata_user_overrides_user_id - # Logged-in user ID to impersonate instead of the user's ID. # @param [String] user_view # Specifies what parts of the user information to return. # @param [String] request_metadata_traffic_source_traffic_source_id @@ -669,11 +659,21 @@ module Google # Locale to use for the current request. # @param [String] request_metadata_user_overrides_ip_address # IP address to use instead of the user's geo-located IP address. - # @param [String] fields - # Selector specifying which fields to include in a partial response. + # @param [Array, String] request_metadata_experiment_ids + # Experiment IDs the current request belongs to. + # @param [String] request_metadata_traffic_source_traffic_sub_id + # Second level identifier to indicate where the traffic comes from. + # An identifier has multiple letters created by a team which redirected the + # traffic to us. + # @param [String] request_metadata_user_overrides_user_id + # Logged-in user ID to impersonate instead of the user's ID. + # @param [String] request_metadata_partners_session_id + # Google Partners session ID. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -686,27 +686,35 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_user(user_id, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_partners_session_id: nil, request_metadata_user_overrides_user_id: nil, user_view: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, fields: nil, quota_user: nil, options: nil, &block) + def get_user(user_id, user_view: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v2/users/{userId}', options) command.response_representation = Google::Apis::PartnersV2::User::Representation command.response_class = Google::Apis::PartnersV2::User command.params['userId'] = user_id unless user_id.nil? - command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? - command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? - command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? - command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? command.query['userView'] = user_view unless user_view.nil? command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? - command.query['fields'] = fields unless fields.nil? + command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? + command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? + command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? + command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end # Updates a user's profile. A user can only update their own profile and # should only be called within the context of a logged in user. # @param [Google::Apis::PartnersV2::UserProfile] user_profile_object + # @param [String] request_metadata_partners_session_id + # Google Partners session ID. + # @param [String] request_metadata_user_overrides_user_id + # Logged-in user ID to impersonate instead of the user's ID. + # @param [String] request_metadata_traffic_source_traffic_source_id + # Identifier to indicate where the traffic comes from. + # An identifier has multiple letters created by a team which redirected the + # traffic to us. # @param [String] request_metadata_locale # Locale to use for the current request. # @param [String] request_metadata_user_overrides_ip_address @@ -717,19 +725,11 @@ module Google # Second level identifier to indicate where the traffic comes from. # An identifier has multiple letters created by a team which redirected the # traffic to us. - # @param [String] request_metadata_user_overrides_user_id - # Logged-in user ID to impersonate instead of the user's ID. - # @param [String] request_metadata_partners_session_id - # Google Partners session ID. - # @param [String] request_metadata_traffic_source_traffic_source_id - # Identifier to indicate where the traffic comes from. - # An identifier has multiple letters created by a team which redirected the - # traffic to us. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -742,27 +742,33 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_user_profile(user_profile_object = nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, request_metadata_traffic_source_traffic_source_id: nil, fields: nil, quota_user: nil, options: nil, &block) + def update_user_profile(user_profile_object = nil, request_metadata_partners_session_id: nil, request_metadata_user_overrides_user_id: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:patch, 'v2/users/profile', options) command.request_representation = Google::Apis::PartnersV2::UserProfile::Representation command.request_object = user_profile_object command.response_representation = Google::Apis::PartnersV2::UserProfile::Representation command.response_class = Google::Apis::PartnersV2::UserProfile + command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? + command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? + command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? - command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? - command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? - command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end # Gets a company. # @param [String] company_id # The ID of the company to retrieve. + # @param [String] request_metadata_traffic_source_traffic_source_id + # Identifier to indicate where the traffic comes from. + # An identifier has multiple letters created by a team which redirected the + # traffic to us. + # @param [String] request_metadata_user_overrides_ip_address + # IP address to use instead of the user's geo-located IP address. # @param [Array, String] request_metadata_experiment_ids # Experiment IDs the current request belongs to. # @param [String] currency_code @@ -790,17 +796,11 @@ module Google # The address to use for sorting the company's addresses by proximity. # If not given, the geo-located address of the request is used. # Used when order_by is set. - # @param [String] request_metadata_traffic_source_traffic_source_id - # Identifier to indicate where the traffic comes from. - # An identifier has multiple letters created by a team which redirected the - # traffic to us. - # @param [String] request_metadata_user_overrides_ip_address - # IP address to use instead of the user's geo-located IP address. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -813,11 +813,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_company(company_id, request_metadata_experiment_ids: nil, currency_code: nil, order_by: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, view: nil, request_metadata_locale: nil, address: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_user_overrides_ip_address: nil, fields: nil, quota_user: nil, options: nil, &block) + def get_company(company_id, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, currency_code: nil, order_by: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, view: nil, request_metadata_locale: nil, address: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v2/companies/{companyId}', options) command.response_representation = Google::Apis::PartnersV2::GetCompanyResponse::Representation command.response_class = Google::Apis::PartnersV2::GetCompanyResponse command.params['companyId'] = company_id unless company_id.nil? + command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? + command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? command.query['currencyCode'] = currency_code unless currency_code.nil? command.query['orderBy'] = order_by unless order_by.nil? @@ -827,14 +829,27 @@ module Google command.query['view'] = view unless view.nil? command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? command.query['address'] = address unless address.nil? - command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? - command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end # Lists companies. + # @param [Array, String] industries + # List of industries the company can help with. + # @param [String] website_url + # Website URL that will help to find a better matched company. + # . + # @param [Array, String] gps_motivations + # List of reasons for using Google Partner Search to get companies. + # @param [Array, String] language_codes + # List of language codes that company can support. Only primary language + # subtags are accepted as defined by + # BCP 47 + # (IETF BCP 47, "Tags for Identifying Languages"). + # @param [Fixnum] page_size + # Requested page size. Server may return fewer companies than requested. + # If unspecified, server picks an appropriate default. # @param [String] request_metadata_user_overrides_ip_address # IP address to use instead of the user's geo-located IP address. # @param [Array, String] request_metadata_experiment_ids @@ -857,11 +872,11 @@ module Google # @param [String] view # The view of the `Company` resource to be returned. This must not be # `COMPANY_VIEW_UNSPECIFIED`. - # @param [String] request_metadata_locale - # Locale to use for the current request. # @param [String] address # The address to use when searching for companies. # If not given, the geo-located address of the request is used. + # @param [String] request_metadata_locale + # Locale to use for the current request. # @param [String] min_monthly_budget_units # The whole units of the amount. # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. @@ -896,33 +911,18 @@ module Google # traffic to us. # @param [String] request_metadata_partners_session_id # Google Partners session ID. + # @param [String] company_name + # Company name to search for. # @param [String] page_token # A token identifying a page of results that the server returns. # Typically, this is the value of `ListCompaniesResponse.next_page_token` # returned from the previous call to # ListCompanies. - # @param [String] company_name - # Company name to search for. - # @param [Array, String] industries - # List of industries the company can help with. - # @param [String] website_url - # Website URL that will help to find a better matched company. - # . - # @param [Array, String] gps_motivations - # List of reasons for using Google Partner Search to get companies. - # @param [Array, String] language_codes - # List of language codes that company can support. Only primary language - # subtags are accepted as defined by - # BCP 47 - # (IETF BCP 47, "Tags for Identifying Languages"). - # @param [Fixnum] page_size - # Requested page size. Server may return fewer companies than requested. - # If unspecified, server picks 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 # @@ -935,10 +935,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_companies(request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, order_by: nil, specializations: nil, max_monthly_budget_currency_code: nil, min_monthly_budget_currency_code: nil, request_metadata_user_overrides_user_id: nil, view: nil, request_metadata_locale: nil, address: nil, min_monthly_budget_units: nil, max_monthly_budget_nanos: nil, services: nil, request_metadata_traffic_source_traffic_source_id: nil, max_monthly_budget_units: nil, min_monthly_budget_nanos: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_partners_session_id: nil, page_token: nil, company_name: nil, industries: nil, website_url: nil, gps_motivations: nil, language_codes: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_companies(industries: nil, website_url: nil, gps_motivations: nil, language_codes: nil, page_size: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, order_by: nil, specializations: nil, max_monthly_budget_currency_code: nil, min_monthly_budget_currency_code: nil, request_metadata_user_overrides_user_id: nil, view: nil, address: nil, request_metadata_locale: nil, min_monthly_budget_units: nil, max_monthly_budget_nanos: nil, services: nil, request_metadata_traffic_source_traffic_source_id: nil, max_monthly_budget_units: nil, min_monthly_budget_nanos: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_partners_session_id: nil, company_name: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v2/companies', options) command.response_representation = Google::Apis::PartnersV2::ListCompaniesResponse::Representation command.response_class = Google::Apis::PartnersV2::ListCompaniesResponse + command.query['industries'] = industries unless industries.nil? + command.query['websiteUrl'] = website_url unless website_url.nil? + command.query['gpsMotivations'] = gps_motivations unless gps_motivations.nil? + command.query['languageCodes'] = language_codes unless language_codes.nil? + command.query['pageSize'] = page_size unless page_size.nil? command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? command.query['orderBy'] = order_by unless order_by.nil? @@ -947,8 +952,8 @@ module Google command.query['minMonthlyBudget.currencyCode'] = min_monthly_budget_currency_code unless min_monthly_budget_currency_code.nil? command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? command.query['view'] = view unless view.nil? - command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? command.query['address'] = address unless address.nil? + command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? command.query['minMonthlyBudget.units'] = min_monthly_budget_units unless min_monthly_budget_units.nil? command.query['maxMonthlyBudget.nanos'] = max_monthly_budget_nanos unless max_monthly_budget_nanos.nil? command.query['services'] = services unless services.nil? @@ -957,15 +962,10 @@ module Google command.query['minMonthlyBudget.nanos'] = min_monthly_budget_nanos unless min_monthly_budget_nanos.nil? command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? - command.query['pageToken'] = page_token unless page_token.nil? command.query['companyName'] = company_name unless company_name.nil? - command.query['industries'] = industries unless industries.nil? - command.query['websiteUrl'] = website_url unless website_url.nil? - command.query['gpsMotivations'] = gps_motivations unless gps_motivations.nil? - command.query['languageCodes'] = language_codes unless language_codes.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['fields'] = fields unless fields.nil? + command.query['pageToken'] = page_token unless page_token.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -973,11 +973,11 @@ module Google # @param [String] company_id # The ID of the company to contact. # @param [Google::Apis::PartnersV2::CreateLeadRequest] create_lead_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 # @@ -990,25 +990,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 create_lead(company_id, create_lead_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def create_lead(company_id, create_lead_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v2/companies/{companyId}/leads', options) command.request_representation = Google::Apis::PartnersV2::CreateLeadRequest::Representation command.request_object = create_lead_request_object command.response_representation = Google::Apis::PartnersV2::CreateLeadResponse::Representation command.response_class = Google::Apis::PartnersV2::CreateLeadResponse command.params['companyId'] = company_id unless company_id.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end # Logs a user event. # @param [Google::Apis::PartnersV2::LogUserEventRequest] log_user_event_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 # @@ -1021,14 +1021,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 log_user_event(log_user_event_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def log_user_event(log_user_event_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v2/userEvents:log', options) command.request_representation = Google::Apis::PartnersV2::LogUserEventRequest::Representation command.request_object = log_user_event_request_object command.response_representation = Google::Apis::PartnersV2::LogUserEventResponse::Representation command.response_class = Google::Apis::PartnersV2::LogUserEventResponse - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -1036,11 +1036,11 @@ module Google # `Failed to render component`, `Profile page is running slow`, # `More than 500 users have accessed this result.`, etc. # @param [Google::Apis::PartnersV2::LogMessageRequest] log_message_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 # @@ -1053,20 +1053,28 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def log_client_message_message(log_message_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def log_client_message_message(log_message_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v2/clientMessages:log', options) command.request_representation = Google::Apis::PartnersV2::LogMessageRequest::Representation command.request_object = log_message_request_object command.response_representation = Google::Apis::PartnersV2::LogMessageResponse::Representation command.response_class = Google::Apis::PartnersV2::LogMessageResponse - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end # Gets an Exam Token for a Partner's user to take an exam in the Exams System # @param [String] exam_type # The exam type we are requesting a token for. + # @param [String] request_metadata_user_overrides_ip_address + # IP address to use instead of the user's geo-located IP address. + # @param [Array, String] request_metadata_experiment_ids + # Experiment IDs the current request belongs to. + # @param [String] request_metadata_traffic_source_traffic_sub_id + # Second level identifier to indicate where the traffic comes from. + # An identifier has multiple letters created by a team which redirected the + # traffic to us. # @param [String] request_metadata_user_overrides_user_id # Logged-in user ID to impersonate instead of the user's ID. # @param [String] request_metadata_partners_session_id @@ -1077,19 +1085,11 @@ module Google # traffic to us. # @param [String] request_metadata_locale # Locale to use for the current request. - # @param [String] request_metadata_user_overrides_ip_address - # IP address to use instead of the user's geo-located IP address. - # @param [Array, String] request_metadata_experiment_ids - # Experiment IDs the current request belongs to. - # @param [String] request_metadata_traffic_source_traffic_sub_id - # Second level identifier to indicate where the traffic comes from. - # An identifier has multiple letters created by a team which redirected the - # traffic to us. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1102,20 +1102,20 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_exam_token(exam_type, request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, fields: nil, quota_user: nil, options: nil, &block) + def get_exam_token(exam_type, request_metadata_user_overrides_ip_address: nil, request_metadata_experiment_ids: nil, request_metadata_traffic_source_traffic_sub_id: nil, request_metadata_user_overrides_user_id: nil, request_metadata_partners_session_id: nil, request_metadata_traffic_source_traffic_source_id: nil, request_metadata_locale: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v2/exams/{examType}/token', options) command.response_representation = Google::Apis::PartnersV2::ExamToken::Representation command.response_class = Google::Apis::PartnersV2::ExamToken command.params['examType'] = exam_type unless exam_type.nil? + command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? + command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? + command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? command.query['requestMetadata.userOverrides.userId'] = request_metadata_user_overrides_user_id unless request_metadata_user_overrides_user_id.nil? command.query['requestMetadata.partnersSessionId'] = request_metadata_partners_session_id unless request_metadata_partners_session_id.nil? command.query['requestMetadata.trafficSource.trafficSourceId'] = request_metadata_traffic_source_traffic_source_id unless request_metadata_traffic_source_traffic_source_id.nil? command.query['requestMetadata.locale'] = request_metadata_locale unless request_metadata_locale.nil? - command.query['requestMetadata.userOverrides.ipAddress'] = request_metadata_user_overrides_ip_address unless request_metadata_user_overrides_ip_address.nil? - command.query['requestMetadata.experimentIds'] = request_metadata_experiment_ids unless request_metadata_experiment_ids.nil? - command.query['requestMetadata.trafficSource.trafficSubId'] = request_metadata_traffic_source_traffic_sub_id unless request_metadata_traffic_source_traffic_sub_id.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/people_v1.rb b/generated/google/apis/people_v1.rb index 9e71d2e0d..310a980d3 100644 --- a/generated/google/apis/people_v1.rb +++ b/generated/google/apis/people_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/people/ module PeopleV1 VERSION = 'V1' - REVISION = '20170310' + REVISION = '20170326' # Know the list of people in your circles, your age range, and language AUTH_PLUS_LOGIN = 'https://www.googleapis.com/auth/plus.login' diff --git a/generated/google/apis/people_v1/classes.rb b/generated/google/apis/people_v1/classes.rb index af6f9ca68..4248daf8d 100644 --- a/generated/google/apis/people_v1/classes.rb +++ b/generated/google/apis/people_v1/classes.rb @@ -22,1028 +22,6 @@ module Google module Apis module PeopleV1 - # A person's read-only photo. A picture shown next to the person's name to - # help others recognize the person. - class Photo - include Google::Apis::Core::Hashable - - # Metadata about a field. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::PeopleV1::FieldMetadata] - attr_accessor :metadata - - # The URL of the photo. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @metadata = args[:metadata] if args.key?(:metadata) - @url = args[:url] if args.key?(:url) - end - end - - # A person's phone number. - class PhoneNumber - include Google::Apis::Core::Hashable - - # The read-only type of the phone number translated and formatted in the - # viewer's account locale or the the `Accept-Language` HTTP header locale. - # Corresponds to the JSON property `formattedType` - # @return [String] - attr_accessor :formatted_type - - # The read-only canonicalized [ITU-T E.164](https://law.resource.org/pub/us/cfr/ - # ibr/004/itu-t.E.164.1.2008.pdf) - # form of the phone number. - # Corresponds to the JSON property `canonicalForm` - # @return [String] - attr_accessor :canonical_form - - # Metadata about a field. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::PeopleV1::FieldMetadata] - attr_accessor :metadata - - # The type of the phone number. The type can be custom or predefined. - # Possible values include, but are not limited to, the following: - # * `home` - # * `work` - # * `mobile` - # * `homeFax` - # * `workFax` - # * `otherFax` - # * `pager` - # * `workMobile` - # * `workPager` - # * `main` - # * `googleVoice` - # * `other` - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The phone number. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @formatted_type = args[:formatted_type] if args.key?(:formatted_type) - @canonical_form = args[:canonical_form] if args.key?(:canonical_form) - @metadata = args[:metadata] if args.key?(:metadata) - @type = args[:type] if args.key?(:type) - @value = args[:value] if args.key?(:value) - end - end - - # - class ListConnectionsResponse - include Google::Apis::Core::Hashable - - # The token that can be used to retrieve the next page of results. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The list of people that the requestor is connected to. - # Corresponds to the JSON property `connections` - # @return [Array] - attr_accessor :connections - - # The token that can be used to retrieve changes since the last request. - # Corresponds to the JSON property `nextSyncToken` - # @return [String] - attr_accessor :next_sync_token - - 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) - @connections = args[:connections] if args.key?(:connections) - @next_sync_token = args[:next_sync_token] if args.key?(:next_sync_token) - end - end - - # A person's birthday. At least one of the `date` and `text` fields are - # specified. The `date` and `text` fields typically represent the same - # date, but are not guaranteed to. - class Birthday - include Google::Apis::Core::Hashable - - # Metadata about a field. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::PeopleV1::FieldMetadata] - attr_accessor :metadata - - # A free-form string representing the user's birthday. - # Corresponds to the JSON property `text` - # @return [String] - attr_accessor :text - - # Represents a whole calendar date, for example a date of birth. The time - # of day and time zone are either specified elsewhere or are not - # significant. The date is relative to the - # [Proleptic Gregorian Calendar](https://en.wikipedia.org/wiki/ - # Proleptic_Gregorian_calendar). - # The day may be 0 to represent a year and month where the day is not - # significant. The year may be 0 to represent a month and day independent - # of year; for example, anniversary date. - # Corresponds to the JSON property `date` - # @return [Google::Apis::PeopleV1::Date] - attr_accessor :date - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @metadata = args[:metadata] if args.key?(:metadata) - @text = args[:text] if args.key?(:text) - @date = args[:date] if args.key?(:date) - end - end - - # A person's past or current residence. - class Residence - include Google::Apis::Core::Hashable - - # Metadata about a field. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::PeopleV1::FieldMetadata] - attr_accessor :metadata - - # True if the residence is the person's current residence; - # false if the residence is a past residence. - # Corresponds to the JSON property `current` - # @return [Boolean] - attr_accessor :current - alias_method :current?, :current - - # The address of the residence. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @metadata = args[:metadata] if args.key?(:metadata) - @current = args[:current] if args.key?(:current) - @value = args[:value] if args.key?(:value) - end - end - - # A person's physical address. May be a P.O. box or street address. All fields - # are optional. - class Address - include Google::Apis::Core::Hashable - - # The read-only type of the address translated and formatted in the viewer's - # account locale or the `Accept-Language` HTTP header locale. - # Corresponds to the JSON property `formattedType` - # @return [String] - attr_accessor :formatted_type - - # The city of the address. - # Corresponds to the JSON property `city` - # @return [String] - attr_accessor :city - - # The unstructured value of the address. If this is not set by the user it - # will be automatically constructed from structured values. - # Corresponds to the JSON property `formattedValue` - # @return [String] - attr_accessor :formatted_value - - # The country of the address. - # Corresponds to the JSON property `country` - # @return [String] - attr_accessor :country - - # The type of the address. The type can be custom or predefined. - # Possible values include, but are not limited to, the following: - # * `home` - # * `work` - # * `other` - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The extended address of the address; for example, the apartment number. - # Corresponds to the JSON property `extendedAddress` - # @return [String] - attr_accessor :extended_address - - # The P.O. box of the address. - # Corresponds to the JSON property `poBox` - # @return [String] - attr_accessor :po_box - - # The postal code of the address. - # Corresponds to the JSON property `postalCode` - # @return [String] - attr_accessor :postal_code - - # The region of the address; for example, the state or province. - # Corresponds to the JSON property `region` - # @return [String] - attr_accessor :region - - # The street address. - # Corresponds to the JSON property `streetAddress` - # @return [String] - attr_accessor :street_address - - # Metadata about a field. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::PeopleV1::FieldMetadata] - attr_accessor :metadata - - # The [ISO 3166-1 alpha-2](http://www.iso.org/iso/country_codes.htm) country - # code of the address. - # Corresponds to the JSON property `countryCode` - # @return [String] - attr_accessor :country_code - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @formatted_type = args[:formatted_type] if args.key?(:formatted_type) - @city = args[:city] if args.key?(:city) - @formatted_value = args[:formatted_value] if args.key?(:formatted_value) - @country = args[:country] if args.key?(:country) - @type = args[:type] if args.key?(:type) - @extended_address = args[:extended_address] if args.key?(:extended_address) - @po_box = args[:po_box] if args.key?(:po_box) - @postal_code = args[:postal_code] if args.key?(:postal_code) - @region = args[:region] if args.key?(:region) - @street_address = args[:street_address] if args.key?(:street_address) - @metadata = args[:metadata] if args.key?(:metadata) - @country_code = args[:country_code] if args.key?(:country_code) - end - end - - # A Google contact group membership. - class ContactGroupMembership - include Google::Apis::Core::Hashable - - # The contact group ID for the contact group membership. The contact group - # ID can be custom or predefined. Possible values include, but are not - # limited to, the following: - # * `myContacts` - # * `starred` - # * A numerical ID for user-created groups. - # Corresponds to the JSON property `contactGroupId` - # @return [String] - attr_accessor :contact_group_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @contact_group_id = args[:contact_group_id] if args.key?(:contact_group_id) - end - end - - # The read-only metadata about a person. - class PersonMetadata - include Google::Apis::Core::Hashable - - # The sources of data for the person. - # Corresponds to the JSON property `sources` - # @return [Array] - attr_accessor :sources - - # Any former resource names this person has had. Populated only for - # [`connections.list`](/people/api/rest/v1/people.connections/list) requests - # that include a sync token. - # The resource name may change when adding or removing fields that link a - # contact and profile such as a verified email, verified phone number, or - # profile URL. - # Corresponds to the JSON property `previousResourceNames` - # @return [Array] - attr_accessor :previous_resource_names - - # True if the person resource has been deleted. Populated only for - # [`connections.list`](/people/api/rest/v1/people.connections/list) requests - # that include a sync token. - # Corresponds to the JSON property `deleted` - # @return [Boolean] - attr_accessor :deleted - alias_method :deleted?, :deleted - - # DEPRECATED(Please read person.metadata.sources.profile_metadata instead). - # The type of the person object. - # Corresponds to the JSON property `objectType` - # @return [String] - attr_accessor :object_type - - # Resource names of people linked to this resource. - # Corresponds to the JSON property `linkedPeopleResourceNames` - # @return [Array] - attr_accessor :linked_people_resource_names - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sources = args[:sources] if args.key?(:sources) - @previous_resource_names = args[:previous_resource_names] if args.key?(:previous_resource_names) - @deleted = args[:deleted] if args.key?(:deleted) - @object_type = args[:object_type] if args.key?(:object_type) - @linked_people_resource_names = args[:linked_people_resource_names] if args.key?(:linked_people_resource_names) - end - end - - # An event related to the person. - class Event - include Google::Apis::Core::Hashable - - # The read-only type of the event translated and formatted in the - # viewer's account locale or the `Accept-Language` HTTP header locale. - # Corresponds to the JSON property `formattedType` - # @return [String] - attr_accessor :formatted_type - - # Metadata about a field. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::PeopleV1::FieldMetadata] - attr_accessor :metadata - - # The type of the event. The type can be custom or predefined. - # Possible values include, but are not limited to, the following: - # * `anniversary` - # * `other` - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Represents a whole calendar date, for example a date of birth. The time - # of day and time zone are either specified elsewhere or are not - # significant. The date is relative to the - # [Proleptic Gregorian Calendar](https://en.wikipedia.org/wiki/ - # Proleptic_Gregorian_calendar). - # The day may be 0 to represent a year and month where the day is not - # significant. The year may be 0 to represent a month and day independent - # of year; for example, anniversary date. - # Corresponds to the JSON property `date` - # @return [Google::Apis::PeopleV1::Date] - attr_accessor :date - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @formatted_type = args[:formatted_type] if args.key?(:formatted_type) - @metadata = args[:metadata] if args.key?(:metadata) - @type = args[:type] if args.key?(:type) - @date = args[:date] if args.key?(:date) - end - end - - # The read-only metadata about a profile. - class ProfileMetadata - include Google::Apis::Core::Hashable - - # The profile object type. - # Corresponds to the JSON property `objectType` - # @return [String] - attr_accessor :object_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @object_type = args[:object_type] if args.key?(:object_type) - end - end - - # A person's associated URLs. - class Url - include Google::Apis::Core::Hashable - - # Metadata about a field. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::PeopleV1::FieldMetadata] - attr_accessor :metadata - - # The type of the URL. The type can be custom or predefined. - # Possible values include, but are not limited to, the following: - # * `home` - # * `work` - # * `blog` - # * `profile` - # * `homePage` - # * `ftp` - # * `reservations` - # * `appInstallPage`: website for a Google+ application. - # * `other` - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The URL. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - # The read-only type of the URL translated and formatted in the viewer's - # account locale or the `Accept-Language` HTTP header locale. - # Corresponds to the JSON property `formattedType` - # @return [String] - attr_accessor :formatted_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @metadata = args[:metadata] if args.key?(:metadata) - @type = args[:type] if args.key?(:type) - @value = args[:value] if args.key?(:value) - @formatted_type = args[:formatted_type] if args.key?(:formatted_type) - end - end - - # A person's gender. - class Gender - include Google::Apis::Core::Hashable - - # Metadata about a field. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::PeopleV1::FieldMetadata] - attr_accessor :metadata - - # The gender for the person. The gender can be custom or predefined. - # Possible values include, but are not limited to, the - # following: - # * `male` - # * `female` - # * `other` - # * `unknown` - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - # The read-only value of the gender translated and formatted in the viewer's - # account locale or the `Accept-Language` HTTP header locale. - # Corresponds to the JSON property `formattedValue` - # @return [String] - attr_accessor :formatted_value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @metadata = args[:metadata] if args.key?(:metadata) - @value = args[:value] if args.key?(:value) - @formatted_value = args[:formatted_value] if args.key?(:formatted_value) - end - end - - # A person's read-only cover photo. A large image shown on the person's - # profile page that represents who they are or what they care about. - class CoverPhoto - include Google::Apis::Core::Hashable - - # Metadata about a field. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::PeopleV1::FieldMetadata] - attr_accessor :metadata - - # True if the cover photo is the default cover photo; - # false if the cover photo is a user-provided cover photo. - # Corresponds to the JSON property `default` - # @return [Boolean] - attr_accessor :default - alias_method :default?, :default - - # The URL of the cover photo. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @metadata = args[:metadata] if args.key?(:metadata) - @default = args[:default] if args.key?(:default) - @url = args[:url] if args.key?(:url) - end - end - - # A person's instant messaging client. - class ImClient - include Google::Apis::Core::Hashable - - # The read-only protocol of the IM client formatted in the viewer's account - # locale or the `Accept-Language` HTTP header locale. - # Corresponds to the JSON property `formattedProtocol` - # @return [String] - attr_accessor :formatted_protocol - - # The read-only type of the IM client translated and formatted in the - # viewer's account locale or the `Accept-Language` HTTP header locale. - # Corresponds to the JSON property `formattedType` - # @return [String] - attr_accessor :formatted_type - - # The protocol of the IM client. The protocol can be custom or predefined. - # Possible values include, but are not limited to, the following: - # * `aim` - # * `msn` - # * `yahoo` - # * `skype` - # * `qq` - # * `googleTalk` - # * `icq` - # * `jabber` - # * `netMeeting` - # Corresponds to the JSON property `protocol` - # @return [String] - attr_accessor :protocol - - # Metadata about a field. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::PeopleV1::FieldMetadata] - attr_accessor :metadata - - # The type of the IM client. The type can be custom or predefined. - # Possible values include, but are not limited to, the following: - # * `home` - # * `work` - # * `other` - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The user name used in the IM client. - # Corresponds to the JSON property `username` - # @return [String] - attr_accessor :username - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @formatted_protocol = args[:formatted_protocol] if args.key?(:formatted_protocol) - @formatted_type = args[:formatted_type] if args.key?(:formatted_type) - @protocol = args[:protocol] if args.key?(:protocol) - @metadata = args[:metadata] if args.key?(:metadata) - @type = args[:type] if args.key?(:type) - @username = args[:username] if args.key?(:username) - end - end - - # One of the person's interests. - class Interest - include Google::Apis::Core::Hashable - - # Metadata about a field. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::PeopleV1::FieldMetadata] - attr_accessor :metadata - - # The interest; for example, `stargazing`. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @metadata = args[:metadata] if args.key?(:metadata) - @value = args[:value] if args.key?(:value) - end - end - - # A person's email address. - class EmailAddress - include Google::Apis::Core::Hashable - - # The display name of the email. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # Metadata about a field. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::PeopleV1::FieldMetadata] - attr_accessor :metadata - - # The type of the email address. The type can be custom or predefined. - # Possible values include, but are not limited to, the following: - # * `home` - # * `work` - # * `other` - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The email address. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - # The read-only type of the email address translated and formatted in the - # viewer's account locale or the `Accept-Language` HTTP header locale. - # Corresponds to the JSON property `formattedType` - # @return [String] - attr_accessor :formatted_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @display_name = args[:display_name] if args.key?(:display_name) - @metadata = args[:metadata] if args.key?(:metadata) - @type = args[:type] if args.key?(:type) - @value = args[:value] if args.key?(:value) - @formatted_type = args[:formatted_type] if args.key?(:formatted_type) - end - end - - # A person's nickname. - class Nickname - include Google::Apis::Core::Hashable - - # Metadata about a field. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::PeopleV1::FieldMetadata] - attr_accessor :metadata - - # The type of the nickname. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The nickname. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @metadata = args[:metadata] if args.key?(:metadata) - @type = args[:type] if args.key?(:type) - @value = args[:value] if args.key?(:value) - end - end - - # A skill that the person has. - class Skill - include Google::Apis::Core::Hashable - - # Metadata about a field. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::PeopleV1::FieldMetadata] - attr_accessor :metadata - - # The skill; for example, `underwater basket weaving`. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @metadata = args[:metadata] if args.key?(:metadata) - @value = args[:value] if args.key?(:value) - end - end - - # A Google Apps Domain membership. - class DomainMembership - include Google::Apis::Core::Hashable - - # True if the person is in the viewer's Google Apps domain. - # Corresponds to the JSON property `inViewerDomain` - # @return [Boolean] - attr_accessor :in_viewer_domain - alias_method :in_viewer_domain?, :in_viewer_domain - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @in_viewer_domain = args[:in_viewer_domain] if args.key?(:in_viewer_domain) - end - end - - # A person's read-only membership in a group. - class Membership - include Google::Apis::Core::Hashable - - # Metadata about a field. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::PeopleV1::FieldMetadata] - attr_accessor :metadata - - # A Google contact group membership. - # Corresponds to the JSON property `contactGroupMembership` - # @return [Google::Apis::PeopleV1::ContactGroupMembership] - attr_accessor :contact_group_membership - - # A Google Apps Domain membership. - # Corresponds to the JSON property `domainMembership` - # @return [Google::Apis::PeopleV1::DomainMembership] - attr_accessor :domain_membership - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @metadata = args[:metadata] if args.key?(:metadata) - @contact_group_membership = args[:contact_group_membership] if args.key?(:contact_group_membership) - @domain_membership = args[:domain_membership] if args.key?(:domain_membership) - end - end - - # A person's read-only relationship status. - class RelationshipStatus - include Google::Apis::Core::Hashable - - # Metadata about a field. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::PeopleV1::FieldMetadata] - attr_accessor :metadata - - # The relationship status. The value can be custom or predefined. - # Possible values include, but are not limited to, the following: - # * `single` - # * `inARelationship` - # * `engaged` - # * `married` - # * `itsComplicated` - # * `openRelationship` - # * `widowed` - # * `inDomesticPartnership` - # * `inCivilUnion` - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - # The read-only value of the relationship status translated and formatted in - # the viewer's account locale or the `Accept-Language` HTTP header locale. - # Corresponds to the JSON property `formattedValue` - # @return [String] - attr_accessor :formatted_value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @metadata = args[:metadata] if args.key?(:metadata) - @value = args[:value] if args.key?(:value) - @formatted_value = args[:formatted_value] if args.key?(:formatted_value) - end - end - - # Represents a whole calendar date, for example a date of birth. The time - # of day and time zone are either specified elsewhere or are not - # significant. The date is relative to the - # [Proleptic Gregorian Calendar](https://en.wikipedia.org/wiki/ - # Proleptic_Gregorian_calendar). - # The day may be 0 to represent a year and month where the day is not - # significant. The year may be 0 to represent a month and day independent - # of year; for example, anniversary date. - class Date - include Google::Apis::Core::Hashable - - # Year of date. Must be from 1 to 9999, or 0 if specifying a date without - # a year. - # Corresponds to the JSON property `year` - # @return [Fixnum] - attr_accessor :year - - # Day of month. Must be from 1 to 31 and valid for the year and month, or 0 - # if specifying a year/month where the day is not significant. - # Corresponds to the JSON property `day` - # @return [Fixnum] - attr_accessor :day - - # Month of year. Must be from 1 to 12. - # Corresponds to the JSON property `month` - # @return [Fixnum] - attr_accessor :month - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @year = args[:year] if args.key?(:year) - @day = args[:day] if args.key?(:day) - @month = args[:month] if args.key?(:month) - end - end - - # A read-only brief one-line description of the person. - class Tagline - include Google::Apis::Core::Hashable - - # Metadata about a field. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::PeopleV1::FieldMetadata] - attr_accessor :metadata - - # The tagline. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @metadata = args[:metadata] if args.key?(:metadata) - @value = args[:value] if args.key?(:value) - end - end - - # A person's name. If the name is a mononym, the family name is empty. - class Name - include Google::Apis::Core::Hashable - - # The honorific prefixes, such as `Mrs.` or `Dr.` - # Corresponds to the JSON property `honorificPrefix` - # @return [String] - attr_accessor :honorific_prefix - - # The honorific suffixes spelled as they sound. - # Corresponds to the JSON property `phoneticHonorificSuffix` - # @return [String] - attr_accessor :phonetic_honorific_suffix - - # The middle name(s). - # Corresponds to the JSON property `middleName` - # @return [String] - attr_accessor :middle_name - - # The given name. - # Corresponds to the JSON property `givenName` - # @return [String] - attr_accessor :given_name - - # The honorific prefixes spelled as they sound. - # Corresponds to the JSON property `phoneticHonorificPrefix` - # @return [String] - attr_accessor :phonetic_honorific_prefix - - # The given name spelled as it sounds. - # Corresponds to the JSON property `phoneticGivenName` - # @return [String] - attr_accessor :phonetic_given_name - - # The family name spelled as it sounds. - # Corresponds to the JSON property `phoneticFamilyName` - # @return [String] - attr_accessor :phonetic_family_name - - # The family name. - # Corresponds to the JSON property `familyName` - # @return [String] - attr_accessor :family_name - - # The middle name(s) spelled as they sound. - # Corresponds to the JSON property `phoneticMiddleName` - # @return [String] - attr_accessor :phonetic_middle_name - - # Metadata about a field. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::PeopleV1::FieldMetadata] - attr_accessor :metadata - - # The full name spelled as it sounds. - # Corresponds to the JSON property `phoneticFullName` - # @return [String] - attr_accessor :phonetic_full_name - - # The read-only display name with the last name first formatted according to - # the locale specified by the viewer's account or the - # Accept-Language HTTP header. - # Corresponds to the JSON property `displayNameLastFirst` - # @return [String] - attr_accessor :display_name_last_first - - # The read-only display name formatted according to the locale specified by - # the viewer's account or the Accept-Language HTTP header. - # Corresponds to the JSON property `displayName` - # @return [String] - attr_accessor :display_name - - # The honorific suffixes, such as `Jr.` - # Corresponds to the JSON property `honorificSuffix` - # @return [String] - attr_accessor :honorific_suffix - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @honorific_prefix = args[:honorific_prefix] if args.key?(:honorific_prefix) - @phonetic_honorific_suffix = args[:phonetic_honorific_suffix] if args.key?(:phonetic_honorific_suffix) - @middle_name = args[:middle_name] if args.key?(:middle_name) - @given_name = args[:given_name] if args.key?(:given_name) - @phonetic_honorific_prefix = args[:phonetic_honorific_prefix] if args.key?(:phonetic_honorific_prefix) - @phonetic_given_name = args[:phonetic_given_name] if args.key?(:phonetic_given_name) - @phonetic_family_name = args[:phonetic_family_name] if args.key?(:phonetic_family_name) - @family_name = args[:family_name] if args.key?(:family_name) - @phonetic_middle_name = args[:phonetic_middle_name] if args.key?(:phonetic_middle_name) - @metadata = args[:metadata] if args.key?(:metadata) - @phonetic_full_name = args[:phonetic_full_name] if args.key?(:phonetic_full_name) - @display_name_last_first = args[:display_name_last_first] if args.key?(:display_name_last_first) - @display_name = args[:display_name] if args.key?(:display_name) - @honorific_suffix = args[:honorific_suffix] if args.key?(:honorific_suffix) - end - end - - # A person's bragging rights. - class BraggingRights - include Google::Apis::Core::Hashable - - # Metadata about a field. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::PeopleV1::FieldMetadata] - attr_accessor :metadata - - # The bragging rights; for example, `climbed mount everest`. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @metadata = args[:metadata] if args.key?(:metadata) - @value = args[:value] if args.key?(:value) - end - end - # A person's locale preference. class Locale include Google::Apis::Core::Hashable @@ -1075,6 +53,12 @@ module Google class Organization include Google::Apis::Core::Hashable + # The read-only type of the organization translated and formatted in the + # viewer's account locale or the `Accept-Language` HTTP header locale. + # Corresponds to the JSON property `formattedType` + # @return [String] + attr_accessor :formatted_type + # Represents a whole calendar date, for example a date of birth. The time # of day and time zone are either specified elsewhere or are not # significant. The date is relative to the @@ -1087,12 +71,6 @@ module Google # @return [Google::Apis::PeopleV1::Date] attr_accessor :start_date - # The read-only type of the organization translated and formatted in the - # viewer's account locale or the `Accept-Language` HTTP header locale. - # Corresponds to the JSON property `formattedType` - # @return [String] - attr_accessor :formatted_type - # The domain name associated with the organization; for example, `google.com`. # Corresponds to the JSON property `domain` # @return [String] @@ -1103,11 +81,6 @@ module Google # @return [String] attr_accessor :department - # The phonetic name of the organization. - # Corresponds to the JSON property `phoneticName` - # @return [String] - attr_accessor :phonetic_name - # The type of the organization. The type can be custom or predefined. # Possible values include, but are not limited to, the following: # * `work` @@ -1116,6 +89,11 @@ module Google # @return [String] attr_accessor :type + # The phonetic name of the organization. + # Corresponds to the JSON property `phoneticName` + # @return [String] + attr_accessor :phonetic_name + # The person's job description at the organization. # Corresponds to the JSON property `jobDescription` # @return [String] @@ -1149,16 +127,16 @@ module Google # @return [Google::Apis::PeopleV1::FieldMetadata] attr_accessor :metadata - # The location of the organization office the person works at. - # Corresponds to the JSON property `location` - # @return [String] - attr_accessor :location - # The person's job title at the organization. # Corresponds to the JSON property `title` # @return [String] attr_accessor :title + # The location of the organization office the person works at. + # Corresponds to the JSON property `location` + # @return [String] + attr_accessor :location + # True if the organization is the person's current organization; # false if the organization is a past organization. # Corresponds to the JSON property `current` @@ -1172,19 +150,19 @@ module Google # Update properties of this object def update!(**args) - @start_date = args[:start_date] if args.key?(:start_date) @formatted_type = args[:formatted_type] if args.key?(:formatted_type) + @start_date = args[:start_date] if args.key?(:start_date) @domain = args[:domain] if args.key?(:domain) @department = args[:department] if args.key?(:department) - @phonetic_name = args[:phonetic_name] if args.key?(:phonetic_name) @type = args[:type] if args.key?(:type) + @phonetic_name = args[:phonetic_name] if args.key?(:phonetic_name) @job_description = args[:job_description] if args.key?(:job_description) @end_date = args[:end_date] if args.key?(:end_date) @symbol = args[:symbol] if args.key?(:symbol) @name = args[:name] if args.key?(:name) @metadata = args[:metadata] if args.key?(:metadata) - @location = args[:location] if args.key?(:location) @title = args[:title] if args.key?(:title) + @location = args[:location] if args.key?(:location) @current = args[:current] if args.key?(:current) end end @@ -1193,11 +171,6 @@ module Google class Biography include Google::Apis::Core::Hashable - # Metadata about a field. - # Corresponds to the JSON property `metadata` - # @return [Google::Apis::PeopleV1::FieldMetadata] - attr_accessor :metadata - # The short biography. # Corresponds to the JSON property `value` # @return [String] @@ -1208,15 +181,20 @@ module Google # @return [String] attr_accessor :content_type + # Metadata about a field. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::PeopleV1::FieldMetadata] + attr_accessor :metadata + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @metadata = args[:metadata] if args.key?(:metadata) @value = args[:value] if args.key?(:value) @content_type = args[:content_type] if args.key?(:content_type) + @metadata = args[:metadata] if args.key?(:metadata) end end @@ -1249,14 +227,6 @@ module Google class FieldMetadata include Google::Apis::Core::Hashable - # True if the field is verified; false if the field is unverified. A - # verified field is typically a name, email address, phone number, or - # website that has been confirmed to be owned by the person. - # Corresponds to the JSON property `verified` - # @return [Boolean] - attr_accessor :verified - alias_method :verified?, :verified - # True if the field is the primary field; false if the field is a secondary # field. # Corresponds to the JSON property `primary` @@ -1269,15 +239,23 @@ module Google # @return [Google::Apis::PeopleV1::Source] attr_accessor :source + # True if the field is verified; false if the field is unverified. A + # verified field is typically a name, email address, phone number, or + # website that has been confirmed to be owned by the person. + # Corresponds to the JSON property `verified` + # @return [Boolean] + attr_accessor :verified + alias_method :verified?, :verified + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @verified = args[:verified] if args.key?(:verified) @primary = args[:primary] if args.key?(:primary) @source = args[:source] if args.key?(:source) + @verified = args[:verified] if args.key?(:verified) end end @@ -1365,16 +343,6 @@ module Google class Source include Google::Apis::Core::Hashable - # The read-only metadata about a profile. - # Corresponds to the JSON property `profileMetadata` - # @return [Google::Apis::PeopleV1::ProfileMetadata] - attr_accessor :profile_metadata - - # The source type. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - # The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of the # source. Used for web cache validation. Only populated in # person.metadata.sources. @@ -1387,16 +355,26 @@ module Google # @return [String] attr_accessor :id + # The read-only metadata about a profile. + # Corresponds to the JSON property `profileMetadata` + # @return [Google::Apis::PeopleV1::ProfileMetadata] + attr_accessor :profile_metadata + + # The source type. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @profile_metadata = args[:profile_metadata] if args.key?(:profile_metadata) - @type = args[:type] if args.key?(:type) @etag = args[:etag] if args.key?(:etag) @id = args[:id] if args.key?(:id) + @profile_metadata = args[:profile_metadata] if args.key?(:profile_metadata) + @type = args[:type] if args.key?(:type) end end @@ -1489,41 +467,16 @@ module Google class Person include Google::Apis::Core::Hashable - # The person's birthdays. - # Corresponds to the JSON property `birthdays` - # @return [Array] - attr_accessor :birthdays - - # The person's locale preferences. - # Corresponds to the JSON property `locales` - # @return [Array] - attr_accessor :locales - - # The kind of relationship the person is looking for. - # Corresponds to the JSON property `relationshipInterests` - # @return [Array] - attr_accessor :relationship_interests - - # The person's associated URLs. - # Corresponds to the JSON property `urls` - # @return [Array] - attr_accessor :urls - - # The person's nicknames. - # Corresponds to the JSON property `nicknames` - # @return [Array] - attr_accessor :nicknames + # The person's relations. + # Corresponds to the JSON property `relations` + # @return [Array] + attr_accessor :relations # The person's names. # Corresponds to the JSON property `names` # @return [Array] attr_accessor :names - # The person's relations. - # Corresponds to the JSON property `relations` - # @return [Array] - attr_accessor :relations - # The person's occupations. # Corresponds to the JSON property `occupations` # @return [Array] @@ -1641,19 +594,39 @@ module Google # @return [Array] attr_accessor :im_clients + # The person's birthdays. + # Corresponds to the JSON property `birthdays` + # @return [Array] + attr_accessor :birthdays + + # The person's locale preferences. + # Corresponds to the JSON property `locales` + # @return [Array] + attr_accessor :locales + + # The kind of relationship the person is looking for. + # Corresponds to the JSON property `relationshipInterests` + # @return [Array] + attr_accessor :relationship_interests + + # The person's associated URLs. + # Corresponds to the JSON property `urls` + # @return [Array] + attr_accessor :urls + + # The person's nicknames. + # Corresponds to the JSON property `nicknames` + # @return [Array] + attr_accessor :nicknames + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @birthdays = args[:birthdays] if args.key?(:birthdays) - @locales = args[:locales] if args.key?(:locales) - @relationship_interests = args[:relationship_interests] if args.key?(:relationship_interests) - @urls = args[:urls] if args.key?(:urls) - @nicknames = args[:nicknames] if args.key?(:nicknames) - @names = args[:names] if args.key?(:names) @relations = args[:relations] if args.key?(:relations) + @names = args[:names] if args.key?(:names) @occupations = args[:occupations] if args.key?(:occupations) @email_addresses = args[:email_addresses] if args.key?(:email_addresses) @organizations = args[:organizations] if args.key?(:organizations) @@ -1677,6 +650,11 @@ module Google @phone_numbers = args[:phone_numbers] if args.key?(:phone_numbers) @cover_photos = args[:cover_photos] if args.key?(:cover_photos) @im_clients = args[:im_clients] if args.key?(:im_clients) + @birthdays = args[:birthdays] if args.key?(:birthdays) + @locales = args[:locales] if args.key?(:locales) + @relationship_interests = args[:relationship_interests] if args.key?(:relationship_interests) + @urls = args[:urls] if args.key?(:urls) + @nicknames = args[:nicknames] if args.key?(:nicknames) end end @@ -1698,6 +676,1034 @@ module Google @responses = args[:responses] if args.key?(:responses) end end + + # A person's read-only photo. A picture shown next to the person's name to + # help others recognize the person. + class Photo + include Google::Apis::Core::Hashable + + # Metadata about a field. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::PeopleV1::FieldMetadata] + attr_accessor :metadata + + # The URL of the photo. + # Corresponds to the JSON property `url` + # @return [String] + attr_accessor :url + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @metadata = args[:metadata] if args.key?(:metadata) + @url = args[:url] if args.key?(:url) + end + end + + # A person's phone number. + class PhoneNumber + include Google::Apis::Core::Hashable + + # Metadata about a field. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::PeopleV1::FieldMetadata] + attr_accessor :metadata + + # The type of the phone number. The type can be custom or predefined. + # Possible values include, but are not limited to, the following: + # * `home` + # * `work` + # * `mobile` + # * `homeFax` + # * `workFax` + # * `otherFax` + # * `pager` + # * `workMobile` + # * `workPager` + # * `main` + # * `googleVoice` + # * `other` + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The phone number. + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + + # The read-only type of the phone number translated and formatted in the + # viewer's account locale or the the `Accept-Language` HTTP header locale. + # Corresponds to the JSON property `formattedType` + # @return [String] + attr_accessor :formatted_type + + # The read-only canonicalized [ITU-T E.164](https://law.resource.org/pub/us/cfr/ + # ibr/004/itu-t.E.164.1.2008.pdf) + # form of the phone number. + # Corresponds to the JSON property `canonicalForm` + # @return [String] + attr_accessor :canonical_form + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @metadata = args[:metadata] if args.key?(:metadata) + @type = args[:type] if args.key?(:type) + @value = args[:value] if args.key?(:value) + @formatted_type = args[:formatted_type] if args.key?(:formatted_type) + @canonical_form = args[:canonical_form] if args.key?(:canonical_form) + end + end + + # + class ListConnectionsResponse + include Google::Apis::Core::Hashable + + # The token that can be used to retrieve the next page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The list of people that the requestor is connected to. + # Corresponds to the JSON property `connections` + # @return [Array] + attr_accessor :connections + + # The token that can be used to retrieve changes since the last request. + # Corresponds to the JSON property `nextSyncToken` + # @return [String] + attr_accessor :next_sync_token + + # The total number of people in the list without pagination. + # Corresponds to the JSON property `totalPeople` + # @return [Fixnum] + attr_accessor :total_people + + 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) + @connections = args[:connections] if args.key?(:connections) + @next_sync_token = args[:next_sync_token] if args.key?(:next_sync_token) + @total_people = args[:total_people] if args.key?(:total_people) + end + end + + # A person's birthday. At least one of the `date` and `text` fields are + # specified. The `date` and `text` fields typically represent the same + # date, but are not guaranteed to. + class Birthday + include Google::Apis::Core::Hashable + + # Metadata about a field. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::PeopleV1::FieldMetadata] + attr_accessor :metadata + + # A free-form string representing the user's birthday. + # Corresponds to the JSON property `text` + # @return [String] + attr_accessor :text + + # Represents a whole calendar date, for example a date of birth. The time + # of day and time zone are either specified elsewhere or are not + # significant. The date is relative to the + # [Proleptic Gregorian Calendar](https://en.wikipedia.org/wiki/ + # Proleptic_Gregorian_calendar). + # The day may be 0 to represent a year and month where the day is not + # significant. The year may be 0 to represent a month and day independent + # of year; for example, anniversary date. + # Corresponds to the JSON property `date` + # @return [Google::Apis::PeopleV1::Date] + attr_accessor :date + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @metadata = args[:metadata] if args.key?(:metadata) + @text = args[:text] if args.key?(:text) + @date = args[:date] if args.key?(:date) + end + end + + # A person's past or current residence. + class Residence + include Google::Apis::Core::Hashable + + # Metadata about a field. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::PeopleV1::FieldMetadata] + attr_accessor :metadata + + # True if the residence is the person's current residence; + # false if the residence is a past residence. + # Corresponds to the JSON property `current` + # @return [Boolean] + attr_accessor :current + alias_method :current?, :current + + # The address of the residence. + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @metadata = args[:metadata] if args.key?(:metadata) + @current = args[:current] if args.key?(:current) + @value = args[:value] if args.key?(:value) + end + end + + # A person's physical address. May be a P.O. box or street address. All fields + # are optional. + class Address + include Google::Apis::Core::Hashable + + # The [ISO 3166-1 alpha-2](http://www.iso.org/iso/country_codes.htm) country + # code of the address. + # Corresponds to the JSON property `countryCode` + # @return [String] + attr_accessor :country_code + + # The read-only type of the address translated and formatted in the viewer's + # account locale or the `Accept-Language` HTTP header locale. + # Corresponds to the JSON property `formattedType` + # @return [String] + attr_accessor :formatted_type + + # The city of the address. + # Corresponds to the JSON property `city` + # @return [String] + attr_accessor :city + + # The unstructured value of the address. If this is not set by the user it + # will be automatically constructed from structured values. + # Corresponds to the JSON property `formattedValue` + # @return [String] + attr_accessor :formatted_value + + # The country of the address. + # Corresponds to the JSON property `country` + # @return [String] + attr_accessor :country + + # The type of the address. The type can be custom or predefined. + # Possible values include, but are not limited to, the following: + # * `home` + # * `work` + # * `other` + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The extended address of the address; for example, the apartment number. + # Corresponds to the JSON property `extendedAddress` + # @return [String] + attr_accessor :extended_address + + # The P.O. box of the address. + # Corresponds to the JSON property `poBox` + # @return [String] + attr_accessor :po_box + + # The postal code of the address. + # Corresponds to the JSON property `postalCode` + # @return [String] + attr_accessor :postal_code + + # The region of the address; for example, the state or province. + # Corresponds to the JSON property `region` + # @return [String] + attr_accessor :region + + # The street address. + # Corresponds to the JSON property `streetAddress` + # @return [String] + attr_accessor :street_address + + # Metadata about a field. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::PeopleV1::FieldMetadata] + attr_accessor :metadata + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @country_code = args[:country_code] if args.key?(:country_code) + @formatted_type = args[:formatted_type] if args.key?(:formatted_type) + @city = args[:city] if args.key?(:city) + @formatted_value = args[:formatted_value] if args.key?(:formatted_value) + @country = args[:country] if args.key?(:country) + @type = args[:type] if args.key?(:type) + @extended_address = args[:extended_address] if args.key?(:extended_address) + @po_box = args[:po_box] if args.key?(:po_box) + @postal_code = args[:postal_code] if args.key?(:postal_code) + @region = args[:region] if args.key?(:region) + @street_address = args[:street_address] if args.key?(:street_address) + @metadata = args[:metadata] if args.key?(:metadata) + end + end + + # A Google contact group membership. + class ContactGroupMembership + include Google::Apis::Core::Hashable + + # The contact group ID for the contact group membership. The contact group + # ID can be custom or predefined. Possible values include, but are not + # limited to, the following: + # * `myContacts` + # * `starred` + # * A numerical ID for user-created groups. + # Corresponds to the JSON property `contactGroupId` + # @return [String] + attr_accessor :contact_group_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @contact_group_id = args[:contact_group_id] if args.key?(:contact_group_id) + end + end + + # An event related to the person. + class Event + include Google::Apis::Core::Hashable + + # Metadata about a field. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::PeopleV1::FieldMetadata] + attr_accessor :metadata + + # The type of the event. The type can be custom or predefined. + # Possible values include, but are not limited to, the following: + # * `anniversary` + # * `other` + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # Represents a whole calendar date, for example a date of birth. The time + # of day and time zone are either specified elsewhere or are not + # significant. The date is relative to the + # [Proleptic Gregorian Calendar](https://en.wikipedia.org/wiki/ + # Proleptic_Gregorian_calendar). + # The day may be 0 to represent a year and month where the day is not + # significant. The year may be 0 to represent a month and day independent + # of year; for example, anniversary date. + # Corresponds to the JSON property `date` + # @return [Google::Apis::PeopleV1::Date] + attr_accessor :date + + # The read-only type of the event translated and formatted in the + # viewer's account locale or the `Accept-Language` HTTP header locale. + # Corresponds to the JSON property `formattedType` + # @return [String] + attr_accessor :formatted_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @metadata = args[:metadata] if args.key?(:metadata) + @type = args[:type] if args.key?(:type) + @date = args[:date] if args.key?(:date) + @formatted_type = args[:formatted_type] if args.key?(:formatted_type) + end + end + + # The read-only metadata about a person. + class PersonMetadata + include Google::Apis::Core::Hashable + + # DEPRECATED(Please read person.metadata.sources.profile_metadata instead). + # The type of the person object. + # Corresponds to the JSON property `objectType` + # @return [String] + attr_accessor :object_type + + # Resource names of people linked to this resource. + # Corresponds to the JSON property `linkedPeopleResourceNames` + # @return [Array] + attr_accessor :linked_people_resource_names + + # The sources of data for the person. + # Corresponds to the JSON property `sources` + # @return [Array] + attr_accessor :sources + + # Any former resource names this person has had. Populated only for + # [`connections.list`](/people/api/rest/v1/people.connections/list) requests + # that include a sync token. + # The resource name may change when adding or removing fields that link a + # contact and profile such as a verified email, verified phone number, or + # profile URL. + # Corresponds to the JSON property `previousResourceNames` + # @return [Array] + attr_accessor :previous_resource_names + + # True if the person resource has been deleted. Populated only for + # [`connections.list`](/people/api/rest/v1/people.connections/list) requests + # that include a sync token. + # Corresponds to the JSON property `deleted` + # @return [Boolean] + attr_accessor :deleted + alias_method :deleted?, :deleted + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @object_type = args[:object_type] if args.key?(:object_type) + @linked_people_resource_names = args[:linked_people_resource_names] if args.key?(:linked_people_resource_names) + @sources = args[:sources] if args.key?(:sources) + @previous_resource_names = args[:previous_resource_names] if args.key?(:previous_resource_names) + @deleted = args[:deleted] if args.key?(:deleted) + end + end + + # The read-only metadata about a profile. + class ProfileMetadata + include Google::Apis::Core::Hashable + + # The profile object type. + # Corresponds to the JSON property `objectType` + # @return [String] + attr_accessor :object_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @object_type = args[:object_type] if args.key?(:object_type) + end + end + + # A person's gender. + class Gender + include Google::Apis::Core::Hashable + + # The read-only value of the gender translated and formatted in the viewer's + # account locale or the `Accept-Language` HTTP header locale. + # Corresponds to the JSON property `formattedValue` + # @return [String] + attr_accessor :formatted_value + + # Metadata about a field. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::PeopleV1::FieldMetadata] + attr_accessor :metadata + + # The gender for the person. The gender can be custom or predefined. + # Possible values include, but are not limited to, the + # following: + # * `male` + # * `female` + # * `other` + # * `unknown` + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @formatted_value = args[:formatted_value] if args.key?(:formatted_value) + @metadata = args[:metadata] if args.key?(:metadata) + @value = args[:value] if args.key?(:value) + end + end + + # A person's associated URLs. + class Url + include Google::Apis::Core::Hashable + + # Metadata about a field. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::PeopleV1::FieldMetadata] + attr_accessor :metadata + + # The type of the URL. The type can be custom or predefined. + # Possible values include, but are not limited to, the following: + # * `home` + # * `work` + # * `blog` + # * `profile` + # * `homePage` + # * `ftp` + # * `reservations` + # * `appInstallPage`: website for a Google+ application. + # * `other` + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The URL. + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + + # The read-only type of the URL translated and formatted in the viewer's + # account locale or the `Accept-Language` HTTP header locale. + # Corresponds to the JSON property `formattedType` + # @return [String] + attr_accessor :formatted_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @metadata = args[:metadata] if args.key?(:metadata) + @type = args[:type] if args.key?(:type) + @value = args[:value] if args.key?(:value) + @formatted_type = args[:formatted_type] if args.key?(:formatted_type) + end + end + + # A person's read-only cover photo. A large image shown on the person's + # profile page that represents who they are or what they care about. + class CoverPhoto + include Google::Apis::Core::Hashable + + # Metadata about a field. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::PeopleV1::FieldMetadata] + attr_accessor :metadata + + # True if the cover photo is the default cover photo; + # false if the cover photo is a user-provided cover photo. + # Corresponds to the JSON property `default` + # @return [Boolean] + attr_accessor :default + alias_method :default?, :default + + # The URL of the cover photo. + # Corresponds to the JSON property `url` + # @return [String] + attr_accessor :url + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @metadata = args[:metadata] if args.key?(:metadata) + @default = args[:default] if args.key?(:default) + @url = args[:url] if args.key?(:url) + end + end + + # One of the person's interests. + class Interest + include Google::Apis::Core::Hashable + + # Metadata about a field. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::PeopleV1::FieldMetadata] + attr_accessor :metadata + + # The interest; for example, `stargazing`. + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @metadata = args[:metadata] if args.key?(:metadata) + @value = args[:value] if args.key?(:value) + end + end + + # A person's instant messaging client. + class ImClient + include Google::Apis::Core::Hashable + + # The read-only protocol of the IM client formatted in the viewer's account + # locale or the `Accept-Language` HTTP header locale. + # Corresponds to the JSON property `formattedProtocol` + # @return [String] + attr_accessor :formatted_protocol + + # The read-only type of the IM client translated and formatted in the + # viewer's account locale or the `Accept-Language` HTTP header locale. + # Corresponds to the JSON property `formattedType` + # @return [String] + attr_accessor :formatted_type + + # Metadata about a field. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::PeopleV1::FieldMetadata] + attr_accessor :metadata + + # The type of the IM client. The type can be custom or predefined. + # Possible values include, but are not limited to, the following: + # * `home` + # * `work` + # * `other` + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The protocol of the IM client. The protocol can be custom or predefined. + # Possible values include, but are not limited to, the following: + # * `aim` + # * `msn` + # * `yahoo` + # * `skype` + # * `qq` + # * `googleTalk` + # * `icq` + # * `jabber` + # * `netMeeting` + # Corresponds to the JSON property `protocol` + # @return [String] + attr_accessor :protocol + + # The user name used in the IM client. + # Corresponds to the JSON property `username` + # @return [String] + attr_accessor :username + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @formatted_protocol = args[:formatted_protocol] if args.key?(:formatted_protocol) + @formatted_type = args[:formatted_type] if args.key?(:formatted_type) + @metadata = args[:metadata] if args.key?(:metadata) + @type = args[:type] if args.key?(:type) + @protocol = args[:protocol] if args.key?(:protocol) + @username = args[:username] if args.key?(:username) + end + end + + # A person's email address. + class EmailAddress + include Google::Apis::Core::Hashable + + # The email address. + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + + # The read-only type of the email address translated and formatted in the + # viewer's account locale or the `Accept-Language` HTTP header locale. + # Corresponds to the JSON property `formattedType` + # @return [String] + attr_accessor :formatted_type + + # The display name of the email. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Metadata about a field. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::PeopleV1::FieldMetadata] + attr_accessor :metadata + + # The type of the email address. The type can be custom or predefined. + # Possible values include, but are not limited to, the following: + # * `home` + # * `work` + # * `other` + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @value = args[:value] if args.key?(:value) + @formatted_type = args[:formatted_type] if args.key?(:formatted_type) + @display_name = args[:display_name] if args.key?(:display_name) + @metadata = args[:metadata] if args.key?(:metadata) + @type = args[:type] if args.key?(:type) + end + end + + # A person's nickname. + class Nickname + include Google::Apis::Core::Hashable + + # The nickname. + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + + # Metadata about a field. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::PeopleV1::FieldMetadata] + attr_accessor :metadata + + # The type of the nickname. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @value = args[:value] if args.key?(:value) + @metadata = args[:metadata] if args.key?(:metadata) + @type = args[:type] if args.key?(:type) + end + end + + # A skill that the person has. + class Skill + include Google::Apis::Core::Hashable + + # The skill; for example, `underwater basket weaving`. + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + + # Metadata about a field. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::PeopleV1::FieldMetadata] + attr_accessor :metadata + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @value = args[:value] if args.key?(:value) + @metadata = args[:metadata] if args.key?(:metadata) + end + end + + # A Google Apps Domain membership. + class DomainMembership + include Google::Apis::Core::Hashable + + # True if the person is in the viewer's Google Apps domain. + # Corresponds to the JSON property `inViewerDomain` + # @return [Boolean] + attr_accessor :in_viewer_domain + alias_method :in_viewer_domain?, :in_viewer_domain + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @in_viewer_domain = args[:in_viewer_domain] if args.key?(:in_viewer_domain) + end + end + + # A person's read-only membership in a group. + class Membership + include Google::Apis::Core::Hashable + + # Metadata about a field. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::PeopleV1::FieldMetadata] + attr_accessor :metadata + + # A Google contact group membership. + # Corresponds to the JSON property `contactGroupMembership` + # @return [Google::Apis::PeopleV1::ContactGroupMembership] + attr_accessor :contact_group_membership + + # A Google Apps Domain membership. + # Corresponds to the JSON property `domainMembership` + # @return [Google::Apis::PeopleV1::DomainMembership] + attr_accessor :domain_membership + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @metadata = args[:metadata] if args.key?(:metadata) + @contact_group_membership = args[:contact_group_membership] if args.key?(:contact_group_membership) + @domain_membership = args[:domain_membership] if args.key?(:domain_membership) + end + end + + # A person's read-only relationship status. + class RelationshipStatus + include Google::Apis::Core::Hashable + + # The read-only value of the relationship status translated and formatted in + # the viewer's account locale or the `Accept-Language` HTTP header locale. + # Corresponds to the JSON property `formattedValue` + # @return [String] + attr_accessor :formatted_value + + # Metadata about a field. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::PeopleV1::FieldMetadata] + attr_accessor :metadata + + # The relationship status. The value can be custom or predefined. + # Possible values include, but are not limited to, the following: + # * `single` + # * `inARelationship` + # * `engaged` + # * `married` + # * `itsComplicated` + # * `openRelationship` + # * `widowed` + # * `inDomesticPartnership` + # * `inCivilUnion` + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @formatted_value = args[:formatted_value] if args.key?(:formatted_value) + @metadata = args[:metadata] if args.key?(:metadata) + @value = args[:value] if args.key?(:value) + end + end + + # Represents a whole calendar date, for example a date of birth. The time + # of day and time zone are either specified elsewhere or are not + # significant. The date is relative to the + # [Proleptic Gregorian Calendar](https://en.wikipedia.org/wiki/ + # Proleptic_Gregorian_calendar). + # The day may be 0 to represent a year and month where the day is not + # significant. The year may be 0 to represent a month and day independent + # of year; for example, anniversary date. + class Date + include Google::Apis::Core::Hashable + + # Year of date. Must be from 1 to 9999, or 0 if specifying a date without + # a year. + # Corresponds to the JSON property `year` + # @return [Fixnum] + attr_accessor :year + + # Day of month. Must be from 1 to 31 and valid for the year and month, or 0 + # if specifying a year/month where the day is not significant. + # Corresponds to the JSON property `day` + # @return [Fixnum] + attr_accessor :day + + # Month of year. Must be from 1 to 12. + # Corresponds to the JSON property `month` + # @return [Fixnum] + attr_accessor :month + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @year = args[:year] if args.key?(:year) + @day = args[:day] if args.key?(:day) + @month = args[:month] if args.key?(:month) + end + end + + # A read-only brief one-line description of the person. + class Tagline + include Google::Apis::Core::Hashable + + # The tagline. + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + + # Metadata about a field. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::PeopleV1::FieldMetadata] + attr_accessor :metadata + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @value = args[:value] if args.key?(:value) + @metadata = args[:metadata] if args.key?(:metadata) + end + end + + # A person's name. If the name is a mononym, the family name is empty. + class Name + include Google::Apis::Core::Hashable + + # The honorific prefixes spelled as they sound. + # Corresponds to the JSON property `phoneticHonorificPrefix` + # @return [String] + attr_accessor :phonetic_honorific_prefix + + # The given name spelled as it sounds. + # Corresponds to the JSON property `phoneticGivenName` + # @return [String] + attr_accessor :phonetic_given_name + + # The family name spelled as it sounds. + # Corresponds to the JSON property `phoneticFamilyName` + # @return [String] + attr_accessor :phonetic_family_name + + # The family name. + # Corresponds to the JSON property `familyName` + # @return [String] + attr_accessor :family_name + + # Metadata about a field. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::PeopleV1::FieldMetadata] + attr_accessor :metadata + + # The middle name(s) spelled as they sound. + # Corresponds to the JSON property `phoneticMiddleName` + # @return [String] + attr_accessor :phonetic_middle_name + + # The full name spelled as it sounds. + # Corresponds to the JSON property `phoneticFullName` + # @return [String] + attr_accessor :phonetic_full_name + + # The read-only display name with the last name first formatted according to + # the locale specified by the viewer's account or the + # Accept-Language HTTP header. + # Corresponds to the JSON property `displayNameLastFirst` + # @return [String] + attr_accessor :display_name_last_first + + # The read-only display name formatted according to the locale specified by + # the viewer's account or the Accept-Language HTTP header. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # The honorific suffixes, such as `Jr.` + # Corresponds to the JSON property `honorificSuffix` + # @return [String] + attr_accessor :honorific_suffix + + # The honorific prefixes, such as `Mrs.` or `Dr.` + # Corresponds to the JSON property `honorificPrefix` + # @return [String] + attr_accessor :honorific_prefix + + # The honorific suffixes spelled as they sound. + # Corresponds to the JSON property `phoneticHonorificSuffix` + # @return [String] + attr_accessor :phonetic_honorific_suffix + + # The middle name(s). + # Corresponds to the JSON property `middleName` + # @return [String] + attr_accessor :middle_name + + # The given name. + # Corresponds to the JSON property `givenName` + # @return [String] + attr_accessor :given_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @phonetic_honorific_prefix = args[:phonetic_honorific_prefix] if args.key?(:phonetic_honorific_prefix) + @phonetic_given_name = args[:phonetic_given_name] if args.key?(:phonetic_given_name) + @phonetic_family_name = args[:phonetic_family_name] if args.key?(:phonetic_family_name) + @family_name = args[:family_name] if args.key?(:family_name) + @metadata = args[:metadata] if args.key?(:metadata) + @phonetic_middle_name = args[:phonetic_middle_name] if args.key?(:phonetic_middle_name) + @phonetic_full_name = args[:phonetic_full_name] if args.key?(:phonetic_full_name) + @display_name_last_first = args[:display_name_last_first] if args.key?(:display_name_last_first) + @display_name = args[:display_name] if args.key?(:display_name) + @honorific_suffix = args[:honorific_suffix] if args.key?(:honorific_suffix) + @honorific_prefix = args[:honorific_prefix] if args.key?(:honorific_prefix) + @phonetic_honorific_suffix = args[:phonetic_honorific_suffix] if args.key?(:phonetic_honorific_suffix) + @middle_name = args[:middle_name] if args.key?(:middle_name) + @given_name = args[:given_name] if args.key?(:given_name) + end + end + + # A person's bragging rights. + class BraggingRights + include Google::Apis::Core::Hashable + + # Metadata about a field. + # Corresponds to the JSON property `metadata` + # @return [Google::Apis::PeopleV1::FieldMetadata] + attr_accessor :metadata + + # The bragging rights; for example, `climbed mount everest`. + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @metadata = args[:metadata] if args.key?(:metadata) + @value = args[:value] if args.key?(:value) + end + end end end end diff --git a/generated/google/apis/people_v1/representations.rb b/generated/google/apis/people_v1/representations.rb index 5742a6a22..89e2554ae 100644 --- a/generated/google/apis/people_v1/representations.rb +++ b/generated/google/apis/people_v1/representations.rb @@ -22,156 +22,6 @@ module Google module Apis module PeopleV1 - class Photo - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PhoneNumber - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ListConnectionsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Birthday - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Residence - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Address - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ContactGroupMembership - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PersonMetadata - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Event - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ProfileMetadata - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Url - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Gender - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CoverPhoto - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ImClient - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Interest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class EmailAddress - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Nickname - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Skill - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DomainMembership - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Membership - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class RelationshipStatus - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Date - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Tagline - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Name - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BraggingRights - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class Locale class Representation < Google::Apis::Core::JsonRepresentation; end @@ -245,273 +95,153 @@ module Google end class Photo - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :url, as: 'url' - end + include Google::Apis::Core::JsonObjectSupport end class PhoneNumber - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :formatted_type, as: 'formattedType' - property :canonical_form, as: 'canonicalForm' - property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :type, as: 'type' - property :value, as: 'value' - end + include Google::Apis::Core::JsonObjectSupport end class ListConnectionsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :connections, as: 'connections', class: Google::Apis::PeopleV1::Person, decorator: Google::Apis::PeopleV1::Person::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :next_sync_token, as: 'nextSyncToken' - end + include Google::Apis::Core::JsonObjectSupport end class Birthday - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :text, as: 'text' - property :date, as: 'date', class: Google::Apis::PeopleV1::Date, decorator: Google::Apis::PeopleV1::Date::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class Residence - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :current, as: 'current' - property :value, as: 'value' - end + include Google::Apis::Core::JsonObjectSupport end class Address - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :formatted_type, as: 'formattedType' - property :city, as: 'city' - property :formatted_value, as: 'formattedValue' - property :country, as: 'country' - property :type, as: 'type' - property :extended_address, as: 'extendedAddress' - property :po_box, as: 'poBox' - property :postal_code, as: 'postalCode' - property :region, as: 'region' - property :street_address, as: 'streetAddress' - property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :country_code, as: 'countryCode' - end + include Google::Apis::Core::JsonObjectSupport end class ContactGroupMembership - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :contact_group_id, as: 'contactGroupId' - end - end + class Representation < Google::Apis::Core::JsonRepresentation; end - class PersonMetadata - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :sources, as: 'sources', class: Google::Apis::PeopleV1::Source, decorator: Google::Apis::PeopleV1::Source::Representation - - collection :previous_resource_names, as: 'previousResourceNames' - property :deleted, as: 'deleted' - property :object_type, as: 'objectType' - collection :linked_people_resource_names, as: 'linkedPeopleResourceNames' - end + include Google::Apis::Core::JsonObjectSupport end class Event - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :formatted_type, as: 'formattedType' - property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :type, as: 'type' - property :date, as: 'date', class: Google::Apis::PeopleV1::Date, decorator: Google::Apis::PeopleV1::Date::Representation + include Google::Apis::Core::JsonObjectSupport + end - end + class PersonMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ProfileMetadata - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :object_type, as: 'objectType' - end - end + class Representation < Google::Apis::Core::JsonRepresentation; end - class Url - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation - - property :type, as: 'type' - property :value, as: 'value' - property :formatted_type, as: 'formattedType' - end + include Google::Apis::Core::JsonObjectSupport end class Gender - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :value, as: 'value' - property :formatted_value, as: 'formattedValue' - end + include Google::Apis::Core::JsonObjectSupport + end + + class Url + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class CoverPhoto - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :default, as: 'default' - property :url, as: 'url' - end - end - - class ImClient - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :formatted_protocol, as: 'formattedProtocol' - property :formatted_type, as: 'formattedType' - property :protocol, as: 'protocol' - property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation - - property :type, as: 'type' - property :username, as: 'username' - end + include Google::Apis::Core::JsonObjectSupport end class Interest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :value, as: 'value' - end + include Google::Apis::Core::JsonObjectSupport + end + + class ImClient + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class EmailAddress - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :display_name, as: 'displayName' - property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :type, as: 'type' - property :value, as: 'value' - property :formatted_type, as: 'formattedType' - end + include Google::Apis::Core::JsonObjectSupport end class Nickname - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :type, as: 'type' - property :value, as: 'value' - end + include Google::Apis::Core::JsonObjectSupport end class Skill - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :value, as: 'value' - end + include Google::Apis::Core::JsonObjectSupport end class DomainMembership - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :in_viewer_domain, as: 'inViewerDomain' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Membership - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :contact_group_membership, as: 'contactGroupMembership', class: Google::Apis::PeopleV1::ContactGroupMembership, decorator: Google::Apis::PeopleV1::ContactGroupMembership::Representation - - property :domain_membership, as: 'domainMembership', class: Google::Apis::PeopleV1::DomainMembership, decorator: Google::Apis::PeopleV1::DomainMembership::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class RelationshipStatus - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :value, as: 'value' - property :formatted_value, as: 'formattedValue' - end + include Google::Apis::Core::JsonObjectSupport end class Date - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :year, as: 'year' - property :day, as: 'day' - property :month, as: 'month' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class Tagline - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :value, as: 'value' - end + include Google::Apis::Core::JsonObjectSupport end class Name - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :honorific_prefix, as: 'honorificPrefix' - property :phonetic_honorific_suffix, as: 'phoneticHonorificSuffix' - property :middle_name, as: 'middleName' - property :given_name, as: 'givenName' - property :phonetic_honorific_prefix, as: 'phoneticHonorificPrefix' - property :phonetic_given_name, as: 'phoneticGivenName' - property :phonetic_family_name, as: 'phoneticFamilyName' - property :family_name, as: 'familyName' - property :phonetic_middle_name, as: 'phoneticMiddleName' - property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :phonetic_full_name, as: 'phoneticFullName' - property :display_name_last_first, as: 'displayNameLastFirst' - property :display_name, as: 'displayName' - property :honorific_suffix, as: 'honorificSuffix' - end + include Google::Apis::Core::JsonObjectSupport end class BraggingRights - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :value, as: 'value' - end + include Google::Apis::Core::JsonObjectSupport end class Locale @@ -526,13 +256,13 @@ module Google class Organization # @private class Representation < Google::Apis::Core::JsonRepresentation + property :formatted_type, as: 'formattedType' property :start_date, as: 'startDate', class: Google::Apis::PeopleV1::Date, decorator: Google::Apis::PeopleV1::Date::Representation - property :formatted_type, as: 'formattedType' property :domain, as: 'domain' property :department, as: 'department' - property :phonetic_name, as: 'phoneticName' property :type, as: 'type' + property :phonetic_name, as: 'phoneticName' property :job_description, as: 'jobDescription' property :end_date, as: 'endDate', class: Google::Apis::PeopleV1::Date, decorator: Google::Apis::PeopleV1::Date::Representation @@ -540,8 +270,8 @@ module Google property :name, as: 'name' property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation - property :location, as: 'location' property :title, as: 'title' + property :location, as: 'location' property :current, as: 'current' end end @@ -549,10 +279,10 @@ module Google class Biography # @private class Representation < Google::Apis::Core::JsonRepresentation - property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation - property :value, as: 'value' property :content_type, as: 'contentType' + property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + end end @@ -568,10 +298,10 @@ module Google class FieldMetadata # @private class Representation < Google::Apis::Core::JsonRepresentation - property :verified, as: 'verified' property :primary, as: 'primary' property :source, as: 'source', class: Google::Apis::PeopleV1::Source, decorator: Google::Apis::PeopleV1::Source::Representation + property :verified, as: 'verified' end end @@ -598,11 +328,11 @@ module Google class Source # @private class Representation < Google::Apis::Core::JsonRepresentation + property :etag, as: 'etag' + property :id, as: 'id' property :profile_metadata, as: 'profileMetadata', class: Google::Apis::PeopleV1::ProfileMetadata, decorator: Google::Apis::PeopleV1::ProfileMetadata::Representation property :type, as: 'type' - property :etag, as: 'etag' - property :id, as: 'id' end end @@ -629,20 +359,10 @@ module Google class Person # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :birthdays, as: 'birthdays', class: Google::Apis::PeopleV1::Birthday, decorator: Google::Apis::PeopleV1::Birthday::Representation - - collection :locales, as: 'locales', class: Google::Apis::PeopleV1::Locale, decorator: Google::Apis::PeopleV1::Locale::Representation - - collection :relationship_interests, as: 'relationshipInterests', class: Google::Apis::PeopleV1::RelationshipInterest, decorator: Google::Apis::PeopleV1::RelationshipInterest::Representation - - collection :urls, as: 'urls', class: Google::Apis::PeopleV1::Url, decorator: Google::Apis::PeopleV1::Url::Representation - - collection :nicknames, as: 'nicknames', class: Google::Apis::PeopleV1::Nickname, decorator: Google::Apis::PeopleV1::Nickname::Representation + collection :relations, as: 'relations', class: Google::Apis::PeopleV1::Relation, decorator: Google::Apis::PeopleV1::Relation::Representation collection :names, as: 'names', class: Google::Apis::PeopleV1::Name, decorator: Google::Apis::PeopleV1::Name::Representation - collection :relations, as: 'relations', class: Google::Apis::PeopleV1::Relation, decorator: Google::Apis::PeopleV1::Relation::Representation - collection :occupations, as: 'occupations', class: Google::Apis::PeopleV1::Occupation, decorator: Google::Apis::PeopleV1::Occupation::Representation collection :email_addresses, as: 'emailAddresses', class: Google::Apis::PeopleV1::EmailAddress, decorator: Google::Apis::PeopleV1::EmailAddress::Representation @@ -686,6 +406,16 @@ module Google collection :im_clients, as: 'imClients', class: Google::Apis::PeopleV1::ImClient, decorator: Google::Apis::PeopleV1::ImClient::Representation + collection :birthdays, as: 'birthdays', class: Google::Apis::PeopleV1::Birthday, decorator: Google::Apis::PeopleV1::Birthday::Representation + + collection :locales, as: 'locales', class: Google::Apis::PeopleV1::Locale, decorator: Google::Apis::PeopleV1::Locale::Representation + + collection :relationship_interests, as: 'relationshipInterests', class: Google::Apis::PeopleV1::RelationshipInterest, decorator: Google::Apis::PeopleV1::RelationshipInterest::Representation + + collection :urls, as: 'urls', class: Google::Apis::PeopleV1::Url, decorator: Google::Apis::PeopleV1::Url::Representation + + collection :nicknames, as: 'nicknames', class: Google::Apis::PeopleV1::Nickname, decorator: Google::Apis::PeopleV1::Nickname::Representation + end end @@ -696,6 +426,277 @@ module Google end end + + class Photo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + + property :url, as: 'url' + end + end + + class PhoneNumber + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + + property :type, as: 'type' + property :value, as: 'value' + property :formatted_type, as: 'formattedType' + property :canonical_form, as: 'canonicalForm' + end + end + + class ListConnectionsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :connections, as: 'connections', class: Google::Apis::PeopleV1::Person, decorator: Google::Apis::PeopleV1::Person::Representation + + property :next_sync_token, as: 'nextSyncToken' + property :total_people, as: 'totalPeople' + end + end + + class Birthday + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + + property :text, as: 'text' + property :date, as: 'date', class: Google::Apis::PeopleV1::Date, decorator: Google::Apis::PeopleV1::Date::Representation + + end + end + + class Residence + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + + property :current, as: 'current' + property :value, as: 'value' + end + end + + class Address + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :country_code, as: 'countryCode' + property :formatted_type, as: 'formattedType' + property :city, as: 'city' + property :formatted_value, as: 'formattedValue' + property :country, as: 'country' + property :type, as: 'type' + property :extended_address, as: 'extendedAddress' + property :po_box, as: 'poBox' + property :postal_code, as: 'postalCode' + property :region, as: 'region' + property :street_address, as: 'streetAddress' + property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + + end + end + + class ContactGroupMembership + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :contact_group_id, as: 'contactGroupId' + end + end + + class Event + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + + property :type, as: 'type' + property :date, as: 'date', class: Google::Apis::PeopleV1::Date, decorator: Google::Apis::PeopleV1::Date::Representation + + property :formatted_type, as: 'formattedType' + end + end + + class PersonMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :object_type, as: 'objectType' + collection :linked_people_resource_names, as: 'linkedPeopleResourceNames' + collection :sources, as: 'sources', class: Google::Apis::PeopleV1::Source, decorator: Google::Apis::PeopleV1::Source::Representation + + collection :previous_resource_names, as: 'previousResourceNames' + property :deleted, as: 'deleted' + end + end + + class ProfileMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :object_type, as: 'objectType' + end + end + + class Gender + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :formatted_value, as: 'formattedValue' + property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + + property :value, as: 'value' + end + end + + class Url + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + + property :type, as: 'type' + property :value, as: 'value' + property :formatted_type, as: 'formattedType' + end + end + + class CoverPhoto + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + + property :default, as: 'default' + property :url, as: 'url' + end + end + + class Interest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + + property :value, as: 'value' + end + end + + class ImClient + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :formatted_protocol, as: 'formattedProtocol' + property :formatted_type, as: 'formattedType' + property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + + property :type, as: 'type' + property :protocol, as: 'protocol' + property :username, as: 'username' + end + end + + class EmailAddress + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :value, as: 'value' + property :formatted_type, as: 'formattedType' + property :display_name, as: 'displayName' + property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + + property :type, as: 'type' + end + end + + class Nickname + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :value, as: 'value' + property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + + property :type, as: 'type' + end + end + + class Skill + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :value, as: 'value' + property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + + end + end + + class DomainMembership + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :in_viewer_domain, as: 'inViewerDomain' + end + end + + class Membership + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + + property :contact_group_membership, as: 'contactGroupMembership', class: Google::Apis::PeopleV1::ContactGroupMembership, decorator: Google::Apis::PeopleV1::ContactGroupMembership::Representation + + property :domain_membership, as: 'domainMembership', class: Google::Apis::PeopleV1::DomainMembership, decorator: Google::Apis::PeopleV1::DomainMembership::Representation + + end + end + + class RelationshipStatus + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :formatted_value, as: 'formattedValue' + property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + + property :value, as: 'value' + end + end + + class Date + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :year, as: 'year' + property :day, as: 'day' + property :month, as: 'month' + end + end + + class Tagline + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :value, as: 'value' + property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + + end + end + + class Name + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :phonetic_honorific_prefix, as: 'phoneticHonorificPrefix' + property :phonetic_given_name, as: 'phoneticGivenName' + property :phonetic_family_name, as: 'phoneticFamilyName' + property :family_name, as: 'familyName' + property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + + property :phonetic_middle_name, as: 'phoneticMiddleName' + property :phonetic_full_name, as: 'phoneticFullName' + property :display_name_last_first, as: 'displayNameLastFirst' + property :display_name, as: 'displayName' + property :honorific_suffix, as: 'honorificSuffix' + property :honorific_prefix, as: 'honorificPrefix' + property :phonetic_honorific_suffix, as: 'phoneticHonorificSuffix' + property :middle_name, as: 'middleName' + property :given_name, as: 'givenName' + end + end + + class BraggingRights + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :metadata, as: 'metadata', class: Google::Apis::PeopleV1::FieldMetadata, decorator: Google::Apis::PeopleV1::FieldMetadata::Representation + + property :value, as: 'value' + end + end end end end diff --git a/generated/google/apis/people_v1/service.rb b/generated/google/apis/people_v1/service.rb index 318307311..830e66732 100644 --- a/generated/google/apis/people_v1/service.rb +++ b/generated/google/apis/people_v1/service.rb @@ -61,11 +61,11 @@ module Google # [`people.connections.list`](/people/api/rest/v1/people.connections/list), # of one of the people to provide information about. You can include this # parameter up to 50 times in one request. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -78,14 +78,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_people(request_mask_include_field: nil, resource_names: nil, fields: nil, quota_user: nil, options: nil, &block) + def get_people(request_mask_include_field: nil, resource_names: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/people:batchGet', options) command.response_representation = Google::Apis::PeopleV1::GetPeopleResponse::Representation command.response_class = Google::Apis::PeopleV1::GetPeopleResponse command.query['requestMask.includeField'] = request_mask_include_field unless request_mask_include_field.nil? command.query['resourceNames'] = resource_names unless resource_names.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -104,11 +104,11 @@ module Google # photo, and profile url. # Each path should start with `person.`: for example, `person.names` or # `person.photos`. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -121,14 +121,14 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_person(resource_name, request_mask_include_field: nil, fields: nil, quota_user: nil, options: nil, &block) + def get_person(resource_name, request_mask_include_field: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+resourceName}', options) command.response_representation = Google::Apis::PeopleV1::Person::Representation command.response_class = Google::Apis::PeopleV1::Person command.params['resourceName'] = resource_name unless resource_name.nil? command.query['requestMask.includeField'] = request_mask_include_field unless request_mask_include_field.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -136,6 +136,9 @@ module Google # linked profiles. # @param [String] resource_name # The resource name to return connections for. Only `people/me` is valid. + # @param [String] sync_token + # A sync token, returned by a previous call to `people.connections.list`. + # Only resources changed since the sync token was created will be returned. # @param [String] sort_order # The order in which the connections should be sorted. Defaults to # `LAST_MODIFIED_ASCENDING`. @@ -144,6 +147,9 @@ module Google # all changes since the last request. # @param [String] page_token # The token of the page to be returned. + # @param [Fixnum] page_size + # The number of connections to include in the response. Valid values are + # between 1 and 500, inclusive. Defaults to 100. # @param [String] request_mask_include_field # Comma-separated list of fields to be included in the response. Omitting # this field will include all fields except for connections.list requests, @@ -151,17 +157,11 @@ module Google # photo, and profile url. # Each path should start with `person.`: for example, `person.names` or # `person.photos`. - # @param [Fixnum] page_size - # The number of connections to include in the response. Valid values are - # between 1 and 500, inclusive. Defaults to 100. - # @param [String] sync_token - # A sync token, returned by a previous call to `people.connections.list`. - # Only resources changed since the sync token was created will be returned. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -174,19 +174,19 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_person_connections(resource_name, sort_order: nil, request_sync_token: nil, page_token: nil, request_mask_include_field: nil, page_size: nil, sync_token: nil, fields: nil, quota_user: nil, options: nil, &block) + def list_person_connections(resource_name, sync_token: nil, sort_order: nil, request_sync_token: nil, page_token: nil, page_size: nil, request_mask_include_field: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+resourceName}/connections', options) command.response_representation = Google::Apis::PeopleV1::ListConnectionsResponse::Representation command.response_class = Google::Apis::PeopleV1::ListConnectionsResponse command.params['resourceName'] = resource_name unless resource_name.nil? + command.query['syncToken'] = sync_token unless sync_token.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['requestSyncToken'] = request_sync_token unless request_sync_token.nil? command.query['pageToken'] = page_token unless page_token.nil? - command.query['requestMask.includeField'] = request_mask_include_field unless request_mask_include_field.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['syncToken'] = sync_token unless sync_token.nil? - command.query['fields'] = fields unless fields.nil? + command.query['requestMask.includeField'] = request_mask_include_field unless request_mask_include_field.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/plus_domains_v1.rb b/generated/google/apis/plus_domains_v1.rb index 44f585a6f..080a0b57f 100644 --- a/generated/google/apis/plus_domains_v1.rb +++ b/generated/google/apis/plus_domains_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/+/domains/ module PlusDomainsV1 VERSION = 'V1' - REVISION = '20170301' + REVISION = '20170322' # View your circles and the people and pages in them AUTH_PLUS_CIRCLES_READ = 'https://www.googleapis.com/auth/plus.circles.read' diff --git a/generated/google/apis/plus_v1.rb b/generated/google/apis/plus_v1.rb index b56142353..70a39cc30 100644 --- a/generated/google/apis/plus_v1.rb +++ b/generated/google/apis/plus_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/+/api/ module PlusV1 VERSION = 'V1' - REVISION = '20170301' + REVISION = '20170322' # Know the list of people in your circles, your age range, and language AUTH_PLUS_LOGIN = 'https://www.googleapis.com/auth/plus.login' diff --git a/generated/google/apis/proximitybeacon_v1beta1.rb b/generated/google/apis/proximitybeacon_v1beta1.rb index 6c4ae01b9..c08dc24c9 100644 --- a/generated/google/apis/proximitybeacon_v1beta1.rb +++ b/generated/google/apis/proximitybeacon_v1beta1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/beacons/proximity/ module ProximitybeaconV1beta1 VERSION = 'V1beta1' - REVISION = '20170220' + REVISION = '20170320' # View and modify your beacons AUTH_USERLOCATION_BEACON_REGISTRY = 'https://www.googleapis.com/auth/userlocation.beacon.registry' diff --git a/generated/google/apis/proximitybeacon_v1beta1/classes.rb b/generated/google/apis/proximitybeacon_v1beta1/classes.rb index bff7719c6..14c113c8a 100644 --- a/generated/google/apis/proximitybeacon_v1beta1/classes.rb +++ b/generated/google/apis/proximitybeacon_v1beta1/classes.rb @@ -26,17 +26,17 @@ module Google class ListBeaconsResponse include Google::Apis::Core::Hashable - # The beacons that matched the search criteria. - # Corresponds to the JSON property `beacons` - # @return [Array] - attr_accessor :beacons - # An opaque pagination token that the client may provide in their next # request to retrieve the next page of results. # Corresponds to the JSON property `nextPageToken` # @return [String] attr_accessor :next_page_token + # The beacons that matched the search criteria. + # Corresponds to the JSON property `beacons` + # @return [Array] + attr_accessor :beacons + # Estimate of the total number of beacons matched by the query. Higher # values may be less accurate. # Corresponds to the JSON property `totalCount` @@ -49,45 +49,12 @@ module Google # Update properties of this object def update!(**args) - @beacons = args[:beacons] if args.key?(:beacons) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @beacons = args[:beacons] if args.key?(:beacons) @total_count = args[:total_count] if args.key?(:total_count) end end - # Represents one beacon observed once. - class Observation - include Google::Apis::Core::Hashable - - # Defines a unique identifier of a beacon as broadcast by the device. - # Corresponds to the JSON property `advertisedId` - # @return [Google::Apis::ProximitybeaconV1beta1::AdvertisedId] - attr_accessor :advertised_id - - # The array of telemetry bytes received from the beacon. The server is - # responsible for parsing it. This field may frequently be empty, as - # with a beacon that transmits telemetry only occasionally. - # Corresponds to the JSON property `telemetry` - # @return [String] - attr_accessor :telemetry - - # Time when the beacon was observed. - # Corresponds to the JSON property `timestampMs` - # @return [String] - attr_accessor :timestamp_ms - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @advertised_id = args[:advertised_id] if args.key?(:advertised_id) - @telemetry = args[:telemetry] if args.key?(:telemetry) - @timestamp_ms = args[:timestamp_ms] if args.key?(:timestamp_ms) - end - end - # Diagnostics for a single beacon. class Diagnostics include Google::Apis::Core::Hashable @@ -97,12 +64,6 @@ module Google # @return [Array] attr_accessor :alerts - # Resource name of the beacon. For Eddystone-EID beacons, this may - # be the beacon's current EID, or the beacon's "stable" Eddystone-UID. - # Corresponds to the JSON property `beaconName` - # @return [String] - attr_accessor :beacon_name - # Represents a whole calendar date, e.g. date of birth. The time of day and # time zone are either specified elsewhere or are not significant. The date # is relative to the Proleptic Gregorian Calendar. The day may be 0 to @@ -114,6 +75,12 @@ module Google # @return [Google::Apis::ProximitybeaconV1beta1::Date] attr_accessor :estimated_low_battery_date + # Resource name of the beacon. For Eddystone-EID beacons, this may + # be the beacon's current EID, or the beacon's "stable" Eddystone-UID. + # Corresponds to the JSON property `beaconName` + # @return [String] + attr_accessor :beacon_name + def initialize(**args) update!(**args) end @@ -121,584 +88,8 @@ module Google # Update properties of this object def update!(**args) @alerts = args[:alerts] if args.key?(:alerts) - @beacon_name = args[:beacon_name] if args.key?(:beacon_name) @estimated_low_battery_date = args[:estimated_low_battery_date] if args.key?(:estimated_low_battery_date) - end - end - - # Defines a unique identifier of a beacon as broadcast by the device. - class AdvertisedId - include Google::Apis::Core::Hashable - - # Specifies the identifier type. - # Required. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The actual beacon identifier, as broadcast by the beacon hardware. Must be - # [base64](http://tools.ietf.org/html/rfc4648#section-4) encoded in HTTP - # requests, and will be so encoded (with padding) in responses. The base64 - # encoding should be of the binary byte-stream and not any textual (such as - # hex) representation thereof. - # Required. - # Corresponds to the JSON property `id` - # @return [String] - attr_accessor :id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] if args.key?(:type) - @id = args[:id] if args.key?(:id) - end - end - - # Response for a request to delete attachments. - class DeleteAttachmentsResponse - include Google::Apis::Core::Hashable - - # The number of attachments that were deleted. - # Corresponds to the JSON property `numDeleted` - # @return [Fixnum] - attr_accessor :num_deleted - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @num_deleted = args[:num_deleted] if args.key?(:num_deleted) - end - end - - # Write-only registration parameters for beacons using Eddystone-EID format. - # Two ways of securely registering an Eddystone-EID beacon with the service - # are supported: - # 1. Perform an ECDH key exchange via this API, including a previous call - # to `GET /v1beta1/eidparams`. In this case the fields - # `beacon_ecdh_public_key` and `service_ecdh_public_key` should be - # populated and `beacon_identity_key` should not be populated. This - # method ensures that only the two parties in the ECDH key exchange can - # compute the identity key, which becomes a secret between them. - # 2. Derive or obtain the beacon's identity key via other secure means - # (perhaps an ECDH key exchange between the beacon and a mobile device - # or any other secure method), and then submit the resulting identity key - # to the service. In this case `beacon_identity_key` field should be - # populated, and neither of `beacon_ecdh_public_key` nor - # `service_ecdh_public_key` fields should be. The security of this method - # depends on how securely the parties involved (in particular the - # bluetooth client) handle the identity key, and obviously on how - # securely the identity key was generated. - # See [the Eddystone specification](https://github.com/google/eddystone/tree/ - # master/eddystone-eid) at GitHub. - class EphemeralIdRegistration - include Google::Apis::Core::Hashable - - # The beacon's public key used for the Elliptic curve Diffie-Hellman - # key exchange. When this field is populated, `service_ecdh_public_key` - # must also be populated, and `beacon_identity_key` must not be. - # Corresponds to the JSON property `beaconEcdhPublicKey` - # @return [String] - attr_accessor :beacon_ecdh_public_key - - # The initial clock value of the beacon. The beacon's clock must have - # begun counting at this value immediately prior to transmitting this - # value to the resolving service. Significant delay in transmitting this - # value to the service risks registration or resolution failures. If a - # value is not provided, the default is zero. - # Corresponds to the JSON property `initialClockValue` - # @return [String] - attr_accessor :initial_clock_value - - # The private key of the beacon. If this field is populated, - # `beacon_ecdh_public_key` and `service_ecdh_public_key` must not be - # populated. - # Corresponds to the JSON property `beaconIdentityKey` - # @return [String] - attr_accessor :beacon_identity_key - - # The service's public key used for the Elliptic curve Diffie-Hellman - # key exchange. When this field is populated, `beacon_ecdh_public_key` - # must also be populated, and `beacon_identity_key` must not be. - # Corresponds to the JSON property `serviceEcdhPublicKey` - # @return [String] - attr_accessor :service_ecdh_public_key - - # Indicates the nominal period between each rotation of the beacon's - # ephemeral ID. "Nominal" because the beacon should randomize the - # actual interval. See [the spec at github](https://github.com/google/eddystone/ - # tree/master/eddystone-eid) - # for details. This value corresponds to a power-of-two scaler on the - # beacon's clock: when the scaler value is K, the beacon will begin - # broadcasting a new ephemeral ID on average every 2^K seconds. - # Corresponds to the JSON property `rotationPeriodExponent` - # @return [Fixnum] - attr_accessor :rotation_period_exponent - - # An initial ephemeral ID calculated using the clock value submitted as - # `initial_clock_value`, and the secret key generated by the - # Diffie-Hellman key exchange using `service_ecdh_public_key` and - # `service_ecdh_public_key`. This initial EID value will be used by the - # service to confirm that the key exchange process was successful. - # Corresponds to the JSON property `initialEid` - # @return [String] - attr_accessor :initial_eid - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @beacon_ecdh_public_key = args[:beacon_ecdh_public_key] if args.key?(:beacon_ecdh_public_key) - @initial_clock_value = args[:initial_clock_value] if args.key?(:initial_clock_value) - @beacon_identity_key = args[:beacon_identity_key] if args.key?(:beacon_identity_key) - @service_ecdh_public_key = args[:service_ecdh_public_key] if args.key?(:service_ecdh_public_key) - @rotation_period_exponent = args[:rotation_period_exponent] if args.key?(:rotation_period_exponent) - @initial_eid = args[:initial_eid] if args.key?(:initial_eid) - end - end - - # Response that contains the requested diagnostics. - class ListDiagnosticsResponse - include Google::Apis::Core::Hashable - - # Token that can be used for pagination. Returned only if the - # request matches more beacons than can be returned in this response. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The diagnostics matching the given request. - # Corresponds to the JSON property `diagnostics` - # @return [Array] - attr_accessor :diagnostics - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @diagnostics = args[:diagnostics] if args.key?(:diagnostics) - end - end - - # A subset of beacon information served via the `beaconinfo.getforobserved` - # method, which you call when users of your app encounter your beacons. - class BeaconInfo - include Google::Apis::Core::Hashable - - # Attachments matching the type(s) requested. - # May be empty if no attachment types were requested. - # Corresponds to the JSON property `attachments` - # @return [Array] - attr_accessor :attachments - - # The name under which the beacon is registered. - # Corresponds to the JSON property `beaconName` - # @return [String] - attr_accessor :beacon_name - - # Defines a unique identifier of a beacon as broadcast by the device. - # Corresponds to the JSON property `advertisedId` - # @return [Google::Apis::ProximitybeaconV1beta1::AdvertisedId] - attr_accessor :advertised_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @attachments = args[:attachments] if args.key?(:attachments) @beacon_name = args[:beacon_name] if args.key?(:beacon_name) - @advertised_id = args[:advertised_id] if args.key?(:advertised_id) - end - end - - # Indoor level, a human-readable string as returned by Google Maps APIs, - # useful to indicate which floor of a building a beacon is located on. - class IndoorLevel - include Google::Apis::Core::Hashable - - # The name of this level. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - end - end - - # Information a client needs to provision and register beacons that - # broadcast Eddystone-EID format beacon IDs, using Elliptic curve - # Diffie-Hellman key exchange. See - # [the Eddystone specification](https://github.com/google/eddystone/tree/master/ - # eddystone-eid) at GitHub. - class EphemeralIdRegistrationParams - include Google::Apis::Core::Hashable - - # The beacon service's public key for use by a beacon to derive its - # Identity Key using Elliptic Curve Diffie-Hellman key exchange. - # Corresponds to the JSON property `serviceEcdhPublicKey` - # @return [String] - attr_accessor :service_ecdh_public_key - - # Indicates the minimum rotation period supported by the service. - # See EddystoneEidRegistration.rotation_period_exponent - # Corresponds to the JSON property `minRotationPeriodExponent` - # @return [Fixnum] - attr_accessor :min_rotation_period_exponent - - # Indicates the maximum rotation period supported by the service. - # See EddystoneEidRegistration.rotation_period_exponent - # Corresponds to the JSON property `maxRotationPeriodExponent` - # @return [Fixnum] - attr_accessor :max_rotation_period_exponent - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @service_ecdh_public_key = args[:service_ecdh_public_key] if args.key?(:service_ecdh_public_key) - @min_rotation_period_exponent = args[:min_rotation_period_exponent] if args.key?(:min_rotation_period_exponent) - @max_rotation_period_exponent = args[:max_rotation_period_exponent] if args.key?(:max_rotation_period_exponent) - end - end - - # Response to `ListBeaconAttachments` that contains the requested attachments. - class ListBeaconAttachmentsResponse - include Google::Apis::Core::Hashable - - # The attachments that corresponded to the request params. - # Corresponds to the JSON property `attachments` - # @return [Array] - attr_accessor :attachments - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @attachments = args[:attachments] if args.key?(:attachments) - end - end - - # An attachment namespace defines read and write access for all the attachments - # created under it. Each namespace is globally unique, and owned by one - # project which is the only project that can create attachments under it. - class Namespace - include Google::Apis::Core::Hashable - - # Resource name of this namespace. Namespaces names have the format: - # namespaces/namespace. - # Corresponds to the JSON property `namespaceName` - # @return [String] - attr_accessor :namespace_name - - # Specifies what clients may receive attachments under this namespace - # via `beaconinfo.getforobserved`. - # Corresponds to the JSON property `servingVisibility` - # @return [String] - attr_accessor :serving_visibility - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @namespace_name = args[:namespace_name] if args.key?(:namespace_name) - @serving_visibility = args[:serving_visibility] if args.key?(:serving_visibility) - end - end - - # A subset of attachment information served via the - # `beaconinfo.getforobserved` method, used when your users encounter your - # beacons. - class AttachmentInfo - include Google::Apis::Core::Hashable - - # An opaque data container for client-provided data. - # Corresponds to the JSON property `data` - # @return [String] - attr_accessor :data - - # Specifies what kind of attachment this is. Tells a client how to - # interpret the `data` field. Format is namespace/type, for - # example scrupulous-wombat-12345/welcome-message - # Corresponds to the JSON property `namespacedType` - # @return [String] - attr_accessor :namespaced_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @data = args[:data] if args.key?(:data) - @namespaced_type = args[:namespaced_type] if args.key?(:namespaced_type) - end - end - - # Details of a beacon device. - class Beacon - include Google::Apis::Core::Hashable - - # Free text used to identify and describe the beacon. Maximum length 140 - # characters. - # Optional. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # Some beacons may require a user to provide an authorization key before - # changing any of its configuration (e.g. broadcast frames, transmit power). - # This field provides a place to store and control access to that key. - # This field is populated in responses to `GET /v1beta1/beacons/3!beaconId` - # from users with write access to the given beacon. That is to say: If the - # user is authorized to write the beacon's confidential data in the service, - # the service considers them authorized to configure the beacon. Note - # that this key grants nothing on the service, only on the beacon itself. - # Corresponds to the JSON property `provisioningKey` - # @return [String] - attr_accessor :provisioning_key - - # Current status of the beacon. - # Required. - # Corresponds to the JSON property `status` - # @return [String] - attr_accessor :status - - # Properties of the beacon device, for example battery type or firmware - # version. - # Optional. - # Corresponds to the JSON property `properties` - # @return [Hash] - attr_accessor :properties - - # Write-only registration parameters for beacons using Eddystone-EID format. - # Two ways of securely registering an Eddystone-EID beacon with the service - # are supported: - # 1. Perform an ECDH key exchange via this API, including a previous call - # to `GET /v1beta1/eidparams`. In this case the fields - # `beacon_ecdh_public_key` and `service_ecdh_public_key` should be - # populated and `beacon_identity_key` should not be populated. This - # method ensures that only the two parties in the ECDH key exchange can - # compute the identity key, which becomes a secret between them. - # 2. Derive or obtain the beacon's identity key via other secure means - # (perhaps an ECDH key exchange between the beacon and a mobile device - # or any other secure method), and then submit the resulting identity key - # to the service. In this case `beacon_identity_key` field should be - # populated, and neither of `beacon_ecdh_public_key` nor - # `service_ecdh_public_key` fields should be. The security of this method - # depends on how securely the parties involved (in particular the - # bluetooth client) handle the identity key, and obviously on how - # securely the identity key was generated. - # See [the Eddystone specification](https://github.com/google/eddystone/tree/ - # master/eddystone-eid) at GitHub. - # Corresponds to the JSON property `ephemeralIdRegistration` - # @return [Google::Apis::ProximitybeaconV1beta1::EphemeralIdRegistration] - attr_accessor :ephemeral_id_registration - - # The [Google Places API](/places/place-id) Place ID of the place where - # the beacon is deployed. This is given when the beacon is registered or - # updated, not automatically detected in any way. - # Optional. - # Corresponds to the JSON property `placeId` - # @return [String] - attr_accessor :place_id - - # Defines a unique identifier of a beacon as broadcast by the device. - # Corresponds to the JSON property `advertisedId` - # @return [Google::Apis::ProximitybeaconV1beta1::AdvertisedId] - attr_accessor :advertised_id - - # An object representing a latitude/longitude pair. This is expressed as a pair - # of doubles representing degrees latitude and degrees longitude. Unless - # specified otherwise, this must conform to the - # WGS84 - # standard. Values must be within normalized ranges. - # Example of normalization code in Python: - # def NormalizeLongitude(longitude): - # """Wraps decimal degrees longitude to [-180.0, 180.0].""" - # q, r = divmod(longitude, 360.0) - # if r > 180.0 or (r == 180.0 and q <= -1.0): - # return r - 360.0 - # return r - # def NormalizeLatLng(latitude, longitude): - # """Wraps decimal degrees latitude and longitude to - # [-90.0, 90.0] and [-180.0, 180.0], respectively.""" - # r = latitude % 360.0 - # if r <= 90.0: - # return r, NormalizeLongitude(longitude) - # elif r >= 270.0: - # return r - 360, NormalizeLongitude(longitude) - # else: - # return 180 - r, NormalizeLongitude(longitude + 180.0) - # assert 180.0 == NormalizeLongitude(180.0) - # assert -180.0 == NormalizeLongitude(-180.0) - # assert -179.0 == NormalizeLongitude(181.0) - # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) - # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) - # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) - # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) - # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) - # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) - # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) - # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) - # The code in logs/storage/validator/logs_validator_traits.cc treats this type - # as if it were annotated as ST_LOCATION. - # Corresponds to the JSON property `latLng` - # @return [Google::Apis::ProximitybeaconV1beta1::LatLng] - attr_accessor :lat_lng - - # Resource name of this beacon. A beacon name has the format - # "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by - # the beacon and N is a code for the beacon's type. Possible values are - # `3` for Eddystone, `1` for iBeacon, or `5` for AltBeacon. - # This field must be left empty when registering. After reading a beacon, - # clients can use the name for future operations. - # Corresponds to the JSON property `beaconName` - # @return [String] - attr_accessor :beacon_name - - # Expected location stability. This is set when the beacon is registered or - # updated, not automatically detected in any way. - # Optional. - # Corresponds to the JSON property `expectedStability` - # @return [String] - attr_accessor :expected_stability - - # Indoor level, a human-readable string as returned by Google Maps APIs, - # useful to indicate which floor of a building a beacon is located on. - # Corresponds to the JSON property `indoorLevel` - # @return [Google::Apis::ProximitybeaconV1beta1::IndoorLevel] - attr_accessor :indoor_level - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @description = args[:description] if args.key?(:description) - @provisioning_key = args[:provisioning_key] if args.key?(:provisioning_key) - @status = args[:status] if args.key?(:status) - @properties = args[:properties] if args.key?(:properties) - @ephemeral_id_registration = args[:ephemeral_id_registration] if args.key?(:ephemeral_id_registration) - @place_id = args[:place_id] if args.key?(:place_id) - @advertised_id = args[:advertised_id] if args.key?(:advertised_id) - @lat_lng = args[:lat_lng] if args.key?(:lat_lng) - @beacon_name = args[:beacon_name] if args.key?(:beacon_name) - @expected_stability = args[:expected_stability] if args.key?(:expected_stability) - @indoor_level = args[:indoor_level] if args.key?(:indoor_level) - 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 - - # Project-specific data associated with a beacon. - class BeaconAttachment - include Google::Apis::Core::Hashable - - # An opaque data container for client-provided data. Must be - # [base64](http://tools.ietf.org/html/rfc4648#section-4) encoded in HTTP - # requests, and will be so encoded (with padding) in responses. - # Required. - # Corresponds to the JSON property `data` - # @return [String] - attr_accessor :data - - # Specifies what kind of attachment this is. Tells a client how to - # interpret the `data` field. Format is namespace/type. Namespace - # provides type separation between clients. Type describes the type of - # `data`, for use by the client when parsing the `data` field. - # Required. - # Corresponds to the JSON property `namespacedType` - # @return [String] - attr_accessor :namespaced_type - - # Resource name of this attachment. Attachment names have the format: - # beacons/beacon_id/attachments/attachment_id. - # Leave this empty on creation. - # Corresponds to the JSON property `attachmentName` - # @return [String] - attr_accessor :attachment_name - - # The UTC time when this attachment was created, in milliseconds since the - # UNIX epoch. - # Corresponds to the JSON property `creationTimeMs` - # @return [String] - attr_accessor :creation_time_ms - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @data = args[:data] if args.key?(:data) - @namespaced_type = args[:namespaced_type] if args.key?(:namespaced_type) - @attachment_name = args[:attachment_name] if args.key?(:attachment_name) - @creation_time_ms = args[:creation_time_ms] if args.key?(:creation_time_ms) - end - end - - # Information about the requested beacons, optionally including attachment - # data. - class GetInfoForObservedBeaconsResponse - include Google::Apis::Core::Hashable - - # Public information about beacons. - # May be empty if the request matched no beacons. - # Corresponds to the JSON property `beacons` - # @return [Array] - attr_accessor :beacons - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @beacons = args[:beacons] if args.key?(:beacons) end end @@ -734,51 +125,58 @@ module Google end end - # Response to ListNamespacesRequest that contains all the project's namespaces. - class ListNamespacesResponse + # 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 - # The attachments that corresponded to the request params. - # Corresponds to the JSON property `namespaces` - # @return [Array] - attr_accessor :namespaces - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @namespaces = args[:namespaces] if args.key?(:namespaces) end end - # Represents a whole calendar date, e.g. date of birth. The time of day and - # time zone are either specified elsewhere or are not significant. The date - # is relative to the Proleptic Gregorian Calendar. The day may be 0 to - # represent a year and month where the day is not significant, e.g. credit card - # expiration date. The year may be 0 to represent a month and day independent - # of year, e.g. anniversary date. Related types are google.type.TimeOfDay - # and `google.protobuf.Timestamp`. - class Date + # Project-specific data associated with a beacon. + class BeaconAttachment include Google::Apis::Core::Hashable - # Month of year. Must be from 1 to 12. - # Corresponds to the JSON property `month` - # @return [Fixnum] - attr_accessor :month + # Resource name of this attachment. Attachment names have the format: + # beacons/beacon_id/attachments/attachment_id. + # Leave this empty on creation. + # Corresponds to the JSON property `attachmentName` + # @return [String] + attr_accessor :attachment_name - # Year of date. Must be from 1 to 9999, or 0 if specifying a date without - # a year. - # Corresponds to the JSON property `year` - # @return [Fixnum] - attr_accessor :year + # Specifies what kind of attachment this is. Tells a client how to + # interpret the `data` field. Format is namespace/type. Namespace + # provides type separation between clients. Type describes the type of + # `data`, for use by the client when parsing the `data` field. + # Required. + # Corresponds to the JSON property `namespacedType` + # @return [String] + attr_accessor :namespaced_type - # Day of month. Must be from 1 to 31 and valid for the year and month, or 0 - # if specifying a year/month where the day is not significant. - # Corresponds to the JSON property `day` - # @return [Fixnum] - attr_accessor :day + # An opaque data container for client-provided data. Must be + # [base64](http://tools.ietf.org/html/rfc4648#section-4) encoded in HTTP + # requests, and will be so encoded (with padding) in responses. + # Required. + # Corresponds to the JSON property `data` + # @return [String] + attr_accessor :data + + # The UTC time when this attachment was created, in milliseconds since the + # UNIX epoch. + # Corresponds to the JSON property `creationTimeMs` + # @return [String] + attr_accessor :creation_time_ms def initialize(**args) update!(**args) @@ -786,9 +184,98 @@ module Google # Update properties of this object def update!(**args) - @month = args[:month] if args.key?(:month) - @year = args[:year] if args.key?(:year) - @day = args[:day] if args.key?(:day) + @attachment_name = args[:attachment_name] if args.key?(:attachment_name) + @namespaced_type = args[:namespaced_type] if args.key?(:namespaced_type) + @data = args[:data] if args.key?(:data) + @creation_time_ms = args[:creation_time_ms] if args.key?(:creation_time_ms) + end + end + + # Write-only registration parameters for beacons using Eddystone-EID format. + # Two ways of securely registering an Eddystone-EID beacon with the service + # are supported: + # 1. Perform an ECDH key exchange via this API, including a previous call + # to `GET /v1beta1/eidparams`. In this case the fields + # `beacon_ecdh_public_key` and `service_ecdh_public_key` should be + # populated and `beacon_identity_key` should not be populated. This + # method ensures that only the two parties in the ECDH key exchange can + # compute the identity key, which becomes a secret between them. + # 2. Derive or obtain the beacon's identity key via other secure means + # (perhaps an ECDH key exchange between the beacon and a mobile device + # or any other secure method), and then submit the resulting identity key + # to the service. In this case `beacon_identity_key` field should be + # populated, and neither of `beacon_ecdh_public_key` nor + # `service_ecdh_public_key` fields should be. The security of this method + # depends on how securely the parties involved (in particular the + # bluetooth client) handle the identity key, and obviously on how + # securely the identity key was generated. + # See [the Eddystone specification](https://github.com/google/eddystone/tree/ + # master/eddystone-eid) at GitHub. + class EphemeralIdRegistration + include Google::Apis::Core::Hashable + + # The initial clock value of the beacon. The beacon's clock must have + # begun counting at this value immediately prior to transmitting this + # value to the resolving service. Significant delay in transmitting this + # value to the service risks registration or resolution failures. If a + # value is not provided, the default is zero. + # Corresponds to the JSON property `initialClockValue` + # @return [String] + attr_accessor :initial_clock_value + + # The beacon's public key used for the Elliptic curve Diffie-Hellman + # key exchange. When this field is populated, `service_ecdh_public_key` + # must also be populated, and `beacon_identity_key` must not be. + # Corresponds to the JSON property `beaconEcdhPublicKey` + # @return [String] + attr_accessor :beacon_ecdh_public_key + + # Indicates the nominal period between each rotation of the beacon's + # ephemeral ID. "Nominal" because the beacon should randomize the + # actual interval. See [the spec at github](https://github.com/google/eddystone/ + # tree/master/eddystone-eid) + # for details. This value corresponds to a power-of-two scaler on the + # beacon's clock: when the scaler value is K, the beacon will begin + # broadcasting a new ephemeral ID on average every 2^K seconds. + # Corresponds to the JSON property `rotationPeriodExponent` + # @return [Fixnum] + attr_accessor :rotation_period_exponent + + # The service's public key used for the Elliptic curve Diffie-Hellman + # key exchange. When this field is populated, `beacon_ecdh_public_key` + # must also be populated, and `beacon_identity_key` must not be. + # Corresponds to the JSON property `serviceEcdhPublicKey` + # @return [String] + attr_accessor :service_ecdh_public_key + + # The private key of the beacon. If this field is populated, + # `beacon_ecdh_public_key` and `service_ecdh_public_key` must not be + # populated. + # Corresponds to the JSON property `beaconIdentityKey` + # @return [String] + attr_accessor :beacon_identity_key + + # An initial ephemeral ID calculated using the clock value submitted as + # `initial_clock_value`, and the secret key generated by the + # Diffie-Hellman key exchange using `service_ecdh_public_key` and + # `service_ecdh_public_key`. This initial EID value will be used by the + # service to confirm that the key exchange process was successful. + # Corresponds to the JSON property `initialEid` + # @return [String] + attr_accessor :initial_eid + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @initial_clock_value = args[:initial_clock_value] if args.key?(:initial_clock_value) + @beacon_ecdh_public_key = args[:beacon_ecdh_public_key] if args.key?(:beacon_ecdh_public_key) + @rotation_period_exponent = args[:rotation_period_exponent] if args.key?(:rotation_period_exponent) + @service_ecdh_public_key = args[:service_ecdh_public_key] if args.key?(:service_ecdh_public_key) + @beacon_identity_key = args[:beacon_identity_key] if args.key?(:beacon_identity_key) + @initial_eid = args[:initial_eid] if args.key?(:initial_eid) end end @@ -852,6 +339,519 @@ module Google @longitude = args[:longitude] if args.key?(:longitude) end end + + # Response to `ListBeaconAttachments` that contains the requested attachments. + class ListBeaconAttachmentsResponse + include Google::Apis::Core::Hashable + + # The attachments that corresponded to the request params. + # Corresponds to the JSON property `attachments` + # @return [Array] + attr_accessor :attachments + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @attachments = args[:attachments] if args.key?(:attachments) + end + end + + # An attachment namespace defines read and write access for all the attachments + # created under it. Each namespace is globally unique, and owned by one + # project which is the only project that can create attachments under it. + class Namespace + include Google::Apis::Core::Hashable + + # Resource name of this namespace. Namespaces names have the format: + # namespaces/namespace. + # Corresponds to the JSON property `namespaceName` + # @return [String] + attr_accessor :namespace_name + + # Specifies what clients may receive attachments under this namespace + # via `beaconinfo.getforobserved`. + # Corresponds to the JSON property `servingVisibility` + # @return [String] + attr_accessor :serving_visibility + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @namespace_name = args[:namespace_name] if args.key?(:namespace_name) + @serving_visibility = args[:serving_visibility] if args.key?(:serving_visibility) + end + end + + # A subset of attachment information served via the + # `beaconinfo.getforobserved` method, used when your users encounter your + # beacons. + class AttachmentInfo + include Google::Apis::Core::Hashable + + # Specifies what kind of attachment this is. Tells a client how to + # interpret the `data` field. Format is namespace/type, for + # example scrupulous-wombat-12345/welcome-message + # Corresponds to the JSON property `namespacedType` + # @return [String] + attr_accessor :namespaced_type + + # An opaque data container for client-provided data. + # Corresponds to the JSON property `data` + # @return [String] + attr_accessor :data + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @namespaced_type = args[:namespaced_type] if args.key?(:namespaced_type) + @data = args[:data] if args.key?(:data) + end + end + + # A subset of beacon information served via the `beaconinfo.getforobserved` + # method, which you call when users of your app encounter your beacons. + class BeaconInfo + include Google::Apis::Core::Hashable + + # The name under which the beacon is registered. + # Corresponds to the JSON property `beaconName` + # @return [String] + attr_accessor :beacon_name + + # Defines a unique identifier of a beacon as broadcast by the device. + # Corresponds to the JSON property `advertisedId` + # @return [Google::Apis::ProximitybeaconV1beta1::AdvertisedId] + attr_accessor :advertised_id + + # Attachments matching the type(s) requested. + # May be empty if no attachment types were requested. + # Corresponds to the JSON property `attachments` + # @return [Array] + attr_accessor :attachments + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @beacon_name = args[:beacon_name] if args.key?(:beacon_name) + @advertised_id = args[:advertised_id] if args.key?(:advertised_id) + @attachments = args[:attachments] if args.key?(:attachments) + end + end + + # Information a client needs to provision and register beacons that + # broadcast Eddystone-EID format beacon IDs, using Elliptic curve + # Diffie-Hellman key exchange. See + # [the Eddystone specification](https://github.com/google/eddystone/tree/master/ + # eddystone-eid) at GitHub. + class EphemeralIdRegistrationParams + include Google::Apis::Core::Hashable + + # The beacon service's public key for use by a beacon to derive its + # Identity Key using Elliptic Curve Diffie-Hellman key exchange. + # Corresponds to the JSON property `serviceEcdhPublicKey` + # @return [String] + attr_accessor :service_ecdh_public_key + + # Indicates the minimum rotation period supported by the service. + # See EddystoneEidRegistration.rotation_period_exponent + # Corresponds to the JSON property `minRotationPeriodExponent` + # @return [Fixnum] + attr_accessor :min_rotation_period_exponent + + # Indicates the maximum rotation period supported by the service. + # See EddystoneEidRegistration.rotation_period_exponent + # Corresponds to the JSON property `maxRotationPeriodExponent` + # @return [Fixnum] + attr_accessor :max_rotation_period_exponent + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @service_ecdh_public_key = args[:service_ecdh_public_key] if args.key?(:service_ecdh_public_key) + @min_rotation_period_exponent = args[:min_rotation_period_exponent] if args.key?(:min_rotation_period_exponent) + @max_rotation_period_exponent = args[:max_rotation_period_exponent] if args.key?(:max_rotation_period_exponent) + end + end + + # Response for a request to delete attachments. + class DeleteAttachmentsResponse + include Google::Apis::Core::Hashable + + # The number of attachments that were deleted. + # Corresponds to the JSON property `numDeleted` + # @return [Fixnum] + attr_accessor :num_deleted + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @num_deleted = args[:num_deleted] if args.key?(:num_deleted) + end + end + + # Represents one beacon observed once. + class Observation + include Google::Apis::Core::Hashable + + # The array of telemetry bytes received from the beacon. The server is + # responsible for parsing it. This field may frequently be empty, as + # with a beacon that transmits telemetry only occasionally. + # Corresponds to the JSON property `telemetry` + # @return [String] + attr_accessor :telemetry + + # Time when the beacon was observed. + # Corresponds to the JSON property `timestampMs` + # @return [String] + attr_accessor :timestamp_ms + + # Defines a unique identifier of a beacon as broadcast by the device. + # Corresponds to the JSON property `advertisedId` + # @return [Google::Apis::ProximitybeaconV1beta1::AdvertisedId] + attr_accessor :advertised_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @telemetry = args[:telemetry] if args.key?(:telemetry) + @timestamp_ms = args[:timestamp_ms] if args.key?(:timestamp_ms) + @advertised_id = args[:advertised_id] if args.key?(:advertised_id) + end + end + + # Response that contains the requested diagnostics. + class ListDiagnosticsResponse + include Google::Apis::Core::Hashable + + # The diagnostics matching the given request. + # Corresponds to the JSON property `diagnostics` + # @return [Array] + attr_accessor :diagnostics + + # Token that can be used for pagination. Returned only if the + # request matches more beacons than can be returned in this response. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @diagnostics = args[:diagnostics] if args.key?(:diagnostics) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # Information about the requested beacons, optionally including attachment + # data. + class GetInfoForObservedBeaconsResponse + include Google::Apis::Core::Hashable + + # Public information about beacons. + # May be empty if the request matched no beacons. + # Corresponds to the JSON property `beacons` + # @return [Array] + attr_accessor :beacons + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @beacons = args[:beacons] if args.key?(:beacons) + end + end + + # Details of a beacon device. + class Beacon + include Google::Apis::Core::Hashable + + # Defines a unique identifier of a beacon as broadcast by the device. + # Corresponds to the JSON property `advertisedId` + # @return [Google::Apis::ProximitybeaconV1beta1::AdvertisedId] + attr_accessor :advertised_id + + # Write-only registration parameters for beacons using Eddystone-EID format. + # Two ways of securely registering an Eddystone-EID beacon with the service + # are supported: + # 1. Perform an ECDH key exchange via this API, including a previous call + # to `GET /v1beta1/eidparams`. In this case the fields + # `beacon_ecdh_public_key` and `service_ecdh_public_key` should be + # populated and `beacon_identity_key` should not be populated. This + # method ensures that only the two parties in the ECDH key exchange can + # compute the identity key, which becomes a secret between them. + # 2. Derive or obtain the beacon's identity key via other secure means + # (perhaps an ECDH key exchange between the beacon and a mobile device + # or any other secure method), and then submit the resulting identity key + # to the service. In this case `beacon_identity_key` field should be + # populated, and neither of `beacon_ecdh_public_key` nor + # `service_ecdh_public_key` fields should be. The security of this method + # depends on how securely the parties involved (in particular the + # bluetooth client) handle the identity key, and obviously on how + # securely the identity key was generated. + # See [the Eddystone specification](https://github.com/google/eddystone/tree/ + # master/eddystone-eid) at GitHub. + # Corresponds to the JSON property `ephemeralIdRegistration` + # @return [Google::Apis::ProximitybeaconV1beta1::EphemeralIdRegistration] + attr_accessor :ephemeral_id_registration + + # Some beacons may require a user to provide an authorization key before + # changing any of its configuration (e.g. broadcast frames, transmit power). + # This field provides a place to store and control access to that key. + # This field is populated in responses to `GET /v1beta1/beacons/3!beaconId` + # from users with write access to the given beacon. That is to say: If the + # user is authorized to write the beacon's confidential data in the service, + # the service considers them authorized to configure the beacon. Note + # that this key grants nothing on the service, only on the beacon itself. + # Corresponds to the JSON property `provisioningKey` + # @return [String] + attr_accessor :provisioning_key + + # Free text used to identify and describe the beacon. Maximum length 140 + # characters. + # Optional. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # An object representing a latitude/longitude pair. This is expressed as a pair + # of doubles representing degrees latitude and degrees longitude. Unless + # specified otherwise, this must conform to the + # WGS84 + # standard. Values must be within normalized ranges. + # Example of normalization code in Python: + # def NormalizeLongitude(longitude): + # """Wraps decimal degrees longitude to [-180.0, 180.0].""" + # q, r = divmod(longitude, 360.0) + # if r > 180.0 or (r == 180.0 and q <= -1.0): + # return r - 360.0 + # return r + # def NormalizeLatLng(latitude, longitude): + # """Wraps decimal degrees latitude and longitude to + # [-90.0, 90.0] and [-180.0, 180.0], respectively.""" + # r = latitude % 360.0 + # if r <= 90.0: + # return r, NormalizeLongitude(longitude) + # elif r >= 270.0: + # return r - 360, NormalizeLongitude(longitude) + # else: + # return 180 - r, NormalizeLongitude(longitude + 180.0) + # assert 180.0 == NormalizeLongitude(180.0) + # assert -180.0 == NormalizeLongitude(-180.0) + # assert -179.0 == NormalizeLongitude(181.0) + # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) + # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) + # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) + # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) + # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) + # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) + # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) + # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) + # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) + # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) + # The code in logs/storage/validator/logs_validator_traits.cc treats this type + # as if it were annotated as ST_LOCATION. + # Corresponds to the JSON property `latLng` + # @return [Google::Apis::ProximitybeaconV1beta1::LatLng] + attr_accessor :lat_lng + + # The [Google Places API](/places/place-id) Place ID of the place where + # the beacon is deployed. This is given when the beacon is registered or + # updated, not automatically detected in any way. + # Optional. + # Corresponds to the JSON property `placeId` + # @return [String] + attr_accessor :place_id + + # Properties of the beacon device, for example battery type or firmware + # version. + # Optional. + # Corresponds to the JSON property `properties` + # @return [Hash] + attr_accessor :properties + + # Current status of the beacon. + # Required. + # Corresponds to the JSON property `status` + # @return [String] + attr_accessor :status + + # Indoor level, a human-readable string as returned by Google Maps APIs, + # useful to indicate which floor of a building a beacon is located on. + # Corresponds to the JSON property `indoorLevel` + # @return [Google::Apis::ProximitybeaconV1beta1::IndoorLevel] + attr_accessor :indoor_level + + # Resource name of this beacon. A beacon name has the format + # "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by + # the beacon and N is a code for the beacon's type. Possible values are + # `3` for Eddystone, `1` for iBeacon, or `5` for AltBeacon. + # This field must be left empty when registering. After reading a beacon, + # clients can use the name for future operations. + # Corresponds to the JSON property `beaconName` + # @return [String] + attr_accessor :beacon_name + + # Expected location stability. This is set when the beacon is registered or + # updated, not automatically detected in any way. + # Optional. + # Corresponds to the JSON property `expectedStability` + # @return [String] + attr_accessor :expected_stability + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @advertised_id = args[:advertised_id] if args.key?(:advertised_id) + @ephemeral_id_registration = args[:ephemeral_id_registration] if args.key?(:ephemeral_id_registration) + @provisioning_key = args[:provisioning_key] if args.key?(:provisioning_key) + @description = args[:description] if args.key?(:description) + @lat_lng = args[:lat_lng] if args.key?(:lat_lng) + @place_id = args[:place_id] if args.key?(:place_id) + @properties = args[:properties] if args.key?(:properties) + @status = args[:status] if args.key?(:status) + @indoor_level = args[:indoor_level] if args.key?(:indoor_level) + @beacon_name = args[:beacon_name] if args.key?(:beacon_name) + @expected_stability = args[:expected_stability] if args.key?(:expected_stability) + end + end + + # Defines a unique identifier of a beacon as broadcast by the device. + class AdvertisedId + include Google::Apis::Core::Hashable + + # Specifies the identifier type. + # Required. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The actual beacon identifier, as broadcast by the beacon hardware. Must be + # [base64](http://tools.ietf.org/html/rfc4648#section-4) encoded in HTTP + # requests, and will be so encoded (with padding) in responses. The base64 + # encoding should be of the binary byte-stream and not any textual (such as + # hex) representation thereof. + # Required. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type = args[:type] if args.key?(:type) + @id = args[:id] if args.key?(:id) + end + end + + # Represents a whole calendar date, e.g. date of birth. The time of day and + # time zone are either specified elsewhere or are not significant. The date + # is relative to the Proleptic Gregorian Calendar. The day may be 0 to + # represent a year and month where the day is not significant, e.g. credit card + # expiration date. The year may be 0 to represent a month and day independent + # of year, e.g. anniversary date. Related types are google.type.TimeOfDay + # and `google.protobuf.Timestamp`. + class Date + include Google::Apis::Core::Hashable + + # Year of date. Must be from 1 to 9999, or 0 if specifying a date without + # a year. + # Corresponds to the JSON property `year` + # @return [Fixnum] + attr_accessor :year + + # Day of month. Must be from 1 to 31 and valid for the year and month, or 0 + # if specifying a year/month where the day is not significant. + # Corresponds to the JSON property `day` + # @return [Fixnum] + attr_accessor :day + + # Month of year. Must be from 1 to 12. + # Corresponds to the JSON property `month` + # @return [Fixnum] + attr_accessor :month + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @year = args[:year] if args.key?(:year) + @day = args[:day] if args.key?(:day) + @month = args[:month] if args.key?(:month) + end + end + + # Indoor level, a human-readable string as returned by Google Maps APIs, + # useful to indicate which floor of a building a beacon is located on. + class IndoorLevel + include Google::Apis::Core::Hashable + + # The name of this level. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + end + end + + # Response to ListNamespacesRequest that contains all the project's namespaces. + class ListNamespacesResponse + include Google::Apis::Core::Hashable + + # The attachments that corresponded to the request params. + # Corresponds to the JSON property `namespaces` + # @return [Array] + attr_accessor :namespaces + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @namespaces = args[:namespaces] if args.key?(:namespaces) + end + end end end end diff --git a/generated/google/apis/proximitybeacon_v1beta1/representations.rb b/generated/google/apis/proximitybeacon_v1beta1/representations.rb index 585465536..dc0e7cb79 100644 --- a/generated/google/apis/proximitybeacon_v1beta1/representations.rb +++ b/generated/google/apis/proximitybeacon_v1beta1/representations.rb @@ -28,25 +28,25 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Observation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class Diagnostics class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class AdvertisedId + class GetInfoForObservedBeaconsRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class DeleteAttachmentsResponse + class Empty + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BeaconAttachment class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -58,25 +58,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class ListDiagnosticsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BeaconInfo - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class IndoorLevel - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class EphemeralIdRegistrationParams + class LatLng class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -100,19 +82,31 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Beacon + class BeaconInfo class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Empty + class EphemeralIdRegistrationParams class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class BeaconAttachment + class DeleteAttachmentsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Observation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListDiagnosticsResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -124,13 +118,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class GetInfoForObservedBeaconsRequest + class Beacon class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class ListNamespacesResponse + class AdvertisedId class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -142,7 +136,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class LatLng + class IndoorLevel + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListNamespacesResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -151,93 +151,65 @@ module Google class ListBeaconsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' collection :beacons, as: 'beacons', class: Google::Apis::ProximitybeaconV1beta1::Beacon, decorator: Google::Apis::ProximitybeaconV1beta1::Beacon::Representation - property :next_page_token, as: 'nextPageToken' property :total_count, as: 'totalCount' end end - class Observation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :advertised_id, as: 'advertisedId', class: Google::Apis::ProximitybeaconV1beta1::AdvertisedId, decorator: Google::Apis::ProximitybeaconV1beta1::AdvertisedId::Representation - - property :telemetry, :base64 => true, as: 'telemetry' - property :timestamp_ms, as: 'timestampMs' - end - end - class Diagnostics # @private class Representation < Google::Apis::Core::JsonRepresentation collection :alerts, as: 'alerts' - property :beacon_name, as: 'beaconName' property :estimated_low_battery_date, as: 'estimatedLowBatteryDate', class: Google::Apis::ProximitybeaconV1beta1::Date, decorator: Google::Apis::ProximitybeaconV1beta1::Date::Representation + property :beacon_name, as: 'beaconName' end end - class AdvertisedId + class GetInfoForObservedBeaconsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - property :id, :base64 => true, as: 'id' + collection :observations, as: 'observations', class: Google::Apis::ProximitybeaconV1beta1::Observation, decorator: Google::Apis::ProximitybeaconV1beta1::Observation::Representation + + collection :namespaced_types, as: 'namespacedTypes' end end - class DeleteAttachmentsResponse + class Empty # @private class Representation < Google::Apis::Core::JsonRepresentation - property :num_deleted, as: 'numDeleted' + end + end + + class BeaconAttachment + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :attachment_name, as: 'attachmentName' + property :namespaced_type, as: 'namespacedType' + property :data, :base64 => true, as: 'data' + property :creation_time_ms, as: 'creationTimeMs' end end class EphemeralIdRegistration # @private class Representation < Google::Apis::Core::JsonRepresentation - property :beacon_ecdh_public_key, :base64 => true, as: 'beaconEcdhPublicKey' property :initial_clock_value, as: 'initialClockValue' - property :beacon_identity_key, :base64 => true, as: 'beaconIdentityKey' - property :service_ecdh_public_key, :base64 => true, as: 'serviceEcdhPublicKey' + property :beacon_ecdh_public_key, :base64 => true, as: 'beaconEcdhPublicKey' property :rotation_period_exponent, as: 'rotationPeriodExponent' + property :service_ecdh_public_key, :base64 => true, as: 'serviceEcdhPublicKey' + property :beacon_identity_key, :base64 => true, as: 'beaconIdentityKey' property :initial_eid, :base64 => true, as: 'initialEid' end end - class ListDiagnosticsResponse + class LatLng # @private class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :diagnostics, as: 'diagnostics', class: Google::Apis::ProximitybeaconV1beta1::Diagnostics, decorator: Google::Apis::ProximitybeaconV1beta1::Diagnostics::Representation - - end - end - - class BeaconInfo - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :attachments, as: 'attachments', class: Google::Apis::ProximitybeaconV1beta1::AttachmentInfo, decorator: Google::Apis::ProximitybeaconV1beta1::AttachmentInfo::Representation - - property :beacon_name, as: 'beaconName' - property :advertised_id, as: 'advertisedId', class: Google::Apis::ProximitybeaconV1beta1::AdvertisedId, decorator: Google::Apis::ProximitybeaconV1beta1::AdvertisedId::Representation - - end - end - - class IndoorLevel - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' - end - end - - class EphemeralIdRegistrationParams - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :service_ecdh_public_key, :base64 => true, as: 'serviceEcdhPublicKey' - property :min_rotation_period_exponent, as: 'minRotationPeriodExponent' - property :max_rotation_period_exponent, as: 'maxRotationPeriodExponent' + property :latitude, as: 'latitude' + property :longitude, as: 'longitude' end end @@ -260,45 +232,54 @@ module Google class AttachmentInfo # @private class Representation < Google::Apis::Core::JsonRepresentation - property :data, :base64 => true, as: 'data' property :namespaced_type, as: 'namespacedType' + property :data, :base64 => true, as: 'data' end end - class Beacon + class BeaconInfo # @private class Representation < Google::Apis::Core::JsonRepresentation - property :description, as: 'description' - property :provisioning_key, :base64 => true, as: 'provisioningKey' - property :status, as: 'status' - hash :properties, as: 'properties' - property :ephemeral_id_registration, as: 'ephemeralIdRegistration', class: Google::Apis::ProximitybeaconV1beta1::EphemeralIdRegistration, decorator: Google::Apis::ProximitybeaconV1beta1::EphemeralIdRegistration::Representation - - property :place_id, as: 'placeId' + property :beacon_name, as: 'beaconName' property :advertised_id, as: 'advertisedId', class: Google::Apis::ProximitybeaconV1beta1::AdvertisedId, decorator: Google::Apis::ProximitybeaconV1beta1::AdvertisedId::Representation - property :lat_lng, as: 'latLng', class: Google::Apis::ProximitybeaconV1beta1::LatLng, decorator: Google::Apis::ProximitybeaconV1beta1::LatLng::Representation - - property :beacon_name, as: 'beaconName' - property :expected_stability, as: 'expectedStability' - property :indoor_level, as: 'indoorLevel', class: Google::Apis::ProximitybeaconV1beta1::IndoorLevel, decorator: Google::Apis::ProximitybeaconV1beta1::IndoorLevel::Representation + collection :attachments, as: 'attachments', class: Google::Apis::ProximitybeaconV1beta1::AttachmentInfo, decorator: Google::Apis::ProximitybeaconV1beta1::AttachmentInfo::Representation end end - class Empty + class EphemeralIdRegistrationParams # @private class Representation < Google::Apis::Core::JsonRepresentation + property :service_ecdh_public_key, :base64 => true, as: 'serviceEcdhPublicKey' + property :min_rotation_period_exponent, as: 'minRotationPeriodExponent' + property :max_rotation_period_exponent, as: 'maxRotationPeriodExponent' end end - class BeaconAttachment + class DeleteAttachmentsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :data, :base64 => true, as: 'data' - property :namespaced_type, as: 'namespacedType' - property :attachment_name, as: 'attachmentName' - property :creation_time_ms, as: 'creationTimeMs' + property :num_deleted, as: 'numDeleted' + end + end + + class Observation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :telemetry, :base64 => true, as: 'telemetry' + property :timestamp_ms, as: 'timestampMs' + property :advertised_id, as: 'advertisedId', class: Google::Apis::ProximitybeaconV1beta1::AdvertisedId, decorator: Google::Apis::ProximitybeaconV1beta1::AdvertisedId::Representation + + end + end + + class ListDiagnosticsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :diagnostics, as: 'diagnostics', class: Google::Apis::ProximitybeaconV1beta1::Diagnostics, decorator: Google::Apis::ProximitybeaconV1beta1::Diagnostics::Representation + + property :next_page_token, as: 'nextPageToken' end end @@ -310,12 +291,48 @@ module Google end end - class GetInfoForObservedBeaconsRequest + class Beacon # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :observations, as: 'observations', class: Google::Apis::ProximitybeaconV1beta1::Observation, decorator: Google::Apis::ProximitybeaconV1beta1::Observation::Representation + property :advertised_id, as: 'advertisedId', class: Google::Apis::ProximitybeaconV1beta1::AdvertisedId, decorator: Google::Apis::ProximitybeaconV1beta1::AdvertisedId::Representation - collection :namespaced_types, as: 'namespacedTypes' + property :ephemeral_id_registration, as: 'ephemeralIdRegistration', class: Google::Apis::ProximitybeaconV1beta1::EphemeralIdRegistration, decorator: Google::Apis::ProximitybeaconV1beta1::EphemeralIdRegistration::Representation + + property :provisioning_key, :base64 => true, as: 'provisioningKey' + property :description, as: 'description' + property :lat_lng, as: 'latLng', class: Google::Apis::ProximitybeaconV1beta1::LatLng, decorator: Google::Apis::ProximitybeaconV1beta1::LatLng::Representation + + property :place_id, as: 'placeId' + hash :properties, as: 'properties' + property :status, as: 'status' + property :indoor_level, as: 'indoorLevel', class: Google::Apis::ProximitybeaconV1beta1::IndoorLevel, decorator: Google::Apis::ProximitybeaconV1beta1::IndoorLevel::Representation + + property :beacon_name, as: 'beaconName' + property :expected_stability, as: 'expectedStability' + end + end + + class AdvertisedId + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' + property :id, :base64 => true, as: 'id' + end + end + + class Date + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :year, as: 'year' + property :day, as: 'day' + property :month, as: 'month' + end + end + + class IndoorLevel + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' end end @@ -326,23 +343,6 @@ module Google end end - - class Date - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :month, as: 'month' - property :year, as: 'year' - property :day, as: 'day' - end - end - - class LatLng - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :latitude, as: 'latitude' - property :longitude, as: 'longitude' - end - end end end end diff --git a/generated/google/apis/proximitybeacon_v1beta1/service.rb b/generated/google/apis/proximitybeacon_v1beta1/service.rb index 8854a6297..9996d173d 100644 --- a/generated/google/apis/proximitybeacon_v1beta1/service.rb +++ b/generated/google/apis/proximitybeacon_v1beta1/service.rb @@ -46,6 +46,118 @@ module Google super('https://proximitybeacon.googleapis.com/', '') end + # Given one or more beacon observations, returns any beacon information + # and attachments accessible to your application. Authorize by using the + # [API key](https://developers.google.com/beacons/proximity/how-tos/authorizing# + # APIKey) + # for the application. + # @param [Google::Apis::ProximitybeaconV1beta1::GetInfoForObservedBeaconsRequest] get_info_for_observed_beacons_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::ProximitybeaconV1beta1::GetInfoForObservedBeaconsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProximitybeaconV1beta1::GetInfoForObservedBeaconsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def getforobserved_beaconinfo(get_info_for_observed_beacons_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/beaconinfo:getforobserved', options) + command.request_representation = Google::Apis::ProximitybeaconV1beta1::GetInfoForObservedBeaconsRequest::Representation + command.request_object = get_info_for_observed_beacons_request_object + command.response_representation = Google::Apis::ProximitybeaconV1beta1::GetInfoForObservedBeaconsResponse::Representation + command.response_class = Google::Apis::ProximitybeaconV1beta1::GetInfoForObservedBeaconsResponse + 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 attachment namespaces owned by your Google Developers Console + # project. Attachment data associated with a beacon must include a + # namespaced type, and the namespace must be owned by your project. + # Authenticate using an [OAuth access token](https://developers.google.com/ + # identity/protocols/OAuth2) + # from a signed-in user with **viewer**, **Is owner** or **Can edit** + # permissions in the Google Developers Console project. + # @param [String] project_id + # The project id to list namespaces under. + # Optional. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::ListNamespacesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProximitybeaconV1beta1::ListNamespacesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_namespaces(project_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/namespaces', options) + command.response_representation = Google::Apis::ProximitybeaconV1beta1::ListNamespacesResponse::Representation + command.response_class = Google::Apis::ProximitybeaconV1beta1::ListNamespacesResponse + command.query['projectId'] = project_id unless project_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Updates the information about the specified namespace. Only the namespace + # visibility can be updated. + # @param [String] namespace_name + # Resource name of this namespace. Namespaces names have the format: + # namespaces/namespace. + # @param [Google::Apis::ProximitybeaconV1beta1::Namespace] namespace_object + # @param [String] project_id + # The project id of the namespace to update. If the project id is not + # specified then the project making the request is used. The project id + # must match the project that owns the beacon. + # Optional. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::Namespace] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProximitybeaconV1beta1::Namespace] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_namespace(namespace_name, namespace_object = nil, project_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:put, 'v1beta1/{+namespaceName}', options) + command.request_representation = Google::Apis::ProximitybeaconV1beta1::Namespace::Representation + command.request_object = namespace_object + command.response_representation = Google::Apis::ProximitybeaconV1beta1::Namespace::Representation + command.response_class = Google::Apis::ProximitybeaconV1beta1::Namespace + command.params['namespaceName'] = namespace_name unless namespace_name.nil? + command.query['projectId'] = project_id unless project_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Gets the Proximity Beacon API's current public key and associated # parameters used to initiate the Diffie-Hellman key exchange required to # register a beacon that broadcasts the Eddystone-EID format. This key @@ -53,11 +165,11 @@ module Google # to provision and register multiple beacons. However, clients should be # prepared to refresh this key when they encounter an error registering an # Eddystone-EID beacon. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -70,159 +182,12 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_eidparams(quota_user: nil, fields: nil, options: nil, &block) + def get_eidparams(fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta1/eidparams', options) command.response_representation = Google::Apis::ProximitybeaconV1beta1::EphemeralIdRegistrationParams::Representation command.response_class = Google::Apis::ProximitybeaconV1beta1::EphemeralIdRegistrationParams - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Decommissions the specified beacon in the service. This beacon will no - # longer be returned from `beaconinfo.getforobserved`. This operation is - # permanent -- you will not be able to re-register a beacon with this ID - # again. - # Authenticate using an [OAuth access token](https://developers.google.com/ - # identity/protocols/OAuth2) - # from a signed-in user with **Is owner** or **Can edit** permissions in the - # Google Developers Console project. - # @param [String] beacon_name - # Beacon that should be decommissioned. A beacon name has the format - # "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by - # the beacon and N is a code for the beacon's type. Possible values are - # `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` - # for AltBeacon. For Eddystone-EID beacons, you may use either the - # current EID of the beacon's "stable" UID. - # Required. - # @param [String] project_id - # The project id of the beacon to decommission. If the project id is not - # specified then the project making the request is used. The project id - # must match the project that owns the beacon. - # Optional. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ProximitybeaconV1beta1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def decommission_beacon(beacon_name, project_id: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1beta1/{+beaconName}:decommission', options) - command.response_representation = Google::Apis::ProximitybeaconV1beta1::Empty::Representation - command.response_class = Google::Apis::ProximitybeaconV1beta1::Empty - command.params['beaconName'] = beacon_name unless beacon_name.nil? - command.query['projectId'] = project_id unless project_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Activates a beacon. A beacon that is active will return information - # and attachment data when queried via `beaconinfo.getforobserved`. - # Calling this method on an already active beacon will do nothing (but - # will return a successful response code). - # Authenticate using an [OAuth access token](https://developers.google.com/ - # identity/protocols/OAuth2) - # from a signed-in user with **Is owner** or **Can edit** permissions in the - # Google Developers Console project. - # @param [String] beacon_name - # Beacon that should be activated. A beacon name has the format - # "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by - # the beacon and N is a code for the beacon's type. Possible values are - # `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` - # for AltBeacon. For Eddystone-EID beacons, you may use either the - # current EID or the beacon's "stable" UID. - # Required. - # @param [String] project_id - # The project id of the beacon to activate. If the project id is not - # specified then the project making the request is used. The project id - # must match the project that owns the beacon. - # Optional. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ProximitybeaconV1beta1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def activate_beacon(beacon_name, project_id: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1beta1/{+beaconName}:activate', options) - command.response_representation = Google::Apis::ProximitybeaconV1beta1::Empty::Representation - command.response_class = Google::Apis::ProximitybeaconV1beta1::Empty - command.params['beaconName'] = beacon_name unless beacon_name.nil? - command.query['projectId'] = project_id unless project_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Deactivates a beacon. Once deactivated, the API will not return - # information nor attachment data for the beacon when queried via - # `beaconinfo.getforobserved`. Calling this method on an already inactive - # beacon will do nothing (but will return a successful response code). - # Authenticate using an [OAuth access token](https://developers.google.com/ - # identity/protocols/OAuth2) - # from a signed-in user with **Is owner** or **Can edit** permissions in the - # Google Developers Console project. - # @param [String] beacon_name - # Beacon that should be deactivated. A beacon name has the format - # "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by - # the beacon and N is a code for the beacon's type. Possible values are - # `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` - # for AltBeacon. For Eddystone-EID beacons, you may use either the - # current EID or the beacon's "stable" UID. - # Required. - # @param [String] project_id - # The project id of the beacon to deactivate. If the project id is not - # specified then the project making the request is used. The project id must - # match the project that owns the beacon. - # Optional. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::Empty] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ProximitybeaconV1beta1::Empty] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def deactivate_beacon(beacon_name, project_id: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1beta1/{+beaconName}:deactivate', options) - command.response_representation = Google::Apis::ProximitybeaconV1beta1::Empty::Representation - command.response_class = Google::Apis::ProximitybeaconV1beta1::Empty - command.params['beaconName'] = beacon_name unless beacon_name.nil? - command.query['projectId'] = project_id unless project_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -300,17 +265,17 @@ module Google # @param [Fixnum] page_size # The maximum number of records to return for this request, up to a # server-defined upper limit. - # @param [String] page_token - # A pagination token obtained from a previous request to list beacons. # @param [String] project_id # The project id to list beacons under. If not present then the project # credential that made the request is used as the project. # Optional. + # @param [String] page_token + # A pagination token obtained from a previous request to list beacons. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -323,16 +288,106 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_beacons(q: nil, page_size: nil, page_token: nil, project_id: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_beacons(q: nil, page_size: nil, project_id: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta1/beacons', options) command.response_representation = Google::Apis::ProximitybeaconV1beta1::ListBeaconsResponse::Representation command.response_class = Google::Apis::ProximitybeaconV1beta1::ListBeaconsResponse command.query['q'] = q unless q.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['pageToken'] = page_token unless page_token.nil? command.query['projectId'] = project_id unless project_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Registers a previously unregistered beacon given its `advertisedId`. + # These IDs are unique within the system. An ID can be registered only once. + # Authenticate using an [OAuth access token](https://developers.google.com/ + # identity/protocols/OAuth2) + # from a signed-in user with **Is owner** or **Can edit** permissions in the + # Google Developers Console project. + # @param [Google::Apis::ProximitybeaconV1beta1::Beacon] beacon_object + # @param [String] project_id + # The project id of the project the beacon will be registered to. If + # the project id is not specified then the project making the request + # is used. + # Optional. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::Beacon] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProximitybeaconV1beta1::Beacon] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def register_beacon(beacon_object = nil, project_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/beacons:register', options) + command.request_representation = Google::Apis::ProximitybeaconV1beta1::Beacon::Representation + command.request_object = beacon_object + command.response_representation = Google::Apis::ProximitybeaconV1beta1::Beacon::Representation + command.response_class = Google::Apis::ProximitybeaconV1beta1::Beacon + command.query['projectId'] = project_id unless project_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Activates a beacon. A beacon that is active will return information + # and attachment data when queried via `beaconinfo.getforobserved`. + # Calling this method on an already active beacon will do nothing (but + # will return a successful response code). + # Authenticate using an [OAuth access token](https://developers.google.com/ + # identity/protocols/OAuth2) + # from a signed-in user with **Is owner** or **Can edit** permissions in the + # Google Developers Console project. + # @param [String] beacon_name + # Beacon that should be activated. A beacon name has the format + # "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by + # the beacon and N is a code for the beacon's type. Possible values are + # `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` + # for AltBeacon. For Eddystone-EID beacons, you may use either the + # current EID or the beacon's "stable" UID. + # Required. + # @param [String] project_id + # The project id of the beacon to activate. If the project id is not + # specified then the project making the request is used. The project id + # must match the project that owns the beacon. + # Optional. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProximitybeaconV1beta1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def activate_beacon(beacon_name, project_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+beaconName}:activate', options) + command.response_representation = Google::Apis::ProximitybeaconV1beta1::Empty::Representation + command.response_class = Google::Apis::ProximitybeaconV1beta1::Empty + command.params['beaconName'] = beacon_name unless beacon_name.nil? + command.query['projectId'] = project_id unless project_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -359,11 +414,11 @@ module Google # then the project making the request is used. The project id must match the # project that owns the beacon. # 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 # @@ -376,14 +431,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_beacon(beacon_name, project_id: nil, quota_user: nil, fields: nil, options: nil, &block) + def get_beacon(beacon_name, project_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta1/{+beaconName}', options) command.response_representation = Google::Apis::ProximitybeaconV1beta1::Beacon::Representation command.response_class = Google::Apis::ProximitybeaconV1beta1::Beacon command.params['beaconName'] = beacon_name unless beacon_name.nil? command.query['projectId'] = project_id unless project_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -411,11 +466,11 @@ module Google # specified then the project making the request is used. The project id # must match the project that owns the beacon. # 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 # @@ -428,7 +483,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_beacon(beacon_name, beacon_object = nil, project_id: nil, quota_user: nil, fields: nil, options: nil, &block) + def update_beacon(beacon_name, beacon_object = nil, project_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:put, 'v1beta1/{+beaconName}', options) command.request_representation = Google::Apis::ProximitybeaconV1beta1::Beacon::Representation command.request_object = beacon_object @@ -436,49 +491,106 @@ module Google command.response_class = Google::Apis::ProximitybeaconV1beta1::Beacon command.params['beaconName'] = beacon_name unless beacon_name.nil? command.query['projectId'] = project_id unless project_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - # Registers a previously unregistered beacon given its `advertisedId`. - # These IDs are unique within the system. An ID can be registered only once. + # Decommissions the specified beacon in the service. This beacon will no + # longer be returned from `beaconinfo.getforobserved`. This operation is + # permanent -- you will not be able to re-register a beacon with this ID + # again. # Authenticate using an [OAuth access token](https://developers.google.com/ # identity/protocols/OAuth2) # from a signed-in user with **Is owner** or **Can edit** permissions in the # Google Developers Console project. - # @param [Google::Apis::ProximitybeaconV1beta1::Beacon] beacon_object + # @param [String] beacon_name + # Beacon that should be decommissioned. A beacon name has the format + # "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by + # the beacon and N is a code for the beacon's type. Possible values are + # `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` + # for AltBeacon. For Eddystone-EID beacons, you may use either the + # current EID of the beacon's "stable" UID. + # Required. # @param [String] project_id - # The project id of the project the beacon will be registered to. If - # the project id is not specified then the project making the request - # is used. + # The project id of the beacon to decommission. If the project id is not + # specified then the project making the request is used. The project id + # must match the project that owns the beacon. # Optional. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::Beacon] parsed result object + # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::Empty] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::ProximitybeaconV1beta1::Beacon] + # @return [Google::Apis::ProximitybeaconV1beta1::Empty] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def register_beacon(beacon_object = nil, project_id: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1beta1/beacons:register', options) - command.request_representation = Google::Apis::ProximitybeaconV1beta1::Beacon::Representation - command.request_object = beacon_object - command.response_representation = Google::Apis::ProximitybeaconV1beta1::Beacon::Representation - command.response_class = Google::Apis::ProximitybeaconV1beta1::Beacon + def decommission_beacon(beacon_name, project_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+beaconName}:decommission', options) + command.response_representation = Google::Apis::ProximitybeaconV1beta1::Empty::Representation + command.response_class = Google::Apis::ProximitybeaconV1beta1::Empty + command.params['beaconName'] = beacon_name unless beacon_name.nil? command.query['projectId'] = project_id unless project_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deactivates a beacon. Once deactivated, the API will not return + # information nor attachment data for the beacon when queried via + # `beaconinfo.getforobserved`. Calling this method on an already inactive + # beacon will do nothing (but will return a successful response code). + # Authenticate using an [OAuth access token](https://developers.google.com/ + # identity/protocols/OAuth2) + # from a signed-in user with **Is owner** or **Can edit** permissions in the + # Google Developers Console project. + # @param [String] beacon_name + # Beacon that should be deactivated. A beacon name has the format + # "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by + # the beacon and N is a code for the beacon's type. Possible values are + # `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` + # for AltBeacon. For Eddystone-EID beacons, you may use either the + # current EID or the beacon's "stable" UID. + # Required. + # @param [String] project_id + # The project id of the beacon to deactivate. If the project id is not + # specified then the project making the request is used. The project id must + # match the project that owns the beacon. + # Optional. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProximitybeaconV1beta1::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def deactivate_beacon(beacon_name, project_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+beaconName}:deactivate', options) + command.response_representation = Google::Apis::ProximitybeaconV1beta1::Empty::Representation + command.response_class = Google::Apis::ProximitybeaconV1beta1::Empty + command.params['beaconName'] = beacon_name unless beacon_name.nil? + command.query['projectId'] = project_id unless project_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -501,11 +613,11 @@ module Google # The project id of the beacon to delete. If not provided, the project # that is making the request is used. # 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 # @@ -518,73 +630,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 delete_beacon(beacon_name, project_id: nil, quota_user: nil, fields: nil, options: nil, &block) + def delete_beacon(beacon_name, project_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1beta1/{+beaconName}', options) command.response_representation = Google::Apis::ProximitybeaconV1beta1::Empty::Representation command.response_class = Google::Apis::ProximitybeaconV1beta1::Empty command.params['beaconName'] = beacon_name unless beacon_name.nil? command.query['projectId'] = project_id unless project_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end - # Associates the given data with the specified beacon. Attachment data must - # contain two parts: - #
    - #
  • A namespaced type.
  • - #
  • The actual attachment data itself.
  • - #
- # The namespaced type consists of two parts, the namespace and the type. - # The namespace must be one of the values returned by the `namespaces` - # endpoint, while the type can be a string of any characters except for the - # forward slash (`/`) up to 100 characters in length. - # Attachment data can be up to 1024 bytes long. + # List the diagnostics for a single beacon. You can also list diagnostics for + # all the beacons owned by your Google Developers Console project by using + # the beacon name `beacons/-`. # Authenticate using an [OAuth access token](https://developers.google.com/ # identity/protocols/OAuth2) - # from a signed-in user with **Is owner** or **Can edit** permissions in the - # Google Developers Console project. + # from a signed-in user with **viewer**, **Is owner** or **Can edit** + # permissions in the Google Developers Console project. # @param [String] beacon_name - # Beacon on which the attachment should be created. A beacon name has the - # format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast - # by the beacon and N is a code for the beacon's type. Possible values are - # `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` - # for AltBeacon. For Eddystone-EID beacons, you may use either the - # current EID or the beacon's "stable" UID. - # Required. - # @param [Google::Apis::ProximitybeaconV1beta1::BeaconAttachment] beacon_attachment_object + # Beacon that the diagnostics are for. + # @param [Fixnum] page_size + # Specifies the maximum number of results to return. Defaults to + # 10. Maximum 1000. Optional. + # @param [String] alert_filter + # Requests only beacons that have the given alert. For example, to find + # beacons that have low batteries use `alert_filter=LOW_BATTERY`. # @param [String] project_id - # The project id of the project the attachment will belong to. If - # the project id is not specified then the project making the request - # is used. - # Optional. + # Requests only diagnostic records for the given project id. If not set, + # then the project making the request will be used for looking up + # diagnostic records. Optional. + # @param [String] page_token + # Requests results that occur after the `page_token`, obtained from the + # response to a previous request. Optional. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::BeaconAttachment] parsed result object + # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::ListDiagnosticsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::ProximitybeaconV1beta1::BeaconAttachment] + # @return [Google::Apis::ProximitybeaconV1beta1::ListDiagnosticsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_beacon_attachment(beacon_name, beacon_attachment_object = nil, project_id: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1beta1/{+beaconName}/attachments', options) - command.request_representation = Google::Apis::ProximitybeaconV1beta1::BeaconAttachment::Representation - command.request_object = beacon_attachment_object - command.response_representation = Google::Apis::ProximitybeaconV1beta1::BeaconAttachment::Representation - command.response_class = Google::Apis::ProximitybeaconV1beta1::BeaconAttachment + def list_beacon_diagnostics(beacon_name, page_size: nil, alert_filter: nil, project_id: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+beaconName}/diagnostics', options) + command.response_representation = Google::Apis::ProximitybeaconV1beta1::ListDiagnosticsResponse::Representation + command.response_class = Google::Apis::ProximitybeaconV1beta1::ListDiagnosticsResponse command.params['beaconName'] = beacon_name unless beacon_name.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['alertFilter'] = alert_filter unless alert_filter.nil? command.query['projectId'] = project_id unless project_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -617,11 +723,11 @@ module Google # specified and the projectId string is empty, then the project # making the request is used. # 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 # @@ -634,15 +740,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 list_beacon_attachments(beacon_name, namespaced_type: nil, project_id: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_beacon_attachments(beacon_name, namespaced_type: nil, project_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta1/{+beaconName}/attachments', options) command.response_representation = Google::Apis::ProximitybeaconV1beta1::ListBeaconAttachmentsResponse::Representation command.response_class = Google::Apis::ProximitybeaconV1beta1::ListBeaconAttachmentsResponse command.params['beaconName'] = beacon_name unless beacon_name.nil? command.query['namespacedType'] = namespaced_type unless namespaced_type.nil? command.query['projectId'] = project_id unless project_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Associates the given data with the specified beacon. Attachment data must + # contain two parts: + #
    + #
  • A namespaced type.
  • + #
  • The actual attachment data itself.
  • + #
+ # The namespaced type consists of two parts, the namespace and the type. + # The namespace must be one of the values returned by the `namespaces` + # endpoint, while the type can be a string of any characters except for the + # forward slash (`/`) up to 100 characters in length. + # Attachment data can be up to 1024 bytes long. + # Authenticate using an [OAuth access token](https://developers.google.com/ + # identity/protocols/OAuth2) + # from a signed-in user with **Is owner** or **Can edit** permissions in the + # Google Developers Console project. + # @param [String] beacon_name + # Beacon on which the attachment should be created. A beacon name has the + # format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast + # by the beacon and N is a code for the beacon's type. Possible values are + # `3` for Eddystone-UID, `4` for Eddystone-EID, `1` for iBeacon, or `5` + # for AltBeacon. For Eddystone-EID beacons, you may use either the + # current EID or the beacon's "stable" UID. + # Required. + # @param [Google::Apis::ProximitybeaconV1beta1::BeaconAttachment] beacon_attachment_object + # @param [String] project_id + # The project id of the project the attachment will belong to. If + # the project id is not specified then the project making the request + # is used. + # 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 [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::BeaconAttachment] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::ProximitybeaconV1beta1::BeaconAttachment] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_beacon_attachment(beacon_name, beacon_attachment_object = nil, project_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+beaconName}/attachments', options) + command.request_representation = Google::Apis::ProximitybeaconV1beta1::BeaconAttachment::Representation + command.request_object = beacon_attachment_object + command.response_representation = Google::Apis::ProximitybeaconV1beta1::BeaconAttachment::Representation + command.response_class = Google::Apis::ProximitybeaconV1beta1::BeaconAttachment + command.params['beaconName'] = beacon_name unless beacon_name.nil? + command.query['projectId'] = project_id unless project_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -676,11 +841,11 @@ module Google # specified and the projectId string is empty, then the project # making the request is used. # 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 # @@ -693,15 +858,15 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_beacon_attachment_delete(beacon_name, namespaced_type: nil, project_id: nil, quota_user: nil, fields: nil, options: nil, &block) + def batch_beacon_attachment_delete(beacon_name, namespaced_type: nil, project_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1beta1/{+beaconName}/attachments:batchDelete', options) command.response_representation = Google::Apis::ProximitybeaconV1beta1::DeleteAttachmentsResponse::Representation command.response_class = Google::Apis::ProximitybeaconV1beta1::DeleteAttachmentsResponse command.params['beaconName'] = beacon_name unless beacon_name.nil? command.query['namespacedType'] = namespaced_type unless namespaced_type.nil? command.query['projectId'] = project_id unless project_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -725,11 +890,11 @@ module Google # The project id of the attachment to delete. If not provided, the project # that is making the request is used. # 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 # @@ -742,179 +907,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 delete_beacon_attachment(attachment_name, project_id: nil, quota_user: nil, fields: nil, options: nil, &block) + def delete_beacon_attachment(attachment_name, project_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1beta1/{+attachmentName}', options) command.response_representation = Google::Apis::ProximitybeaconV1beta1::Empty::Representation command.response_class = Google::Apis::ProximitybeaconV1beta1::Empty command.params['attachmentName'] = attachment_name unless attachment_name.nil? command.query['projectId'] = project_id unless project_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # List the diagnostics for a single beacon. You can also list diagnostics for - # all the beacons owned by your Google Developers Console project by using - # the beacon name `beacons/-`. - # Authenticate using an [OAuth access token](https://developers.google.com/ - # identity/protocols/OAuth2) - # from a signed-in user with **viewer**, **Is owner** or **Can edit** - # permissions in the Google Developers Console project. - # @param [String] beacon_name - # Beacon that the diagnostics are for. - # @param [Fixnum] page_size - # Specifies the maximum number of results to return. Defaults to - # 10. Maximum 1000. Optional. - # @param [String] alert_filter - # Requests only beacons that have the given alert. For example, to find - # beacons that have low batteries use `alert_filter=LOW_BATTERY`. - # @param [String] page_token - # Requests results that occur after the `page_token`, obtained from the - # response to a previous request. Optional. - # @param [String] project_id - # Requests only diagnostic records for the given project id. If not set, - # then the project making the request will be used for looking up - # diagnostic records. Optional. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::ListDiagnosticsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ProximitybeaconV1beta1::ListDiagnosticsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_beacon_diagnostics(beacon_name, page_size: nil, alert_filter: nil, page_token: nil, project_id: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1beta1/{+beaconName}/diagnostics', options) - command.response_representation = Google::Apis::ProximitybeaconV1beta1::ListDiagnosticsResponse::Representation - command.response_class = Google::Apis::ProximitybeaconV1beta1::ListDiagnosticsResponse - command.params['beaconName'] = beacon_name unless beacon_name.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['alertFilter'] = alert_filter unless alert_filter.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['projectId'] = project_id unless project_id.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Given one or more beacon observations, returns any beacon information - # and attachments accessible to your application. Authorize by using the - # [API key](https://developers.google.com/beacons/proximity/how-tos/authorizing# - # APIKey) - # for the application. - # @param [Google::Apis::ProximitybeaconV1beta1::GetInfoForObservedBeaconsRequest] get_info_for_observed_beacons_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::ProximitybeaconV1beta1::GetInfoForObservedBeaconsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ProximitybeaconV1beta1::GetInfoForObservedBeaconsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def getforobserved_beaconinfo(get_info_for_observed_beacons_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v1beta1/beaconinfo:getforobserved', options) - command.request_representation = Google::Apis::ProximitybeaconV1beta1::GetInfoForObservedBeaconsRequest::Representation - command.request_object = get_info_for_observed_beacons_request_object - command.response_representation = Google::Apis::ProximitybeaconV1beta1::GetInfoForObservedBeaconsResponse::Representation - command.response_class = Google::Apis::ProximitybeaconV1beta1::GetInfoForObservedBeaconsResponse - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Updates the information about the specified namespace. Only the namespace - # visibility can be updated. - # @param [String] namespace_name - # Resource name of this namespace. Namespaces names have the format: - # namespaces/namespace. - # @param [Google::Apis::ProximitybeaconV1beta1::Namespace] namespace_object - # @param [String] project_id - # The project id of the namespace to update. If the project id is not - # specified then the project making the request is used. The project id - # must match the project that owns the beacon. - # Optional. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::Namespace] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ProximitybeaconV1beta1::Namespace] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_namespace(namespace_name, namespace_object = nil, project_id: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:put, 'v1beta1/{+namespaceName}', options) - command.request_representation = Google::Apis::ProximitybeaconV1beta1::Namespace::Representation - command.request_object = namespace_object - command.response_representation = Google::Apis::ProximitybeaconV1beta1::Namespace::Representation - command.response_class = Google::Apis::ProximitybeaconV1beta1::Namespace - command.params['namespaceName'] = namespace_name unless namespace_name.nil? - command.query['projectId'] = project_id unless project_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Lists all attachment namespaces owned by your Google Developers Console - # project. Attachment data associated with a beacon must include a - # namespaced type, and the namespace must be owned by your project. - # Authenticate using an [OAuth access token](https://developers.google.com/ - # identity/protocols/OAuth2) - # from a signed-in user with **viewer**, **Is owner** or **Can edit** - # permissions in the Google Developers Console project. - # @param [String] project_id - # The project id to list namespaces under. - # Optional. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::ProximitybeaconV1beta1::ListNamespacesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::ProximitybeaconV1beta1::ListNamespacesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_namespaces(project_id: nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:get, 'v1beta1/namespaces', options) - command.response_representation = Google::Apis::ProximitybeaconV1beta1::ListNamespacesResponse::Representation - command.response_class = Google::Apis::ProximitybeaconV1beta1::ListNamespacesResponse - command.query['projectId'] = project_id unless project_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/pubsub_v1.rb b/generated/google/apis/pubsub_v1.rb index 44c4f71f7..5476a6109 100644 --- a/generated/google/apis/pubsub_v1.rb +++ b/generated/google/apis/pubsub_v1.rb @@ -25,13 +25,13 @@ module Google # @see https://cloud.google.com/pubsub/docs module PubsubV1 VERSION = 'V1' - REVISION = '20170214' - - # View and manage Pub/Sub topics and subscriptions - AUTH_PUBSUB = 'https://www.googleapis.com/auth/pubsub' + REVISION = '20170308' # 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' end end end diff --git a/generated/google/apis/pubsub_v1/classes.rb b/generated/google/apis/pubsub_v1/classes.rb index ebaeb1208..3b8665d07 100644 --- a/generated/google/apis/pubsub_v1/classes.rb +++ b/generated/google/apis/pubsub_v1/classes.rb @@ -22,6 +22,72 @@ module Google module Apis module PubsubV1 + # Associates `members` with a `role`. + class Binding + include Google::Apis::Core::Hashable + + # Specifies the identities requesting access for a Cloud Platform resource. + # `members` can have the following values: + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # * `user:`emailid``: An email address that represents a specific Google + # account. For example, `alice@gmail.com` or `joe@example.com`. + # * `serviceAccount:`emailid``: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # * `group:`emailid``: An email address that represents a Google group. + # For example, `admins@example.com`. + # * `domain:`domain``: A Google Apps domain name that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # Corresponds to the JSON property `members` + # @return [Array] + attr_accessor :members + + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # Corresponds to the JSON property `role` + # @return [String] + attr_accessor :role + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @members = args[:members] if args.key?(:members) + @role = args[:role] if args.key?(:role) + end + end + + # Response for the `ListTopics` method. + class ListTopicsResponse + include Google::Apis::Core::Hashable + + # If not empty, indicates that there may be more topics that match the + # request; this value should be passed in a new `ListTopicsRequest`. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The resulting topics. + # Corresponds to the JSON property `topics` + # @return [Array] + attr_accessor :topics + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @topics = args[:topics] if args.key?(:topics) + end + end + # Request for the Acknowledge method. class AcknowledgeRequest include Google::Apis::Core::Hashable @@ -61,32 +127,6 @@ module Google end end - # Response for the `ListTopics` method. - class ListTopicsResponse - include Google::Apis::Core::Hashable - - # If not empty, indicates that there may be more topics that match the - # request; this value should be passed in a new `ListTopicsRequest`. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # The resulting topics. - # Corresponds to the JSON property `topics` - # @return [Array] - attr_accessor :topics - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @topics = args[:topics] if args.key?(:topics) - end - end - # Response for the `ListTopicSubscriptions` method. class ListTopicSubscriptionsResponse include Google::Apis::Core::Hashable @@ -176,11 +216,10 @@ module Google # 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 + # use to change the format of the pushed 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. + # controls the shape of the pushed message (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` @@ -260,6 +299,11 @@ module Google class ListSubscriptionsResponse include Google::Apis::Core::Hashable + # The subscriptions that match the request. + # Corresponds to the JSON property `subscriptions` + # @return [Array] + attr_accessor :subscriptions + # If not empty, indicates that there may be more subscriptions that match # the request; this value should be passed in a new # `ListSubscriptionsRequest` to get more subscriptions. @@ -267,19 +311,14 @@ module Google # @return [String] attr_accessor :next_page_token - # The subscriptions that match the request. - # Corresponds to the JSON property `subscriptions` - # @return [Array] - attr_accessor :subscriptions - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) @subscriptions = args[:subscriptions] if args.key?(:subscriptions) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) end end @@ -327,6 +366,11 @@ module Google 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 + # 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 @@ -365,21 +409,16 @@ module Google # @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) + @push_config = args[:push_config] if args.key?(:push_config) @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 @@ -405,30 +444,6 @@ module Google end end - # A topic resource. - class Topic - include Google::Apis::Core::Hashable - - # The name of the topic. It must have the format - # `"projects/`project`/topics/`topic`"`. ``topic`` must start with a letter, - # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), - # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent - # signs (`%`). It must be between 3 and 255 characters in length, and it - # must not start with `"goog"`. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @name = args[:name] if args.key?(:name) - end - end - # 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 @@ -458,6 +473,18 @@ module Google class Policy include Google::Apis::Core::Hashable + # Version of the `Policy`. The default version is 0. + # Corresponds to the JSON property `version` + # @return [Fixnum] + attr_accessor :version + + # Associates a list of `members` to a `role`. + # Multiple `bindings` must not be specified for the same `role`. + # `bindings` with no members will result in an error. + # Corresponds to the JSON property `bindings` + # @return [Array] + attr_accessor :bindings + # `etag` is used for optimistic concurrency control as a way to help # prevent simultaneous updates of a policy from overwriting each other. # It is strongly suggested that systems make use of the `etag` in the @@ -471,17 +498,31 @@ module Google # @return [String] attr_accessor :etag - # Version of the `Policy`. The default version is 0. - # Corresponds to the JSON property `version` - # @return [Fixnum] - attr_accessor :version + def initialize(**args) + update!(**args) + end - # Associates a list of `members` to a `role`. - # Multiple `bindings` must not be specified for the same `role`. - # `bindings` with no members will result in an error. - # Corresponds to the JSON property `bindings` - # @return [Array] - attr_accessor :bindings + # Update properties of this object + def update!(**args) + @version = args[:version] if args.key?(:version) + @bindings = args[:bindings] if args.key?(:bindings) + @etag = args[:etag] if args.key?(:etag) + end + end + + # A topic resource. + class Topic + include Google::Apis::Core::Hashable + + # The name of the topic. It must have the format + # `"projects/`project`/topics/`topic`"`. ``topic`` must start with a letter, + # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), + # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent + # signs (`%`). It must be between 3 and 255 characters in length, and it + # must not start with `"goog"`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name def initialize(**args) update!(**args) @@ -489,9 +530,7 @@ module Google # Update properties of this object def update!(**args) - @etag = args[:etag] if args.key?(:etag) - @version = args[:version] if args.key?(:version) - @bindings = args[:bindings] if args.key?(:bindings) + @name = args[:name] if args.key?(:name) end end @@ -499,11 +538,6 @@ module Google class ModifyAckDeadlineRequest include Google::Apis::Core::Hashable - # List of acknowledgment IDs. - # Corresponds to the JSON property `ackIds` - # @return [Array] - attr_accessor :ack_ids - # The new ack deadline with respect to the time this request was sent to # the Pub/Sub system. For example, if the value is 10, the new # ack deadline will expire 10 seconds after the `ModifyAckDeadline` call @@ -515,14 +549,19 @@ module Google # @return [Fixnum] attr_accessor :ack_deadline_seconds + # List of acknowledgment IDs. + # Corresponds to the JSON property `ackIds` + # @return [Array] + attr_accessor :ack_ids + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @ack_ids = args[:ack_ids] if args.key?(:ack_ids) @ack_deadline_seconds = args[:ack_deadline_seconds] if args.key?(:ack_deadline_seconds) + @ack_ids = args[:ack_ids] if args.key?(:ack_ids) end end @@ -575,6 +614,13 @@ module Google class Message include Google::Apis::Core::Hashable + # The time at which the message was published, populated by the server when + # it receives the `Publish` call. It must not be populated by the + # publisher in a `Publish` call. + # Corresponds to the JSON property `publishTime` + # @return [String] + attr_accessor :publish_time + # The message payload. # Corresponds to the JSON property `data` # @return [String] @@ -593,23 +639,16 @@ module Google # @return [String] attr_accessor :message_id - # The time at which the message was published, populated by the server when - # it receives the `Publish` call. It must not be populated by the - # publisher in a `Publish` call. - # Corresponds to the JSON property `publishTime` - # @return [String] - attr_accessor :publish_time - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @publish_time = args[:publish_time] if args.key?(:publish_time) @data = args[:data] if args.key?(:data) @attributes = args[:attributes] if args.key?(:attributes) @message_id = args[:message_id] if args.key?(:message_id) - @publish_time = args[:publish_time] if args.key?(:publish_time) end end @@ -631,46 +670,6 @@ module Google @push_config = args[:push_config] if args.key?(:push_config) end end - - # Associates `members` with a `role`. - class Binding - include Google::Apis::Core::Hashable - - # Specifies the identities requesting access for a Cloud Platform resource. - # `members` can have the following values: - # * `allUsers`: A special identifier that represents anyone who is - # on the internet; with or without a Google account. - # * `allAuthenticatedUsers`: A special identifier that represents anyone - # who is authenticated with a Google account or a service account. - # * `user:`emailid``: An email address that represents a specific Google - # account. For example, `alice@gmail.com` or `joe@example.com`. - # * `serviceAccount:`emailid``: An email address that represents a service - # account. For example, `my-other-app@appspot.gserviceaccount.com`. - # * `group:`emailid``: An email address that represents a Google group. - # For example, `admins@example.com`. - # * `domain:`domain``: A Google Apps domain name that represents all the - # users of that domain. For example, `google.com` or `example.com`. - # Corresponds to the JSON property `members` - # @return [Array] - attr_accessor :members - - # Role that is assigned to `members`. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # Required - # Corresponds to the JSON property `role` - # @return [String] - attr_accessor :role - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @members = args[:members] if args.key?(:members) - @role = args[:role] if args.key?(:role) - end - end end end end diff --git a/generated/google/apis/pubsub_v1/representations.rb b/generated/google/apis/pubsub_v1/representations.rb index 10b092beb..1c9356bfb 100644 --- a/generated/google/apis/pubsub_v1/representations.rb +++ b/generated/google/apis/pubsub_v1/representations.rb @@ -22,6 +22,18 @@ module Google module Apis module PubsubV1 + class Binding + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListTopicsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class AcknowledgeRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -34,12 +46,6 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class ListTopicsResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class ListTopicSubscriptionsResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -106,13 +112,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Topic + class Policy class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Policy + class Topic class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -143,9 +149,20 @@ module Google end class Binding - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :members, as: 'members' + property :role, as: 'role' + end + end - include Google::Apis::Core::JsonObjectSupport + 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 + + end end class AcknowledgeRequest @@ -161,15 +178,6 @@ module Google end end - 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 - - end - end - class ListTopicSubscriptionsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -221,9 +229,9 @@ module Google 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 + property :next_page_token, as: 'nextPageToken' end end @@ -245,11 +253,11 @@ module Google 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 :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 @@ -260,6 +268,16 @@ module Google end end + class Policy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :version, as: 'version' + collection :bindings, as: 'bindings', class: Google::Apis::PubsubV1::Binding, decorator: Google::Apis::PubsubV1::Binding::Representation + + property :etag, :base64 => true, as: 'etag' + end + end + class Topic # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -267,21 +285,11 @@ module Google 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::PubsubV1::Binding, decorator: Google::Apis::PubsubV1::Binding::Representation - - end - end - class ModifyAckDeadlineRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :ack_ids, as: 'ackIds' property :ack_deadline_seconds, as: 'ackDeadlineSeconds' + collection :ack_ids, as: 'ackIds' end end @@ -296,10 +304,10 @@ module Google class Message # @private class Representation < Google::Apis::Core::JsonRepresentation + property :publish_time, as: 'publishTime' property :data, :base64 => true, as: 'data' hash :attributes, as: 'attributes' property :message_id, as: 'messageId' - property :publish_time, as: 'publishTime' end end @@ -310,14 +318,6 @@ module Google end end - - class Binding - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :members, as: 'members' - property :role, as: 'role' - end - end end end end diff --git a/generated/google/apis/pubsub_v1/service.rb b/generated/google/apis/pubsub_v1/service.rb index cc2e3ed2f..f779248a2 100644 --- a/generated/google/apis/pubsub_v1/service.rb +++ b/generated/google/apis/pubsub_v1/service.rb @@ -46,126 +46,21 @@ module Google super('https://pubsub.googleapis.com/', '') end - # Gets the configuration of a topic. - # @param [String] topic - # The name of the topic to get. - # Format is `projects/`project`/topics/`topic``. - # @param [String] fields - # Selector specifying which fields to include in a partial response. + # Acknowledges the messages associated with the `ack_ids` in the + # `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages + # from the subscription. + # Acknowledging a message whose ack deadline has expired may succeed, + # but such a message may be redelivered later. Acknowledging a message more + # than once will not result in an error. + # @param [String] subscription + # The subscription whose message is being acknowledged. + # Format is `projects/`project`/subscriptions/`sub``. + # @param [Google::Apis::PubsubV1::AcknowledgeRequest] acknowledge_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 [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1::Topic] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1::Topic] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_topic(topic, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+topic}', options) - command.response_representation = Google::Apis::PubsubV1::Topic::Representation - command.response_class = Google::Apis::PubsubV1::Topic - command.params['topic'] = topic unless topic.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic - # does not exist. The message payload must not be empty; it must contain - # either a non-empty data field, or at least one attribute. - # @param [String] topic - # The messages in the request will be published on this topic. - # Format is `projects/`project`/topics/`topic``. - # @param [Google::Apis::PubsubV1::PublishRequest] publish_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1::PublishResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1::PublishResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def publish_topic(topic, publish_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+topic}:publish', options) - command.request_representation = Google::Apis::PubsubV1::PublishRequest::Representation - command.request_object = publish_request_object - command.response_representation = Google::Apis::PubsubV1::PublishResponse::Representation - command.response_class = Google::Apis::PubsubV1::PublishResponse - command.params['topic'] = topic unless topic.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Returns permissions that a caller has on the specified resource. - # If the resource does not exist, this will return an empty set of - # permissions, not a NOT_FOUND error. - # Note: This operation is designed to be used for building permission-aware - # UIs and command-line tools, not for authorization checking. This operation - # may "fail open" without warning. - # @param [String] resource - # REQUIRED: The resource for which the policy detail is being requested. - # `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] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1::TestIamPermissionsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1::TestIamPermissionsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def test_topic_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options) - command.request_representation = Google::Apis::PubsubV1::TestIamPermissionsRequest::Representation - command.request_object = test_iam_permissions_request_object - command.response_representation = Google::Apis::PubsubV1::TestIamPermissionsResponse::Representation - command.response_class = Google::Apis::PubsubV1::TestIamPermissionsResponse - command.params['resource'] = resource unless resource.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Deletes the topic with the given name. Returns `NOT_FOUND` if the topic - # does not exist. After a topic is deleted, a new topic may be created with - # the same name; this is an entirely new topic with none of the old - # configuration or subscriptions. Existing subscriptions to this topic are - # not deleted, but their `topic` field is set to `_deleted-topic_`. - # @param [String] topic - # Name of the topic to delete. - # Format is `projects/`project`/topics/`topic``. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -178,126 +73,53 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def delete_topic(topic, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:delete, 'v1/{+topic}', options) + def acknowledge_subscription(subscription, acknowledge_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+subscription}:acknowledge', options) + command.request_representation = Google::Apis::PubsubV1::AcknowledgeRequest::Representation + command.request_object = acknowledge_request_object command.response_representation = Google::Apis::PubsubV1::Empty::Representation command.response_class = Google::Apis::PubsubV1::Empty - command.params['topic'] = topic unless topic.nil? - command.query['fields'] = fields unless fields.nil? + command.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 topics. - # @param [String] project - # The name of the cloud project that topics belong to. - # Format is `projects/`project``. - # @param [Fixnum] page_size - # Maximum number of topics to return. - # @param [String] page_token - # The value returned by the last `ListTopicsResponse`; indicates that this is - # a continuation of a prior `ListTopics` call, and that the system should - # return the next page of data. - # @param [String] fields - # Selector specifying which fields to include in a partial response. + # 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::ListTopicsResponse] parsed result object + # @yieldparam result [Google::Apis::PubsubV1::Empty] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::PubsubV1::ListTopicsResponse] + # @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 list_topics(project, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+project}/topics', options) - command.response_representation = Google::Apis::PubsubV1::ListTopicsResponse::Representation - command.response_class = Google::Apis::PubsubV1::ListTopicsResponse - command.params['project'] = project unless project.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? + 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? - execute_or_queue_command(command, &block) - end - - # Creates the given topic with the given name. - # @param [String] name - # The name of the topic. It must have the format - # `"projects/`project`/topics/`topic`"`. ``topic`` must start with a letter, - # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), - # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent - # signs (`%`). It must be between 3 and 255 characters in length, and it - # must not start with `"goog"`. - # @param [Google::Apis::PubsubV1::Topic] topic_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1::Topic] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1::Topic] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_topic(name, topic_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:put, 'v1/{+name}', options) - command.request_representation = Google::Apis::PubsubV1::Topic::Representation - command.request_object = topic_object - command.response_representation = Google::Apis::PubsubV1::Topic::Representation - command.response_class = Google::Apis::PubsubV1::Topic - command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Sets the access control policy on the specified resource. Replaces any - # existing policy. - # @param [String] resource - # REQUIRED: The resource for which the policy is being specified. - # `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] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1::Policy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1::Policy] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_topic_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options) - command.request_representation = Google::Apis::PubsubV1::SetIamPolicyRequest::Representation - command.request_object = set_iam_policy_request_object - command.response_representation = Google::Apis::PubsubV1::Policy::Representation - command.response_class = Google::Apis::PubsubV1::Policy - command.params['resource'] = resource unless resource.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -306,13 +128,12 @@ module Google # 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. + # See the operation documentation for the appropriate value for this field. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -325,52 +146,44 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_project_topic_iam_policy(resource, fields: nil, quota_user: nil, options: nil, &block) + 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['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end - # Lists the name of the subscriptions for this topic. - # @param [String] topic - # The name of the topic that subscriptions are attached to. - # Format is `projects/`project`/topics/`topic``. - # @param [Fixnum] page_size - # Maximum number of subscription names to return. - # @param [String] page_token - # The value returned by the last `ListTopicSubscriptionsResponse`; indicates - # that this is a continuation of a prior `ListTopicSubscriptions` call, and - # that the system should return the next page of data. - # @param [String] fields - # Selector specifying which fields to include in a partial response. + # 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::ListTopicSubscriptionsResponse] parsed result object + # @yieldparam result [Google::Apis::PubsubV1::Subscription] parsed result object # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::PubsubV1::ListTopicSubscriptionsResponse] + # @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 list_topic_subscriptions(topic, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+topic}/subscriptions', options) - command.response_representation = Google::Apis::PubsubV1::ListTopicSubscriptionsResponse::Representation - command.response_class = Google::Apis::PubsubV1::ListTopicSubscriptionsResponse - command.params['topic'] = topic unless topic.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['fields'] = fields unless fields.nil? + 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 @@ -382,14 +195,13 @@ module Google # may "fail open" without warning. # @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``. + # See the operation documentation for the appropriate value for this field. # @param [Google::Apis::PubsubV1::TestIamPermissionsRequest] test_iam_permissions_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -402,15 +214,15 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def test_subscription_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + 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['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -423,11 +235,11 @@ module Google # The name of the subscription. # Format is `projects/`project`/subscriptions/`sub``. # @param [Google::Apis::PubsubV1::ModifyPushConfigRequest] modify_push_config_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -440,15 +252,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 modify_subscription_push_config(subscription, modify_push_config_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def modify_subscription_push_config(subscription, modify_push_config_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+subscription}:modifyPushConfig', options) command.request_representation = Google::Apis::PubsubV1::ModifyPushConfigRequest::Representation command.request_object = modify_push_config_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['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -460,11 +272,11 @@ module Google # @param [String] subscription # The subscription to delete. # Format is `projects/`project`/subscriptions/`sub``. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -477,13 +289,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_subscription(subscription, fields: nil, quota_user: nil, options: nil, &block) + 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['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -495,11 +307,11 @@ module Google # The subscription from which messages should be pulled. # Format is `projects/`project`/subscriptions/`sub``. # @param [Google::Apis::PubsubV1::PullRequest] pull_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 # @@ -512,15 +324,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 pull_subscription(subscription, pull_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def pull_subscription(subscription, pull_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+subscription}:pull', options) command.request_representation = Google::Apis::PubsubV1::PullRequest::Representation command.request_object = pull_request_object command.response_representation = Google::Apis::PubsubV1::PullResponse::Representation command.response_class = Google::Apis::PubsubV1::PullResponse command.params['subscription'] = subscription unless subscription.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -534,11 +346,11 @@ module Google # system should return the next page of data. # @param [Fixnum] page_size # Maximum number of subscriptions to return. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -551,15 +363,50 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_subscriptions(project, page_token: nil, page_size: nil, fields: nil, quota_user: 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['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Sets the access control policy on the specified resource. Replaces any + # existing policy. + # @param [String] resource + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param [Google::Apis::PubsubV1::SetIamPolicyRequest] set_iam_policy_request_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include 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_subscription_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 @@ -580,11 +427,11 @@ module Google # plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters # in length, and it must not start with `"goog"`. # @param [Google::Apis::PubsubV1::Subscription] subscription_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -597,15 +444,15 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_subscription(name, subscription_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def create_subscription(name, subscription_object = nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:put, 'v1/{+name}', options) command.request_representation = Google::Apis::PubsubV1::Subscription::Representation command.request_object = subscription_object command.response_representation = Google::Apis::PubsubV1::Subscription::Representation command.response_class = Google::Apis::PubsubV1::Subscription command.params['name'] = name unless name.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -613,14 +460,13 @@ module Google # 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``. + # See the operation documentation for the appropriate value for this field. # @param [Google::Apis::PubsubV1::SetIamPolicyRequest] set_iam_policy_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -633,193 +479,15 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_subscription_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + def set_snapshot_iam_policy(resource, set_iam_policy_request_object = nil, 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['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Acknowledges the messages associated with the `ack_ids` in the - # `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages - # from the subscription. - # Acknowledging a message whose ack deadline has expired may succeed, - # but such a message may be redelivered later. Acknowledging a message more - # than once will not result in an error. - # @param [String] subscription - # The subscription whose message is being acknowledged. - # Format is `projects/`project`/subscriptions/`sub``. - # @param [Google::Apis::PubsubV1::AcknowledgeRequest] acknowledge_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1::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 acknowledge_subscription(subscription, acknowledge_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+subscription}:acknowledge', options) - command.request_representation = Google::Apis::PubsubV1::AcknowledgeRequest::Representation - command.request_object = acknowledge_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['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.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 name of the subscription. - # Format is `projects/`project`/subscriptions/`sub``. - # @param [Google::Apis::PubsubV1::ModifyAckDeadlineRequest] modify_ack_deadline_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1::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, fields: nil, quota_user: 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['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::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, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options) - command.response_representation = Google::Apis::PubsubV1::Policy::Representation - command.response_class = Google::Apis::PubsubV1::Policy - command.params['resource'] = resource unless resource.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets the configuration details of a subscription. - # @param [String] subscription - # The name of the subscription to get. - # Format is `projects/`project`/subscriptions/`sub``. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1::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, fields: nil, quota_user: 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['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::PubsubV1::SetIamPolicyRequest] set_iam_policy_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::PubsubV1::Policy] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::PubsubV1::Policy] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_snapshot_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options) - command.request_representation = Google::Apis::PubsubV1::SetIamPolicyRequest::Representation - command.request_object = set_iam_policy_request_object - command.response_representation = Google::Apis::PubsubV1::Policy::Representation - command.response_class = Google::Apis::PubsubV1::Policy - command.params['resource'] = resource unless resource.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -831,14 +499,13 @@ module Google # may "fail open" without warning. # @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``. + # See the operation documentation for the appropriate value for this field. # @param [Google::Apis::PubsubV1::TestIamPermissionsRequest] test_iam_permissions_request_object - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -851,15 +518,15 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def test_snapshot_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + 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['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -868,13 +535,12 @@ module Google # 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. + # See the operation documentation for the appropriate value for this field. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -887,13 +553,338 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @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, fields: nil, quota_user: 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 command.params['resource'] = resource unless resource.nil? - command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # 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 matching topics. + # @param [String] project + # The name of the cloud project that topics belong to. + # Format is `projects/`project``. + # @param [String] page_token + # The value returned by the last `ListTopicsResponse`; indicates that this is + # a continuation of a prior `ListTopics` call, and that the system should + # return the next page of data. + # @param [Fixnum] page_size + # Maximum number of topics to return. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include 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::ListTopicsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::PubsubV1::ListTopicsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_topics(project, page_token: nil, page_size: nil, 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['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 the specified resource. Replaces any + # existing policy. + # @param [String] resource + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param [Google::Apis::PubsubV1::SetIamPolicyRequest] set_iam_policy_request_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include 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_topic_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 + + # Creates the given topic with the given name. + # @param [String] name + # The name of the topic. It must have the format + # `"projects/`project`/topics/`topic`"`. ``topic`` must start with a letter, + # and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), + # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent + # signs (`%`). It must be between 3 and 255 characters in length, and it + # must not start with `"goog"`. + # @param [Google::Apis::PubsubV1::Topic] topic_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include 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 create_topic(name, topic_object = nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:put, 'v1/{+name}', options) + command.request_representation = Google::Apis::PubsubV1::Topic::Representation + command.request_object = topic_object + command.response_representation = Google::Apis::PubsubV1::Topic::Representation + command.response_class = Google::Apis::PubsubV1::Topic + command.params['name'] = name unless name.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Gets the access control policy for a resource. + # Returns an empty policy if the resource exists and does not have a policy + # set. + # @param [String] resource + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include 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 + # 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['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? + execute_or_queue_command(command, &block) + end + + # Returns permissions that a caller has on the specified resource. + # If the resource does not exist, this will return an empty set of + # permissions, not a NOT_FOUND error. + # Note: This operation is designed to be used for building permission-aware + # UIs and command-line tools, not for authorization checking. This operation + # may "fail open" without warning. + # @param [String] resource + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param [Google::Apis::PubsubV1::TestIamPermissionsRequest] test_iam_permissions_request_object + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include 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_topic_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 + + # Lists the name of the subscriptions for this topic. + # @param [String] topic + # The name of the topic that subscriptions are attached to. + # Format is `projects/`project`/topics/`topic``. + # @param [String] page_token + # The value returned by the last `ListTopicSubscriptionsResponse`; indicates + # that this is a continuation of a prior `ListTopicSubscriptions` call, and + # that the system should return the next page of data. + # @param [Fixnum] page_size + # Maximum number of subscription names to return. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include 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::ListTopicSubscriptionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::PubsubV1::ListTopicSubscriptionsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_topic_subscriptions(topic, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+topic}/subscriptions', options) + command.response_representation = Google::Apis::PubsubV1::ListTopicSubscriptionsResponse::Representation + command.response_class = Google::Apis::PubsubV1::ListTopicSubscriptionsResponse + command.params['topic'] = topic unless topic.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/reseller_v1.rb b/generated/google/apis/reseller_v1.rb index 20e2257c5..cca9ed26c 100644 --- a/generated/google/apis/reseller_v1.rb +++ b/generated/google/apis/reseller_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/google-apps/reseller/ module ResellerV1 VERSION = 'V1' - REVISION = '20170216' + REVISION = '20170228' # Manage users on your domain AUTH_APPS_ORDER = 'https://www.googleapis.com/auth/apps.order' diff --git a/generated/google/apis/reseller_v1/classes.rb b/generated/google/apis/reseller_v1/classes.rb index b9472b044..0136726e8 100644 --- a/generated/google/apis/reseller_v1/classes.rb +++ b/generated/google/apis/reseller_v1/classes.rb @@ -452,6 +452,14 @@ module Google # @return [String] attr_accessor :sku_id + # Read-only external display name for a product's SKU assigned to a customer in + # the subscription. SKU names are subject to change at Google's discretion. For + # products and SKUs available in this version of the API, see Product and SKU + # IDs. + # Corresponds to the JSON property `skuName` + # @return [String] + attr_accessor :sku_name + # This is an optional property. # Corresponds to the JSON property `status` # @return [String] @@ -513,6 +521,7 @@ module Google @resource_ui_url = args[:resource_ui_url] if args.key?(:resource_ui_url) @seats = args[:seats] if args.key?(:seats) @sku_id = args[:sku_id] if args.key?(:sku_id) + @sku_name = args[:sku_name] if args.key?(:sku_name) @status = args[:status] if args.key?(:status) @subscription_id = args[:subscription_id] if args.key?(:subscription_id) @suspension_reasons = args[:suspension_reasons] if args.key?(:suspension_reasons) diff --git a/generated/google/apis/reseller_v1/representations.rb b/generated/google/apis/reseller_v1/representations.rb index a5b7db4f4..30c2aad24 100644 --- a/generated/google/apis/reseller_v1/representations.rb +++ b/generated/google/apis/reseller_v1/representations.rb @@ -194,6 +194,7 @@ module Google property :seats, as: 'seats', class: Google::Apis::ResellerV1::Seats, decorator: Google::Apis::ResellerV1::Seats::Representation property :sku_id, as: 'skuId' + property :sku_name, as: 'skuName' property :status, as: 'status' property :subscription_id, as: 'subscriptionId' collection :suspension_reasons, as: 'suspensionReasons' diff --git a/generated/google/apis/script_v1.rb b/generated/google/apis/script_v1.rb index ed4209fa0..97bc30eaf 100644 --- a/generated/google/apis/script_v1.rb +++ b/generated/google/apis/script_v1.rb @@ -25,7 +25,10 @@ module Google # @see https://developers.google.com/apps-script/execution/rest/v1/scripts/run module ScriptV1 VERSION = 'V1' - REVISION = '20170228' + REVISION = '20170321' + + # View your email address + AUTH_USERINFO_EMAIL = 'https://www.googleapis.com/auth/userinfo.email' # Manage your calendars CALENDAR_FEEDS = 'https://www.google.com/calendar/feeds' @@ -39,26 +42,23 @@ module Google # 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' - # Read, send, delete, and manage your email AUTH_SCOPE = 'https://mail.google.com/' - # View and manage the provisioning of users on your domain - AUTH_ADMIN_DIRECTORY_USER = 'https://www.googleapis.com/auth/admin.directory.user' + # View and manage your spreadsheets in Google Drive + AUTH_SPREADSHEETS = 'https://www.googleapis.com/auth/spreadsheets' # View and manage the provisioning of groups on your domain AUTH_ADMIN_DIRECTORY_GROUP = 'https://www.googleapis.com/auth/admin.directory.group' + # View and manage the provisioning of users on your domain + AUTH_ADMIN_DIRECTORY_USER = 'https://www.googleapis.com/auth/admin.directory.user' + # View and manage your forms in Google Drive AUTH_FORMS = 'https://www.googleapis.com/auth/forms' # Manage your contacts M8_FEEDS = 'https://www.google.com/m8/feeds' - - # View your email address - AUTH_USERINFO_EMAIL = 'https://www.googleapis.com/auth/userinfo.email' end end end diff --git a/generated/google/apis/script_v1/classes.rb b/generated/google/apis/script_v1/classes.rb index d8e275ac0..1c31129e3 100644 --- a/generated/google/apis/script_v1/classes.rb +++ b/generated/google/apis/script_v1/classes.rb @@ -22,6 +22,164 @@ module Google module Apis module ScriptV1 + # A stack trace through the script that shows where the execution failed. + class ScriptStackTraceElement + include Google::Apis::Core::Hashable + + # The name of the function that failed. + # Corresponds to the JSON property `function` + # @return [String] + attr_accessor :function + + # The line number where the script failed. + # Corresponds to the JSON property `lineNumber` + # @return [Fixnum] + attr_accessor :line_number + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @function = args[:function] if args.key?(:function) + @line_number = args[:line_number] if args.key?(:line_number) + end + end + + # An object that provides information about the nature of an error in the Apps + # Script Execution API. If an + # `run` call succeeds but the + # script function (or Apps Script itself) throws an exception, the response + # body's `error` field contains a + # `Status` object. The `Status` object's `details` field + # contains an array with a single one of these `ExecutionError` objects. + class ExecutionError + include Google::Apis::Core::Hashable + + # The error type, for example `TypeError` or `ReferenceError`. If the error + # type is unavailable, this field is not included. + # Corresponds to the JSON property `errorType` + # @return [String] + attr_accessor :error_type + + # The error message thrown by Apps Script, usually localized into the user's + # language. + # Corresponds to the JSON property `errorMessage` + # @return [String] + attr_accessor :error_message + + # An array of objects that provide a stack trace through the script to show + # where the execution failed, with the deepest call first. + # Corresponds to the JSON property `scriptStackTraceElements` + # @return [Array] + attr_accessor :script_stack_trace_elements + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @error_type = args[:error_type] if args.key?(:error_type) + @error_message = args[:error_message] if args.key?(:error_message) + @script_stack_trace_elements = args[:script_stack_trace_elements] if args.key?(:script_stack_trace_elements) + end + end + + # If a `run` call succeeds but the script function (or Apps Script itself) + # throws an exception, the response body's `error` field will contain this ` + # Status` object. + class Status + include Google::Apis::Core::Hashable + + # An array that contains a single `ExecutionError` object that provides + # information about the nature of the error. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + + # The status code. For this API, this value will always be 3, corresponding to + # an INVALID_ARGUMENT error. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + + # A developer-facing error message, which is in English. Any user-facing error + # message is localized and sent in the [`google.rpc.Status.details`](google.rpc. + # Status.details) field, or localized by the client. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @details = args[:details] if args.key?(:details) + @code = args[:code] if args.key?(:code) + @message = args[:message] if args.key?(:message) + end + end + + # A request to run the function in a script. The script is identified by the + # specified `script_id`. Executing a function on a script returns results + # based on the implementation of the script. + class ExecutionRequest + include Google::Apis::Core::Hashable + + # The name of the function to execute in the given script. The name does not + # include parentheses or parameters. + # Corresponds to the JSON property `function` + # @return [String] + attr_accessor :function + + # If `true` and the user is an owner of the script, the script runs at the + # most recently saved version rather than the version deployed for use with + # the Execution API. Optional; default is `false`. + # Corresponds to the JSON property `devMode` + # @return [Boolean] + attr_accessor :dev_mode + alias_method :dev_mode?, :dev_mode + + # The parameters to be passed to the function being executed. The object type + # for each parameter should match the expected type in Apps Script. + # Parameters cannot be Apps Script-specific object types (such as a + # `Document` or a `Calendar`); they can only be primitive types such as + # `string`, `number`, `array`, `object`, or `boolean`. Optional. + # Corresponds to the JSON property `parameters` + # @return [Array] + attr_accessor :parameters + + # For Android add-ons only. An ID that represents the user's current session + # in the Android app for Google Docs or Sheets, included as extra data in the + # [`Intent`](https://developer.android.com/guide/components/intents-filters.html) + # that launches the add-on. When an Android add-on is run with a session + # state, it gains the privileges of a + # [bound](https://developers.google.com/apps-script/guides/bound) script — + # that is, it can access information like the user's current cursor position + # (in Docs) or selected cell (in Sheets). To retrieve the state, call + # `Intent.getStringExtra("com.google.android.apps.docs.addons.SessionState")`. + # Optional. + # Corresponds to the JSON property `sessionState` + # @return [String] + attr_accessor :session_state + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @function = args[:function] if args.key?(:function) + @dev_mode = args[:dev_mode] if args.key?(:dev_mode) + @parameters = args[:parameters] if args.key?(:parameters) + @session_state = args[:session_state] if args.key?(:session_state) + end + end + # An object that provides the return value of a function executed through the # Apps Script Execution API. If a # `run` call succeeds and the @@ -110,164 +268,6 @@ module Google @metadata = args[:metadata] if args.key?(:metadata) end end - - # A stack trace through the script that shows where the execution failed. - class ScriptStackTraceElement - include Google::Apis::Core::Hashable - - # The line number where the script failed. - # Corresponds to the JSON property `lineNumber` - # @return [Fixnum] - attr_accessor :line_number - - # The name of the function that failed. - # Corresponds to the JSON property `function` - # @return [String] - attr_accessor :function - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @line_number = args[:line_number] if args.key?(:line_number) - @function = args[:function] if args.key?(:function) - end - end - - # An object that provides information about the nature of an error in the Apps - # Script Execution API. If an - # `run` call succeeds but the - # script function (or Apps Script itself) throws an exception, the response - # body's `error` field contains a - # `Status` object. The `Status` object's `details` field - # contains an array with a single one of these `ExecutionError` objects. - class ExecutionError - include Google::Apis::Core::Hashable - - # The error type, for example `TypeError` or `ReferenceError`. If the error - # type is unavailable, this field is not included. - # Corresponds to the JSON property `errorType` - # @return [String] - attr_accessor :error_type - - # The error message thrown by Apps Script, usually localized into the user's - # language. - # Corresponds to the JSON property `errorMessage` - # @return [String] - attr_accessor :error_message - - # An array of objects that provide a stack trace through the script to show - # where the execution failed, with the deepest call first. - # Corresponds to the JSON property `scriptStackTraceElements` - # @return [Array] - attr_accessor :script_stack_trace_elements - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @error_type = args[:error_type] if args.key?(:error_type) - @error_message = args[:error_message] if args.key?(:error_message) - @script_stack_trace_elements = args[:script_stack_trace_elements] if args.key?(:script_stack_trace_elements) - end - end - - # If a `run` call succeeds but the script function (or Apps Script itself) - # throws an exception, the response body's `error` field will contain this ` - # Status` object. - class Status - include Google::Apis::Core::Hashable - - # An array that contains a single `ExecutionError` object that provides - # information about the nature of the error. - # Corresponds to the JSON property `details` - # @return [Array>] - attr_accessor :details - - # The status code. For this API, this value will always be 3, corresponding to - # an INVALID_ARGUMENT error. - # Corresponds to the JSON property `code` - # @return [Fixnum] - attr_accessor :code - - # A developer-facing error message, which is in English. Any user-facing error - # message is localized and sent in the [`google.rpc.Status.details`](google.rpc. - # Status.details) field, or localized by the client. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @details = args[:details] if args.key?(:details) - @code = args[:code] if args.key?(:code) - @message = args[:message] if args.key?(:message) - end - end - - # A request to run the function in a script. The script is identified by the - # specified `script_id`. Executing a function on a script returns results - # based on the implementation of the script. - class ExecutionRequest - include Google::Apis::Core::Hashable - - # For Android add-ons only. An ID that represents the user's current session - # in the Android app for Google Docs or Sheets, included as extra data in the - # [`Intent`](https://developer.android.com/guide/components/intents-filters.html) - # that launches the add-on. When an Android add-on is run with a session - # state, it gains the privileges of a - # [bound](https://developers.google.com/apps-script/guides/bound) script — - # that is, it can access information like the user's current cursor position - # (in Docs) or selected cell (in Sheets). To retrieve the state, call - # `Intent.getStringExtra("com.google.android.apps.docs.addons.SessionState")`. - # Optional. - # Corresponds to the JSON property `sessionState` - # @return [String] - attr_accessor :session_state - - # The name of the function to execute in the given script. The name does not - # include parentheses or parameters. - # Corresponds to the JSON property `function` - # @return [String] - attr_accessor :function - - # If `true` and the user is an owner of the script, the script runs at the - # most recently saved version rather than the version deployed for use with - # the Execution API. Optional; default is `false`. - # Corresponds to the JSON property `devMode` - # @return [Boolean] - attr_accessor :dev_mode - alias_method :dev_mode?, :dev_mode - - # The parameters to be passed to the function being executed. The object type - # for each parameter should match the expected type in Apps Script. - # Parameters cannot be Apps Script-specific object types (such as a - # `Document` or a `Calendar`); they can only be primitive types such as - # `string`, `number`, `array`, `object`, or `boolean`. Optional. - # Corresponds to the JSON property `parameters` - # @return [Array] - attr_accessor :parameters - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @session_state = args[:session_state] if args.key?(:session_state) - @function = args[:function] if args.key?(:function) - @dev_mode = args[:dev_mode] if args.key?(:dev_mode) - @parameters = args[:parameters] if args.key?(:parameters) - end - end end end end diff --git a/generated/google/apis/script_v1/representations.rb b/generated/google/apis/script_v1/representations.rb index 3292b6fb0..b6b34a08b 100644 --- a/generated/google/apis/script_v1/representations.rb +++ b/generated/google/apis/script_v1/representations.rb @@ -22,18 +22,6 @@ module Google module Apis module ScriptV1 - class ExecutionResponse - 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 ScriptStackTraceElement class Representation < Google::Apis::Core::JsonRepresentation; end @@ -59,29 +47,22 @@ module Google end class ExecutionResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :result, as: 'result' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport 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::ScriptV1::Status, decorator: Google::Apis::ScriptV1::Status::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - hash :metadata, as: 'metadata' - end + include Google::Apis::Core::JsonObjectSupport end class ScriptStackTraceElement # @private class Representation < Google::Apis::Core::JsonRepresentation - property :line_number, as: 'lineNumber' property :function, as: 'function' + property :line_number, as: 'lineNumber' end end @@ -107,10 +88,29 @@ module Google class ExecutionRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :session_state, as: 'sessionState' property :function, as: 'function' property :dev_mode, as: 'devMode' collection :parameters, as: 'parameters' + property :session_state, as: 'sessionState' + end + end + + class ExecutionResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :result, as: 'result' + 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::ScriptV1::Status, decorator: Google::Apis::ScriptV1::Status::Representation + + hash :metadata, as: 'metadata' end end end diff --git a/generated/google/apis/sheets_v4.rb b/generated/google/apis/sheets_v4.rb index b2f228bc0..b6b7a265f 100644 --- a/generated/google/apis/sheets_v4.rb +++ b/generated/google/apis/sheets_v4.rb @@ -25,7 +25,10 @@ module Google # @see https://developers.google.com/sheets/ module SheetsV4 VERSION = 'V4' - REVISION = '20170303' + REVISION = '20170323' + + # View and manage your spreadsheets in Google Drive + AUTH_SPREADSHEETS = 'https://www.googleapis.com/auth/spreadsheets' # View and manage the files in your Google Drive AUTH_DRIVE = 'https://www.googleapis.com/auth/drive' @@ -35,9 +38,6 @@ module Google # View your Google Spreadsheets AUTH_SPREADSHEETS_READONLY = 'https://www.googleapis.com/auth/spreadsheets.readonly' - - # View and manage your spreadsheets in Google Drive - AUTH_SPREADSHEETS = 'https://www.googleapis.com/auth/spreadsheets' end end end diff --git a/generated/google/apis/sheets_v4/classes.rb b/generated/google/apis/sheets_v4/classes.rb index d522a37e8..59e1a9289 100644 --- a/generated/google/apis/sheets_v4/classes.rb +++ b/generated/google/apis/sheets_v4/classes.rb @@ -22,2828 +22,10 @@ module Google module Apis module SheetsV4 - # Properties of a sheet. - class SheetProperties - include Google::Apis::Core::Hashable - - # The name of the sheet. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The index of the sheet within the spreadsheet. - # When adding or updating sheet properties, if this field - # is excluded then the sheet will be added or moved to the end - # of the sheet list. When updating sheet indices or inserting - # sheets, movement is considered in "before the move" indexes. - # For example, if there were 3 sheets (S1, S2, S3) in order to - # move S1 ahead of S2 the index would have to be set to 2. A sheet - # index update request will be ignored if the requested index is - # identical to the sheets current index or if the requested new - # index is equal to the current sheet index + 1. - # Corresponds to the JSON property `index` - # @return [Fixnum] - attr_accessor :index - - # Represents a color in the RGBA color space. This representation is designed - # for simplicity of conversion to/from color representations in various - # languages over compactness; for example, the fields of this representation - # can be trivially provided to the constructor of "java.awt.Color" in Java; it - # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" - # method in iOS; and, with just a little work, it can be easily formatted into - # a CSS "rgba()" string in JavaScript, as well. Here are some examples: - # Example (Java): - # import com.google.type.Color; - # // ... - # public static java.awt.Color fromProto(Color protocolor) ` - # float alpha = protocolor.hasAlpha() - # ? protocolor.getAlpha().getValue() - # : 1.0; - # return new java.awt.Color( - # protocolor.getRed(), - # protocolor.getGreen(), - # protocolor.getBlue(), - # alpha); - # ` - # public static Color toProto(java.awt.Color color) ` - # float red = (float) color.getRed(); - # float green = (float) color.getGreen(); - # float blue = (float) color.getBlue(); - # float denominator = 255.0; - # Color.Builder resultBuilder = - # Color - # .newBuilder() - # .setRed(red / denominator) - # .setGreen(green / denominator) - # .setBlue(blue / denominator); - # int alpha = color.getAlpha(); - # if (alpha != 255) ` - # result.setAlpha( - # FloatValue - # .newBuilder() - # .setValue(((float) alpha) / denominator) - # .build()); - # ` - # return resultBuilder.build(); - # ` - # // ... - # Example (iOS / Obj-C): - # // ... - # static UIColor* fromProto(Color* protocolor) ` - # float red = [protocolor red]; - # float green = [protocolor green]; - # float blue = [protocolor blue]; - # FloatValue* alpha_wrapper = [protocolor alpha]; - # float alpha = 1.0; - # if (alpha_wrapper != nil) ` - # alpha = [alpha_wrapper value]; - # ` - # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; - # ` - # static Color* toProto(UIColor* color) ` - # CGFloat red, green, blue, alpha; - # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` - # return nil; - # ` - # Color* result = [Color alloc] init]; - # [result setRed:red]; - # [result setGreen:green]; - # [result setBlue:blue]; - # if (alpha <= 0.9999) ` - # [result setAlpha:floatWrapperWithValue(alpha)]; - # ` - # [result autorelease]; - # return result; - # ` - # // ... - # Example (JavaScript): - # // ... - # var protoToCssColor = function(rgb_color) ` - # var redFrac = rgb_color.red || 0.0; - # var greenFrac = rgb_color.green || 0.0; - # var blueFrac = rgb_color.blue || 0.0; - # var red = Math.floor(redFrac * 255); - # var green = Math.floor(greenFrac * 255); - # var blue = Math.floor(blueFrac * 255); - # if (!('alpha' in rgb_color)) ` - # return rgbToCssColor_(red, green, blue); - # ` - # var alphaFrac = rgb_color.alpha.value || 0.0; - # var rgbParams = [red, green, blue].join(','); - # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); - # `; - # var rgbToCssColor_ = function(red, green, blue) ` - # var rgbNumber = new Number((red << 16) | (green << 8) | blue); - # var hexString = rgbNumber.toString(16); - # var missingZeros = 6 - hexString.length; - # var resultBuilder = ['#']; - # for (var i = 0; i < missingZeros; i++) ` - # resultBuilder.push('0'); - # ` - # resultBuilder.push(hexString); - # return resultBuilder.join(''); - # `; - # // ... - # Corresponds to the JSON property `tabColor` - # @return [Google::Apis::SheetsV4::Color] - attr_accessor :tab_color - - # The ID of the sheet. Must be non-negative. - # This field cannot be changed once set. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - # True if the sheet is an RTL sheet instead of an LTR sheet. - # Corresponds to the JSON property `rightToLeft` - # @return [Boolean] - attr_accessor :right_to_left - alias_method :right_to_left?, :right_to_left - - # True if the sheet is hidden in the UI, false if it's visible. - # Corresponds to the JSON property `hidden` - # @return [Boolean] - attr_accessor :hidden - alias_method :hidden?, :hidden - - # The type of sheet. Defaults to GRID. - # This field cannot be changed once set. - # Corresponds to the JSON property `sheetType` - # @return [String] - attr_accessor :sheet_type - - # Properties of a grid. - # Corresponds to the JSON property `gridProperties` - # @return [Google::Apis::SheetsV4::GridProperties] - attr_accessor :grid_properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @title = args[:title] if args.key?(:title) - @index = args[:index] if args.key?(:index) - @tab_color = args[:tab_color] if args.key?(:tab_color) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @right_to_left = args[:right_to_left] if args.key?(:right_to_left) - @hidden = args[:hidden] if args.key?(:hidden) - @sheet_type = args[:sheet_type] if args.key?(:sheet_type) - @grid_properties = args[:grid_properties] if args.key?(:grid_properties) - end - end - - # Updates properties of dimensions within the specified range. - class UpdateDimensionPropertiesRequest - include Google::Apis::Core::Hashable - - # Properties about a dimension. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV4::DimensionProperties] - attr_accessor :properties - - # A range along a single dimension on a sheet. - # All indexes are zero-based. - # Indexes are half open: the start index is inclusive - # and the end index is exclusive. - # Missing indexes indicate the range is unbounded on that side. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::DimensionRange] - attr_accessor :range - - # The fields that should be updated. At least one field must be specified. - # The root `properties` is implied and should not be specified. - # A single `"*"` can be used as short-hand for listing every field. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @properties = args[:properties] if args.key?(:properties) - @range = args[:range] if args.key?(:range) - @fields = args[:fields] if args.key?(:fields) - end - end - - # A combination of a source range and how to extend that source. - class SourceAndDestination - include Google::Apis::Core::Hashable - - # The dimension that data should be filled into. - # Corresponds to the JSON property `dimension` - # @return [String] - attr_accessor :dimension - - # The number of rows or columns that data should be filled into. - # Positive numbers expand beyond the last row or last column - # of the source. Negative numbers expand before the first row - # or first column of the source. - # Corresponds to the JSON property `fillLength` - # @return [Fixnum] - attr_accessor :fill_length - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `source` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :source - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dimension = args[:dimension] if args.key?(:dimension) - @fill_length = args[:fill_length] if args.key?(:fill_length) - @source = args[:source] if args.key?(:source) - end - end - - # A filter view. - class FilterView - include Google::Apis::Core::Hashable - - # The named range this filter view is backed by, if any. - # When writing, only one of range or named_range_id - # may be set. - # Corresponds to the JSON property `namedRangeId` - # @return [String] - attr_accessor :named_range_id - - # The ID of the filter view. - # Corresponds to the JSON property `filterViewId` - # @return [Fixnum] - attr_accessor :filter_view_id - - # The criteria for showing/hiding values per column. - # The map's key is the column index, and the value is the criteria for - # that column. - # Corresponds to the JSON property `criteria` - # @return [Hash] - attr_accessor :criteria - - # The name of the filter view. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :range - - # The sort order per column. Later specifications are used when values - # are equal in the earlier specifications. - # Corresponds to the JSON property `sortSpecs` - # @return [Array] - attr_accessor :sort_specs - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @named_range_id = args[:named_range_id] if args.key?(:named_range_id) - @filter_view_id = args[:filter_view_id] if args.key?(:filter_view_id) - @criteria = args[:criteria] if args.key?(:criteria) - @title = args[:title] if args.key?(:title) - @range = args[:range] if args.key?(:range) - @sort_specs = args[:sort_specs] if args.key?(:sort_specs) - end - end - - # Properties referring a single dimension (either row or column). If both - # BandedRange.row_properties and BandedRange.column_properties are - # set, the fill colors are applied to cells according to the following rules: - # * header_color and footer_color take priority over band colors. - # * first_band_color takes priority over second_band_color. - # * row_properties takes priority over column_properties. - # For example, the first row color takes priority over the first column - # color, but the first column color takes priority over the second row color. - # Similarly, the row header takes priority over the column header in the - # top left cell, but the column header takes priority over the first row - # color if the row header is not set. - class BandingProperties - include Google::Apis::Core::Hashable - - # Represents a color in the RGBA color space. This representation is designed - # for simplicity of conversion to/from color representations in various - # languages over compactness; for example, the fields of this representation - # can be trivially provided to the constructor of "java.awt.Color" in Java; it - # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" - # method in iOS; and, with just a little work, it can be easily formatted into - # a CSS "rgba()" string in JavaScript, as well. Here are some examples: - # Example (Java): - # import com.google.type.Color; - # // ... - # public static java.awt.Color fromProto(Color protocolor) ` - # float alpha = protocolor.hasAlpha() - # ? protocolor.getAlpha().getValue() - # : 1.0; - # return new java.awt.Color( - # protocolor.getRed(), - # protocolor.getGreen(), - # protocolor.getBlue(), - # alpha); - # ` - # public static Color toProto(java.awt.Color color) ` - # float red = (float) color.getRed(); - # float green = (float) color.getGreen(); - # float blue = (float) color.getBlue(); - # float denominator = 255.0; - # Color.Builder resultBuilder = - # Color - # .newBuilder() - # .setRed(red / denominator) - # .setGreen(green / denominator) - # .setBlue(blue / denominator); - # int alpha = color.getAlpha(); - # if (alpha != 255) ` - # result.setAlpha( - # FloatValue - # .newBuilder() - # .setValue(((float) alpha) / denominator) - # .build()); - # ` - # return resultBuilder.build(); - # ` - # // ... - # Example (iOS / Obj-C): - # // ... - # static UIColor* fromProto(Color* protocolor) ` - # float red = [protocolor red]; - # float green = [protocolor green]; - # float blue = [protocolor blue]; - # FloatValue* alpha_wrapper = [protocolor alpha]; - # float alpha = 1.0; - # if (alpha_wrapper != nil) ` - # alpha = [alpha_wrapper value]; - # ` - # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; - # ` - # static Color* toProto(UIColor* color) ` - # CGFloat red, green, blue, alpha; - # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` - # return nil; - # ` - # Color* result = [Color alloc] init]; - # [result setRed:red]; - # [result setGreen:green]; - # [result setBlue:blue]; - # if (alpha <= 0.9999) ` - # [result setAlpha:floatWrapperWithValue(alpha)]; - # ` - # [result autorelease]; - # return result; - # ` - # // ... - # Example (JavaScript): - # // ... - # var protoToCssColor = function(rgb_color) ` - # var redFrac = rgb_color.red || 0.0; - # var greenFrac = rgb_color.green || 0.0; - # var blueFrac = rgb_color.blue || 0.0; - # var red = Math.floor(redFrac * 255); - # var green = Math.floor(greenFrac * 255); - # var blue = Math.floor(blueFrac * 255); - # if (!('alpha' in rgb_color)) ` - # return rgbToCssColor_(red, green, blue); - # ` - # var alphaFrac = rgb_color.alpha.value || 0.0; - # var rgbParams = [red, green, blue].join(','); - # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); - # `; - # var rgbToCssColor_ = function(red, green, blue) ` - # var rgbNumber = new Number((red << 16) | (green << 8) | blue); - # var hexString = rgbNumber.toString(16); - # var missingZeros = 6 - hexString.length; - # var resultBuilder = ['#']; - # for (var i = 0; i < missingZeros; i++) ` - # resultBuilder.push('0'); - # ` - # resultBuilder.push(hexString); - # return resultBuilder.join(''); - # `; - # // ... - # Corresponds to the JSON property `footerColor` - # @return [Google::Apis::SheetsV4::Color] - attr_accessor :footer_color - - # Represents a color in the RGBA color space. This representation is designed - # for simplicity of conversion to/from color representations in various - # languages over compactness; for example, the fields of this representation - # can be trivially provided to the constructor of "java.awt.Color" in Java; it - # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" - # method in iOS; and, with just a little work, it can be easily formatted into - # a CSS "rgba()" string in JavaScript, as well. Here are some examples: - # Example (Java): - # import com.google.type.Color; - # // ... - # public static java.awt.Color fromProto(Color protocolor) ` - # float alpha = protocolor.hasAlpha() - # ? protocolor.getAlpha().getValue() - # : 1.0; - # return new java.awt.Color( - # protocolor.getRed(), - # protocolor.getGreen(), - # protocolor.getBlue(), - # alpha); - # ` - # public static Color toProto(java.awt.Color color) ` - # float red = (float) color.getRed(); - # float green = (float) color.getGreen(); - # float blue = (float) color.getBlue(); - # float denominator = 255.0; - # Color.Builder resultBuilder = - # Color - # .newBuilder() - # .setRed(red / denominator) - # .setGreen(green / denominator) - # .setBlue(blue / denominator); - # int alpha = color.getAlpha(); - # if (alpha != 255) ` - # result.setAlpha( - # FloatValue - # .newBuilder() - # .setValue(((float) alpha) / denominator) - # .build()); - # ` - # return resultBuilder.build(); - # ` - # // ... - # Example (iOS / Obj-C): - # // ... - # static UIColor* fromProto(Color* protocolor) ` - # float red = [protocolor red]; - # float green = [protocolor green]; - # float blue = [protocolor blue]; - # FloatValue* alpha_wrapper = [protocolor alpha]; - # float alpha = 1.0; - # if (alpha_wrapper != nil) ` - # alpha = [alpha_wrapper value]; - # ` - # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; - # ` - # static Color* toProto(UIColor* color) ` - # CGFloat red, green, blue, alpha; - # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` - # return nil; - # ` - # Color* result = [Color alloc] init]; - # [result setRed:red]; - # [result setGreen:green]; - # [result setBlue:blue]; - # if (alpha <= 0.9999) ` - # [result setAlpha:floatWrapperWithValue(alpha)]; - # ` - # [result autorelease]; - # return result; - # ` - # // ... - # Example (JavaScript): - # // ... - # var protoToCssColor = function(rgb_color) ` - # var redFrac = rgb_color.red || 0.0; - # var greenFrac = rgb_color.green || 0.0; - # var blueFrac = rgb_color.blue || 0.0; - # var red = Math.floor(redFrac * 255); - # var green = Math.floor(greenFrac * 255); - # var blue = Math.floor(blueFrac * 255); - # if (!('alpha' in rgb_color)) ` - # return rgbToCssColor_(red, green, blue); - # ` - # var alphaFrac = rgb_color.alpha.value || 0.0; - # var rgbParams = [red, green, blue].join(','); - # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); - # `; - # var rgbToCssColor_ = function(red, green, blue) ` - # var rgbNumber = new Number((red << 16) | (green << 8) | blue); - # var hexString = rgbNumber.toString(16); - # var missingZeros = 6 - hexString.length; - # var resultBuilder = ['#']; - # for (var i = 0; i < missingZeros; i++) ` - # resultBuilder.push('0'); - # ` - # resultBuilder.push(hexString); - # return resultBuilder.join(''); - # `; - # // ... - # Corresponds to the JSON property `headerColor` - # @return [Google::Apis::SheetsV4::Color] - attr_accessor :header_color - - # Represents a color in the RGBA color space. This representation is designed - # for simplicity of conversion to/from color representations in various - # languages over compactness; for example, the fields of this representation - # can be trivially provided to the constructor of "java.awt.Color" in Java; it - # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" - # method in iOS; and, with just a little work, it can be easily formatted into - # a CSS "rgba()" string in JavaScript, as well. Here are some examples: - # Example (Java): - # import com.google.type.Color; - # // ... - # public static java.awt.Color fromProto(Color protocolor) ` - # float alpha = protocolor.hasAlpha() - # ? protocolor.getAlpha().getValue() - # : 1.0; - # return new java.awt.Color( - # protocolor.getRed(), - # protocolor.getGreen(), - # protocolor.getBlue(), - # alpha); - # ` - # public static Color toProto(java.awt.Color color) ` - # float red = (float) color.getRed(); - # float green = (float) color.getGreen(); - # float blue = (float) color.getBlue(); - # float denominator = 255.0; - # Color.Builder resultBuilder = - # Color - # .newBuilder() - # .setRed(red / denominator) - # .setGreen(green / denominator) - # .setBlue(blue / denominator); - # int alpha = color.getAlpha(); - # if (alpha != 255) ` - # result.setAlpha( - # FloatValue - # .newBuilder() - # .setValue(((float) alpha) / denominator) - # .build()); - # ` - # return resultBuilder.build(); - # ` - # // ... - # Example (iOS / Obj-C): - # // ... - # static UIColor* fromProto(Color* protocolor) ` - # float red = [protocolor red]; - # float green = [protocolor green]; - # float blue = [protocolor blue]; - # FloatValue* alpha_wrapper = [protocolor alpha]; - # float alpha = 1.0; - # if (alpha_wrapper != nil) ` - # alpha = [alpha_wrapper value]; - # ` - # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; - # ` - # static Color* toProto(UIColor* color) ` - # CGFloat red, green, blue, alpha; - # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` - # return nil; - # ` - # Color* result = [Color alloc] init]; - # [result setRed:red]; - # [result setGreen:green]; - # [result setBlue:blue]; - # if (alpha <= 0.9999) ` - # [result setAlpha:floatWrapperWithValue(alpha)]; - # ` - # [result autorelease]; - # return result; - # ` - # // ... - # Example (JavaScript): - # // ... - # var protoToCssColor = function(rgb_color) ` - # var redFrac = rgb_color.red || 0.0; - # var greenFrac = rgb_color.green || 0.0; - # var blueFrac = rgb_color.blue || 0.0; - # var red = Math.floor(redFrac * 255); - # var green = Math.floor(greenFrac * 255); - # var blue = Math.floor(blueFrac * 255); - # if (!('alpha' in rgb_color)) ` - # return rgbToCssColor_(red, green, blue); - # ` - # var alphaFrac = rgb_color.alpha.value || 0.0; - # var rgbParams = [red, green, blue].join(','); - # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); - # `; - # var rgbToCssColor_ = function(red, green, blue) ` - # var rgbNumber = new Number((red << 16) | (green << 8) | blue); - # var hexString = rgbNumber.toString(16); - # var missingZeros = 6 - hexString.length; - # var resultBuilder = ['#']; - # for (var i = 0; i < missingZeros; i++) ` - # resultBuilder.push('0'); - # ` - # resultBuilder.push(hexString); - # return resultBuilder.join(''); - # `; - # // ... - # Corresponds to the JSON property `firstBandColor` - # @return [Google::Apis::SheetsV4::Color] - attr_accessor :first_band_color - - # Represents a color in the RGBA color space. This representation is designed - # for simplicity of conversion to/from color representations in various - # languages over compactness; for example, the fields of this representation - # can be trivially provided to the constructor of "java.awt.Color" in Java; it - # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" - # method in iOS; and, with just a little work, it can be easily formatted into - # a CSS "rgba()" string in JavaScript, as well. Here are some examples: - # Example (Java): - # import com.google.type.Color; - # // ... - # public static java.awt.Color fromProto(Color protocolor) ` - # float alpha = protocolor.hasAlpha() - # ? protocolor.getAlpha().getValue() - # : 1.0; - # return new java.awt.Color( - # protocolor.getRed(), - # protocolor.getGreen(), - # protocolor.getBlue(), - # alpha); - # ` - # public static Color toProto(java.awt.Color color) ` - # float red = (float) color.getRed(); - # float green = (float) color.getGreen(); - # float blue = (float) color.getBlue(); - # float denominator = 255.0; - # Color.Builder resultBuilder = - # Color - # .newBuilder() - # .setRed(red / denominator) - # .setGreen(green / denominator) - # .setBlue(blue / denominator); - # int alpha = color.getAlpha(); - # if (alpha != 255) ` - # result.setAlpha( - # FloatValue - # .newBuilder() - # .setValue(((float) alpha) / denominator) - # .build()); - # ` - # return resultBuilder.build(); - # ` - # // ... - # Example (iOS / Obj-C): - # // ... - # static UIColor* fromProto(Color* protocolor) ` - # float red = [protocolor red]; - # float green = [protocolor green]; - # float blue = [protocolor blue]; - # FloatValue* alpha_wrapper = [protocolor alpha]; - # float alpha = 1.0; - # if (alpha_wrapper != nil) ` - # alpha = [alpha_wrapper value]; - # ` - # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; - # ` - # static Color* toProto(UIColor* color) ` - # CGFloat red, green, blue, alpha; - # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` - # return nil; - # ` - # Color* result = [Color alloc] init]; - # [result setRed:red]; - # [result setGreen:green]; - # [result setBlue:blue]; - # if (alpha <= 0.9999) ` - # [result setAlpha:floatWrapperWithValue(alpha)]; - # ` - # [result autorelease]; - # return result; - # ` - # // ... - # Example (JavaScript): - # // ... - # var protoToCssColor = function(rgb_color) ` - # var redFrac = rgb_color.red || 0.0; - # var greenFrac = rgb_color.green || 0.0; - # var blueFrac = rgb_color.blue || 0.0; - # var red = Math.floor(redFrac * 255); - # var green = Math.floor(greenFrac * 255); - # var blue = Math.floor(blueFrac * 255); - # if (!('alpha' in rgb_color)) ` - # return rgbToCssColor_(red, green, blue); - # ` - # var alphaFrac = rgb_color.alpha.value || 0.0; - # var rgbParams = [red, green, blue].join(','); - # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); - # `; - # var rgbToCssColor_ = function(red, green, blue) ` - # var rgbNumber = new Number((red << 16) | (green << 8) | blue); - # var hexString = rgbNumber.toString(16); - # var missingZeros = 6 - hexString.length; - # var resultBuilder = ['#']; - # for (var i = 0; i < missingZeros; i++) ` - # resultBuilder.push('0'); - # ` - # resultBuilder.push(hexString); - # return resultBuilder.join(''); - # `; - # // ... - # Corresponds to the JSON property `secondBandColor` - # @return [Google::Apis::SheetsV4::Color] - attr_accessor :second_band_color - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @footer_color = args[:footer_color] if args.key?(:footer_color) - @header_color = args[:header_color] if args.key?(:header_color) - @first_band_color = args[:first_band_color] if args.key?(:first_band_color) - @second_band_color = args[:second_band_color] if args.key?(:second_band_color) - end - end - - # The default filter associated with a sheet. - class BasicFilter - include Google::Apis::Core::Hashable - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :range - - # The criteria for showing/hiding values per column. - # The map's key is the column index, and the value is the criteria for - # that column. - # Corresponds to the JSON property `criteria` - # @return [Hash] - attr_accessor :criteria - - # The sort order per column. Later specifications are used when values - # are equal in the earlier specifications. - # Corresponds to the JSON property `sortSpecs` - # @return [Array] - attr_accessor :sort_specs - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @range = args[:range] if args.key?(:range) - @criteria = args[:criteria] if args.key?(:criteria) - @sort_specs = args[:sort_specs] if args.key?(:sort_specs) - end - end - - # The result of adding a new protected range. - class AddProtectedRangeResponse - include Google::Apis::Core::Hashable - - # A protected range. - # Corresponds to the JSON property `protectedRange` - # @return [Google::Apis::SheetsV4::ProtectedRange] - attr_accessor :protected_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @protected_range = args[:protected_range] if args.key?(:protected_range) - end - end - - # The response when updating a range of values in a spreadsheet. - class UpdateValuesResponse - include Google::Apis::Core::Hashable - - # The number of rows where at least one cell in the row was updated. - # Corresponds to the JSON property `updatedRows` - # @return [Fixnum] - attr_accessor :updated_rows - - # Data within a range of the spreadsheet. - # Corresponds to the JSON property `updatedData` - # @return [Google::Apis::SheetsV4::ValueRange] - attr_accessor :updated_data - - # The number of columns where at least one cell in the column was updated. - # Corresponds to the JSON property `updatedColumns` - # @return [Fixnum] - attr_accessor :updated_columns - - # The spreadsheet the updates were applied to. - # Corresponds to the JSON property `spreadsheetId` - # @return [String] - attr_accessor :spreadsheet_id - - # The range (in A1 notation) that updates were applied to. - # Corresponds to the JSON property `updatedRange` - # @return [String] - attr_accessor :updated_range - - # The number of cells updated. - # Corresponds to the JSON property `updatedCells` - # @return [Fixnum] - attr_accessor :updated_cells - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @updated_rows = args[:updated_rows] if args.key?(:updated_rows) - @updated_data = args[:updated_data] if args.key?(:updated_data) - @updated_columns = args[:updated_columns] if args.key?(:updated_columns) - @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) - @updated_range = args[:updated_range] if args.key?(:updated_range) - @updated_cells = args[:updated_cells] if args.key?(:updated_cells) - end - end - - # An error in a cell. - class ErrorValue - include Google::Apis::Core::Hashable - - # The type of error. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # A message with more information about the error - # (in the spreadsheet's locale). - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] if args.key?(:type) - @message = args[:message] if args.key?(:message) - end - end - - # The definition of how a value in a pivot table should be calculated. - class PivotValue - include Google::Apis::Core::Hashable - - # The column offset of the source range that this value reads from. - # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0` - # means this value refers to column `C`, whereas the offset `1` would - # refer to column `D`. - # Corresponds to the JSON property `sourceColumnOffset` - # @return [Fixnum] - attr_accessor :source_column_offset - - # A name to use for the value. This is only used if formula was set. - # Otherwise, the column name is used. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - # A custom formula to calculate the value. The formula must start - # with an `=` character. - # Corresponds to the JSON property `formula` - # @return [String] - attr_accessor :formula - - # A function to summarize the value. - # If formula is set, the only supported values are - # SUM and - # CUSTOM. - # If sourceColumnOffset is set, then `CUSTOM` - # is not supported. - # Corresponds to the JSON property `summarizeFunction` - # @return [String] - attr_accessor :summarize_function - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @source_column_offset = args[:source_column_offset] if args.key?(:source_column_offset) - @name = args[:name] if args.key?(:name) - @formula = args[:formula] if args.key?(:formula) - @summarize_function = args[:summarize_function] if args.key?(:summarize_function) - end - end - - # The request to copy a sheet across spreadsheets. - class CopySheetToAnotherSpreadsheetRequest - include Google::Apis::Core::Hashable - - # The ID of the spreadsheet to copy the sheet to. - # Corresponds to the JSON property `destinationSpreadsheetId` - # @return [String] - attr_accessor :destination_spreadsheet_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @destination_spreadsheet_id = args[:destination_spreadsheet_id] if args.key?(:destination_spreadsheet_id) - end - end - - # Information about which values in a pivot group should be used for sorting. - class PivotGroupSortValueBucket - include Google::Apis::Core::Hashable - - # The offset in the PivotTable.values list which the values in this - # grouping should be sorted by. - # Corresponds to the JSON property `valuesIndex` - # @return [Fixnum] - attr_accessor :values_index - - # Determines the bucket from which values are chosen to sort. - # For example, in a pivot table with one row group & two column groups, - # the row group can list up to two values. The first value corresponds - # to a value within the first column group, and the second value - # corresponds to a value in the second column group. If no values - # are listed, this would indicate that the row should be sorted according - # to the "Grand Total" over the column groups. If a single value is listed, - # this would correspond to using the "Total" of that bucket. - # Corresponds to the JSON property `buckets` - # @return [Array] - attr_accessor :buckets - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @values_index = args[:values_index] if args.key?(:values_index) - @buckets = args[:buckets] if args.key?(:buckets) - end - end - - # The position of an embedded object such as a chart. - class EmbeddedObjectPosition - include Google::Apis::Core::Hashable - - # If true, the embedded object will be put on a new sheet whose ID - # is chosen for you. Used only when writing. - # Corresponds to the JSON property `newSheet` - # @return [Boolean] - attr_accessor :new_sheet - alias_method :new_sheet?, :new_sheet - - # The sheet this is on. Set only if the embedded object - # is on its own sheet. Must be non-negative. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - # The location an object is overlaid on top of a grid. - # Corresponds to the JSON property `overlayPosition` - # @return [Google::Apis::SheetsV4::OverlayPosition] - attr_accessor :overlay_position - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @new_sheet = args[:new_sheet] if args.key?(:new_sheet) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @overlay_position = args[:overlay_position] if args.key?(:overlay_position) - end - end - - # Deletes the protected range with the given ID. - class DeleteProtectedRangeRequest - include Google::Apis::Core::Hashable - - # The ID of the protected range to delete. - # Corresponds to the JSON property `protectedRangeId` - # @return [Fixnum] - attr_accessor :protected_range_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @protected_range_id = args[:protected_range_id] if args.key?(:protected_range_id) - end - end - - # Fills in more data based on existing data. - class AutoFillRequest - include Google::Apis::Core::Hashable - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :range - - # True if we should generate data with the "alternate" series. - # This differs based on the type and amount of source data. - # Corresponds to the JSON property `useAlternateSeries` - # @return [Boolean] - attr_accessor :use_alternate_series - alias_method :use_alternate_series?, :use_alternate_series - - # A combination of a source range and how to extend that source. - # Corresponds to the JSON property `sourceAndDestination` - # @return [Google::Apis::SheetsV4::SourceAndDestination] - attr_accessor :source_and_destination - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @range = args[:range] if args.key?(:range) - @use_alternate_series = args[:use_alternate_series] if args.key?(:use_alternate_series) - @source_and_destination = args[:source_and_destination] if args.key?(:source_and_destination) - end - end - - # A rule that applies a gradient color scale format, based on - # the interpolation points listed. The format of a cell will vary - # based on its contents as compared to the values of the interpolation - # points. - class GradientRule - include Google::Apis::Core::Hashable - - # A single interpolation point on a gradient conditional format. - # These pin the gradient color scale according to the color, - # type and value chosen. - # Corresponds to the JSON property `midpoint` - # @return [Google::Apis::SheetsV4::InterpolationPoint] - attr_accessor :midpoint - - # A single interpolation point on a gradient conditional format. - # These pin the gradient color scale according to the color, - # type and value chosen. - # Corresponds to the JSON property `minpoint` - # @return [Google::Apis::SheetsV4::InterpolationPoint] - attr_accessor :minpoint - - # A single interpolation point on a gradient conditional format. - # These pin the gradient color scale according to the color, - # type and value chosen. - # Corresponds to the JSON property `maxpoint` - # @return [Google::Apis::SheetsV4::InterpolationPoint] - attr_accessor :maxpoint - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @midpoint = args[:midpoint] if args.key?(:midpoint) - @minpoint = args[:minpoint] if args.key?(:minpoint) - @maxpoint = args[:maxpoint] if args.key?(:maxpoint) - end - end - - # Sets the basic filter associated with a sheet. - class SetBasicFilterRequest - include Google::Apis::Core::Hashable - - # The default filter associated with a sheet. - # Corresponds to the JSON property `filter` - # @return [Google::Apis::SheetsV4::BasicFilter] - attr_accessor :filter - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @filter = args[:filter] if args.key?(:filter) - end - end - - # The request for clearing a range of values in a spreadsheet. - class ClearValuesRequest - include Google::Apis::Core::Hashable - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - end - end - - # A single interpolation point on a gradient conditional format. - # These pin the gradient color scale according to the color, - # type and value chosen. - class InterpolationPoint - include Google::Apis::Core::Hashable - - # The value this interpolation point uses. May be a formula. - # Unused if type is MIN or - # MAX. - # Corresponds to the JSON property `value` - # @return [String] - attr_accessor :value - - # Represents a color in the RGBA color space. This representation is designed - # for simplicity of conversion to/from color representations in various - # languages over compactness; for example, the fields of this representation - # can be trivially provided to the constructor of "java.awt.Color" in Java; it - # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" - # method in iOS; and, with just a little work, it can be easily formatted into - # a CSS "rgba()" string in JavaScript, as well. Here are some examples: - # Example (Java): - # import com.google.type.Color; - # // ... - # public static java.awt.Color fromProto(Color protocolor) ` - # float alpha = protocolor.hasAlpha() - # ? protocolor.getAlpha().getValue() - # : 1.0; - # return new java.awt.Color( - # protocolor.getRed(), - # protocolor.getGreen(), - # protocolor.getBlue(), - # alpha); - # ` - # public static Color toProto(java.awt.Color color) ` - # float red = (float) color.getRed(); - # float green = (float) color.getGreen(); - # float blue = (float) color.getBlue(); - # float denominator = 255.0; - # Color.Builder resultBuilder = - # Color - # .newBuilder() - # .setRed(red / denominator) - # .setGreen(green / denominator) - # .setBlue(blue / denominator); - # int alpha = color.getAlpha(); - # if (alpha != 255) ` - # result.setAlpha( - # FloatValue - # .newBuilder() - # .setValue(((float) alpha) / denominator) - # .build()); - # ` - # return resultBuilder.build(); - # ` - # // ... - # Example (iOS / Obj-C): - # // ... - # static UIColor* fromProto(Color* protocolor) ` - # float red = [protocolor red]; - # float green = [protocolor green]; - # float blue = [protocolor blue]; - # FloatValue* alpha_wrapper = [protocolor alpha]; - # float alpha = 1.0; - # if (alpha_wrapper != nil) ` - # alpha = [alpha_wrapper value]; - # ` - # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; - # ` - # static Color* toProto(UIColor* color) ` - # CGFloat red, green, blue, alpha; - # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` - # return nil; - # ` - # Color* result = [Color alloc] init]; - # [result setRed:red]; - # [result setGreen:green]; - # [result setBlue:blue]; - # if (alpha <= 0.9999) ` - # [result setAlpha:floatWrapperWithValue(alpha)]; - # ` - # [result autorelease]; - # return result; - # ` - # // ... - # Example (JavaScript): - # // ... - # var protoToCssColor = function(rgb_color) ` - # var redFrac = rgb_color.red || 0.0; - # var greenFrac = rgb_color.green || 0.0; - # var blueFrac = rgb_color.blue || 0.0; - # var red = Math.floor(redFrac * 255); - # var green = Math.floor(greenFrac * 255); - # var blue = Math.floor(blueFrac * 255); - # if (!('alpha' in rgb_color)) ` - # return rgbToCssColor_(red, green, blue); - # ` - # var alphaFrac = rgb_color.alpha.value || 0.0; - # var rgbParams = [red, green, blue].join(','); - # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); - # `; - # var rgbToCssColor_ = function(red, green, blue) ` - # var rgbNumber = new Number((red << 16) | (green << 8) | blue); - # var hexString = rgbNumber.toString(16); - # var missingZeros = 6 - hexString.length; - # var resultBuilder = ['#']; - # for (var i = 0; i < missingZeros; i++) ` - # resultBuilder.push('0'); - # ` - # resultBuilder.push(hexString); - # return resultBuilder.join(''); - # `; - # // ... - # Corresponds to the JSON property `color` - # @return [Google::Apis::SheetsV4::Color] - attr_accessor :color - - # How the value should be interpreted. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @value = args[:value] if args.key?(:value) - @color = args[:color] if args.key?(:color) - @type = args[:type] if args.key?(:type) - end - end - - # Deletes the embedded object with the given ID. - class DeleteEmbeddedObjectRequest - include Google::Apis::Core::Hashable - - # The ID of the embedded object to delete. - # Corresponds to the JSON property `objectId` - # @return [Fixnum] - attr_accessor :object_id_prop - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - end - end - - # The result of the find/replace. - class FindReplaceResponse - include Google::Apis::Core::Hashable - - # The number of non-formula cells changed. - # Corresponds to the JSON property `valuesChanged` - # @return [Fixnum] - attr_accessor :values_changed - - # The number of occurrences (possibly multiple within a cell) changed. - # For example, if replacing `"e"` with `"o"` in `"Google Sheets"`, this would - # be `"3"` because `"Google Sheets"` -> `"Googlo Shoots"`. - # Corresponds to the JSON property `occurrencesChanged` - # @return [Fixnum] - attr_accessor :occurrences_changed - - # The number of rows changed. - # Corresponds to the JSON property `rowsChanged` - # @return [Fixnum] - attr_accessor :rows_changed - - # The number of sheets changed. - # Corresponds to the JSON property `sheetsChanged` - # @return [Fixnum] - attr_accessor :sheets_changed - - # The number of formula cells changed. - # Corresponds to the JSON property `formulasChanged` - # @return [Fixnum] - attr_accessor :formulas_changed - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @values_changed = args[:values_changed] if args.key?(:values_changed) - @occurrences_changed = args[:occurrences_changed] if args.key?(:occurrences_changed) - @rows_changed = args[:rows_changed] if args.key?(:rows_changed) - @sheets_changed = args[:sheets_changed] if args.key?(:sheets_changed) - @formulas_changed = args[:formulas_changed] if args.key?(:formulas_changed) - end - end - - # Deletes the requested sheet. - class DeleteSheetRequest - include Google::Apis::Core::Hashable - - # The ID of the sheet to delete. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - end - end - - # Duplicates a particular filter view. - class DuplicateFilterViewRequest - include Google::Apis::Core::Hashable - - # The ID of the filter being duplicated. - # Corresponds to the JSON property `filterId` - # @return [Fixnum] - attr_accessor :filter_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @filter_id = args[:filter_id] if args.key?(:filter_id) - end - end - - # The result of updating a conditional format rule. - class UpdateConditionalFormatRuleResponse - include Google::Apis::Core::Hashable - - # A rule describing a conditional format. - # Corresponds to the JSON property `oldRule` - # @return [Google::Apis::SheetsV4::ConditionalFormatRule] - attr_accessor :old_rule - - # The index of the new rule. - # Corresponds to the JSON property `newIndex` - # @return [Fixnum] - attr_accessor :new_index - - # The old index of the rule. Not set if a rule was replaced - # (because it is the same as new_index). - # Corresponds to the JSON property `oldIndex` - # @return [Fixnum] - attr_accessor :old_index - - # A rule describing a conditional format. - # Corresponds to the JSON property `newRule` - # @return [Google::Apis::SheetsV4::ConditionalFormatRule] - attr_accessor :new_rule - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @old_rule = args[:old_rule] if args.key?(:old_rule) - @new_index = args[:new_index] if args.key?(:new_index) - @old_index = args[:old_index] if args.key?(:old_index) - @new_rule = args[:new_rule] if args.key?(:new_rule) - end - end - - # The value of the condition. - class ConditionValue - include Google::Apis::Core::Hashable - - # A relative date (based on the current date). - # Valid only if the type is - # DATE_BEFORE, - # DATE_AFTER, - # DATE_ON_OR_BEFORE or - # DATE_ON_OR_AFTER. - # Relative dates are not supported in data validation. - # They are supported only in conditional formatting and - # conditional filters. - # Corresponds to the JSON property `relativeDate` - # @return [String] - attr_accessor :relative_date - - # A value the condition is based on. - # The value will be parsed as if the user typed into a cell. - # Formulas are supported (and must begin with an `=`). - # Corresponds to the JSON property `userEnteredValue` - # @return [String] - attr_accessor :user_entered_value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @relative_date = args[:relative_date] if args.key?(:relative_date) - @user_entered_value = args[:user_entered_value] if args.key?(:user_entered_value) - end - end - - # Duplicates the contents of a sheet. - class DuplicateSheetRequest - include Google::Apis::Core::Hashable - - # If set, the ID of the new sheet. If not set, an ID is chosen. - # If set, the ID must not conflict with any existing sheet ID. - # If set, it must be non-negative. - # Corresponds to the JSON property `newSheetId` - # @return [Fixnum] - attr_accessor :new_sheet_id - - # The zero-based index where the new sheet should be inserted. - # The index of all sheets after this are incremented. - # Corresponds to the JSON property `insertSheetIndex` - # @return [Fixnum] - attr_accessor :insert_sheet_index - - # The name of the new sheet. If empty, a new name is chosen for you. - # Corresponds to the JSON property `newSheetName` - # @return [String] - attr_accessor :new_sheet_name - - # The sheet to duplicate. - # Corresponds to the JSON property `sourceSheetId` - # @return [Fixnum] - attr_accessor :source_sheet_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @new_sheet_id = args[:new_sheet_id] if args.key?(:new_sheet_id) - @insert_sheet_index = args[:insert_sheet_index] if args.key?(:insert_sheet_index) - @new_sheet_name = args[:new_sheet_name] if args.key?(:new_sheet_name) - @source_sheet_id = args[:source_sheet_id] if args.key?(:source_sheet_id) - end - end - - # The kinds of value that a cell in a spreadsheet can have. - class ExtendedValue - include Google::Apis::Core::Hashable - - # Represents a double value. - # Note: Dates, Times and DateTimes are represented as doubles in - # "serial number" format. - # Corresponds to the JSON property `numberValue` - # @return [Float] - attr_accessor :number_value - - # An error in a cell. - # Corresponds to the JSON property `errorValue` - # @return [Google::Apis::SheetsV4::ErrorValue] - attr_accessor :error_value - - # Represents a string value. - # Leading single quotes are not included. For example, if the user typed - # `'123` into the UI, this would be represented as a `stringValue` of - # `"123"`. - # Corresponds to the JSON property `stringValue` - # @return [String] - attr_accessor :string_value - - # Represents a boolean value. - # Corresponds to the JSON property `boolValue` - # @return [Boolean] - attr_accessor :bool_value - alias_method :bool_value?, :bool_value - - # Represents a formula. - # Corresponds to the JSON property `formulaValue` - # @return [String] - attr_accessor :formula_value - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @number_value = args[:number_value] if args.key?(:number_value) - @error_value = args[:error_value] if args.key?(:error_value) - @string_value = args[:string_value] if args.key?(:string_value) - @bool_value = args[:bool_value] if args.key?(:bool_value) - @formula_value = args[:formula_value] if args.key?(:formula_value) - end - end - - # A banded (alternating colors) range in a sheet. - class BandedRange - include Google::Apis::Core::Hashable - - # Properties referring a single dimension (either row or column). If both - # BandedRange.row_properties and BandedRange.column_properties are - # set, the fill colors are applied to cells according to the following rules: - # * header_color and footer_color take priority over band colors. - # * first_band_color takes priority over second_band_color. - # * row_properties takes priority over column_properties. - # For example, the first row color takes priority over the first column - # color, but the first column color takes priority over the second row color. - # Similarly, the row header takes priority over the column header in the - # top left cell, but the column header takes priority over the first row - # color if the row header is not set. - # Corresponds to the JSON property `rowProperties` - # @return [Google::Apis::SheetsV4::BandingProperties] - attr_accessor :row_properties - - # Properties referring a single dimension (either row or column). If both - # BandedRange.row_properties and BandedRange.column_properties are - # set, the fill colors are applied to cells according to the following rules: - # * header_color and footer_color take priority over band colors. - # * first_band_color takes priority over second_band_color. - # * row_properties takes priority over column_properties. - # For example, the first row color takes priority over the first column - # color, but the first column color takes priority over the second row color. - # Similarly, the row header takes priority over the column header in the - # top left cell, but the column header takes priority over the first row - # color if the row header is not set. - # Corresponds to the JSON property `columnProperties` - # @return [Google::Apis::SheetsV4::BandingProperties] - attr_accessor :column_properties - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :range - - # The id of the banded range. - # Corresponds to the JSON property `bandedRangeId` - # @return [Fixnum] - attr_accessor :banded_range_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @row_properties = args[:row_properties] if args.key?(:row_properties) - @column_properties = args[:column_properties] if args.key?(:column_properties) - @range = args[:range] if args.key?(:range) - @banded_range_id = args[:banded_range_id] if args.key?(:banded_range_id) - end - end - - # The response when updating a range of values in a spreadsheet. - class BatchClearValuesResponse - include Google::Apis::Core::Hashable - - # The spreadsheet the updates were applied to. - # Corresponds to the JSON property `spreadsheetId` - # @return [String] - attr_accessor :spreadsheet_id - - # The ranges that were cleared, in A1 notation. - # (If the requests were for an unbounded range or a ranger larger - # than the bounds of the sheet, this will be the actual ranges - # that were cleared, bounded to the sheet's limits.) - # Corresponds to the JSON property `clearedRanges` - # @return [Array] - attr_accessor :cleared_ranges - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) - @cleared_ranges = args[:cleared_ranges] if args.key?(:cleared_ranges) - end - end - - # Resource that represents a spreadsheet. - class Spreadsheet - include Google::Apis::Core::Hashable - - # The ID of the spreadsheet. - # This field is read-only. - # Corresponds to the JSON property `spreadsheetId` - # @return [String] - attr_accessor :spreadsheet_id - - # The sheets that are part of a spreadsheet. - # Corresponds to the JSON property `sheets` - # @return [Array] - attr_accessor :sheets - - # The named ranges defined in a spreadsheet. - # Corresponds to the JSON property `namedRanges` - # @return [Array] - attr_accessor :named_ranges - - # The url of the spreadsheet. - # This field is read-only. - # Corresponds to the JSON property `spreadsheetUrl` - # @return [String] - attr_accessor :spreadsheet_url - - # Properties of a spreadsheet. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV4::SpreadsheetProperties] - attr_accessor :properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) - @sheets = args[:sheets] if args.key?(:sheets) - @named_ranges = args[:named_ranges] if args.key?(:named_ranges) - @spreadsheet_url = args[:spreadsheet_url] if args.key?(:spreadsheet_url) - @properties = args[:properties] if args.key?(:properties) - end - end - - # Adds a chart to a sheet in the spreadsheet. - class AddChartRequest - include Google::Apis::Core::Hashable - - # A chart embedded in a sheet. - # Corresponds to the JSON property `chart` - # @return [Google::Apis::SheetsV4::EmbeddedChart] - attr_accessor :chart - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @chart = args[:chart] if args.key?(:chart) - end - end - - # Updates an existing protected range with the specified - # protectedRangeId. - class UpdateProtectedRangeRequest - include Google::Apis::Core::Hashable - - # A protected range. - # Corresponds to the JSON property `protectedRange` - # @return [Google::Apis::SheetsV4::ProtectedRange] - attr_accessor :protected_range - - # The fields that should be updated. At least one field must be specified. - # The root `protectedRange` is implied and should not be specified. - # A single `"*"` can be used as short-hand for listing every field. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @protected_range = args[:protected_range] if args.key?(:protected_range) - @fields = args[:fields] if args.key?(:fields) - end - end - - # The format of a run of text in a cell. - # Absent values indicate that the field isn't specified. - class TextFormat - include Google::Apis::Core::Hashable - - # Represents a color in the RGBA color space. This representation is designed - # for simplicity of conversion to/from color representations in various - # languages over compactness; for example, the fields of this representation - # can be trivially provided to the constructor of "java.awt.Color" in Java; it - # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" - # method in iOS; and, with just a little work, it can be easily formatted into - # a CSS "rgba()" string in JavaScript, as well. Here are some examples: - # Example (Java): - # import com.google.type.Color; - # // ... - # public static java.awt.Color fromProto(Color protocolor) ` - # float alpha = protocolor.hasAlpha() - # ? protocolor.getAlpha().getValue() - # : 1.0; - # return new java.awt.Color( - # protocolor.getRed(), - # protocolor.getGreen(), - # protocolor.getBlue(), - # alpha); - # ` - # public static Color toProto(java.awt.Color color) ` - # float red = (float) color.getRed(); - # float green = (float) color.getGreen(); - # float blue = (float) color.getBlue(); - # float denominator = 255.0; - # Color.Builder resultBuilder = - # Color - # .newBuilder() - # .setRed(red / denominator) - # .setGreen(green / denominator) - # .setBlue(blue / denominator); - # int alpha = color.getAlpha(); - # if (alpha != 255) ` - # result.setAlpha( - # FloatValue - # .newBuilder() - # .setValue(((float) alpha) / denominator) - # .build()); - # ` - # return resultBuilder.build(); - # ` - # // ... - # Example (iOS / Obj-C): - # // ... - # static UIColor* fromProto(Color* protocolor) ` - # float red = [protocolor red]; - # float green = [protocolor green]; - # float blue = [protocolor blue]; - # FloatValue* alpha_wrapper = [protocolor alpha]; - # float alpha = 1.0; - # if (alpha_wrapper != nil) ` - # alpha = [alpha_wrapper value]; - # ` - # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; - # ` - # static Color* toProto(UIColor* color) ` - # CGFloat red, green, blue, alpha; - # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` - # return nil; - # ` - # Color* result = [Color alloc] init]; - # [result setRed:red]; - # [result setGreen:green]; - # [result setBlue:blue]; - # if (alpha <= 0.9999) ` - # [result setAlpha:floatWrapperWithValue(alpha)]; - # ` - # [result autorelease]; - # return result; - # ` - # // ... - # Example (JavaScript): - # // ... - # var protoToCssColor = function(rgb_color) ` - # var redFrac = rgb_color.red || 0.0; - # var greenFrac = rgb_color.green || 0.0; - # var blueFrac = rgb_color.blue || 0.0; - # var red = Math.floor(redFrac * 255); - # var green = Math.floor(greenFrac * 255); - # var blue = Math.floor(blueFrac * 255); - # if (!('alpha' in rgb_color)) ` - # return rgbToCssColor_(red, green, blue); - # ` - # var alphaFrac = rgb_color.alpha.value || 0.0; - # var rgbParams = [red, green, blue].join(','); - # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); - # `; - # var rgbToCssColor_ = function(red, green, blue) ` - # var rgbNumber = new Number((red << 16) | (green << 8) | blue); - # var hexString = rgbNumber.toString(16); - # var missingZeros = 6 - hexString.length; - # var resultBuilder = ['#']; - # for (var i = 0; i < missingZeros; i++) ` - # resultBuilder.push('0'); - # ` - # resultBuilder.push(hexString); - # return resultBuilder.join(''); - # `; - # // ... - # Corresponds to the JSON property `foregroundColor` - # @return [Google::Apis::SheetsV4::Color] - attr_accessor :foreground_color - - # True if the text is bold. - # Corresponds to the JSON property `bold` - # @return [Boolean] - attr_accessor :bold - alias_method :bold?, :bold - - # The font family. - # Corresponds to the JSON property `fontFamily` - # @return [String] - attr_accessor :font_family - - # True if the text has a strikethrough. - # Corresponds to the JSON property `strikethrough` - # @return [Boolean] - attr_accessor :strikethrough - alias_method :strikethrough?, :strikethrough - - # True if the text is italicized. - # Corresponds to the JSON property `italic` - # @return [Boolean] - attr_accessor :italic - alias_method :italic?, :italic - - # The size of the font. - # Corresponds to the JSON property `fontSize` - # @return [Fixnum] - attr_accessor :font_size - - # True if the text is underlined. - # Corresponds to the JSON property `underline` - # @return [Boolean] - attr_accessor :underline - alias_method :underline?, :underline - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @foreground_color = args[:foreground_color] if args.key?(:foreground_color) - @bold = args[:bold] if args.key?(:bold) - @font_family = args[:font_family] if args.key?(:font_family) - @strikethrough = args[:strikethrough] if args.key?(:strikethrough) - @italic = args[:italic] if args.key?(:italic) - @font_size = args[:font_size] if args.key?(:font_size) - @underline = args[:underline] if args.key?(:underline) - end - end - - # The result of adding a sheet. - class AddSheetResponse - include Google::Apis::Core::Hashable - - # Properties of a sheet. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV4::SheetProperties] - attr_accessor :properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @properties = args[:properties] if args.key?(:properties) - end - end - - # The result of adding a filter view. - class AddFilterViewResponse - include Google::Apis::Core::Hashable - - # A filter view. - # Corresponds to the JSON property `filter` - # @return [Google::Apis::SheetsV4::FilterView] - attr_accessor :filter - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @filter = args[:filter] if args.key?(:filter) - end - end - - # Settings to control how circular dependencies are resolved with iterative - # calculation. - class IterativeCalculationSettings - include Google::Apis::Core::Hashable - - # When iterative calculation is enabled and successive results differ by - # less than this threshold value, the calculation rounds stop. - # Corresponds to the JSON property `convergenceThreshold` - # @return [Float] - attr_accessor :convergence_threshold - - # When iterative calculation is enabled, the maximum number of calculation - # rounds to perform. - # Corresponds to the JSON property `maxIterations` - # @return [Fixnum] - attr_accessor :max_iterations - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @convergence_threshold = args[:convergence_threshold] if args.key?(:convergence_threshold) - @max_iterations = args[:max_iterations] if args.key?(:max_iterations) - end - end - - # Properties of a spreadsheet. - class SpreadsheetProperties - include Google::Apis::Core::Hashable - - # The amount of time to wait before volatile functions are recalculated. - # Corresponds to the JSON property `autoRecalc` - # @return [String] - attr_accessor :auto_recalc - - # The format of a cell. - # Corresponds to the JSON property `defaultFormat` - # @return [Google::Apis::SheetsV4::CellFormat] - attr_accessor :default_format - - # The time zone of the spreadsheet, in CLDR format such as - # `America/New_York`. If the time zone isn't recognized, this may - # be a custom time zone such as `GMT-07:00`. - # Corresponds to the JSON property `timeZone` - # @return [String] - attr_accessor :time_zone - - # The title of the spreadsheet. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The locale of the spreadsheet in one of the following formats: - # * an ISO 639-1 language code such as `en` - # * an ISO 639-2 language code such as `fil`, if no 639-1 code exists - # * a combination of the ISO language code and country code, such as `en_US` - # Note: when updating this field, not all locales/languages are supported. - # Corresponds to the JSON property `locale` - # @return [String] - attr_accessor :locale - - # Settings to control how circular dependencies are resolved with iterative - # calculation. - # Corresponds to the JSON property `iterativeCalculationSettings` - # @return [Google::Apis::SheetsV4::IterativeCalculationSettings] - attr_accessor :iterative_calculation_settings - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @auto_recalc = args[:auto_recalc] if args.key?(:auto_recalc) - @default_format = args[:default_format] if args.key?(:default_format) - @time_zone = args[:time_zone] if args.key?(:time_zone) - @title = args[:title] if args.key?(:title) - @locale = args[:locale] if args.key?(:locale) - @iterative_calculation_settings = args[:iterative_calculation_settings] if args.key?(:iterative_calculation_settings) - end - end - - # The location an object is overlaid on top of a grid. - class OverlayPosition - include Google::Apis::Core::Hashable - - # The width of the object, in pixels. Defaults to 600. - # Corresponds to the JSON property `widthPixels` - # @return [Fixnum] - attr_accessor :width_pixels - - # The horizontal offset, in pixels, that the object is offset - # from the anchor cell. - # Corresponds to the JSON property `offsetXPixels` - # @return [Fixnum] - attr_accessor :offset_x_pixels - - # A coordinate in a sheet. - # All indexes are zero-based. - # Corresponds to the JSON property `anchorCell` - # @return [Google::Apis::SheetsV4::GridCoordinate] - attr_accessor :anchor_cell - - # The vertical offset, in pixels, that the object is offset - # from the anchor cell. - # Corresponds to the JSON property `offsetYPixels` - # @return [Fixnum] - attr_accessor :offset_y_pixels - - # The height of the object, in pixels. Defaults to 371. - # Corresponds to the JSON property `heightPixels` - # @return [Fixnum] - attr_accessor :height_pixels - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @width_pixels = args[:width_pixels] if args.key?(:width_pixels) - @offset_x_pixels = args[:offset_x_pixels] if args.key?(:offset_x_pixels) - @anchor_cell = args[:anchor_cell] if args.key?(:anchor_cell) - @offset_y_pixels = args[:offset_y_pixels] if args.key?(:offset_y_pixels) - @height_pixels = args[:height_pixels] if args.key?(:height_pixels) - end - end - - # Updates all cells in the range to the values in the given Cell object. - # Only the fields listed in the fields field are updated; others are - # unchanged. - # If writing a cell with a formula, the formula's ranges will automatically - # increment for each field in the range. - # For example, if writing a cell with formula `=A1` into range B2:C4, - # B2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`, - # C2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`. - # To keep the formula's ranges static, use the `$` indicator. - # For example, use the formula `=$A$1` to prevent both the row and the - # column from incrementing. - class RepeatCellRequest - include Google::Apis::Core::Hashable - - # The fields that should be updated. At least one field must be specified. - # The root `cell` is implied and should not be specified. - # A single `"*"` can be used as short-hand for listing every field. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - # Data about a specific cell. - # Corresponds to the JSON property `cell` - # @return [Google::Apis::SheetsV4::CellData] - attr_accessor :cell - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @fields = args[:fields] if args.key?(:fields) - @cell = args[:cell] if args.key?(:cell) - @range = args[:range] if args.key?(:range) - end - end - - # The result of adding a chart to a spreadsheet. - class AddChartResponse - include Google::Apis::Core::Hashable - - # A chart embedded in a sheet. - # Corresponds to the JSON property `chart` - # @return [Google::Apis::SheetsV4::EmbeddedChart] - attr_accessor :chart - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @chart = args[:chart] if args.key?(:chart) - end - end - - # Inserts rows or columns in a sheet at a particular index. - class InsertDimensionRequest - include Google::Apis::Core::Hashable - - # A range along a single dimension on a sheet. - # All indexes are zero-based. - # Indexes are half open: the start index is inclusive - # and the end index is exclusive. - # Missing indexes indicate the range is unbounded on that side. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::DimensionRange] - attr_accessor :range - - # Whether dimension properties should be extended from the dimensions - # before or after the newly inserted dimensions. - # True to inherit from the dimensions before (in which case the start - # index must be greater than 0), and false to inherit from the dimensions - # after. - # For example, if row index 0 has red background and row index 1 - # has a green background, then inserting 2 rows at index 1 can inherit - # either the green or red background. If `inheritFromBefore` is true, - # the two new rows will be red (because the row before the insertion point - # was red), whereas if `inheritFromBefore` is false, the two new rows will - # be green (because the row after the insertion point was green). - # Corresponds to the JSON property `inheritFromBefore` - # @return [Boolean] - attr_accessor :inherit_from_before - alias_method :inherit_from_before?, :inherit_from_before - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @range = args[:range] if args.key?(:range) - @inherit_from_before = args[:inherit_from_before] if args.key?(:inherit_from_before) - end - end - - # Updates properties of a spreadsheet. - class UpdateSpreadsheetPropertiesRequest - include Google::Apis::Core::Hashable - - # Properties of a spreadsheet. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV4::SpreadsheetProperties] - attr_accessor :properties - - # The fields that should be updated. At least one field must be specified. - # The root 'properties' is implied and should not be specified. - # A single `"*"` can be used as short-hand for listing every field. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @properties = args[:properties] if args.key?(:properties) - @fields = args[:fields] if args.key?(:fields) - end - end - - # The request for updating more than one range of values in a spreadsheet. - class BatchUpdateValuesRequest - include Google::Apis::Core::Hashable - - # Determines how values in the response should be rendered. - # The default render option is ValueRenderOption.FORMATTED_VALUE. - # Corresponds to the JSON property `responseValueRenderOption` - # @return [String] - attr_accessor :response_value_render_option - - # Determines if the update response should include the values - # of the cells that were updated. By default, responses - # do not include the updated values. The `updatedData` field within - # each of the BatchUpdateValuesResponse.responses will contain - # the updated values. If the range to write was larger than than the range - # actually written, the response will include all values in the requested - # range (excluding trailing empty rows and columns). - # Corresponds to the JSON property `includeValuesInResponse` - # @return [Boolean] - attr_accessor :include_values_in_response - alias_method :include_values_in_response?, :include_values_in_response - - # How the input data should be interpreted. - # Corresponds to the JSON property `valueInputOption` - # @return [String] - attr_accessor :value_input_option - - # The new values to apply to the spreadsheet. - # Corresponds to the JSON property `data` - # @return [Array] - attr_accessor :data - - # Determines how dates, times, and durations in the response should be - # rendered. This is ignored if response_value_render_option is - # FORMATTED_VALUE. - # The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER]. - # Corresponds to the JSON property `responseDateTimeRenderOption` - # @return [String] - attr_accessor :response_date_time_render_option - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @response_value_render_option = args[:response_value_render_option] if args.key?(:response_value_render_option) - @include_values_in_response = args[:include_values_in_response] if args.key?(:include_values_in_response) - @value_input_option = args[:value_input_option] if args.key?(:value_input_option) - @data = args[:data] if args.key?(:data) - @response_date_time_render_option = args[:response_date_time_render_option] if args.key?(:response_date_time_render_option) - end - end - - # A protected range. - class ProtectedRange - include Google::Apis::Core::Hashable - - # The named range this protected range is backed by, if any. - # When writing, only one of range or named_range_id - # may be set. - # Corresponds to the JSON property `namedRangeId` - # @return [String] - attr_accessor :named_range_id - - # The ID of the protected range. - # This field is read-only. - # Corresponds to the JSON property `protectedRangeId` - # @return [Fixnum] - attr_accessor :protected_range_id - - # True if this protected range will show a warning when editing. - # Warning-based protection means that every user can edit data in the - # protected range, except editing will prompt a warning asking the user - # to confirm the edit. - # When writing: if this field is true, then editors is ignored. - # Additionally, if this field is changed from true to false and the - # `editors` field is not set (nor included in the field mask), then - # the editors will be set to all the editors in the document. - # Corresponds to the JSON property `warningOnly` - # @return [Boolean] - attr_accessor :warning_only - alias_method :warning_only?, :warning_only - - # True if the user who requested this protected range can edit the - # protected area. - # This field is read-only. - # Corresponds to the JSON property `requestingUserCanEdit` - # @return [Boolean] - attr_accessor :requesting_user_can_edit - alias_method :requesting_user_can_edit?, :requesting_user_can_edit - - # The editors of a protected range. - # Corresponds to the JSON property `editors` - # @return [Google::Apis::SheetsV4::Editors] - attr_accessor :editors - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :range - - # The description of this protected range. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The list of unprotected ranges within a protected sheet. - # Unprotected ranges are only supported on protected sheets. - # Corresponds to the JSON property `unprotectedRanges` - # @return [Array] - attr_accessor :unprotected_ranges - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @named_range_id = args[:named_range_id] if args.key?(:named_range_id) - @protected_range_id = args[:protected_range_id] if args.key?(:protected_range_id) - @warning_only = args[:warning_only] if args.key?(:warning_only) - @requesting_user_can_edit = args[:requesting_user_can_edit] if args.key?(:requesting_user_can_edit) - @editors = args[:editors] if args.key?(:editors) - @range = args[:range] if args.key?(:range) - @description = args[:description] if args.key?(:description) - @unprotected_ranges = args[:unprotected_ranges] if args.key?(:unprotected_ranges) - end - end - - # Properties about a dimension. - class DimensionProperties - include Google::Apis::Core::Hashable - - # The height (if a row) or width (if a column) of the dimension in pixels. - # Corresponds to the JSON property `pixelSize` - # @return [Fixnum] - attr_accessor :pixel_size - - # True if this dimension is being filtered. - # This field is read-only. - # Corresponds to the JSON property `hiddenByFilter` - # @return [Boolean] - attr_accessor :hidden_by_filter - alias_method :hidden_by_filter?, :hidden_by_filter - - # True if this dimension is explicitly hidden. - # Corresponds to the JSON property `hiddenByUser` - # @return [Boolean] - attr_accessor :hidden_by_user - alias_method :hidden_by_user?, :hidden_by_user - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @pixel_size = args[:pixel_size] if args.key?(:pixel_size) - @hidden_by_filter = args[:hidden_by_filter] if args.key?(:hidden_by_filter) - @hidden_by_user = args[:hidden_by_user] if args.key?(:hidden_by_user) - end - end - - # A range along a single dimension on a sheet. - # All indexes are zero-based. - # Indexes are half open: the start index is inclusive - # and the end index is exclusive. - # Missing indexes indicate the range is unbounded on that side. - class DimensionRange - include Google::Apis::Core::Hashable - - # The sheet this span is on. - # Corresponds to the JSON property `sheetId` - # @return [Fixnum] - attr_accessor :sheet_id - - # The dimension of the span. - # Corresponds to the JSON property `dimension` - # @return [String] - attr_accessor :dimension - - # The start (inclusive) of the span, or not set if unbounded. - # Corresponds to the JSON property `startIndex` - # @return [Fixnum] - attr_accessor :start_index - - # The end (exclusive) of the span, or not set if unbounded. - # Corresponds to the JSON property `endIndex` - # @return [Fixnum] - attr_accessor :end_index - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) - @dimension = args[:dimension] if args.key?(:dimension) - @start_index = args[:start_index] if args.key?(:start_index) - @end_index = args[:end_index] if args.key?(:end_index) - end - end - - # A named range. - class NamedRange - include Google::Apis::Core::Hashable - - # The ID of the named range. - # Corresponds to the JSON property `namedRangeId` - # @return [String] - attr_accessor :named_range_id - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :range - - # The name of the named range. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @named_range_id = args[:named_range_id] if args.key?(:named_range_id) - @range = args[:range] if args.key?(:range) - @name = args[:name] if args.key?(:name) - end - end - - # Moves data from the source to the destination. - class CutPasteRequest - include Google::Apis::Core::Hashable - - # A coordinate in a sheet. - # All indexes are zero-based. - # Corresponds to the JSON property `destination` - # @return [Google::Apis::SheetsV4::GridCoordinate] - attr_accessor :destination - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `source` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :source - - # What kind of data to paste. All the source data will be cut, regardless - # of what is pasted. - # Corresponds to the JSON property `pasteType` - # @return [String] - attr_accessor :paste_type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @destination = args[:destination] if args.key?(:destination) - @source = args[:source] if args.key?(:source) - @paste_type = args[:paste_type] if args.key?(:paste_type) - end - end - - # A single series of data in a chart. - # For example, if charting stock prices over time, multiple series may exist, - # one for the "Open Price", "High Price", "Low Price" and "Close Price". - class BasicChartSeries - include Google::Apis::Core::Hashable - - # The data included in a domain or series. - # Corresponds to the JSON property `series` - # @return [Google::Apis::SheetsV4::ChartData] - attr_accessor :series - - # The type of this series. Valid only if the - # chartType is - # COMBO. - # Different types will change the way the series is visualized. - # Only LINE, AREA, - # and COLUMN are supported. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The minor axis that will specify the range of values for this series. - # For example, if charting stocks over time, the "Volume" series - # may want to be pinned to the right with the prices pinned to the left, - # because the scale of trading volume is different than the scale of - # prices. - # It is an error to specify an axis that isn't a valid minor axis - # for the chart's type. - # Corresponds to the JSON property `targetAxis` - # @return [String] - attr_accessor :target_axis - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @series = args[:series] if args.key?(:series) - @type = args[:type] if args.key?(:type) - @target_axis = args[:target_axis] if args.key?(:target_axis) - end - end - - # The borders of the cell. - class Borders - include Google::Apis::Core::Hashable - - # A border along a cell. - # Corresponds to the JSON property `top` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :top - - # A border along a cell. - # Corresponds to the JSON property `left` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :left - - # A border along a cell. - # Corresponds to the JSON property `right` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :right - - # A border along a cell. - # Corresponds to the JSON property `bottom` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :bottom - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @top = args[:top] if args.key?(:top) - @left = args[:left] if args.key?(:left) - @right = args[:right] if args.key?(:right) - @bottom = args[:bottom] if args.key?(:bottom) - end - end - - # Automatically resizes one or more dimensions based on the contents - # of the cells in that dimension. - class AutoResizeDimensionsRequest - include Google::Apis::Core::Hashable - - # A range along a single dimension on a sheet. - # All indexes are zero-based. - # Indexes are half open: the start index is inclusive - # and the end index is exclusive. - # Missing indexes indicate the range is unbounded on that side. - # Corresponds to the JSON property `dimensions` - # @return [Google::Apis::SheetsV4::DimensionRange] - attr_accessor :dimensions - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dimensions = args[:dimensions] if args.key?(:dimensions) - end - end - - # Updates the borders of a range. - # If a field is not set in the request, that means the border remains as-is. - # For example, with two subsequent UpdateBordersRequest: - # 1. range: A1:A5 `` top: RED, bottom: WHITE `` - # 2. range: A1:A5 `` left: BLUE `` - # That would result in A1:A5 having a borders of - # `` top: RED, bottom: WHITE, left: BLUE ``. - # If you want to clear a border, explicitly set the style to - # NONE. - class UpdateBordersRequest - include Google::Apis::Core::Hashable - - # A border along a cell. - # Corresponds to the JSON property `right` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :right - - # A range on a sheet. - # All indexes are zero-based. - # Indexes are half open, e.g the start index is inclusive - # and the end index is exclusive -- [start_index, end_index). - # Missing indexes indicate the range is unbounded on that side. - # For example, if `"Sheet1"` is sheet ID 0, then: - # `Sheet1!A1:A1 == sheet_id: 0, - # start_row_index: 0, end_row_index: 1, - # start_column_index: 0, end_column_index: 1` - # `Sheet1!A3:B4 == sheet_id: 0, - # start_row_index: 2, end_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A:B == sheet_id: 0, - # start_column_index: 0, end_column_index: 2` - # `Sheet1!A5:B == sheet_id: 0, - # start_row_index: 4, - # start_column_index: 0, end_column_index: 2` - # `Sheet1 == sheet_id:0` - # The start index must always be less than or equal to the end index. - # If the start index equals the end index, then the range is empty. - # Empty ranges are typically not meaningful and are usually rendered in the - # UI as `#REF!`. - # Corresponds to the JSON property `range` - # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :range - - # A border along a cell. - # Corresponds to the JSON property `innerHorizontal` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :inner_horizontal - - # A border along a cell. - # Corresponds to the JSON property `top` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :top - - # A border along a cell. - # Corresponds to the JSON property `left` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :left - - # A border along a cell. - # Corresponds to the JSON property `bottom` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :bottom - - # A border along a cell. - # Corresponds to the JSON property `innerVertical` - # @return [Google::Apis::SheetsV4::Border] - attr_accessor :inner_vertical - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @right = args[:right] if args.key?(:right) - @range = args[:range] if args.key?(:range) - @inner_horizontal = args[:inner_horizontal] if args.key?(:inner_horizontal) - @top = args[:top] if args.key?(:top) - @left = args[:left] if args.key?(:left) - @bottom = args[:bottom] if args.key?(:bottom) - @inner_vertical = args[:inner_vertical] if args.key?(:inner_vertical) - end - end - # The format of a cell. class CellFormat include Google::Apis::Core::Hashable - # The number format of a cell. - # Corresponds to the JSON property `numberFormat` - # @return [Google::Apis::SheetsV4::NumberFormat] - attr_accessor :number_format - - # How a hyperlink, if it exists, should be displayed in the cell. - # Corresponds to the JSON property `hyperlinkDisplayType` - # @return [String] - attr_accessor :hyperlink_display_type - - # The horizontal alignment of the value in the cell. - # Corresponds to the JSON property `horizontalAlignment` - # @return [String] - attr_accessor :horizontal_alignment - - # The format of a run of text in a cell. - # Absent values indicate that the field isn't specified. - # Corresponds to the JSON property `textFormat` - # @return [Google::Apis::SheetsV4::TextFormat] - attr_accessor :text_format - # Represents a color in the RGBA color space. This representation is designed # for simplicity of conversion to/from color representations in various # languages over compactness; for example, the fields of this representation @@ -2947,17 +129,17 @@ module Google # @return [Google::Apis::SheetsV4::Color] attr_accessor :background_color + # The vertical alignment of the value in the cell. + # Corresponds to the JSON property `verticalAlignment` + # @return [String] + attr_accessor :vertical_alignment + # The amount of padding around the cell, in pixels. # When updating padding, every field must be specified. # Corresponds to the JSON property `padding` # @return [Google::Apis::SheetsV4::Padding] attr_accessor :padding - # The vertical alignment of the value in the cell. - # Corresponds to the JSON property `verticalAlignment` - # @return [String] - attr_accessor :vertical_alignment - # The borders of the cell. # Corresponds to the JSON property `borders` # @return [Google::Apis::SheetsV4::Borders] @@ -2978,23 +160,44 @@ module Google # @return [Google::Apis::SheetsV4::TextRotation] attr_accessor :text_rotation + # The number format of a cell. + # Corresponds to the JSON property `numberFormat` + # @return [Google::Apis::SheetsV4::NumberFormat] + attr_accessor :number_format + + # The horizontal alignment of the value in the cell. + # Corresponds to the JSON property `horizontalAlignment` + # @return [String] + attr_accessor :horizontal_alignment + + # How a hyperlink, if it exists, should be displayed in the cell. + # Corresponds to the JSON property `hyperlinkDisplayType` + # @return [String] + attr_accessor :hyperlink_display_type + + # The format of a run of text in a cell. + # Absent values indicate that the field isn't specified. + # Corresponds to the JSON property `textFormat` + # @return [Google::Apis::SheetsV4::TextFormat] + attr_accessor :text_format + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @number_format = args[:number_format] if args.key?(:number_format) - @hyperlink_display_type = args[:hyperlink_display_type] if args.key?(:hyperlink_display_type) - @horizontal_alignment = args[:horizontal_alignment] if args.key?(:horizontal_alignment) - @text_format = args[:text_format] if args.key?(:text_format) @background_color = args[:background_color] if args.key?(:background_color) - @padding = args[:padding] if args.key?(:padding) @vertical_alignment = args[:vertical_alignment] if args.key?(:vertical_alignment) + @padding = args[:padding] if args.key?(:padding) @borders = args[:borders] if args.key?(:borders) @text_direction = args[:text_direction] if args.key?(:text_direction) @wrap_strategy = args[:wrap_strategy] if args.key?(:wrap_strategy) @text_rotation = args[:text_rotation] if args.key?(:text_rotation) + @number_format = args[:number_format] if args.key?(:number_format) + @horizontal_alignment = args[:horizontal_alignment] if args.key?(:horizontal_alignment) + @hyperlink_display_type = args[:hyperlink_display_type] if args.key?(:hyperlink_display_type) + @text_format = args[:text_format] if args.key?(:text_format) end end @@ -3002,11 +205,6 @@ module Google class ClearValuesResponse include Google::Apis::Core::Hashable - # The spreadsheet the updates were applied to. - # Corresponds to the JSON property `spreadsheetId` - # @return [String] - attr_accessor :spreadsheet_id - # The range (in A1 notation) that was cleared. # (If the request was for an unbounded range or a ranger larger # than the bounds of the sheet, this will be the actual range @@ -3015,14 +213,19 @@ module Google # @return [String] attr_accessor :cleared_range + # The spreadsheet the updates were applied to. + # Corresponds to the JSON property `spreadsheetId` + # @return [String] + attr_accessor :spreadsheet_id + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) @cleared_range = args[:cleared_range] if args.key?(:cleared_range) + @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) end end @@ -3377,6 +580,16 @@ module Google # @return [String] attr_accessor :value_layout + # Each column grouping in the pivot table. + # Corresponds to the JSON property `columns` + # @return [Array] + attr_accessor :columns + + # A list of values to include in the pivot table. + # Corresponds to the JSON property `values` + # @return [Array] + attr_accessor :values + # A range on a sheet. # All indexes are zero-based. # Indexes are half open, e.g the start index is inclusive @@ -3403,16 +616,6 @@ module Google # @return [Google::Apis::SheetsV4::GridRange] attr_accessor :source - # Each column grouping in the pivot table. - # Corresponds to the JSON property `columns` - # @return [Array] - attr_accessor :columns - - # A list of values to include in the pivot table. - # Corresponds to the JSON property `values` - # @return [Array] - attr_accessor :values - def initialize(**args) update!(**args) end @@ -3422,9 +625,9 @@ module Google @criteria = args[:criteria] if args.key?(:criteria) @rows = args[:rows] if args.key?(:rows) @value_layout = args[:value_layout] if args.key?(:value_layout) - @source = args[:source] if args.key?(:source) @columns = args[:columns] if args.key?(:columns) @values = args[:values] if args.key?(:values) + @source = args[:source] if args.key?(:source) end end @@ -3464,6 +667,15 @@ module Google class ValueRange include Google::Apis::Core::Hashable + # The range the values cover, in A1 notation. + # For output, this range indicates the entire requested range, + # even though the values will exclude trailing rows and columns. + # When appending values, this field represents the range to search for a + # table, after which values will be appended. + # Corresponds to the JSON property `range` + # @return [String] + attr_accessor :range + # The major dimension of the values. # For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, # then requesting `range=A1:B2,majorDimension=ROWS` will return @@ -3490,24 +702,15 @@ module Google # @return [Array>] attr_accessor :values - # The range the values cover, in A1 notation. - # For output, this range indicates the entire requested range, - # even though the values will exclude trailing rows and columns. - # When appending values, this field represents the range to search for a - # table, after which values will be appended. - # Corresponds to the JSON property `range` - # @return [String] - attr_accessor :range - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @range = args[:range] if args.key?(:range) @major_dimension = args[:major_dimension] if args.key?(:major_dimension) @values = args[:values] if args.key?(:values) - @range = args[:range] if args.key?(:range) end end @@ -3569,6 +772,36 @@ module Google class Response include Google::Apis::Core::Hashable + # The result of adding a new protected range. + # Corresponds to the JSON property `addProtectedRange` + # @return [Google::Apis::SheetsV4::AddProtectedRangeResponse] + attr_accessor :add_protected_range + + # The result of duplicating a sheet. + # Corresponds to the JSON property `duplicateSheet` + # @return [Google::Apis::SheetsV4::DuplicateSheetResponse] + attr_accessor :duplicate_sheet + + # The result of deleting a conditional format rule. + # Corresponds to the JSON property `deleteConditionalFormatRule` + # @return [Google::Apis::SheetsV4::DeleteConditionalFormatRuleResponse] + attr_accessor :delete_conditional_format_rule + + # The result of updating an embedded object's position. + # Corresponds to the JSON property `updateEmbeddedObjectPosition` + # @return [Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionResponse] + attr_accessor :update_embedded_object_position + + # The result of a filter view being duplicated. + # Corresponds to the JSON property `duplicateFilterView` + # @return [Google::Apis::SheetsV4::DuplicateFilterViewResponse] + attr_accessor :duplicate_filter_view + + # The result of adding a chart to a spreadsheet. + # Corresponds to the JSON property `addChart` + # @return [Google::Apis::SheetsV4::AddChartResponse] + attr_accessor :add_chart + # The result of the find/replace. # Corresponds to the JSON property `findReplace` # @return [Google::Apis::SheetsV4::FindReplaceResponse] @@ -3599,54 +832,24 @@ module Google # @return [Google::Apis::SheetsV4::AddBandingResponse] attr_accessor :add_banding - # The result of adding a new protected range. - # Corresponds to the JSON property `addProtectedRange` - # @return [Google::Apis::SheetsV4::AddProtectedRangeResponse] - attr_accessor :add_protected_range - - # The result of duplicating a sheet. - # Corresponds to the JSON property `duplicateSheet` - # @return [Google::Apis::SheetsV4::DuplicateSheetResponse] - attr_accessor :duplicate_sheet - - # The result of updating an embedded object's position. - # Corresponds to the JSON property `updateEmbeddedObjectPosition` - # @return [Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionResponse] - attr_accessor :update_embedded_object_position - - # The result of deleting a conditional format rule. - # Corresponds to the JSON property `deleteConditionalFormatRule` - # @return [Google::Apis::SheetsV4::DeleteConditionalFormatRuleResponse] - attr_accessor :delete_conditional_format_rule - - # The result of a filter view being duplicated. - # Corresponds to the JSON property `duplicateFilterView` - # @return [Google::Apis::SheetsV4::DuplicateFilterViewResponse] - attr_accessor :duplicate_filter_view - - # The result of adding a chart to a spreadsheet. - # Corresponds to the JSON property `addChart` - # @return [Google::Apis::SheetsV4::AddChartResponse] - attr_accessor :add_chart - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @add_protected_range = args[:add_protected_range] if args.key?(:add_protected_range) + @duplicate_sheet = args[:duplicate_sheet] if args.key?(:duplicate_sheet) + @delete_conditional_format_rule = args[:delete_conditional_format_rule] if args.key?(:delete_conditional_format_rule) + @update_embedded_object_position = args[:update_embedded_object_position] if args.key?(:update_embedded_object_position) + @duplicate_filter_view = args[:duplicate_filter_view] if args.key?(:duplicate_filter_view) + @add_chart = args[:add_chart] if args.key?(:add_chart) @find_replace = args[:find_replace] if args.key?(:find_replace) @add_sheet = args[:add_sheet] if args.key?(:add_sheet) @update_conditional_format_rule = args[:update_conditional_format_rule] if args.key?(:update_conditional_format_rule) @add_named_range = args[:add_named_range] if args.key?(:add_named_range) @add_filter_view = args[:add_filter_view] if args.key?(:add_filter_view) @add_banding = args[:add_banding] if args.key?(:add_banding) - @add_protected_range = args[:add_protected_range] if args.key?(:add_protected_range) - @duplicate_sheet = args[:duplicate_sheet] if args.key?(:duplicate_sheet) - @update_embedded_object_position = args[:update_embedded_object_position] if args.key?(:update_embedded_object_position) - @delete_conditional_format_rule = args[:delete_conditional_format_rule] if args.key?(:delete_conditional_format_rule) - @duplicate_filter_view = args[:duplicate_filter_view] if args.key?(:duplicate_filter_view) - @add_chart = args[:add_chart] if args.key?(:add_chart) end end @@ -3704,25 +907,25 @@ module Google class TextFormatRun include Google::Apis::Core::Hashable + # The character index where this run starts. + # Corresponds to the JSON property `startIndex` + # @return [Fixnum] + attr_accessor :start_index + # The format of a run of text in a cell. # Absent values indicate that the field isn't specified. # Corresponds to the JSON property `format` # @return [Google::Apis::SheetsV4::TextFormat] attr_accessor :format - # The character index where this run starts. - # Corresponds to the JSON property `startIndex` - # @return [Fixnum] - attr_accessor :start_index - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @format = args[:format] if args.key?(:format) @start_index = args[:start_index] if args.key?(:start_index) + @format = args[:format] if args.key?(:format) end end @@ -3795,58 +998,16 @@ module Google end end - # Data in the grid, as well as metadata about the dimensions. - class GridData - include Google::Apis::Core::Hashable - - # The data in the grid, one entry per row, - # starting with the row in startRow. - # The values in RowData will correspond to columns starting - # at start_column. - # Corresponds to the JSON property `rowData` - # @return [Array] - attr_accessor :row_data - - # The first row this GridData refers to, zero-based. - # Corresponds to the JSON property `startRow` - # @return [Fixnum] - attr_accessor :start_row - - # Metadata about the requested columns in the grid, starting with the column - # in start_column. - # Corresponds to the JSON property `columnMetadata` - # @return [Array] - attr_accessor :column_metadata - - # The first column this GridData refers to, zero-based. - # Corresponds to the JSON property `startColumn` - # @return [Fixnum] - attr_accessor :start_column - - # Metadata about the requested rows in the grid, starting with the row - # in start_row. - # Corresponds to the JSON property `rowMetadata` - # @return [Array] - attr_accessor :row_metadata - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @row_data = args[:row_data] if args.key?(:row_data) - @start_row = args[:start_row] if args.key?(:start_row) - @column_metadata = args[:column_metadata] if args.key?(:column_metadata) - @start_column = args[:start_column] if args.key?(:start_column) - @row_metadata = args[:row_metadata] if args.key?(:row_metadata) - end - end - # A border along a cell. class Border include Google::Apis::Core::Hashable + # The width of the border, in pixels. + # Deprecated; the width is determined by the "style" field. + # Corresponds to the JSON property `width` + # @return [Fixnum] + attr_accessor :width + # The style of the border. # Corresponds to the JSON property `style` # @return [String] @@ -3955,40 +1116,51 @@ module Google # @return [Google::Apis::SheetsV4::Color] attr_accessor :color - # The width of the border, in pixels. - # Deprecated; the width is determined by the "style" field. - # Corresponds to the JSON property `width` - # @return [Fixnum] - attr_accessor :width - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @width = args[:width] if args.key?(:width) @style = args[:style] if args.key?(:style) @color = args[:color] if args.key?(:color) - @width = args[:width] if args.key?(:width) end end - # Updates properties of the named range with the specified - # namedRangeId. - class UpdateNamedRangeRequest + # Data in the grid, as well as metadata about the dimensions. + class GridData include Google::Apis::Core::Hashable - # A named range. - # Corresponds to the JSON property `namedRange` - # @return [Google::Apis::SheetsV4::NamedRange] - attr_accessor :named_range + # The first row this GridData refers to, zero-based. + # Corresponds to the JSON property `startRow` + # @return [Fixnum] + attr_accessor :start_row - # The fields that should be updated. At least one field must be specified. - # The root `namedRange` is implied and should not be specified. - # A single `"*"` can be used as short-hand for listing every field. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields + # Metadata about the requested columns in the grid, starting with the column + # in start_column. + # Corresponds to the JSON property `columnMetadata` + # @return [Array] + attr_accessor :column_metadata + + # The first column this GridData refers to, zero-based. + # Corresponds to the JSON property `startColumn` + # @return [Fixnum] + attr_accessor :start_column + + # Metadata about the requested rows in the grid, starting with the row + # in start_row. + # Corresponds to the JSON property `rowMetadata` + # @return [Array] + attr_accessor :row_metadata + + # The data in the grid, one entry per row, + # starting with the row in startRow. + # The values in RowData will correspond to columns starting + # at start_column. + # Corresponds to the JSON property `rowData` + # @return [Array] + attr_accessor :row_data def initialize(**args) update!(**args) @@ -3996,8 +1168,11 @@ module Google # Update properties of this object def update!(**args) - @named_range = args[:named_range] if args.key?(:named_range) - @fields = args[:fields] if args.key?(:fields) + @start_row = args[:start_row] if args.key?(:start_row) + @column_metadata = args[:column_metadata] if args.key?(:column_metadata) + @start_column = args[:start_column] if args.key?(:start_column) + @row_metadata = args[:row_metadata] if args.key?(:row_metadata) + @row_data = args[:row_data] if args.key?(:row_data) end end @@ -4005,54 +1180,6 @@ module Google class FindReplaceRequest include Google::Apis::Core::Hashable - # True to find/replace over all sheets. - # Corresponds to the JSON property `allSheets` - # @return [Boolean] - attr_accessor :all_sheets - alias_method :all_sheets?, :all_sheets - - # True if the search is case sensitive. - # Corresponds to the JSON property `matchCase` - # @return [Boolean] - attr_accessor :match_case - alias_method :match_case?, :match_case - - # True if the search should include cells with formulas. - # False to skip cells with formulas. - # Corresponds to the JSON property `includeFormulas` - # @return [Boolean] - attr_accessor :include_formulas - alias_method :include_formulas?, :include_formulas - - # True if the find value should match the entire cell. - # Corresponds to the JSON property `matchEntireCell` - # @return [Boolean] - attr_accessor :match_entire_cell - alias_method :match_entire_cell?, :match_entire_cell - - # True if the find value is a regex. - # The regular expression and replacement should follow Java regex rules - # at https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html. - # The replacement string is allowed to refer to capturing groups. - # For example, if one cell has the contents `"Google Sheets"` and another - # has `"Google Docs"`, then searching for `"o.* (.*)"` with a replacement of - # `"$1 Rocks"` would change the contents of the cells to - # `"GSheets Rocks"` and `"GDocs Rocks"` respectively. - # Corresponds to the JSON property `searchByRegex` - # @return [Boolean] - attr_accessor :search_by_regex - alias_method :search_by_regex?, :search_by_regex - - # The value to search. - # Corresponds to the JSON property `find` - # @return [String] - attr_accessor :find - - # The value to use as the replacement. - # Corresponds to the JSON property `replacement` - # @return [String] - attr_accessor :replacement - # A range on a sheet. # All indexes are zero-based. # Indexes are half open, e.g the start index is inclusive @@ -4084,21 +1211,97 @@ module Google # @return [Fixnum] attr_accessor :sheet_id + # True if the search is case sensitive. + # Corresponds to the JSON property `matchCase` + # @return [Boolean] + attr_accessor :match_case + alias_method :match_case?, :match_case + + # True to find/replace over all sheets. + # Corresponds to the JSON property `allSheets` + # @return [Boolean] + attr_accessor :all_sheets + alias_method :all_sheets?, :all_sheets + + # True if the search should include cells with formulas. + # False to skip cells with formulas. + # Corresponds to the JSON property `includeFormulas` + # @return [Boolean] + attr_accessor :include_formulas + alias_method :include_formulas?, :include_formulas + + # True if the find value should match the entire cell. + # Corresponds to the JSON property `matchEntireCell` + # @return [Boolean] + attr_accessor :match_entire_cell + alias_method :match_entire_cell?, :match_entire_cell + + # The value to search. + # Corresponds to the JSON property `find` + # @return [String] + attr_accessor :find + + # True if the find value is a regex. + # The regular expression and replacement should follow Java regex rules + # at https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html. + # The replacement string is allowed to refer to capturing groups. + # For example, if one cell has the contents `"Google Sheets"` and another + # has `"Google Docs"`, then searching for `"o.* (.*)"` with a replacement of + # `"$1 Rocks"` would change the contents of the cells to + # `"GSheets Rocks"` and `"GDocs Rocks"` respectively. + # Corresponds to the JSON property `searchByRegex` + # @return [Boolean] + attr_accessor :search_by_regex + alias_method :search_by_regex?, :search_by_regex + + # The value to use as the replacement. + # Corresponds to the JSON property `replacement` + # @return [String] + attr_accessor :replacement + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @all_sheets = args[:all_sheets] if args.key?(:all_sheets) - @match_case = args[:match_case] if args.key?(:match_case) - @include_formulas = args[:include_formulas] if args.key?(:include_formulas) - @match_entire_cell = args[:match_entire_cell] if args.key?(:match_entire_cell) - @search_by_regex = args[:search_by_regex] if args.key?(:search_by_regex) - @find = args[:find] if args.key?(:find) - @replacement = args[:replacement] if args.key?(:replacement) @range = args[:range] if args.key?(:range) @sheet_id = args[:sheet_id] if args.key?(:sheet_id) + @match_case = args[:match_case] if args.key?(:match_case) + @all_sheets = args[:all_sheets] if args.key?(:all_sheets) + @include_formulas = args[:include_formulas] if args.key?(:include_formulas) + @match_entire_cell = args[:match_entire_cell] if args.key?(:match_entire_cell) + @find = args[:find] if args.key?(:find) + @search_by_regex = args[:search_by_regex] if args.key?(:search_by_regex) + @replacement = args[:replacement] if args.key?(:replacement) + end + end + + # Updates properties of the named range with the specified + # namedRangeId. + class UpdateNamedRangeRequest + include Google::Apis::Core::Hashable + + # A named range. + # Corresponds to the JSON property `namedRange` + # @return [Google::Apis::SheetsV4::NamedRange] + attr_accessor :named_range + + # The fields that should be updated. At least one field must be specified. + # The root `namedRange` is implied and should not be specified. + # A single `"*"` can be used as short-hand for listing every field. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @named_range = args[:named_range] if args.key?(:named_range) + @fields = args[:fields] if args.key?(:fields) end end @@ -4130,6 +1333,12 @@ module Google class UpdateCellsRequest include Google::Apis::Core::Hashable + # A coordinate in a sheet. + # All indexes are zero-based. + # Corresponds to the JSON property `start` + # @return [Google::Apis::SheetsV4::GridCoordinate] + attr_accessor :start + # A range on a sheet. # All indexes are zero-based. # Indexes are half open, e.g the start index is inclusive @@ -4169,22 +1378,16 @@ module Google # @return [String] attr_accessor :fields - # A coordinate in a sheet. - # All indexes are zero-based. - # Corresponds to the JSON property `start` - # @return [Google::Apis::SheetsV4::GridCoordinate] - attr_accessor :start - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @start = args[:start] if args.key?(:start) @range = args[:range] if args.key?(:range) @rows = args[:rows] if args.key?(:rows) @fields = args[:fields] if args.key?(:fields) - @start = args[:start] if args.key?(:start) end end @@ -4211,6 +1414,14 @@ module Google class DeleteRangeRequest include Google::Apis::Core::Hashable + # The dimension from which deleted cells will be replaced with. + # If ROWS, existing cells will be shifted upward to + # replace the deleted cells. If COLUMNS, existing cells + # will be shifted left to replace the deleted cells. + # Corresponds to the JSON property `shiftDimension` + # @return [String] + attr_accessor :shift_dimension + # A range on a sheet. # All indexes are zero-based. # Indexes are half open, e.g the start index is inclusive @@ -4237,22 +1448,14 @@ module Google # @return [Google::Apis::SheetsV4::GridRange] attr_accessor :range - # The dimension from which deleted cells will be replaced with. - # If ROWS, existing cells will be shifted upward to - # replace the deleted cells. If COLUMNS, existing cells - # will be shifted left to replace the deleted cells. - # Corresponds to the JSON property `shiftDimension` - # @return [String] - attr_accessor :shift_dimension - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @range = args[:range] if args.key?(:range) @shift_dimension = args[:shift_dimension] if args.key?(:shift_dimension) + @range = args[:range] if args.key?(:range) end end @@ -4293,11 +1496,6 @@ module Google class UpdateSheetPropertiesRequest include Google::Apis::Core::Hashable - # Properties of a sheet. - # Corresponds to the JSON property `properties` - # @return [Google::Apis::SheetsV4::SheetProperties] - attr_accessor :properties - # The fields that should be updated. At least one field must be specified. # The root `properties` is implied and should not be specified. # A single `"*"` can be used as short-hand for listing every field. @@ -4305,58 +1503,19 @@ module Google # @return [String] attr_accessor :fields + # Properties of a sheet. + # Corresponds to the JSON property `properties` + # @return [Google::Apis::SheetsV4::SheetProperties] + attr_accessor :properties + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @properties = args[:properties] if args.key?(:properties) @fields = args[:fields] if args.key?(:fields) - end - end - - # Properties of a grid. - class GridProperties - include Google::Apis::Core::Hashable - - # The number of rows that are frozen in the grid. - # Corresponds to the JSON property `frozenRowCount` - # @return [Fixnum] - attr_accessor :frozen_row_count - - # True if the grid isn't showing gridlines in the UI. - # Corresponds to the JSON property `hideGridlines` - # @return [Boolean] - attr_accessor :hide_gridlines - alias_method :hide_gridlines?, :hide_gridlines - - # The number of columns in the grid. - # Corresponds to the JSON property `columnCount` - # @return [Fixnum] - attr_accessor :column_count - - # The number of columns that are frozen in the grid. - # Corresponds to the JSON property `frozenColumnCount` - # @return [Fixnum] - attr_accessor :frozen_column_count - - # The number of rows in the grid. - # Corresponds to the JSON property `rowCount` - # @return [Fixnum] - attr_accessor :row_count - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @frozen_row_count = args[:frozen_row_count] if args.key?(:frozen_row_count) - @hide_gridlines = args[:hide_gridlines] if args.key?(:hide_gridlines) - @column_count = args[:column_count] if args.key?(:column_count) - @frozen_column_count = args[:frozen_column_count] if args.key?(:frozen_column_count) - @row_count = args[:row_count] if args.key?(:row_count) + @properties = args[:properties] if args.key?(:properties) end end @@ -4400,38 +1559,35 @@ module Google end end - # The result of updating an embedded object's position. - class UpdateEmbeddedObjectPositionResponse + # Properties of a grid. + class GridProperties include Google::Apis::Core::Hashable - # The position of an embedded object such as a chart. - # Corresponds to the JSON property `position` - # @return [Google::Apis::SheetsV4::EmbeddedObjectPosition] - attr_accessor :position - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @position = args[:position] if args.key?(:position) - end - end - - # A sort order associated with a specific column or row. - class SortSpec - include Google::Apis::Core::Hashable - - # The dimension the sort should be applied to. - # Corresponds to the JSON property `dimensionIndex` + # The number of rows in the grid. + # Corresponds to the JSON property `rowCount` # @return [Fixnum] - attr_accessor :dimension_index + attr_accessor :row_count - # The order data should be sorted. - # Corresponds to the JSON property `sortOrder` - # @return [String] - attr_accessor :sort_order + # The number of rows that are frozen in the grid. + # Corresponds to the JSON property `frozenRowCount` + # @return [Fixnum] + attr_accessor :frozen_row_count + + # True if the grid isn't showing gridlines in the UI. + # Corresponds to the JSON property `hideGridlines` + # @return [Boolean] + attr_accessor :hide_gridlines + alias_method :hide_gridlines?, :hide_gridlines + + # The number of columns in the grid. + # Corresponds to the JSON property `columnCount` + # @return [Fixnum] + attr_accessor :column_count + + # The number of columns that are frozen in the grid. + # Corresponds to the JSON property `frozenColumnCount` + # @return [Fixnum] + attr_accessor :frozen_column_count def initialize(**args) update!(**args) @@ -4439,8 +1595,11 @@ module Google # Update properties of this object def update!(**args) - @dimension_index = args[:dimension_index] if args.key?(:dimension_index) - @sort_order = args[:sort_order] if args.key?(:sort_order) + @row_count = args[:row_count] if args.key?(:row_count) + @frozen_row_count = args[:frozen_row_count] if args.key?(:frozen_row_count) + @hide_gridlines = args[:hide_gridlines] if args.key?(:hide_gridlines) + @column_count = args[:column_count] if args.key?(:column_count) + @frozen_column_count = args[:frozen_column_count] if args.key?(:frozen_column_count) end end @@ -4518,6 +1677,50 @@ module Google end end + # A sort order associated with a specific column or row. + class SortSpec + include Google::Apis::Core::Hashable + + # The dimension the sort should be applied to. + # Corresponds to the JSON property `dimensionIndex` + # @return [Fixnum] + attr_accessor :dimension_index + + # The order data should be sorted. + # Corresponds to the JSON property `sortOrder` + # @return [String] + attr_accessor :sort_order + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @dimension_index = args[:dimension_index] if args.key?(:dimension_index) + @sort_order = args[:sort_order] if args.key?(:sort_order) + end + end + + # The result of updating an embedded object's position. + class UpdateEmbeddedObjectPositionResponse + include Google::Apis::Core::Hashable + + # The position of an embedded object such as a chart. + # Corresponds to the JSON property `position` + # @return [Google::Apis::SheetsV4::EmbeddedObjectPosition] + attr_accessor :position + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @position = args[:position] if args.key?(:position) + end + end + # A rule that may or may not match, depending on the condition. class BooleanRule include Google::Apis::Core::Hashable @@ -4545,32 +1748,6 @@ module Google end end - # Metadata about a value in a pivot grouping. - class PivotGroupValueMetadata - include Google::Apis::Core::Hashable - - # The kinds of value that a cell in a spreadsheet can have. - # Corresponds to the JSON property `value` - # @return [Google::Apis::SheetsV4::ExtendedValue] - attr_accessor :value - - # True if the data corresponding to the value is collapsed. - # Corresponds to the JSON property `collapsed` - # @return [Boolean] - attr_accessor :collapsed - alias_method :collapsed?, :collapsed - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @value = args[:value] if args.key?(:value) - @collapsed = args[:collapsed] if args.key?(:collapsed) - end - end - # Criteria for showing/hiding rows in a filter or filter view. class FilterCriteria include Google::Apis::Core::Hashable @@ -4598,6 +1775,32 @@ module Google end end + # Metadata about a value in a pivot grouping. + class PivotGroupValueMetadata + include Google::Apis::Core::Hashable + + # True if the data corresponding to the value is collapsed. + # Corresponds to the JSON property `collapsed` + # @return [Boolean] + attr_accessor :collapsed + alias_method :collapsed?, :collapsed + + # The kinds of value that a cell in a spreadsheet can have. + # Corresponds to the JSON property `value` + # @return [Google::Apis::SheetsV4::ExtendedValue] + attr_accessor :value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @collapsed = args[:collapsed] if args.key?(:collapsed) + @value = args[:value] if args.key?(:value) + end + end + # The editors of a protected range. class Editors include Google::Apis::Core::Hashable @@ -4670,48 +1873,6 @@ module Google end end - # A data validation rule. - class DataValidationRule - include Google::Apis::Core::Hashable - - # True if the UI should be customized based on the kind of condition. - # If true, "List" conditions will show a dropdown. - # Corresponds to the JSON property `showCustomUi` - # @return [Boolean] - attr_accessor :show_custom_ui - alias_method :show_custom_ui?, :show_custom_ui - - # True if invalid data should be rejected. - # Corresponds to the JSON property `strict` - # @return [Boolean] - attr_accessor :strict - alias_method :strict?, :strict - - # A message to show the user when adding data to the cell. - # Corresponds to the JSON property `inputMessage` - # @return [String] - attr_accessor :input_message - - # A condition that can evaluate to true or false. - # BooleanConditions are used by conditional formatting, - # data validation, and the criteria in filters. - # Corresponds to the JSON property `condition` - # @return [Google::Apis::SheetsV4::BooleanCondition] - attr_accessor :condition - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @show_custom_ui = args[:show_custom_ui] if args.key?(:show_custom_ui) - @strict = args[:strict] if args.key?(:strict) - @input_message = args[:input_message] if args.key?(:input_message) - @condition = args[:condition] if args.key?(:condition) - end - end - # The domain of a chart. # For example, if charting stock prices over time, this would be the date. class BasicChartDomain @@ -4732,10 +1893,63 @@ module Google end end + # A data validation rule. + class DataValidationRule + include Google::Apis::Core::Hashable + + # A condition that can evaluate to true or false. + # BooleanConditions are used by conditional formatting, + # data validation, and the criteria in filters. + # Corresponds to the JSON property `condition` + # @return [Google::Apis::SheetsV4::BooleanCondition] + attr_accessor :condition + + # True if the UI should be customized based on the kind of condition. + # If true, "List" conditions will show a dropdown. + # Corresponds to the JSON property `showCustomUi` + # @return [Boolean] + attr_accessor :show_custom_ui + alias_method :show_custom_ui?, :show_custom_ui + + # True if invalid data should be rejected. + # Corresponds to the JSON property `strict` + # @return [Boolean] + attr_accessor :strict + alias_method :strict?, :strict + + # A message to show the user when adding data to the cell. + # Corresponds to the JSON property `inputMessage` + # @return [String] + attr_accessor :input_message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @condition = args[:condition] if args.key?(:condition) + @show_custom_ui = args[:show_custom_ui] if args.key?(:show_custom_ui) + @strict = args[:strict] if args.key?(:strict) + @input_message = args[:input_message] if args.key?(:input_message) + end + end + # Inserts data into the spreadsheet starting at the specified coordinate. class PasteDataRequest include Google::Apis::Core::Hashable + # How the data should be pasted. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # True if the data is HTML. + # Corresponds to the JSON property `html` + # @return [Boolean] + attr_accessor :html + alias_method :html?, :html + # A coordinate in a sheet. # All indexes are zero-based. # Corresponds to the JSON property `coordinate` @@ -4752,28 +1966,17 @@ module Google # @return [String] attr_accessor :delimiter - # How the data should be pasted. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # True if the data is HTML. - # Corresponds to the JSON property `html` - # @return [Boolean] - attr_accessor :html - alias_method :html?, :html - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @type = args[:type] if args.key?(:type) + @html = args[:html] if args.key?(:html) @coordinate = args[:coordinate] if args.key?(:coordinate) @data = args[:data] if args.key?(:data) @delimiter = args[:delimiter] if args.key?(:delimiter) - @type = args[:type] if args.key?(:type) - @html = args[:html] if args.key?(:html) end end @@ -4781,6 +1984,11 @@ module Google class AppendDimensionRequest include Google::Apis::Core::Hashable + # The number of rows or columns to append. + # Corresponds to the JSON property `length` + # @return [Fixnum] + attr_accessor :length + # The sheet to append rows or columns to. # Corresponds to the JSON property `sheetId` # @return [Fixnum] @@ -4791,20 +1999,15 @@ module Google # @return [String] attr_accessor :dimension - # The number of rows or columns to append. - # Corresponds to the JSON property `length` - # @return [Fixnum] - attr_accessor :length - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @length = args[:length] if args.key?(:length) @sheet_id = args[:sheet_id] if args.key?(:sheet_id) @dimension = args[:dimension] if args.key?(:dimension) - @length = args[:length] if args.key?(:length) end end @@ -4832,6 +2035,11 @@ module Google class UpdateEmbeddedObjectPositionRequest include Google::Apis::Core::Hashable + # The ID of the object to moved. + # Corresponds to the JSON property `objectId` + # @return [Fixnum] + attr_accessor :object_id_prop + # The position of an embedded object such as a chart. # Corresponds to the JSON property `newPosition` # @return [Google::Apis::SheetsV4::EmbeddedObjectPosition] @@ -4848,20 +2056,15 @@ module Google # @return [String] attr_accessor :fields - # The ID of the object to moved. - # Corresponds to the JSON property `objectId` - # @return [Fixnum] - attr_accessor :object_id_prop - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) @new_position = args[:new_position] if args.key?(:new_position) @fields = args[:fields] if args.key?(:fields) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) end end @@ -4953,6 +2156,11 @@ module Google class UpdateFilterViewRequest include Google::Apis::Core::Hashable + # A filter view. + # Corresponds to the JSON property `filter` + # @return [Google::Apis::SheetsV4::FilterView] + attr_accessor :filter + # The fields that should be updated. At least one field must be specified. # The root `filter` is implied and should not be specified. # A single `"*"` can be used as short-hand for listing every field. @@ -4960,19 +2168,14 @@ module Google # @return [String] attr_accessor :fields - # A filter view. - # Corresponds to the JSON property `filter` - # @return [Google::Apis::SheetsV4::FilterView] - attr_accessor :filter - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @fields = args[:fields] if args.key?(:fields) @filter = args[:filter] if args.key?(:filter) + @fields = args[:fields] if args.key?(:fields) end end @@ -5037,14 +2240,14 @@ module Google # If the start index equals the end index, then the range is empty. # Empty ranges are typically not meaningful and are usually rendered in the # UI as `#REF!`. - # Corresponds to the JSON property `source` + # Corresponds to the JSON property `destination` # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :source + attr_accessor :destination - # What kind of data to paste. - # Corresponds to the JSON property `pasteType` + # How that data should be oriented when pasting. + # Corresponds to the JSON property `pasteOrientation` # @return [String] - attr_accessor :paste_type + attr_accessor :paste_orientation # A range on a sheet. # All indexes are zero-based. @@ -5068,14 +2271,14 @@ module Google # If the start index equals the end index, then the range is empty. # Empty ranges are typically not meaningful and are usually rendered in the # UI as `#REF!`. - # Corresponds to the JSON property `destination` + # Corresponds to the JSON property `source` # @return [Google::Apis::SheetsV4::GridRange] - attr_accessor :destination + attr_accessor :source - # How that data should be oriented when pasting. - # Corresponds to the JSON property `pasteOrientation` + # What kind of data to paste. + # Corresponds to the JSON property `pasteType` # @return [String] - attr_accessor :paste_orientation + attr_accessor :paste_type def initialize(**args) update!(**args) @@ -5083,40 +2286,10 @@ module Google # Update properties of this object def update!(**args) - @source = args[:source] if args.key?(:source) - @paste_type = args[:paste_type] if args.key?(:paste_type) @destination = args[:destination] if args.key?(:destination) @paste_orientation = args[:paste_orientation] if args.key?(:paste_orientation) - end - end - - # A condition that can evaluate to true or false. - # BooleanConditions are used by conditional formatting, - # data validation, and the criteria in filters. - class BooleanCondition - include Google::Apis::Core::Hashable - - # The type of condition. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # The values of the condition. The number of supported values depends - # on the condition type. Some support zero values, - # others one or two values, - # and ConditionType.ONE_OF_LIST supports an arbitrary number of values. - # Corresponds to the JSON property `values` - # @return [Array] - attr_accessor :values - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] if args.key?(:type) - @values = args[:values] if args.key?(:values) + @source = args[:source] if args.key?(:source) + @paste_type = args[:paste_type] if args.key?(:paste_type) end end @@ -5124,6 +2297,134 @@ module Google class Request include Google::Apis::Core::Hashable + # Deletes the embedded object with the given ID. + # Corresponds to the JSON property `deleteEmbeddedObject` + # @return [Google::Apis::SheetsV4::DeleteEmbeddedObjectRequest] + attr_accessor :delete_embedded_object + + # Updates properties of the filter view. + # Corresponds to the JSON property `updateFilterView` + # @return [Google::Apis::SheetsV4::UpdateFilterViewRequest] + attr_accessor :update_filter_view + + # Adds a new banded range to the spreadsheet. + # Corresponds to the JSON property `addBanding` + # @return [Google::Apis::SheetsV4::AddBandingRequest] + attr_accessor :add_banding + + # Automatically resizes one or more dimensions based on the contents + # of the cells in that dimension. + # Corresponds to the JSON property `autoResizeDimensions` + # @return [Google::Apis::SheetsV4::AutoResizeDimensionsRequest] + attr_accessor :auto_resize_dimensions + + # Adds new cells after the last row with data in a sheet, + # inserting new rows into the sheet if necessary. + # Corresponds to the JSON property `appendCells` + # @return [Google::Apis::SheetsV4::AppendCellsRequest] + attr_accessor :append_cells + + # Moves data from the source to the destination. + # Corresponds to the JSON property `cutPaste` + # @return [Google::Apis::SheetsV4::CutPasteRequest] + attr_accessor :cut_paste + + # Merges all cells in the range. + # Corresponds to the JSON property `mergeCells` + # @return [Google::Apis::SheetsV4::MergeCellsRequest] + attr_accessor :merge_cells + + # Updates properties of the named range with the specified + # namedRangeId. + # Corresponds to the JSON property `updateNamedRange` + # @return [Google::Apis::SheetsV4::UpdateNamedRangeRequest] + attr_accessor :update_named_range + + # Updates properties of the sheet with the specified + # sheetId. + # Corresponds to the JSON property `updateSheetProperties` + # @return [Google::Apis::SheetsV4::UpdateSheetPropertiesRequest] + attr_accessor :update_sheet_properties + + # Deletes the dimensions from the sheet. + # Corresponds to the JSON property `deleteDimension` + # @return [Google::Apis::SheetsV4::DeleteDimensionRequest] + attr_accessor :delete_dimension + + # Fills in more data based on existing data. + # Corresponds to the JSON property `autoFill` + # @return [Google::Apis::SheetsV4::AutoFillRequest] + attr_accessor :auto_fill + + # Sorts data in rows based on a sort order per column. + # Corresponds to the JSON property `sortRange` + # @return [Google::Apis::SheetsV4::SortRangeRequest] + attr_accessor :sort_range + + # Deletes the protected range with the given ID. + # Corresponds to the JSON property `deleteProtectedRange` + # @return [Google::Apis::SheetsV4::DeleteProtectedRangeRequest] + attr_accessor :delete_protected_range + + # Duplicates a particular filter view. + # Corresponds to the JSON property `duplicateFilterView` + # @return [Google::Apis::SheetsV4::DuplicateFilterViewRequest] + attr_accessor :duplicate_filter_view + + # Adds a chart to a sheet in the spreadsheet. + # Corresponds to the JSON property `addChart` + # @return [Google::Apis::SheetsV4::AddChartRequest] + attr_accessor :add_chart + + # Finds and replaces data in cells over a range, sheet, or all sheets. + # Corresponds to the JSON property `findReplace` + # @return [Google::Apis::SheetsV4::FindReplaceRequest] + attr_accessor :find_replace + + # Splits a column of text into multiple columns, + # based on a delimiter in each cell. + # Corresponds to the JSON property `textToColumns` + # @return [Google::Apis::SheetsV4::TextToColumnsRequest] + attr_accessor :text_to_columns + + # Updates a chart's specifications. + # (This does not move or resize a chart. To move or resize a chart, use + # UpdateEmbeddedObjectPositionRequest.) + # Corresponds to the JSON property `updateChartSpec` + # @return [Google::Apis::SheetsV4::UpdateChartSpecRequest] + attr_accessor :update_chart_spec + + # Updates an existing protected range with the specified + # protectedRangeId. + # Corresponds to the JSON property `updateProtectedRange` + # @return [Google::Apis::SheetsV4::UpdateProtectedRangeRequest] + attr_accessor :update_protected_range + + # Adds a new sheet. + # When a sheet is added at a given index, + # all subsequent sheets' indexes are incremented. + # To add an object sheet, use AddChartRequest instead and specify + # EmbeddedObjectPosition.sheetId or + # EmbeddedObjectPosition.newSheet. + # Corresponds to the JSON property `addSheet` + # @return [Google::Apis::SheetsV4::AddSheetRequest] + attr_accessor :add_sheet + + # Copies data from the source to the destination. + # Corresponds to the JSON property `copyPaste` + # @return [Google::Apis::SheetsV4::CopyPasteRequest] + attr_accessor :copy_paste + + # Deletes a particular filter view. + # Corresponds to the JSON property `deleteFilterView` + # @return [Google::Apis::SheetsV4::DeleteFilterViewRequest] + attr_accessor :delete_filter_view + + # Inserts rows or columns in a sheet at a particular index. + # Corresponds to the JSON property `insertDimension` + # @return [Google::Apis::SheetsV4::InsertDimensionRequest] + attr_accessor :insert_dimension + # Deletes a range of cells, shifting other cells into the deleted area. # Corresponds to the JSON property `deleteRange` # @return [Google::Apis::SheetsV4::DeleteRangeRequest] @@ -5139,6 +2440,12 @@ module Google # @return [Google::Apis::SheetsV4::AddFilterViewRequest] attr_accessor :add_filter_view + # Sets a data validation rule to every cell in the range. + # To clear validation in a range, call this with no rule specified. + # Corresponds to the JSON property `setDataValidation` + # @return [Google::Apis::SheetsV4::SetDataValidationRequest] + attr_accessor :set_data_validation + # Updates the borders of a range. # If a field is not set in the request, that means the border remains as-is. # For example, with two subsequent UpdateBordersRequest: @@ -5152,23 +2459,12 @@ module Google # @return [Google::Apis::SheetsV4::UpdateBordersRequest] attr_accessor :update_borders - # Sets a data validation rule to every cell in the range. - # To clear validation in a range, call this with no rule specified. - # Corresponds to the JSON property `setDataValidation` - # @return [Google::Apis::SheetsV4::SetDataValidationRequest] - attr_accessor :set_data_validation - # Deletes a conditional format rule at the given index. # All subsequent rules' indexes are decremented. # Corresponds to the JSON property `deleteConditionalFormatRule` # @return [Google::Apis::SheetsV4::DeleteConditionalFormatRuleRequest] attr_accessor :delete_conditional_format_rule - # Clears the basic filter, if any exists on the sheet. - # Corresponds to the JSON property `clearBasicFilter` - # @return [Google::Apis::SheetsV4::ClearBasicFilterRequest] - attr_accessor :clear_basic_filter - # Updates all cells in the range to the values in the given Cell object. # Only the fields listed in the fields field are updated; others are # unchanged. @@ -5184,6 +2480,11 @@ module Google # @return [Google::Apis::SheetsV4::RepeatCellRequest] attr_accessor :repeat_cell + # Clears the basic filter, if any exists on the sheet. + # Corresponds to the JSON property `clearBasicFilter` + # @return [Google::Apis::SheetsV4::ClearBasicFilterRequest] + attr_accessor :clear_basic_filter + # Appends rows or columns to the end of a sheet. # Corresponds to the JSON property `appendDimension` # @return [Google::Apis::SheetsV4::AppendDimensionRequest] @@ -5277,148 +2578,43 @@ module Google # @return [Google::Apis::SheetsV4::UpdateSpreadsheetPropertiesRequest] attr_accessor :update_spreadsheet_properties - # Deletes the embedded object with the given ID. - # Corresponds to the JSON property `deleteEmbeddedObject` - # @return [Google::Apis::SheetsV4::DeleteEmbeddedObjectRequest] - attr_accessor :delete_embedded_object - - # Updates properties of the filter view. - # Corresponds to the JSON property `updateFilterView` - # @return [Google::Apis::SheetsV4::UpdateFilterViewRequest] - attr_accessor :update_filter_view - - # Adds a new banded range to the spreadsheet. - # Corresponds to the JSON property `addBanding` - # @return [Google::Apis::SheetsV4::AddBandingRequest] - attr_accessor :add_banding - - # Adds new cells after the last row with data in a sheet, - # inserting new rows into the sheet if necessary. - # Corresponds to the JSON property `appendCells` - # @return [Google::Apis::SheetsV4::AppendCellsRequest] - attr_accessor :append_cells - - # Automatically resizes one or more dimensions based on the contents - # of the cells in that dimension. - # Corresponds to the JSON property `autoResizeDimensions` - # @return [Google::Apis::SheetsV4::AutoResizeDimensionsRequest] - attr_accessor :auto_resize_dimensions - - # Moves data from the source to the destination. - # Corresponds to the JSON property `cutPaste` - # @return [Google::Apis::SheetsV4::CutPasteRequest] - attr_accessor :cut_paste - - # Merges all cells in the range. - # Corresponds to the JSON property `mergeCells` - # @return [Google::Apis::SheetsV4::MergeCellsRequest] - attr_accessor :merge_cells - - # Updates properties of the named range with the specified - # namedRangeId. - # Corresponds to the JSON property `updateNamedRange` - # @return [Google::Apis::SheetsV4::UpdateNamedRangeRequest] - attr_accessor :update_named_range - - # Updates properties of the sheet with the specified - # sheetId. - # Corresponds to the JSON property `updateSheetProperties` - # @return [Google::Apis::SheetsV4::UpdateSheetPropertiesRequest] - attr_accessor :update_sheet_properties - - # Fills in more data based on existing data. - # Corresponds to the JSON property `autoFill` - # @return [Google::Apis::SheetsV4::AutoFillRequest] - attr_accessor :auto_fill - - # Deletes the dimensions from the sheet. - # Corresponds to the JSON property `deleteDimension` - # @return [Google::Apis::SheetsV4::DeleteDimensionRequest] - attr_accessor :delete_dimension - - # Sorts data in rows based on a sort order per column. - # Corresponds to the JSON property `sortRange` - # @return [Google::Apis::SheetsV4::SortRangeRequest] - attr_accessor :sort_range - - # Deletes the protected range with the given ID. - # Corresponds to the JSON property `deleteProtectedRange` - # @return [Google::Apis::SheetsV4::DeleteProtectedRangeRequest] - attr_accessor :delete_protected_range - - # Duplicates a particular filter view. - # Corresponds to the JSON property `duplicateFilterView` - # @return [Google::Apis::SheetsV4::DuplicateFilterViewRequest] - attr_accessor :duplicate_filter_view - - # Adds a chart to a sheet in the spreadsheet. - # Corresponds to the JSON property `addChart` - # @return [Google::Apis::SheetsV4::AddChartRequest] - attr_accessor :add_chart - - # Finds and replaces data in cells over a range, sheet, or all sheets. - # Corresponds to the JSON property `findReplace` - # @return [Google::Apis::SheetsV4::FindReplaceRequest] - attr_accessor :find_replace - - # Updates a chart's specifications. - # (This does not move or resize a chart. To move or resize a chart, use - # UpdateEmbeddedObjectPositionRequest.) - # Corresponds to the JSON property `updateChartSpec` - # @return [Google::Apis::SheetsV4::UpdateChartSpecRequest] - attr_accessor :update_chart_spec - - # Splits a column of text into multiple columns, - # based on a delimiter in each cell. - # Corresponds to the JSON property `textToColumns` - # @return [Google::Apis::SheetsV4::TextToColumnsRequest] - attr_accessor :text_to_columns - - # Updates an existing protected range with the specified - # protectedRangeId. - # Corresponds to the JSON property `updateProtectedRange` - # @return [Google::Apis::SheetsV4::UpdateProtectedRangeRequest] - attr_accessor :update_protected_range - - # Adds a new sheet. - # When a sheet is added at a given index, - # all subsequent sheets' indexes are incremented. - # To add an object sheet, use AddChartRequest instead and specify - # EmbeddedObjectPosition.sheetId or - # EmbeddedObjectPosition.newSheet. - # Corresponds to the JSON property `addSheet` - # @return [Google::Apis::SheetsV4::AddSheetRequest] - attr_accessor :add_sheet - - # Copies data from the source to the destination. - # Corresponds to the JSON property `copyPaste` - # @return [Google::Apis::SheetsV4::CopyPasteRequest] - attr_accessor :copy_paste - - # Deletes a particular filter view. - # Corresponds to the JSON property `deleteFilterView` - # @return [Google::Apis::SheetsV4::DeleteFilterViewRequest] - attr_accessor :delete_filter_view - - # Inserts rows or columns in a sheet at a particular index. - # Corresponds to the JSON property `insertDimension` - # @return [Google::Apis::SheetsV4::InsertDimensionRequest] - attr_accessor :insert_dimension - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @delete_embedded_object = args[:delete_embedded_object] if args.key?(:delete_embedded_object) + @update_filter_view = args[:update_filter_view] if args.key?(:update_filter_view) + @add_banding = args[:add_banding] if args.key?(:add_banding) + @auto_resize_dimensions = args[:auto_resize_dimensions] if args.key?(:auto_resize_dimensions) + @append_cells = args[:append_cells] if args.key?(:append_cells) + @cut_paste = args[:cut_paste] if args.key?(:cut_paste) + @merge_cells = args[:merge_cells] if args.key?(:merge_cells) + @update_named_range = args[:update_named_range] if args.key?(:update_named_range) + @update_sheet_properties = args[:update_sheet_properties] if args.key?(:update_sheet_properties) + @delete_dimension = args[:delete_dimension] if args.key?(:delete_dimension) + @auto_fill = args[:auto_fill] if args.key?(:auto_fill) + @sort_range = args[:sort_range] if args.key?(:sort_range) + @delete_protected_range = args[:delete_protected_range] if args.key?(:delete_protected_range) + @duplicate_filter_view = args[:duplicate_filter_view] if args.key?(:duplicate_filter_view) + @add_chart = args[:add_chart] if args.key?(:add_chart) + @find_replace = args[:find_replace] if args.key?(:find_replace) + @text_to_columns = args[:text_to_columns] if args.key?(:text_to_columns) + @update_chart_spec = args[:update_chart_spec] if args.key?(:update_chart_spec) + @update_protected_range = args[:update_protected_range] if args.key?(:update_protected_range) + @add_sheet = args[:add_sheet] if args.key?(:add_sheet) + @copy_paste = args[:copy_paste] if args.key?(:copy_paste) + @delete_filter_view = args[:delete_filter_view] if args.key?(:delete_filter_view) + @insert_dimension = args[:insert_dimension] if args.key?(:insert_dimension) @delete_range = args[:delete_range] if args.key?(:delete_range) @delete_banding = args[:delete_banding] if args.key?(:delete_banding) @add_filter_view = args[:add_filter_view] if args.key?(:add_filter_view) - @update_borders = args[:update_borders] if args.key?(:update_borders) @set_data_validation = args[:set_data_validation] if args.key?(:set_data_validation) + @update_borders = args[:update_borders] if args.key?(:update_borders) @delete_conditional_format_rule = args[:delete_conditional_format_rule] if args.key?(:delete_conditional_format_rule) - @clear_basic_filter = args[:clear_basic_filter] if args.key?(:clear_basic_filter) @repeat_cell = args[:repeat_cell] if args.key?(:repeat_cell) + @clear_basic_filter = args[:clear_basic_filter] if args.key?(:clear_basic_filter) @append_dimension = args[:append_dimension] if args.key?(:append_dimension) @update_conditional_format_rule = args[:update_conditional_format_rule] if args.key?(:update_conditional_format_rule) @insert_range = args[:insert_range] if args.key?(:insert_range) @@ -5437,29 +2633,36 @@ module Google @add_named_range = args[:add_named_range] if args.key?(:add_named_range) @update_cells = args[:update_cells] if args.key?(:update_cells) @update_spreadsheet_properties = args[:update_spreadsheet_properties] if args.key?(:update_spreadsheet_properties) - @delete_embedded_object = args[:delete_embedded_object] if args.key?(:delete_embedded_object) - @update_filter_view = args[:update_filter_view] if args.key?(:update_filter_view) - @add_banding = args[:add_banding] if args.key?(:add_banding) - @append_cells = args[:append_cells] if args.key?(:append_cells) - @auto_resize_dimensions = args[:auto_resize_dimensions] if args.key?(:auto_resize_dimensions) - @cut_paste = args[:cut_paste] if args.key?(:cut_paste) - @merge_cells = args[:merge_cells] if args.key?(:merge_cells) - @update_named_range = args[:update_named_range] if args.key?(:update_named_range) - @update_sheet_properties = args[:update_sheet_properties] if args.key?(:update_sheet_properties) - @auto_fill = args[:auto_fill] if args.key?(:auto_fill) - @delete_dimension = args[:delete_dimension] if args.key?(:delete_dimension) - @sort_range = args[:sort_range] if args.key?(:sort_range) - @delete_protected_range = args[:delete_protected_range] if args.key?(:delete_protected_range) - @duplicate_filter_view = args[:duplicate_filter_view] if args.key?(:duplicate_filter_view) - @add_chart = args[:add_chart] if args.key?(:add_chart) - @find_replace = args[:find_replace] if args.key?(:find_replace) - @update_chart_spec = args[:update_chart_spec] if args.key?(:update_chart_spec) - @text_to_columns = args[:text_to_columns] if args.key?(:text_to_columns) - @update_protected_range = args[:update_protected_range] if args.key?(:update_protected_range) - @add_sheet = args[:add_sheet] if args.key?(:add_sheet) - @copy_paste = args[:copy_paste] if args.key?(:copy_paste) - @delete_filter_view = args[:delete_filter_view] if args.key?(:delete_filter_view) - @insert_dimension = args[:insert_dimension] if args.key?(:insert_dimension) + end + end + + # A condition that can evaluate to true or false. + # BooleanConditions are used by conditional formatting, + # data validation, and the criteria in filters. + class BooleanCondition + include Google::Apis::Core::Hashable + + # The type of condition. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The values of the condition. The number of supported values depends + # on the condition type. Some support zero values, + # others one or two values, + # and ConditionType.ONE_OF_LIST supports an arbitrary number of values. + # Corresponds to the JSON property `values` + # @return [Array] + attr_accessor :values + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type = args[:type] if args.key?(:type) + @values = args[:values] if args.key?(:values) end end @@ -5532,6 +2735,21 @@ module Google class BasicChartSpec include Google::Apis::Core::Hashable + # The type of the chart. + # Corresponds to the JSON property `chartType` + # @return [String] + attr_accessor :chart_type + + # The data this chart is visualizing. + # Corresponds to the JSON property `series` + # @return [Array] + attr_accessor :series + + # The position of the chart legend. + # Corresponds to the JSON property `legendPosition` + # @return [String] + attr_accessor :legend_position + # The domain of data this is charting. # Only a single domain is currently supported. # Corresponds to the JSON property `domains` @@ -5552,33 +2770,18 @@ module Google # @return [Array] attr_accessor :axis - # The type of the chart. - # Corresponds to the JSON property `chartType` - # @return [String] - attr_accessor :chart_type - - # The data this chart is visualizing. - # Corresponds to the JSON property `series` - # @return [Array] - attr_accessor :series - - # The position of the chart legend. - # Corresponds to the JSON property `legendPosition` - # @return [String] - attr_accessor :legend_position - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @domains = args[:domains] if args.key?(:domains) - @header_count = args[:header_count] if args.key?(:header_count) - @axis = args[:axis] if args.key?(:axis) @chart_type = args[:chart_type] if args.key?(:chart_type) @series = args[:series] if args.key?(:series) @legend_position = args[:legend_position] if args.key?(:legend_position) + @domains = args[:domains] if args.key?(:domains) + @header_count = args[:header_count] if args.key?(:header_count) + @axis = args[:axis] if args.key?(:axis) end end @@ -5633,12 +2836,6 @@ module Google class CellData include Google::Apis::Core::Hashable - # A hyperlink this cell points to, if any. - # This field is read-only. (To set it, use a `=HYPERLINK` formula.) - # Corresponds to the JSON property `hyperlink` - # @return [String] - attr_accessor :hyperlink - # A pivot table. # Corresponds to the JSON property `pivotTable` # @return [Google::Apis::SheetsV4::PivotTable] @@ -5649,16 +2846,16 @@ module Google # @return [Google::Apis::SheetsV4::CellFormat] attr_accessor :user_entered_format - # The format of a cell. - # Corresponds to the JSON property `effectiveFormat` - # @return [Google::Apis::SheetsV4::CellFormat] - attr_accessor :effective_format - # Any note on the cell. # Corresponds to the JSON property `note` # @return [String] attr_accessor :note + # The format of a cell. + # Corresponds to the JSON property `effectiveFormat` + # @return [Google::Apis::SheetsV4::CellFormat] + attr_accessor :effective_format + # The kinds of value that a cell in a spreadsheet can have. # Corresponds to the JSON property `userEnteredValue` # @return [Google::Apis::SheetsV4::ExtendedValue] @@ -5674,6 +2871,13 @@ module Google # @return [Google::Apis::SheetsV4::ExtendedValue] attr_accessor :effective_value + # The formatted value of the cell. + # This is the value as it's shown to the user. + # This field is read-only. + # Corresponds to the JSON property `formattedValue` + # @return [String] + attr_accessor :formatted_value + # Runs of rich text applied to subsections of the cell. Runs are only valid # on user entered strings, not formulas, bools, or numbers. # Runs start at specific indexes in the text and continue until the next @@ -5686,12 +2890,11 @@ module Google # @return [Array] attr_accessor :text_format_runs - # The formatted value of the cell. - # This is the value as it's shown to the user. - # This field is read-only. - # Corresponds to the JSON property `formattedValue` + # A hyperlink this cell points to, if any. + # This field is read-only. (To set it, use a `=HYPERLINK` formula.) + # Corresponds to the JSON property `hyperlink` # @return [String] - attr_accessor :formatted_value + attr_accessor :hyperlink def initialize(**args) update!(**args) @@ -5699,16 +2902,16 @@ module Google # Update properties of this object def update!(**args) - @hyperlink = args[:hyperlink] if args.key?(:hyperlink) @pivot_table = args[:pivot_table] if args.key?(:pivot_table) @user_entered_format = args[:user_entered_format] if args.key?(:user_entered_format) - @effective_format = args[:effective_format] if args.key?(:effective_format) @note = args[:note] if args.key?(:note) + @effective_format = args[:effective_format] if args.key?(:effective_format) @user_entered_value = args[:user_entered_value] if args.key?(:user_entered_value) @data_validation = args[:data_validation] if args.key?(:data_validation) @effective_value = args[:effective_value] if args.key?(:effective_value) - @text_format_runs = args[:text_format_runs] if args.key?(:text_format_runs) @formatted_value = args[:formatted_value] if args.key?(:formatted_value) + @text_format_runs = args[:text_format_runs] if args.key?(:text_format_runs) + @hyperlink = args[:hyperlink] if args.key?(:hyperlink) end end @@ -5716,6 +2919,11 @@ module Google class BatchUpdateSpreadsheetRequest include Google::Apis::Core::Hashable + # A list of updates to apply to the spreadsheet. + # Corresponds to the JSON property `requests` + # @return [Array] + attr_accessor :requests + # Determines if the update response should include the spreadsheet # resource. # Corresponds to the JSON property `includeSpreadsheetInResponse` @@ -5737,21 +2945,16 @@ module Google attr_accessor :response_include_grid_data alias_method :response_include_grid_data?, :response_include_grid_data - # A list of updates to apply to the spreadsheet. - # Corresponds to the JSON property `requests` - # @return [Array] - attr_accessor :requests - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @requests = args[:requests] if args.key?(:requests) @include_spreadsheet_in_response = args[:include_spreadsheet_in_response] if args.key?(:include_spreadsheet_in_response) @response_ranges = args[:response_ranges] if args.key?(:response_ranges) @response_include_grid_data = args[:response_include_grid_data] if args.key?(:response_include_grid_data) - @requests = args[:requests] if args.key?(:requests) end end @@ -5761,6 +2964,12 @@ module Google class BasicChartAxis include Google::Apis::Core::Hashable + # The format of a run of text in a cell. + # Absent values indicate that the field isn't specified. + # Corresponds to the JSON property `format` + # @return [Google::Apis::SheetsV4::TextFormat] + attr_accessor :format + # The position of this axis. # Corresponds to the JSON property `position` # @return [String] @@ -5772,21 +2981,15 @@ module Google # @return [String] attr_accessor :title - # The format of a run of text in a cell. - # Absent values indicate that the field isn't specified. - # Corresponds to the JSON property `format` - # @return [Google::Apis::SheetsV4::TextFormat] - attr_accessor :format - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @format = args[:format] if args.key?(:format) @position = args[:position] if args.key?(:position) @title = args[:title] if args.key?(:title) - @format = args[:format] if args.key?(:format) end end @@ -5795,6 +2998,11 @@ module Google class Padding include Google::Apis::Core::Hashable + # The right padding of the cell. + # Corresponds to the JSON property `right` + # @return [Fixnum] + attr_accessor :right + # The bottom padding of the cell. # Corresponds to the JSON property `bottom` # @return [Fixnum] @@ -5810,21 +3018,16 @@ module Google # @return [Fixnum] attr_accessor :left - # The right padding of the cell. - # Corresponds to the JSON property `right` - # @return [Fixnum] - attr_accessor :right - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @right = args[:right] if args.key?(:right) @bottom = args[:bottom] if args.key?(:bottom) @top = args[:top] if args.key?(:top) @left = args[:left] if args.key?(:left) - @right = args[:right] if args.key?(:right) end end @@ -5901,6 +3104,17 @@ module Google class BatchUpdateValuesResponse include Google::Apis::Core::Hashable + # The total number of rows where at least one cell in the row was updated. + # Corresponds to the JSON property `totalUpdatedRows` + # @return [Fixnum] + attr_accessor :total_updated_rows + + # One UpdateValuesResponse per requested range, in the same order as + # the requests appeared. + # Corresponds to the JSON property `responses` + # @return [Array] + attr_accessor :responses + # The total number of sheets where at least one cell in the sheet was # updated. # Corresponds to the JSON property `totalUpdatedSheets` @@ -5923,29 +3137,18 @@ module Google # @return [String] attr_accessor :spreadsheet_id - # The total number of rows where at least one cell in the row was updated. - # Corresponds to the JSON property `totalUpdatedRows` - # @return [Fixnum] - attr_accessor :total_updated_rows - - # One UpdateValuesResponse per requested range, in the same order as - # the requests appeared. - # Corresponds to the JSON property `responses` - # @return [Array] - attr_accessor :responses - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @total_updated_rows = args[:total_updated_rows] if args.key?(:total_updated_rows) + @responses = args[:responses] if args.key?(:responses) @total_updated_sheets = args[:total_updated_sheets] if args.key?(:total_updated_sheets) @total_updated_cells = args[:total_updated_cells] if args.key?(:total_updated_cells) @total_updated_columns = args[:total_updated_columns] if args.key?(:total_updated_columns) @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) - @total_updated_rows = args[:total_updated_rows] if args.key?(:total_updated_rows) - @responses = args[:responses] if args.key?(:responses) end end @@ -5953,12 +3156,6 @@ module Google class SortRangeRequest include Google::Apis::Core::Hashable - # The sort order per column. Later specifications are used when values - # are equal in the earlier specifications. - # Corresponds to the JSON property `sortSpecs` - # @return [Array] - attr_accessor :sort_specs - # A range on a sheet. # All indexes are zero-based. # Indexes are half open, e.g the start index is inclusive @@ -5985,14 +3182,20 @@ module Google # @return [Google::Apis::SheetsV4::GridRange] attr_accessor :range + # The sort order per column. Later specifications are used when values + # are equal in the earlier specifications. + # Corresponds to the JSON property `sortSpecs` + # @return [Array] + attr_accessor :sort_specs + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @sort_specs = args[:sort_specs] if args.key?(:sort_specs) @range = args[:range] if args.key?(:range) + @sort_specs = args[:sort_specs] if args.key?(:sort_specs) end end @@ -6000,11 +3203,6 @@ module Google class MergeCellsRequest include Google::Apis::Core::Hashable - # How the cells should be merged. - # Corresponds to the JSON property `mergeType` - # @return [String] - attr_accessor :merge_type - # A range on a sheet. # All indexes are zero-based. # Indexes are half open, e.g the start index is inclusive @@ -6031,14 +3229,19 @@ module Google # @return [Google::Apis::SheetsV4::GridRange] attr_accessor :range + # How the cells should be merged. + # Corresponds to the JSON property `mergeType` + # @return [String] + attr_accessor :merge_type + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @merge_type = args[:merge_type] if args.key?(:merge_type) @range = args[:range] if args.key?(:range) + @merge_type = args[:merge_type] if args.key?(:merge_type) end end @@ -6118,6 +3321,25 @@ module Google end end + # Clears the basic filter, if any exists on the sheet. + class ClearBasicFilterRequest + include Google::Apis::Core::Hashable + + # The sheet ID on which the basic filter should be cleared. + # Corresponds to the JSON property `sheetId` + # @return [Fixnum] + attr_accessor :sheet_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @sheet_id = args[:sheet_id] if args.key?(:sheet_id) + end + end + # Splits a column of text into multiple columns, # based on a delimiter in each cell. class TextToColumnsRequest @@ -6172,14 +3394,14 @@ module Google end end - # Clears the basic filter, if any exists on the sheet. - class ClearBasicFilterRequest + # Removes the banded range with the given ID from the spreadsheet. + class DeleteBandingRequest include Google::Apis::Core::Hashable - # The sheet ID on which the basic filter should be cleared. - # Corresponds to the JSON property `sheetId` + # The ID of the banded range to delete. + # Corresponds to the JSON property `bandedRangeId` # @return [Fixnum] - attr_accessor :sheet_id + attr_accessor :banded_range_id def initialize(**args) update!(**args) @@ -6187,7 +3409,7 @@ module Google # Update properties of this object def update!(**args) - @sheet_id = args[:sheet_id] if args.key?(:sheet_id) + @banded_range_id = args[:banded_range_id] if args.key?(:banded_range_id) end end @@ -6223,25 +3445,6 @@ module Google end end - # Removes the banded range with the given ID from the spreadsheet. - class DeleteBandingRequest - include Google::Apis::Core::Hashable - - # The ID of the banded range to delete. - # Corresponds to the JSON property `bandedRangeId` - # @return [Fixnum] - attr_accessor :banded_range_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @banded_range_id = args[:banded_range_id] if args.key?(:banded_range_id) - end - end - # The response when updating a range of values in a spreadsheet. class AppendValuesResponse include Google::Apis::Core::Hashable @@ -6444,6 +3647,2803 @@ module Google @pattern = args[:pattern] if args.key?(:pattern) end end + + # Properties of a sheet. + class SheetProperties + include Google::Apis::Core::Hashable + + # The name of the sheet. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # The index of the sheet within the spreadsheet. + # When adding or updating sheet properties, if this field + # is excluded then the sheet will be added or moved to the end + # of the sheet list. When updating sheet indices or inserting + # sheets, movement is considered in "before the move" indexes. + # For example, if there were 3 sheets (S1, S2, S3) in order to + # move S1 ahead of S2 the index would have to be set to 2. A sheet + # index update request will be ignored if the requested index is + # identical to the sheets current index or if the requested new + # index is equal to the current sheet index + 1. + # Corresponds to the JSON property `index` + # @return [Fixnum] + attr_accessor :index + + # Represents a color in the RGBA color space. This representation is designed + # for simplicity of conversion to/from color representations in various + # languages over compactness; for example, the fields of this representation + # can be trivially provided to the constructor of "java.awt.Color" in Java; it + # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" + # method in iOS; and, with just a little work, it can be easily formatted into + # a CSS "rgba()" string in JavaScript, as well. Here are some examples: + # Example (Java): + # import com.google.type.Color; + # // ... + # public static java.awt.Color fromProto(Color protocolor) ` + # float alpha = protocolor.hasAlpha() + # ? protocolor.getAlpha().getValue() + # : 1.0; + # return new java.awt.Color( + # protocolor.getRed(), + # protocolor.getGreen(), + # protocolor.getBlue(), + # alpha); + # ` + # public static Color toProto(java.awt.Color color) ` + # float red = (float) color.getRed(); + # float green = (float) color.getGreen(); + # float blue = (float) color.getBlue(); + # float denominator = 255.0; + # Color.Builder resultBuilder = + # Color + # .newBuilder() + # .setRed(red / denominator) + # .setGreen(green / denominator) + # .setBlue(blue / denominator); + # int alpha = color.getAlpha(); + # if (alpha != 255) ` + # result.setAlpha( + # FloatValue + # .newBuilder() + # .setValue(((float) alpha) / denominator) + # .build()); + # ` + # return resultBuilder.build(); + # ` + # // ... + # Example (iOS / Obj-C): + # // ... + # static UIColor* fromProto(Color* protocolor) ` + # float red = [protocolor red]; + # float green = [protocolor green]; + # float blue = [protocolor blue]; + # FloatValue* alpha_wrapper = [protocolor alpha]; + # float alpha = 1.0; + # if (alpha_wrapper != nil) ` + # alpha = [alpha_wrapper value]; + # ` + # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; + # ` + # static Color* toProto(UIColor* color) ` + # CGFloat red, green, blue, alpha; + # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` + # return nil; + # ` + # Color* result = [Color alloc] init]; + # [result setRed:red]; + # [result setGreen:green]; + # [result setBlue:blue]; + # if (alpha <= 0.9999) ` + # [result setAlpha:floatWrapperWithValue(alpha)]; + # ` + # [result autorelease]; + # return result; + # ` + # // ... + # Example (JavaScript): + # // ... + # var protoToCssColor = function(rgb_color) ` + # var redFrac = rgb_color.red || 0.0; + # var greenFrac = rgb_color.green || 0.0; + # var blueFrac = rgb_color.blue || 0.0; + # var red = Math.floor(redFrac * 255); + # var green = Math.floor(greenFrac * 255); + # var blue = Math.floor(blueFrac * 255); + # if (!('alpha' in rgb_color)) ` + # return rgbToCssColor_(red, green, blue); + # ` + # var alphaFrac = rgb_color.alpha.value || 0.0; + # var rgbParams = [red, green, blue].join(','); + # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); + # `; + # var rgbToCssColor_ = function(red, green, blue) ` + # var rgbNumber = new Number((red << 16) | (green << 8) | blue); + # var hexString = rgbNumber.toString(16); + # var missingZeros = 6 - hexString.length; + # var resultBuilder = ['#']; + # for (var i = 0; i < missingZeros; i++) ` + # resultBuilder.push('0'); + # ` + # resultBuilder.push(hexString); + # return resultBuilder.join(''); + # `; + # // ... + # Corresponds to the JSON property `tabColor` + # @return [Google::Apis::SheetsV4::Color] + attr_accessor :tab_color + + # The ID of the sheet. Must be non-negative. + # This field cannot be changed once set. + # Corresponds to the JSON property `sheetId` + # @return [Fixnum] + attr_accessor :sheet_id + + # True if the sheet is an RTL sheet instead of an LTR sheet. + # Corresponds to the JSON property `rightToLeft` + # @return [Boolean] + attr_accessor :right_to_left + alias_method :right_to_left?, :right_to_left + + # True if the sheet is hidden in the UI, false if it's visible. + # Corresponds to the JSON property `hidden` + # @return [Boolean] + attr_accessor :hidden + alias_method :hidden?, :hidden + + # The type of sheet. Defaults to GRID. + # This field cannot be changed once set. + # Corresponds to the JSON property `sheetType` + # @return [String] + attr_accessor :sheet_type + + # Properties of a grid. + # Corresponds to the JSON property `gridProperties` + # @return [Google::Apis::SheetsV4::GridProperties] + attr_accessor :grid_properties + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @title = args[:title] if args.key?(:title) + @index = args[:index] if args.key?(:index) + @tab_color = args[:tab_color] if args.key?(:tab_color) + @sheet_id = args[:sheet_id] if args.key?(:sheet_id) + @right_to_left = args[:right_to_left] if args.key?(:right_to_left) + @hidden = args[:hidden] if args.key?(:hidden) + @sheet_type = args[:sheet_type] if args.key?(:sheet_type) + @grid_properties = args[:grid_properties] if args.key?(:grid_properties) + end + end + + # Updates properties of dimensions within the specified range. + class UpdateDimensionPropertiesRequest + include Google::Apis::Core::Hashable + + # A range along a single dimension on a sheet. + # All indexes are zero-based. + # Indexes are half open: the start index is inclusive + # and the end index is exclusive. + # Missing indexes indicate the range is unbounded on that side. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::DimensionRange] + attr_accessor :range + + # The fields that should be updated. At least one field must be specified. + # The root `properties` is implied and should not be specified. + # A single `"*"` can be used as short-hand for listing every field. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + # Properties about a dimension. + # Corresponds to the JSON property `properties` + # @return [Google::Apis::SheetsV4::DimensionProperties] + attr_accessor :properties + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @range = args[:range] if args.key?(:range) + @fields = args[:fields] if args.key?(:fields) + @properties = args[:properties] if args.key?(:properties) + end + end + + # A combination of a source range and how to extend that source. + class SourceAndDestination + include Google::Apis::Core::Hashable + + # The number of rows or columns that data should be filled into. + # Positive numbers expand beyond the last row or last column + # of the source. Negative numbers expand before the first row + # or first column of the source. + # Corresponds to the JSON property `fillLength` + # @return [Fixnum] + attr_accessor :fill_length + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `source` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :source + + # The dimension that data should be filled into. + # Corresponds to the JSON property `dimension` + # @return [String] + attr_accessor :dimension + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @fill_length = args[:fill_length] if args.key?(:fill_length) + @source = args[:source] if args.key?(:source) + @dimension = args[:dimension] if args.key?(:dimension) + end + end + + # A filter view. + class FilterView + include Google::Apis::Core::Hashable + + # The named range this filter view is backed by, if any. + # When writing, only one of range or named_range_id + # may be set. + # Corresponds to the JSON property `namedRangeId` + # @return [String] + attr_accessor :named_range_id + + # The ID of the filter view. + # Corresponds to the JSON property `filterViewId` + # @return [Fixnum] + attr_accessor :filter_view_id + + # The criteria for showing/hiding values per column. + # The map's key is the column index, and the value is the criteria for + # that column. + # Corresponds to the JSON property `criteria` + # @return [Hash] + attr_accessor :criteria + + # The name of the filter view. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :range + + # The sort order per column. Later specifications are used when values + # are equal in the earlier specifications. + # Corresponds to the JSON property `sortSpecs` + # @return [Array] + attr_accessor :sort_specs + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @named_range_id = args[:named_range_id] if args.key?(:named_range_id) + @filter_view_id = args[:filter_view_id] if args.key?(:filter_view_id) + @criteria = args[:criteria] if args.key?(:criteria) + @title = args[:title] if args.key?(:title) + @range = args[:range] if args.key?(:range) + @sort_specs = args[:sort_specs] if args.key?(:sort_specs) + end + end + + # Properties referring a single dimension (either row or column). If both + # BandedRange.row_properties and BandedRange.column_properties are + # set, the fill colors are applied to cells according to the following rules: + # * header_color and footer_color take priority over band colors. + # * first_band_color takes priority over second_band_color. + # * row_properties takes priority over column_properties. + # For example, the first row color takes priority over the first column + # color, but the first column color takes priority over the second row color. + # Similarly, the row header takes priority over the column header in the + # top left cell, but the column header takes priority over the first row + # color if the row header is not set. + class BandingProperties + include Google::Apis::Core::Hashable + + # Represents a color in the RGBA color space. This representation is designed + # for simplicity of conversion to/from color representations in various + # languages over compactness; for example, the fields of this representation + # can be trivially provided to the constructor of "java.awt.Color" in Java; it + # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" + # method in iOS; and, with just a little work, it can be easily formatted into + # a CSS "rgba()" string in JavaScript, as well. Here are some examples: + # Example (Java): + # import com.google.type.Color; + # // ... + # public static java.awt.Color fromProto(Color protocolor) ` + # float alpha = protocolor.hasAlpha() + # ? protocolor.getAlpha().getValue() + # : 1.0; + # return new java.awt.Color( + # protocolor.getRed(), + # protocolor.getGreen(), + # protocolor.getBlue(), + # alpha); + # ` + # public static Color toProto(java.awt.Color color) ` + # float red = (float) color.getRed(); + # float green = (float) color.getGreen(); + # float blue = (float) color.getBlue(); + # float denominator = 255.0; + # Color.Builder resultBuilder = + # Color + # .newBuilder() + # .setRed(red / denominator) + # .setGreen(green / denominator) + # .setBlue(blue / denominator); + # int alpha = color.getAlpha(); + # if (alpha != 255) ` + # result.setAlpha( + # FloatValue + # .newBuilder() + # .setValue(((float) alpha) / denominator) + # .build()); + # ` + # return resultBuilder.build(); + # ` + # // ... + # Example (iOS / Obj-C): + # // ... + # static UIColor* fromProto(Color* protocolor) ` + # float red = [protocolor red]; + # float green = [protocolor green]; + # float blue = [protocolor blue]; + # FloatValue* alpha_wrapper = [protocolor alpha]; + # float alpha = 1.0; + # if (alpha_wrapper != nil) ` + # alpha = [alpha_wrapper value]; + # ` + # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; + # ` + # static Color* toProto(UIColor* color) ` + # CGFloat red, green, blue, alpha; + # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` + # return nil; + # ` + # Color* result = [Color alloc] init]; + # [result setRed:red]; + # [result setGreen:green]; + # [result setBlue:blue]; + # if (alpha <= 0.9999) ` + # [result setAlpha:floatWrapperWithValue(alpha)]; + # ` + # [result autorelease]; + # return result; + # ` + # // ... + # Example (JavaScript): + # // ... + # var protoToCssColor = function(rgb_color) ` + # var redFrac = rgb_color.red || 0.0; + # var greenFrac = rgb_color.green || 0.0; + # var blueFrac = rgb_color.blue || 0.0; + # var red = Math.floor(redFrac * 255); + # var green = Math.floor(greenFrac * 255); + # var blue = Math.floor(blueFrac * 255); + # if (!('alpha' in rgb_color)) ` + # return rgbToCssColor_(red, green, blue); + # ` + # var alphaFrac = rgb_color.alpha.value || 0.0; + # var rgbParams = [red, green, blue].join(','); + # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); + # `; + # var rgbToCssColor_ = function(red, green, blue) ` + # var rgbNumber = new Number((red << 16) | (green << 8) | blue); + # var hexString = rgbNumber.toString(16); + # var missingZeros = 6 - hexString.length; + # var resultBuilder = ['#']; + # for (var i = 0; i < missingZeros; i++) ` + # resultBuilder.push('0'); + # ` + # resultBuilder.push(hexString); + # return resultBuilder.join(''); + # `; + # // ... + # Corresponds to the JSON property `firstBandColor` + # @return [Google::Apis::SheetsV4::Color] + attr_accessor :first_band_color + + # Represents a color in the RGBA color space. This representation is designed + # for simplicity of conversion to/from color representations in various + # languages over compactness; for example, the fields of this representation + # can be trivially provided to the constructor of "java.awt.Color" in Java; it + # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" + # method in iOS; and, with just a little work, it can be easily formatted into + # a CSS "rgba()" string in JavaScript, as well. Here are some examples: + # Example (Java): + # import com.google.type.Color; + # // ... + # public static java.awt.Color fromProto(Color protocolor) ` + # float alpha = protocolor.hasAlpha() + # ? protocolor.getAlpha().getValue() + # : 1.0; + # return new java.awt.Color( + # protocolor.getRed(), + # protocolor.getGreen(), + # protocolor.getBlue(), + # alpha); + # ` + # public static Color toProto(java.awt.Color color) ` + # float red = (float) color.getRed(); + # float green = (float) color.getGreen(); + # float blue = (float) color.getBlue(); + # float denominator = 255.0; + # Color.Builder resultBuilder = + # Color + # .newBuilder() + # .setRed(red / denominator) + # .setGreen(green / denominator) + # .setBlue(blue / denominator); + # int alpha = color.getAlpha(); + # if (alpha != 255) ` + # result.setAlpha( + # FloatValue + # .newBuilder() + # .setValue(((float) alpha) / denominator) + # .build()); + # ` + # return resultBuilder.build(); + # ` + # // ... + # Example (iOS / Obj-C): + # // ... + # static UIColor* fromProto(Color* protocolor) ` + # float red = [protocolor red]; + # float green = [protocolor green]; + # float blue = [protocolor blue]; + # FloatValue* alpha_wrapper = [protocolor alpha]; + # float alpha = 1.0; + # if (alpha_wrapper != nil) ` + # alpha = [alpha_wrapper value]; + # ` + # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; + # ` + # static Color* toProto(UIColor* color) ` + # CGFloat red, green, blue, alpha; + # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` + # return nil; + # ` + # Color* result = [Color alloc] init]; + # [result setRed:red]; + # [result setGreen:green]; + # [result setBlue:blue]; + # if (alpha <= 0.9999) ` + # [result setAlpha:floatWrapperWithValue(alpha)]; + # ` + # [result autorelease]; + # return result; + # ` + # // ... + # Example (JavaScript): + # // ... + # var protoToCssColor = function(rgb_color) ` + # var redFrac = rgb_color.red || 0.0; + # var greenFrac = rgb_color.green || 0.0; + # var blueFrac = rgb_color.blue || 0.0; + # var red = Math.floor(redFrac * 255); + # var green = Math.floor(greenFrac * 255); + # var blue = Math.floor(blueFrac * 255); + # if (!('alpha' in rgb_color)) ` + # return rgbToCssColor_(red, green, blue); + # ` + # var alphaFrac = rgb_color.alpha.value || 0.0; + # var rgbParams = [red, green, blue].join(','); + # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); + # `; + # var rgbToCssColor_ = function(red, green, blue) ` + # var rgbNumber = new Number((red << 16) | (green << 8) | blue); + # var hexString = rgbNumber.toString(16); + # var missingZeros = 6 - hexString.length; + # var resultBuilder = ['#']; + # for (var i = 0; i < missingZeros; i++) ` + # resultBuilder.push('0'); + # ` + # resultBuilder.push(hexString); + # return resultBuilder.join(''); + # `; + # // ... + # Corresponds to the JSON property `secondBandColor` + # @return [Google::Apis::SheetsV4::Color] + attr_accessor :second_band_color + + # Represents a color in the RGBA color space. This representation is designed + # for simplicity of conversion to/from color representations in various + # languages over compactness; for example, the fields of this representation + # can be trivially provided to the constructor of "java.awt.Color" in Java; it + # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" + # method in iOS; and, with just a little work, it can be easily formatted into + # a CSS "rgba()" string in JavaScript, as well. Here are some examples: + # Example (Java): + # import com.google.type.Color; + # // ... + # public static java.awt.Color fromProto(Color protocolor) ` + # float alpha = protocolor.hasAlpha() + # ? protocolor.getAlpha().getValue() + # : 1.0; + # return new java.awt.Color( + # protocolor.getRed(), + # protocolor.getGreen(), + # protocolor.getBlue(), + # alpha); + # ` + # public static Color toProto(java.awt.Color color) ` + # float red = (float) color.getRed(); + # float green = (float) color.getGreen(); + # float blue = (float) color.getBlue(); + # float denominator = 255.0; + # Color.Builder resultBuilder = + # Color + # .newBuilder() + # .setRed(red / denominator) + # .setGreen(green / denominator) + # .setBlue(blue / denominator); + # int alpha = color.getAlpha(); + # if (alpha != 255) ` + # result.setAlpha( + # FloatValue + # .newBuilder() + # .setValue(((float) alpha) / denominator) + # .build()); + # ` + # return resultBuilder.build(); + # ` + # // ... + # Example (iOS / Obj-C): + # // ... + # static UIColor* fromProto(Color* protocolor) ` + # float red = [protocolor red]; + # float green = [protocolor green]; + # float blue = [protocolor blue]; + # FloatValue* alpha_wrapper = [protocolor alpha]; + # float alpha = 1.0; + # if (alpha_wrapper != nil) ` + # alpha = [alpha_wrapper value]; + # ` + # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; + # ` + # static Color* toProto(UIColor* color) ` + # CGFloat red, green, blue, alpha; + # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` + # return nil; + # ` + # Color* result = [Color alloc] init]; + # [result setRed:red]; + # [result setGreen:green]; + # [result setBlue:blue]; + # if (alpha <= 0.9999) ` + # [result setAlpha:floatWrapperWithValue(alpha)]; + # ` + # [result autorelease]; + # return result; + # ` + # // ... + # Example (JavaScript): + # // ... + # var protoToCssColor = function(rgb_color) ` + # var redFrac = rgb_color.red || 0.0; + # var greenFrac = rgb_color.green || 0.0; + # var blueFrac = rgb_color.blue || 0.0; + # var red = Math.floor(redFrac * 255); + # var green = Math.floor(greenFrac * 255); + # var blue = Math.floor(blueFrac * 255); + # if (!('alpha' in rgb_color)) ` + # return rgbToCssColor_(red, green, blue); + # ` + # var alphaFrac = rgb_color.alpha.value || 0.0; + # var rgbParams = [red, green, blue].join(','); + # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); + # `; + # var rgbToCssColor_ = function(red, green, blue) ` + # var rgbNumber = new Number((red << 16) | (green << 8) | blue); + # var hexString = rgbNumber.toString(16); + # var missingZeros = 6 - hexString.length; + # var resultBuilder = ['#']; + # for (var i = 0; i < missingZeros; i++) ` + # resultBuilder.push('0'); + # ` + # resultBuilder.push(hexString); + # return resultBuilder.join(''); + # `; + # // ... + # Corresponds to the JSON property `footerColor` + # @return [Google::Apis::SheetsV4::Color] + attr_accessor :footer_color + + # Represents a color in the RGBA color space. This representation is designed + # for simplicity of conversion to/from color representations in various + # languages over compactness; for example, the fields of this representation + # can be trivially provided to the constructor of "java.awt.Color" in Java; it + # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" + # method in iOS; and, with just a little work, it can be easily formatted into + # a CSS "rgba()" string in JavaScript, as well. Here are some examples: + # Example (Java): + # import com.google.type.Color; + # // ... + # public static java.awt.Color fromProto(Color protocolor) ` + # float alpha = protocolor.hasAlpha() + # ? protocolor.getAlpha().getValue() + # : 1.0; + # return new java.awt.Color( + # protocolor.getRed(), + # protocolor.getGreen(), + # protocolor.getBlue(), + # alpha); + # ` + # public static Color toProto(java.awt.Color color) ` + # float red = (float) color.getRed(); + # float green = (float) color.getGreen(); + # float blue = (float) color.getBlue(); + # float denominator = 255.0; + # Color.Builder resultBuilder = + # Color + # .newBuilder() + # .setRed(red / denominator) + # .setGreen(green / denominator) + # .setBlue(blue / denominator); + # int alpha = color.getAlpha(); + # if (alpha != 255) ` + # result.setAlpha( + # FloatValue + # .newBuilder() + # .setValue(((float) alpha) / denominator) + # .build()); + # ` + # return resultBuilder.build(); + # ` + # // ... + # Example (iOS / Obj-C): + # // ... + # static UIColor* fromProto(Color* protocolor) ` + # float red = [protocolor red]; + # float green = [protocolor green]; + # float blue = [protocolor blue]; + # FloatValue* alpha_wrapper = [protocolor alpha]; + # float alpha = 1.0; + # if (alpha_wrapper != nil) ` + # alpha = [alpha_wrapper value]; + # ` + # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; + # ` + # static Color* toProto(UIColor* color) ` + # CGFloat red, green, blue, alpha; + # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` + # return nil; + # ` + # Color* result = [Color alloc] init]; + # [result setRed:red]; + # [result setGreen:green]; + # [result setBlue:blue]; + # if (alpha <= 0.9999) ` + # [result setAlpha:floatWrapperWithValue(alpha)]; + # ` + # [result autorelease]; + # return result; + # ` + # // ... + # Example (JavaScript): + # // ... + # var protoToCssColor = function(rgb_color) ` + # var redFrac = rgb_color.red || 0.0; + # var greenFrac = rgb_color.green || 0.0; + # var blueFrac = rgb_color.blue || 0.0; + # var red = Math.floor(redFrac * 255); + # var green = Math.floor(greenFrac * 255); + # var blue = Math.floor(blueFrac * 255); + # if (!('alpha' in rgb_color)) ` + # return rgbToCssColor_(red, green, blue); + # ` + # var alphaFrac = rgb_color.alpha.value || 0.0; + # var rgbParams = [red, green, blue].join(','); + # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); + # `; + # var rgbToCssColor_ = function(red, green, blue) ` + # var rgbNumber = new Number((red << 16) | (green << 8) | blue); + # var hexString = rgbNumber.toString(16); + # var missingZeros = 6 - hexString.length; + # var resultBuilder = ['#']; + # for (var i = 0; i < missingZeros; i++) ` + # resultBuilder.push('0'); + # ` + # resultBuilder.push(hexString); + # return resultBuilder.join(''); + # `; + # // ... + # Corresponds to the JSON property `headerColor` + # @return [Google::Apis::SheetsV4::Color] + attr_accessor :header_color + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @first_band_color = args[:first_band_color] if args.key?(:first_band_color) + @second_band_color = args[:second_band_color] if args.key?(:second_band_color) + @footer_color = args[:footer_color] if args.key?(:footer_color) + @header_color = args[:header_color] if args.key?(:header_color) + end + end + + # The result of adding a new protected range. + class AddProtectedRangeResponse + include Google::Apis::Core::Hashable + + # A protected range. + # Corresponds to the JSON property `protectedRange` + # @return [Google::Apis::SheetsV4::ProtectedRange] + attr_accessor :protected_range + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @protected_range = args[:protected_range] if args.key?(:protected_range) + end + end + + # The default filter associated with a sheet. + class BasicFilter + include Google::Apis::Core::Hashable + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :range + + # The criteria for showing/hiding values per column. + # The map's key is the column index, and the value is the criteria for + # that column. + # Corresponds to the JSON property `criteria` + # @return [Hash] + attr_accessor :criteria + + # The sort order per column. Later specifications are used when values + # are equal in the earlier specifications. + # Corresponds to the JSON property `sortSpecs` + # @return [Array] + attr_accessor :sort_specs + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @range = args[:range] if args.key?(:range) + @criteria = args[:criteria] if args.key?(:criteria) + @sort_specs = args[:sort_specs] if args.key?(:sort_specs) + end + end + + # The response when updating a range of values in a spreadsheet. + class UpdateValuesResponse + include Google::Apis::Core::Hashable + + # The number of rows where at least one cell in the row was updated. + # Corresponds to the JSON property `updatedRows` + # @return [Fixnum] + attr_accessor :updated_rows + + # Data within a range of the spreadsheet. + # Corresponds to the JSON property `updatedData` + # @return [Google::Apis::SheetsV4::ValueRange] + attr_accessor :updated_data + + # The number of columns where at least one cell in the column was updated. + # Corresponds to the JSON property `updatedColumns` + # @return [Fixnum] + attr_accessor :updated_columns + + # The spreadsheet the updates were applied to. + # Corresponds to the JSON property `spreadsheetId` + # @return [String] + attr_accessor :spreadsheet_id + + # The range (in A1 notation) that updates were applied to. + # Corresponds to the JSON property `updatedRange` + # @return [String] + attr_accessor :updated_range + + # The number of cells updated. + # Corresponds to the JSON property `updatedCells` + # @return [Fixnum] + attr_accessor :updated_cells + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @updated_rows = args[:updated_rows] if args.key?(:updated_rows) + @updated_data = args[:updated_data] if args.key?(:updated_data) + @updated_columns = args[:updated_columns] if args.key?(:updated_columns) + @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) + @updated_range = args[:updated_range] if args.key?(:updated_range) + @updated_cells = args[:updated_cells] if args.key?(:updated_cells) + end + end + + # The definition of how a value in a pivot table should be calculated. + class PivotValue + include Google::Apis::Core::Hashable + + # A function to summarize the value. + # If formula is set, the only supported values are + # SUM and + # CUSTOM. + # If sourceColumnOffset is set, then `CUSTOM` + # is not supported. + # Corresponds to the JSON property `summarizeFunction` + # @return [String] + attr_accessor :summarize_function + + # The column offset of the source range that this value reads from. + # For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0` + # means this value refers to column `C`, whereas the offset `1` would + # refer to column `D`. + # Corresponds to the JSON property `sourceColumnOffset` + # @return [Fixnum] + attr_accessor :source_column_offset + + # A name to use for the value. This is only used if formula was set. + # Otherwise, the column name is used. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # A custom formula to calculate the value. The formula must start + # with an `=` character. + # Corresponds to the JSON property `formula` + # @return [String] + attr_accessor :formula + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @summarize_function = args[:summarize_function] if args.key?(:summarize_function) + @source_column_offset = args[:source_column_offset] if args.key?(:source_column_offset) + @name = args[:name] if args.key?(:name) + @formula = args[:formula] if args.key?(:formula) + end + end + + # An error in a cell. + class ErrorValue + include Google::Apis::Core::Hashable + + # The type of error. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # A message with more information about the error + # (in the spreadsheet's locale). + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type = args[:type] if args.key?(:type) + @message = args[:message] if args.key?(:message) + end + end + + # The request to copy a sheet across spreadsheets. + class CopySheetToAnotherSpreadsheetRequest + include Google::Apis::Core::Hashable + + # The ID of the spreadsheet to copy the sheet to. + # Corresponds to the JSON property `destinationSpreadsheetId` + # @return [String] + attr_accessor :destination_spreadsheet_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @destination_spreadsheet_id = args[:destination_spreadsheet_id] if args.key?(:destination_spreadsheet_id) + end + end + + # Information about which values in a pivot group should be used for sorting. + class PivotGroupSortValueBucket + include Google::Apis::Core::Hashable + + # Determines the bucket from which values are chosen to sort. + # For example, in a pivot table with one row group & two column groups, + # the row group can list up to two values. The first value corresponds + # to a value within the first column group, and the second value + # corresponds to a value in the second column group. If no values + # are listed, this would indicate that the row should be sorted according + # to the "Grand Total" over the column groups. If a single value is listed, + # this would correspond to using the "Total" of that bucket. + # Corresponds to the JSON property `buckets` + # @return [Array] + attr_accessor :buckets + + # The offset in the PivotTable.values list which the values in this + # grouping should be sorted by. + # Corresponds to the JSON property `valuesIndex` + # @return [Fixnum] + attr_accessor :values_index + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @buckets = args[:buckets] if args.key?(:buckets) + @values_index = args[:values_index] if args.key?(:values_index) + end + end + + # The position of an embedded object such as a chart. + class EmbeddedObjectPosition + include Google::Apis::Core::Hashable + + # If true, the embedded object will be put on a new sheet whose ID + # is chosen for you. Used only when writing. + # Corresponds to the JSON property `newSheet` + # @return [Boolean] + attr_accessor :new_sheet + alias_method :new_sheet?, :new_sheet + + # The sheet this is on. Set only if the embedded object + # is on its own sheet. Must be non-negative. + # Corresponds to the JSON property `sheetId` + # @return [Fixnum] + attr_accessor :sheet_id + + # The location an object is overlaid on top of a grid. + # Corresponds to the JSON property `overlayPosition` + # @return [Google::Apis::SheetsV4::OverlayPosition] + attr_accessor :overlay_position + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @new_sheet = args[:new_sheet] if args.key?(:new_sheet) + @sheet_id = args[:sheet_id] if args.key?(:sheet_id) + @overlay_position = args[:overlay_position] if args.key?(:overlay_position) + end + end + + # Deletes the protected range with the given ID. + class DeleteProtectedRangeRequest + include Google::Apis::Core::Hashable + + # The ID of the protected range to delete. + # Corresponds to the JSON property `protectedRangeId` + # @return [Fixnum] + attr_accessor :protected_range_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @protected_range_id = args[:protected_range_id] if args.key?(:protected_range_id) + end + end + + # Fills in more data based on existing data. + class AutoFillRequest + include Google::Apis::Core::Hashable + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :range + + # True if we should generate data with the "alternate" series. + # This differs based on the type and amount of source data. + # Corresponds to the JSON property `useAlternateSeries` + # @return [Boolean] + attr_accessor :use_alternate_series + alias_method :use_alternate_series?, :use_alternate_series + + # A combination of a source range and how to extend that source. + # Corresponds to the JSON property `sourceAndDestination` + # @return [Google::Apis::SheetsV4::SourceAndDestination] + attr_accessor :source_and_destination + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @range = args[:range] if args.key?(:range) + @use_alternate_series = args[:use_alternate_series] if args.key?(:use_alternate_series) + @source_and_destination = args[:source_and_destination] if args.key?(:source_and_destination) + end + end + + # A rule that applies a gradient color scale format, based on + # the interpolation points listed. The format of a cell will vary + # based on its contents as compared to the values of the interpolation + # points. + class GradientRule + include Google::Apis::Core::Hashable + + # A single interpolation point on a gradient conditional format. + # These pin the gradient color scale according to the color, + # type and value chosen. + # Corresponds to the JSON property `midpoint` + # @return [Google::Apis::SheetsV4::InterpolationPoint] + attr_accessor :midpoint + + # A single interpolation point on a gradient conditional format. + # These pin the gradient color scale according to the color, + # type and value chosen. + # Corresponds to the JSON property `minpoint` + # @return [Google::Apis::SheetsV4::InterpolationPoint] + attr_accessor :minpoint + + # A single interpolation point on a gradient conditional format. + # These pin the gradient color scale according to the color, + # type and value chosen. + # Corresponds to the JSON property `maxpoint` + # @return [Google::Apis::SheetsV4::InterpolationPoint] + attr_accessor :maxpoint + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @midpoint = args[:midpoint] if args.key?(:midpoint) + @minpoint = args[:minpoint] if args.key?(:minpoint) + @maxpoint = args[:maxpoint] if args.key?(:maxpoint) + end + end + + # The request for clearing a range of values in a spreadsheet. + class ClearValuesRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Sets the basic filter associated with a sheet. + class SetBasicFilterRequest + include Google::Apis::Core::Hashable + + # The default filter associated with a sheet. + # Corresponds to the JSON property `filter` + # @return [Google::Apis::SheetsV4::BasicFilter] + attr_accessor :filter + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @filter = args[:filter] if args.key?(:filter) + end + end + + # A single interpolation point on a gradient conditional format. + # These pin the gradient color scale according to the color, + # type and value chosen. + class InterpolationPoint + include Google::Apis::Core::Hashable + + # How the value should be interpreted. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The value this interpolation point uses. May be a formula. + # Unused if type is MIN or + # MAX. + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + + # Represents a color in the RGBA color space. This representation is designed + # for simplicity of conversion to/from color representations in various + # languages over compactness; for example, the fields of this representation + # can be trivially provided to the constructor of "java.awt.Color" in Java; it + # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" + # method in iOS; and, with just a little work, it can be easily formatted into + # a CSS "rgba()" string in JavaScript, as well. Here are some examples: + # Example (Java): + # import com.google.type.Color; + # // ... + # public static java.awt.Color fromProto(Color protocolor) ` + # float alpha = protocolor.hasAlpha() + # ? protocolor.getAlpha().getValue() + # : 1.0; + # return new java.awt.Color( + # protocolor.getRed(), + # protocolor.getGreen(), + # protocolor.getBlue(), + # alpha); + # ` + # public static Color toProto(java.awt.Color color) ` + # float red = (float) color.getRed(); + # float green = (float) color.getGreen(); + # float blue = (float) color.getBlue(); + # float denominator = 255.0; + # Color.Builder resultBuilder = + # Color + # .newBuilder() + # .setRed(red / denominator) + # .setGreen(green / denominator) + # .setBlue(blue / denominator); + # int alpha = color.getAlpha(); + # if (alpha != 255) ` + # result.setAlpha( + # FloatValue + # .newBuilder() + # .setValue(((float) alpha) / denominator) + # .build()); + # ` + # return resultBuilder.build(); + # ` + # // ... + # Example (iOS / Obj-C): + # // ... + # static UIColor* fromProto(Color* protocolor) ` + # float red = [protocolor red]; + # float green = [protocolor green]; + # float blue = [protocolor blue]; + # FloatValue* alpha_wrapper = [protocolor alpha]; + # float alpha = 1.0; + # if (alpha_wrapper != nil) ` + # alpha = [alpha_wrapper value]; + # ` + # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; + # ` + # static Color* toProto(UIColor* color) ` + # CGFloat red, green, blue, alpha; + # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` + # return nil; + # ` + # Color* result = [Color alloc] init]; + # [result setRed:red]; + # [result setGreen:green]; + # [result setBlue:blue]; + # if (alpha <= 0.9999) ` + # [result setAlpha:floatWrapperWithValue(alpha)]; + # ` + # [result autorelease]; + # return result; + # ` + # // ... + # Example (JavaScript): + # // ... + # var protoToCssColor = function(rgb_color) ` + # var redFrac = rgb_color.red || 0.0; + # var greenFrac = rgb_color.green || 0.0; + # var blueFrac = rgb_color.blue || 0.0; + # var red = Math.floor(redFrac * 255); + # var green = Math.floor(greenFrac * 255); + # var blue = Math.floor(blueFrac * 255); + # if (!('alpha' in rgb_color)) ` + # return rgbToCssColor_(red, green, blue); + # ` + # var alphaFrac = rgb_color.alpha.value || 0.0; + # var rgbParams = [red, green, blue].join(','); + # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); + # `; + # var rgbToCssColor_ = function(red, green, blue) ` + # var rgbNumber = new Number((red << 16) | (green << 8) | blue); + # var hexString = rgbNumber.toString(16); + # var missingZeros = 6 - hexString.length; + # var resultBuilder = ['#']; + # for (var i = 0; i < missingZeros; i++) ` + # resultBuilder.push('0'); + # ` + # resultBuilder.push(hexString); + # return resultBuilder.join(''); + # `; + # // ... + # Corresponds to the JSON property `color` + # @return [Google::Apis::SheetsV4::Color] + attr_accessor :color + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type = args[:type] if args.key?(:type) + @value = args[:value] if args.key?(:value) + @color = args[:color] if args.key?(:color) + end + end + + # Deletes the embedded object with the given ID. + class DeleteEmbeddedObjectRequest + include Google::Apis::Core::Hashable + + # The ID of the embedded object to delete. + # Corresponds to the JSON property `objectId` + # @return [Fixnum] + attr_accessor :object_id_prop + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + end + end + + # The result of the find/replace. + class FindReplaceResponse + include Google::Apis::Core::Hashable + + # The number of occurrences (possibly multiple within a cell) changed. + # For example, if replacing `"e"` with `"o"` in `"Google Sheets"`, this would + # be `"3"` because `"Google Sheets"` -> `"Googlo Shoots"`. + # Corresponds to the JSON property `occurrencesChanged` + # @return [Fixnum] + attr_accessor :occurrences_changed + + # The number of rows changed. + # Corresponds to the JSON property `rowsChanged` + # @return [Fixnum] + attr_accessor :rows_changed + + # The number of sheets changed. + # Corresponds to the JSON property `sheetsChanged` + # @return [Fixnum] + attr_accessor :sheets_changed + + # The number of formula cells changed. + # Corresponds to the JSON property `formulasChanged` + # @return [Fixnum] + attr_accessor :formulas_changed + + # The number of non-formula cells changed. + # Corresponds to the JSON property `valuesChanged` + # @return [Fixnum] + attr_accessor :values_changed + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @occurrences_changed = args[:occurrences_changed] if args.key?(:occurrences_changed) + @rows_changed = args[:rows_changed] if args.key?(:rows_changed) + @sheets_changed = args[:sheets_changed] if args.key?(:sheets_changed) + @formulas_changed = args[:formulas_changed] if args.key?(:formulas_changed) + @values_changed = args[:values_changed] if args.key?(:values_changed) + end + end + + # Duplicates a particular filter view. + class DuplicateFilterViewRequest + include Google::Apis::Core::Hashable + + # The ID of the filter being duplicated. + # Corresponds to the JSON property `filterId` + # @return [Fixnum] + attr_accessor :filter_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @filter_id = args[:filter_id] if args.key?(:filter_id) + end + end + + # Deletes the requested sheet. + class DeleteSheetRequest + include Google::Apis::Core::Hashable + + # The ID of the sheet to delete. + # Corresponds to the JSON property `sheetId` + # @return [Fixnum] + attr_accessor :sheet_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @sheet_id = args[:sheet_id] if args.key?(:sheet_id) + end + end + + # The result of updating a conditional format rule. + class UpdateConditionalFormatRuleResponse + include Google::Apis::Core::Hashable + + # The index of the new rule. + # Corresponds to the JSON property `newIndex` + # @return [Fixnum] + attr_accessor :new_index + + # The old index of the rule. Not set if a rule was replaced + # (because it is the same as new_index). + # Corresponds to the JSON property `oldIndex` + # @return [Fixnum] + attr_accessor :old_index + + # A rule describing a conditional format. + # Corresponds to the JSON property `newRule` + # @return [Google::Apis::SheetsV4::ConditionalFormatRule] + attr_accessor :new_rule + + # A rule describing a conditional format. + # Corresponds to the JSON property `oldRule` + # @return [Google::Apis::SheetsV4::ConditionalFormatRule] + attr_accessor :old_rule + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @new_index = args[:new_index] if args.key?(:new_index) + @old_index = args[:old_index] if args.key?(:old_index) + @new_rule = args[:new_rule] if args.key?(:new_rule) + @old_rule = args[:old_rule] if args.key?(:old_rule) + end + end + + # Duplicates the contents of a sheet. + class DuplicateSheetRequest + include Google::Apis::Core::Hashable + + # The zero-based index where the new sheet should be inserted. + # The index of all sheets after this are incremented. + # Corresponds to the JSON property `insertSheetIndex` + # @return [Fixnum] + attr_accessor :insert_sheet_index + + # The name of the new sheet. If empty, a new name is chosen for you. + # Corresponds to the JSON property `newSheetName` + # @return [String] + attr_accessor :new_sheet_name + + # The sheet to duplicate. + # Corresponds to the JSON property `sourceSheetId` + # @return [Fixnum] + attr_accessor :source_sheet_id + + # If set, the ID of the new sheet. If not set, an ID is chosen. + # If set, the ID must not conflict with any existing sheet ID. + # If set, it must be non-negative. + # Corresponds to the JSON property `newSheetId` + # @return [Fixnum] + attr_accessor :new_sheet_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @insert_sheet_index = args[:insert_sheet_index] if args.key?(:insert_sheet_index) + @new_sheet_name = args[:new_sheet_name] if args.key?(:new_sheet_name) + @source_sheet_id = args[:source_sheet_id] if args.key?(:source_sheet_id) + @new_sheet_id = args[:new_sheet_id] if args.key?(:new_sheet_id) + end + end + + # The value of the condition. + class ConditionValue + include Google::Apis::Core::Hashable + + # A relative date (based on the current date). + # Valid only if the type is + # DATE_BEFORE, + # DATE_AFTER, + # DATE_ON_OR_BEFORE or + # DATE_ON_OR_AFTER. + # Relative dates are not supported in data validation. + # They are supported only in conditional formatting and + # conditional filters. + # Corresponds to the JSON property `relativeDate` + # @return [String] + attr_accessor :relative_date + + # A value the condition is based on. + # The value will be parsed as if the user typed into a cell. + # Formulas are supported (and must begin with an `=`). + # Corresponds to the JSON property `userEnteredValue` + # @return [String] + attr_accessor :user_entered_value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @relative_date = args[:relative_date] if args.key?(:relative_date) + @user_entered_value = args[:user_entered_value] if args.key?(:user_entered_value) + end + end + + # The kinds of value that a cell in a spreadsheet can have. + class ExtendedValue + include Google::Apis::Core::Hashable + + # Represents a double value. + # Note: Dates, Times and DateTimes are represented as doubles in + # "serial number" format. + # Corresponds to the JSON property `numberValue` + # @return [Float] + attr_accessor :number_value + + # An error in a cell. + # Corresponds to the JSON property `errorValue` + # @return [Google::Apis::SheetsV4::ErrorValue] + attr_accessor :error_value + + # Represents a string value. + # Leading single quotes are not included. For example, if the user typed + # `'123` into the UI, this would be represented as a `stringValue` of + # `"123"`. + # Corresponds to the JSON property `stringValue` + # @return [String] + attr_accessor :string_value + + # Represents a boolean value. + # Corresponds to the JSON property `boolValue` + # @return [Boolean] + attr_accessor :bool_value + alias_method :bool_value?, :bool_value + + # Represents a formula. + # Corresponds to the JSON property `formulaValue` + # @return [String] + attr_accessor :formula_value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @number_value = args[:number_value] if args.key?(:number_value) + @error_value = args[:error_value] if args.key?(:error_value) + @string_value = args[:string_value] if args.key?(:string_value) + @bool_value = args[:bool_value] if args.key?(:bool_value) + @formula_value = args[:formula_value] if args.key?(:formula_value) + end + end + + # Adds a chart to a sheet in the spreadsheet. + class AddChartRequest + include Google::Apis::Core::Hashable + + # A chart embedded in a sheet. + # Corresponds to the JSON property `chart` + # @return [Google::Apis::SheetsV4::EmbeddedChart] + attr_accessor :chart + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @chart = args[:chart] if args.key?(:chart) + end + end + + # Resource that represents a spreadsheet. + class Spreadsheet + include Google::Apis::Core::Hashable + + # Properties of a spreadsheet. + # Corresponds to the JSON property `properties` + # @return [Google::Apis::SheetsV4::SpreadsheetProperties] + attr_accessor :properties + + # The ID of the spreadsheet. + # This field is read-only. + # Corresponds to the JSON property `spreadsheetId` + # @return [String] + attr_accessor :spreadsheet_id + + # The sheets that are part of a spreadsheet. + # Corresponds to the JSON property `sheets` + # @return [Array] + attr_accessor :sheets + + # The named ranges defined in a spreadsheet. + # Corresponds to the JSON property `namedRanges` + # @return [Array] + attr_accessor :named_ranges + + # The url of the spreadsheet. + # This field is read-only. + # Corresponds to the JSON property `spreadsheetUrl` + # @return [String] + attr_accessor :spreadsheet_url + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @properties = args[:properties] if args.key?(:properties) + @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) + @sheets = args[:sheets] if args.key?(:sheets) + @named_ranges = args[:named_ranges] if args.key?(:named_ranges) + @spreadsheet_url = args[:spreadsheet_url] if args.key?(:spreadsheet_url) + end + end + + # The response when updating a range of values in a spreadsheet. + class BatchClearValuesResponse + include Google::Apis::Core::Hashable + + # The ranges that were cleared, in A1 notation. + # (If the requests were for an unbounded range or a ranger larger + # than the bounds of the sheet, this will be the actual ranges + # that were cleared, bounded to the sheet's limits.) + # Corresponds to the JSON property `clearedRanges` + # @return [Array] + attr_accessor :cleared_ranges + + # The spreadsheet the updates were applied to. + # Corresponds to the JSON property `spreadsheetId` + # @return [String] + attr_accessor :spreadsheet_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @cleared_ranges = args[:cleared_ranges] if args.key?(:cleared_ranges) + @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) + end + end + + # A banded (alternating colors) range in a sheet. + class BandedRange + include Google::Apis::Core::Hashable + + # Properties referring a single dimension (either row or column). If both + # BandedRange.row_properties and BandedRange.column_properties are + # set, the fill colors are applied to cells according to the following rules: + # * header_color and footer_color take priority over band colors. + # * first_band_color takes priority over second_band_color. + # * row_properties takes priority over column_properties. + # For example, the first row color takes priority over the first column + # color, but the first column color takes priority over the second row color. + # Similarly, the row header takes priority over the column header in the + # top left cell, but the column header takes priority over the first row + # color if the row header is not set. + # Corresponds to the JSON property `rowProperties` + # @return [Google::Apis::SheetsV4::BandingProperties] + attr_accessor :row_properties + + # Properties referring a single dimension (either row or column). If both + # BandedRange.row_properties and BandedRange.column_properties are + # set, the fill colors are applied to cells according to the following rules: + # * header_color and footer_color take priority over band colors. + # * first_band_color takes priority over second_band_color. + # * row_properties takes priority over column_properties. + # For example, the first row color takes priority over the first column + # color, but the first column color takes priority over the second row color. + # Similarly, the row header takes priority over the column header in the + # top left cell, but the column header takes priority over the first row + # color if the row header is not set. + # Corresponds to the JSON property `columnProperties` + # @return [Google::Apis::SheetsV4::BandingProperties] + attr_accessor :column_properties + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :range + + # The id of the banded range. + # Corresponds to the JSON property `bandedRangeId` + # @return [Fixnum] + attr_accessor :banded_range_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @row_properties = args[:row_properties] if args.key?(:row_properties) + @column_properties = args[:column_properties] if args.key?(:column_properties) + @range = args[:range] if args.key?(:range) + @banded_range_id = args[:banded_range_id] if args.key?(:banded_range_id) + end + end + + # Updates an existing protected range with the specified + # protectedRangeId. + class UpdateProtectedRangeRequest + include Google::Apis::Core::Hashable + + # A protected range. + # Corresponds to the JSON property `protectedRange` + # @return [Google::Apis::SheetsV4::ProtectedRange] + attr_accessor :protected_range + + # The fields that should be updated. At least one field must be specified. + # The root `protectedRange` is implied and should not be specified. + # A single `"*"` can be used as short-hand for listing every field. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @protected_range = args[:protected_range] if args.key?(:protected_range) + @fields = args[:fields] if args.key?(:fields) + end + end + + # The format of a run of text in a cell. + # Absent values indicate that the field isn't specified. + class TextFormat + include Google::Apis::Core::Hashable + + # True if the text is underlined. + # Corresponds to the JSON property `underline` + # @return [Boolean] + attr_accessor :underline + alias_method :underline?, :underline + + # True if the text is bold. + # Corresponds to the JSON property `bold` + # @return [Boolean] + attr_accessor :bold + alias_method :bold?, :bold + + # Represents a color in the RGBA color space. This representation is designed + # for simplicity of conversion to/from color representations in various + # languages over compactness; for example, the fields of this representation + # can be trivially provided to the constructor of "java.awt.Color" in Java; it + # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" + # method in iOS; and, with just a little work, it can be easily formatted into + # a CSS "rgba()" string in JavaScript, as well. Here are some examples: + # Example (Java): + # import com.google.type.Color; + # // ... + # public static java.awt.Color fromProto(Color protocolor) ` + # float alpha = protocolor.hasAlpha() + # ? protocolor.getAlpha().getValue() + # : 1.0; + # return new java.awt.Color( + # protocolor.getRed(), + # protocolor.getGreen(), + # protocolor.getBlue(), + # alpha); + # ` + # public static Color toProto(java.awt.Color color) ` + # float red = (float) color.getRed(); + # float green = (float) color.getGreen(); + # float blue = (float) color.getBlue(); + # float denominator = 255.0; + # Color.Builder resultBuilder = + # Color + # .newBuilder() + # .setRed(red / denominator) + # .setGreen(green / denominator) + # .setBlue(blue / denominator); + # int alpha = color.getAlpha(); + # if (alpha != 255) ` + # result.setAlpha( + # FloatValue + # .newBuilder() + # .setValue(((float) alpha) / denominator) + # .build()); + # ` + # return resultBuilder.build(); + # ` + # // ... + # Example (iOS / Obj-C): + # // ... + # static UIColor* fromProto(Color* protocolor) ` + # float red = [protocolor red]; + # float green = [protocolor green]; + # float blue = [protocolor blue]; + # FloatValue* alpha_wrapper = [protocolor alpha]; + # float alpha = 1.0; + # if (alpha_wrapper != nil) ` + # alpha = [alpha_wrapper value]; + # ` + # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; + # ` + # static Color* toProto(UIColor* color) ` + # CGFloat red, green, blue, alpha; + # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` + # return nil; + # ` + # Color* result = [Color alloc] init]; + # [result setRed:red]; + # [result setGreen:green]; + # [result setBlue:blue]; + # if (alpha <= 0.9999) ` + # [result setAlpha:floatWrapperWithValue(alpha)]; + # ` + # [result autorelease]; + # return result; + # ` + # // ... + # Example (JavaScript): + # // ... + # var protoToCssColor = function(rgb_color) ` + # var redFrac = rgb_color.red || 0.0; + # var greenFrac = rgb_color.green || 0.0; + # var blueFrac = rgb_color.blue || 0.0; + # var red = Math.floor(redFrac * 255); + # var green = Math.floor(greenFrac * 255); + # var blue = Math.floor(blueFrac * 255); + # if (!('alpha' in rgb_color)) ` + # return rgbToCssColor_(red, green, blue); + # ` + # var alphaFrac = rgb_color.alpha.value || 0.0; + # var rgbParams = [red, green, blue].join(','); + # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); + # `; + # var rgbToCssColor_ = function(red, green, blue) ` + # var rgbNumber = new Number((red << 16) | (green << 8) | blue); + # var hexString = rgbNumber.toString(16); + # var missingZeros = 6 - hexString.length; + # var resultBuilder = ['#']; + # for (var i = 0; i < missingZeros; i++) ` + # resultBuilder.push('0'); + # ` + # resultBuilder.push(hexString); + # return resultBuilder.join(''); + # `; + # // ... + # Corresponds to the JSON property `foregroundColor` + # @return [Google::Apis::SheetsV4::Color] + attr_accessor :foreground_color + + # The font family. + # Corresponds to the JSON property `fontFamily` + # @return [String] + attr_accessor :font_family + + # True if the text has a strikethrough. + # Corresponds to the JSON property `strikethrough` + # @return [Boolean] + attr_accessor :strikethrough + alias_method :strikethrough?, :strikethrough + + # True if the text is italicized. + # Corresponds to the JSON property `italic` + # @return [Boolean] + attr_accessor :italic + alias_method :italic?, :italic + + # The size of the font. + # Corresponds to the JSON property `fontSize` + # @return [Fixnum] + attr_accessor :font_size + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @underline = args[:underline] if args.key?(:underline) + @bold = args[:bold] if args.key?(:bold) + @foreground_color = args[:foreground_color] if args.key?(:foreground_color) + @font_family = args[:font_family] if args.key?(:font_family) + @strikethrough = args[:strikethrough] if args.key?(:strikethrough) + @italic = args[:italic] if args.key?(:italic) + @font_size = args[:font_size] if args.key?(:font_size) + end + end + + # The result of adding a sheet. + class AddSheetResponse + include Google::Apis::Core::Hashable + + # Properties of a sheet. + # Corresponds to the JSON property `properties` + # @return [Google::Apis::SheetsV4::SheetProperties] + attr_accessor :properties + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @properties = args[:properties] if args.key?(:properties) + end + end + + # The result of adding a filter view. + class AddFilterViewResponse + include Google::Apis::Core::Hashable + + # A filter view. + # Corresponds to the JSON property `filter` + # @return [Google::Apis::SheetsV4::FilterView] + attr_accessor :filter + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @filter = args[:filter] if args.key?(:filter) + end + end + + # Settings to control how circular dependencies are resolved with iterative + # calculation. + class IterativeCalculationSettings + include Google::Apis::Core::Hashable + + # When iterative calculation is enabled and successive results differ by + # less than this threshold value, the calculation rounds stop. + # Corresponds to the JSON property `convergenceThreshold` + # @return [Float] + attr_accessor :convergence_threshold + + # When iterative calculation is enabled, the maximum number of calculation + # rounds to perform. + # Corresponds to the JSON property `maxIterations` + # @return [Fixnum] + attr_accessor :max_iterations + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @convergence_threshold = args[:convergence_threshold] if args.key?(:convergence_threshold) + @max_iterations = args[:max_iterations] if args.key?(:max_iterations) + end + end + + # The location an object is overlaid on top of a grid. + class OverlayPosition + include Google::Apis::Core::Hashable + + # The width of the object, in pixels. Defaults to 600. + # Corresponds to the JSON property `widthPixels` + # @return [Fixnum] + attr_accessor :width_pixels + + # The horizontal offset, in pixels, that the object is offset + # from the anchor cell. + # Corresponds to the JSON property `offsetXPixels` + # @return [Fixnum] + attr_accessor :offset_x_pixels + + # A coordinate in a sheet. + # All indexes are zero-based. + # Corresponds to the JSON property `anchorCell` + # @return [Google::Apis::SheetsV4::GridCoordinate] + attr_accessor :anchor_cell + + # The vertical offset, in pixels, that the object is offset + # from the anchor cell. + # Corresponds to the JSON property `offsetYPixels` + # @return [Fixnum] + attr_accessor :offset_y_pixels + + # The height of the object, in pixels. Defaults to 371. + # Corresponds to the JSON property `heightPixels` + # @return [Fixnum] + attr_accessor :height_pixels + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @width_pixels = args[:width_pixels] if args.key?(:width_pixels) + @offset_x_pixels = args[:offset_x_pixels] if args.key?(:offset_x_pixels) + @anchor_cell = args[:anchor_cell] if args.key?(:anchor_cell) + @offset_y_pixels = args[:offset_y_pixels] if args.key?(:offset_y_pixels) + @height_pixels = args[:height_pixels] if args.key?(:height_pixels) + end + end + + # Properties of a spreadsheet. + class SpreadsheetProperties + include Google::Apis::Core::Hashable + + # The format of a cell. + # Corresponds to the JSON property `defaultFormat` + # @return [Google::Apis::SheetsV4::CellFormat] + attr_accessor :default_format + + # The amount of time to wait before volatile functions are recalculated. + # Corresponds to the JSON property `autoRecalc` + # @return [String] + attr_accessor :auto_recalc + + # The title of the spreadsheet. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # The time zone of the spreadsheet, in CLDR format such as + # `America/New_York`. If the time zone isn't recognized, this may + # be a custom time zone such as `GMT-07:00`. + # Corresponds to the JSON property `timeZone` + # @return [String] + attr_accessor :time_zone + + # The locale of the spreadsheet in one of the following formats: + # * an ISO 639-1 language code such as `en` + # * an ISO 639-2 language code such as `fil`, if no 639-1 code exists + # * a combination of the ISO language code and country code, such as `en_US` + # Note: when updating this field, not all locales/languages are supported. + # Corresponds to the JSON property `locale` + # @return [String] + attr_accessor :locale + + # Settings to control how circular dependencies are resolved with iterative + # calculation. + # Corresponds to the JSON property `iterativeCalculationSettings` + # @return [Google::Apis::SheetsV4::IterativeCalculationSettings] + attr_accessor :iterative_calculation_settings + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @default_format = args[:default_format] if args.key?(:default_format) + @auto_recalc = args[:auto_recalc] if args.key?(:auto_recalc) + @title = args[:title] if args.key?(:title) + @time_zone = args[:time_zone] if args.key?(:time_zone) + @locale = args[:locale] if args.key?(:locale) + @iterative_calculation_settings = args[:iterative_calculation_settings] if args.key?(:iterative_calculation_settings) + end + end + + # Updates all cells in the range to the values in the given Cell object. + # Only the fields listed in the fields field are updated; others are + # unchanged. + # If writing a cell with a formula, the formula's ranges will automatically + # increment for each field in the range. + # For example, if writing a cell with formula `=A1` into range B2:C4, + # B2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`, + # C2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`. + # To keep the formula's ranges static, use the `$` indicator. + # For example, use the formula `=$A$1` to prevent both the row and the + # column from incrementing. + class RepeatCellRequest + include Google::Apis::Core::Hashable + + # Data about a specific cell. + # Corresponds to the JSON property `cell` + # @return [Google::Apis::SheetsV4::CellData] + attr_accessor :cell + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :range + + # The fields that should be updated. At least one field must be specified. + # The root `cell` is implied and should not be specified. + # A single `"*"` can be used as short-hand for listing every field. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @cell = args[:cell] if args.key?(:cell) + @range = args[:range] if args.key?(:range) + @fields = args[:fields] if args.key?(:fields) + end + end + + # The result of adding a chart to a spreadsheet. + class AddChartResponse + include Google::Apis::Core::Hashable + + # A chart embedded in a sheet. + # Corresponds to the JSON property `chart` + # @return [Google::Apis::SheetsV4::EmbeddedChart] + attr_accessor :chart + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @chart = args[:chart] if args.key?(:chart) + end + end + + # Inserts rows or columns in a sheet at a particular index. + class InsertDimensionRequest + include Google::Apis::Core::Hashable + + # A range along a single dimension on a sheet. + # All indexes are zero-based. + # Indexes are half open: the start index is inclusive + # and the end index is exclusive. + # Missing indexes indicate the range is unbounded on that side. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::DimensionRange] + attr_accessor :range + + # Whether dimension properties should be extended from the dimensions + # before or after the newly inserted dimensions. + # True to inherit from the dimensions before (in which case the start + # index must be greater than 0), and false to inherit from the dimensions + # after. + # For example, if row index 0 has red background and row index 1 + # has a green background, then inserting 2 rows at index 1 can inherit + # either the green or red background. If `inheritFromBefore` is true, + # the two new rows will be red (because the row before the insertion point + # was red), whereas if `inheritFromBefore` is false, the two new rows will + # be green (because the row after the insertion point was green). + # Corresponds to the JSON property `inheritFromBefore` + # @return [Boolean] + attr_accessor :inherit_from_before + alias_method :inherit_from_before?, :inherit_from_before + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @range = args[:range] if args.key?(:range) + @inherit_from_before = args[:inherit_from_before] if args.key?(:inherit_from_before) + end + end + + # Updates properties of a spreadsheet. + class UpdateSpreadsheetPropertiesRequest + include Google::Apis::Core::Hashable + + # The fields that should be updated. At least one field must be specified. + # The root 'properties' is implied and should not be specified. + # A single `"*"` can be used as short-hand for listing every field. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + # Properties of a spreadsheet. + # Corresponds to the JSON property `properties` + # @return [Google::Apis::SheetsV4::SpreadsheetProperties] + attr_accessor :properties + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @fields = args[:fields] if args.key?(:fields) + @properties = args[:properties] if args.key?(:properties) + end + end + + # A protected range. + class ProtectedRange + include Google::Apis::Core::Hashable + + # True if the user who requested this protected range can edit the + # protected area. + # This field is read-only. + # Corresponds to the JSON property `requestingUserCanEdit` + # @return [Boolean] + attr_accessor :requesting_user_can_edit + alias_method :requesting_user_can_edit?, :requesting_user_can_edit + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :range + + # The editors of a protected range. + # Corresponds to the JSON property `editors` + # @return [Google::Apis::SheetsV4::Editors] + attr_accessor :editors + + # The description of this protected range. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The list of unprotected ranges within a protected sheet. + # Unprotected ranges are only supported on protected sheets. + # Corresponds to the JSON property `unprotectedRanges` + # @return [Array] + attr_accessor :unprotected_ranges + + # The named range this protected range is backed by, if any. + # When writing, only one of range or named_range_id + # may be set. + # Corresponds to the JSON property `namedRangeId` + # @return [String] + attr_accessor :named_range_id + + # The ID of the protected range. + # This field is read-only. + # Corresponds to the JSON property `protectedRangeId` + # @return [Fixnum] + attr_accessor :protected_range_id + + # True if this protected range will show a warning when editing. + # Warning-based protection means that every user can edit data in the + # protected range, except editing will prompt a warning asking the user + # to confirm the edit. + # When writing: if this field is true, then editors is ignored. + # Additionally, if this field is changed from true to false and the + # `editors` field is not set (nor included in the field mask), then + # the editors will be set to all the editors in the document. + # Corresponds to the JSON property `warningOnly` + # @return [Boolean] + attr_accessor :warning_only + alias_method :warning_only?, :warning_only + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @requesting_user_can_edit = args[:requesting_user_can_edit] if args.key?(:requesting_user_can_edit) + @range = args[:range] if args.key?(:range) + @editors = args[:editors] if args.key?(:editors) + @description = args[:description] if args.key?(:description) + @unprotected_ranges = args[:unprotected_ranges] if args.key?(:unprotected_ranges) + @named_range_id = args[:named_range_id] if args.key?(:named_range_id) + @protected_range_id = args[:protected_range_id] if args.key?(:protected_range_id) + @warning_only = args[:warning_only] if args.key?(:warning_only) + end + end + + # The request for updating more than one range of values in a spreadsheet. + class BatchUpdateValuesRequest + include Google::Apis::Core::Hashable + + # Determines how values in the response should be rendered. + # The default render option is ValueRenderOption.FORMATTED_VALUE. + # Corresponds to the JSON property `responseValueRenderOption` + # @return [String] + attr_accessor :response_value_render_option + + # Determines if the update response should include the values + # of the cells that were updated. By default, responses + # do not include the updated values. The `updatedData` field within + # each of the BatchUpdateValuesResponse.responses will contain + # the updated values. If the range to write was larger than than the range + # actually written, the response will include all values in the requested + # range (excluding trailing empty rows and columns). + # Corresponds to the JSON property `includeValuesInResponse` + # @return [Boolean] + attr_accessor :include_values_in_response + alias_method :include_values_in_response?, :include_values_in_response + + # How the input data should be interpreted. + # Corresponds to the JSON property `valueInputOption` + # @return [String] + attr_accessor :value_input_option + + # The new values to apply to the spreadsheet. + # Corresponds to the JSON property `data` + # @return [Array] + attr_accessor :data + + # Determines how dates, times, and durations in the response should be + # rendered. This is ignored if response_value_render_option is + # FORMATTED_VALUE. + # The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER]. + # Corresponds to the JSON property `responseDateTimeRenderOption` + # @return [String] + attr_accessor :response_date_time_render_option + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @response_value_render_option = args[:response_value_render_option] if args.key?(:response_value_render_option) + @include_values_in_response = args[:include_values_in_response] if args.key?(:include_values_in_response) + @value_input_option = args[:value_input_option] if args.key?(:value_input_option) + @data = args[:data] if args.key?(:data) + @response_date_time_render_option = args[:response_date_time_render_option] if args.key?(:response_date_time_render_option) + end + end + + # Properties about a dimension. + class DimensionProperties + include Google::Apis::Core::Hashable + + # The height (if a row) or width (if a column) of the dimension in pixels. + # Corresponds to the JSON property `pixelSize` + # @return [Fixnum] + attr_accessor :pixel_size + + # True if this dimension is being filtered. + # This field is read-only. + # Corresponds to the JSON property `hiddenByFilter` + # @return [Boolean] + attr_accessor :hidden_by_filter + alias_method :hidden_by_filter?, :hidden_by_filter + + # True if this dimension is explicitly hidden. + # Corresponds to the JSON property `hiddenByUser` + # @return [Boolean] + attr_accessor :hidden_by_user + alias_method :hidden_by_user?, :hidden_by_user + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @pixel_size = args[:pixel_size] if args.key?(:pixel_size) + @hidden_by_filter = args[:hidden_by_filter] if args.key?(:hidden_by_filter) + @hidden_by_user = args[:hidden_by_user] if args.key?(:hidden_by_user) + end + end + + # A named range. + class NamedRange + include Google::Apis::Core::Hashable + + # The ID of the named range. + # Corresponds to the JSON property `namedRangeId` + # @return [String] + attr_accessor :named_range_id + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :range + + # The name of the named range. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @named_range_id = args[:named_range_id] if args.key?(:named_range_id) + @range = args[:range] if args.key?(:range) + @name = args[:name] if args.key?(:name) + end + end + + # A range along a single dimension on a sheet. + # All indexes are zero-based. + # Indexes are half open: the start index is inclusive + # and the end index is exclusive. + # Missing indexes indicate the range is unbounded on that side. + class DimensionRange + include Google::Apis::Core::Hashable + + # The start (inclusive) of the span, or not set if unbounded. + # Corresponds to the JSON property `startIndex` + # @return [Fixnum] + attr_accessor :start_index + + # The end (exclusive) of the span, or not set if unbounded. + # Corresponds to the JSON property `endIndex` + # @return [Fixnum] + attr_accessor :end_index + + # The sheet this span is on. + # Corresponds to the JSON property `sheetId` + # @return [Fixnum] + attr_accessor :sheet_id + + # The dimension of the span. + # Corresponds to the JSON property `dimension` + # @return [String] + attr_accessor :dimension + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @start_index = args[:start_index] if args.key?(:start_index) + @end_index = args[:end_index] if args.key?(:end_index) + @sheet_id = args[:sheet_id] if args.key?(:sheet_id) + @dimension = args[:dimension] if args.key?(:dimension) + end + end + + # Moves data from the source to the destination. + class CutPasteRequest + include Google::Apis::Core::Hashable + + # A coordinate in a sheet. + # All indexes are zero-based. + # Corresponds to the JSON property `destination` + # @return [Google::Apis::SheetsV4::GridCoordinate] + attr_accessor :destination + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `source` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :source + + # What kind of data to paste. All the source data will be cut, regardless + # of what is pasted. + # Corresponds to the JSON property `pasteType` + # @return [String] + attr_accessor :paste_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @destination = args[:destination] if args.key?(:destination) + @source = args[:source] if args.key?(:source) + @paste_type = args[:paste_type] if args.key?(:paste_type) + end + end + + # The borders of the cell. + class Borders + include Google::Apis::Core::Hashable + + # A border along a cell. + # Corresponds to the JSON property `top` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :top + + # A border along a cell. + # Corresponds to the JSON property `left` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :left + + # A border along a cell. + # Corresponds to the JSON property `right` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :right + + # A border along a cell. + # Corresponds to the JSON property `bottom` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :bottom + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @top = args[:top] if args.key?(:top) + @left = args[:left] if args.key?(:left) + @right = args[:right] if args.key?(:right) + @bottom = args[:bottom] if args.key?(:bottom) + end + end + + # A single series of data in a chart. + # For example, if charting stock prices over time, multiple series may exist, + # one for the "Open Price", "High Price", "Low Price" and "Close Price". + class BasicChartSeries + include Google::Apis::Core::Hashable + + # The data included in a domain or series. + # Corresponds to the JSON property `series` + # @return [Google::Apis::SheetsV4::ChartData] + attr_accessor :series + + # The type of this series. Valid only if the + # chartType is + # COMBO. + # Different types will change the way the series is visualized. + # Only LINE, AREA, + # and COLUMN are supported. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # The minor axis that will specify the range of values for this series. + # For example, if charting stocks over time, the "Volume" series + # may want to be pinned to the right with the prices pinned to the left, + # because the scale of trading volume is different than the scale of + # prices. + # It is an error to specify an axis that isn't a valid minor axis + # for the chart's type. + # Corresponds to the JSON property `targetAxis` + # @return [String] + attr_accessor :target_axis + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @series = args[:series] if args.key?(:series) + @type = args[:type] if args.key?(:type) + @target_axis = args[:target_axis] if args.key?(:target_axis) + end + end + + # Automatically resizes one or more dimensions based on the contents + # of the cells in that dimension. + class AutoResizeDimensionsRequest + include Google::Apis::Core::Hashable + + # A range along a single dimension on a sheet. + # All indexes are zero-based. + # Indexes are half open: the start index is inclusive + # and the end index is exclusive. + # Missing indexes indicate the range is unbounded on that side. + # Corresponds to the JSON property `dimensions` + # @return [Google::Apis::SheetsV4::DimensionRange] + attr_accessor :dimensions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @dimensions = args[:dimensions] if args.key?(:dimensions) + end + end + + # Updates the borders of a range. + # If a field is not set in the request, that means the border remains as-is. + # For example, with two subsequent UpdateBordersRequest: + # 1. range: A1:A5 `` top: RED, bottom: WHITE `` + # 2. range: A1:A5 `` left: BLUE `` + # That would result in A1:A5 having a borders of + # `` top: RED, bottom: WHITE, left: BLUE ``. + # If you want to clear a border, explicitly set the style to + # NONE. + class UpdateBordersRequest + include Google::Apis::Core::Hashable + + # A border along a cell. + # Corresponds to the JSON property `top` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :top + + # A border along a cell. + # Corresponds to the JSON property `left` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :left + + # A border along a cell. + # Corresponds to the JSON property `bottom` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :bottom + + # A border along a cell. + # Corresponds to the JSON property `innerVertical` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :inner_vertical + + # A border along a cell. + # Corresponds to the JSON property `right` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :right + + # A range on a sheet. + # All indexes are zero-based. + # Indexes are half open, e.g the start index is inclusive + # and the end index is exclusive -- [start_index, end_index). + # Missing indexes indicate the range is unbounded on that side. + # For example, if `"Sheet1"` is sheet ID 0, then: + # `Sheet1!A1:A1 == sheet_id: 0, + # start_row_index: 0, end_row_index: 1, + # start_column_index: 0, end_column_index: 1` + # `Sheet1!A3:B4 == sheet_id: 0, + # start_row_index: 2, end_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A:B == sheet_id: 0, + # start_column_index: 0, end_column_index: 2` + # `Sheet1!A5:B == sheet_id: 0, + # start_row_index: 4, + # start_column_index: 0, end_column_index: 2` + # `Sheet1 == sheet_id:0` + # The start index must always be less than or equal to the end index. + # If the start index equals the end index, then the range is empty. + # Empty ranges are typically not meaningful and are usually rendered in the + # UI as `#REF!`. + # Corresponds to the JSON property `range` + # @return [Google::Apis::SheetsV4::GridRange] + attr_accessor :range + + # A border along a cell. + # Corresponds to the JSON property `innerHorizontal` + # @return [Google::Apis::SheetsV4::Border] + attr_accessor :inner_horizontal + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @top = args[:top] if args.key?(:top) + @left = args[:left] if args.key?(:left) + @bottom = args[:bottom] if args.key?(:bottom) + @inner_vertical = args[:inner_vertical] if args.key?(:inner_vertical) + @right = args[:right] if args.key?(:right) + @range = args[:range] if args.key?(:range) + @inner_horizontal = args[:inner_horizontal] if args.key?(:inner_horizontal) + end + end end end end diff --git a/generated/google/apis/sheets_v4/representations.rb b/generated/google/apis/sheets_v4/representations.rb index 4497ce1af..ec89d4944 100644 --- a/generated/google/apis/sheets_v4/representations.rb +++ b/generated/google/apis/sheets_v4/representations.rb @@ -22,318 +22,6 @@ module Google module Apis module SheetsV4 - class SheetProperties - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateDimensionPropertiesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SourceAndDestination - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class FilterView - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BandingProperties - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BasicFilter - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddProtectedRangeResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateValuesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ErrorValue - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PivotValue - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CopySheetToAnotherSpreadsheetRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class PivotGroupSortValueBucket - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class EmbeddedObjectPosition - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DeleteProtectedRangeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AutoFillRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class GradientRule - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SetBasicFilterRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ClearValuesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class InterpolationPoint - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DeleteEmbeddedObjectRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class FindReplaceResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DeleteSheetRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DuplicateFilterViewRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateConditionalFormatRuleResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ConditionValue - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DuplicateSheetRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ExtendedValue - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BandedRange - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BatchClearValuesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Spreadsheet - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddChartRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateProtectedRangeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class TextFormat - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddSheetResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddFilterViewResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class IterativeCalculationSettings - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SpreadsheetProperties - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class OverlayPosition - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class RepeatCellRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AddChartResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class InsertDimensionRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateSpreadsheetPropertiesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BatchUpdateValuesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class ProtectedRange - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DimensionProperties - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class DimensionRange - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class NamedRange - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class CutPasteRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BasicChartSeries - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Borders - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class AutoResizeDimensionsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class UpdateBordersRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class CellFormat class Representation < Google::Apis::Core::JsonRepresentation; end @@ -460,19 +148,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class GridData - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class Border class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class UpdateNamedRangeRequest + class GridData class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -484,6 +166,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class UpdateNamedRangeRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class AddSheetRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -520,25 +208,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class GridProperties - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class UnmergeCellsRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class UpdateEmbeddedObjectPositionResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SortSpec + class GridProperties class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -550,19 +226,31 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class SortSpec + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpdateEmbeddedObjectPositionResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class BooleanRule class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class PivotGroupValueMetadata + class FilterCriteria class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class FilterCriteria + class PivotGroupValueMetadata class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -580,13 +268,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class DataValidationRule + class BasicChartDomain class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class BasicChartDomain + class DataValidationRule class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -646,13 +334,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class BooleanCondition + class Request class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Request + class BooleanCondition class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -760,19 +448,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class TextToColumnsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class ClearBasicFilterRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class BatchUpdateSpreadsheetResponse + class TextToColumnsRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -784,6 +466,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class BatchUpdateSpreadsheetResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class AppendValuesResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -827,578 +515,345 @@ module Google end class SheetProperties - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :title, as: 'title' - property :index, as: 'index' - property :tab_color, as: 'tabColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :sheet_id, as: 'sheetId' - property :right_to_left, as: 'rightToLeft' - property :hidden, as: 'hidden' - property :sheet_type, as: 'sheetType' - property :grid_properties, as: 'gridProperties', class: Google::Apis::SheetsV4::GridProperties, decorator: Google::Apis::SheetsV4::GridProperties::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class UpdateDimensionPropertiesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :properties, as: 'properties', class: Google::Apis::SheetsV4::DimensionProperties, decorator: Google::Apis::SheetsV4::DimensionProperties::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :range, as: 'range', class: Google::Apis::SheetsV4::DimensionRange, decorator: Google::Apis::SheetsV4::DimensionRange::Representation - - property :fields, as: 'fields' - end + include Google::Apis::Core::JsonObjectSupport end class SourceAndDestination - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :dimension, as: 'dimension' - property :fill_length, as: 'fillLength' - property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class FilterView - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :named_range_id, as: 'namedRangeId' - property :filter_view_id, as: 'filterViewId' - hash :criteria, as: 'criteria', class: Google::Apis::SheetsV4::FilterCriteria, decorator: Google::Apis::SheetsV4::FilterCriteria::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :title, as: 'title' - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - collection :sort_specs, as: 'sortSpecs', class: Google::Apis::SheetsV4::SortSpec, decorator: Google::Apis::SheetsV4::SortSpec::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class BandingProperties - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :footer_color, as: 'footerColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :header_color, as: 'headerColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation - - property :first_band_color, as: 'firstBandColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation - - property :second_band_color, as: 'secondBandColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation - - end - end - - class BasicFilter - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - hash :criteria, as: 'criteria', class: Google::Apis::SheetsV4::FilterCriteria, decorator: Google::Apis::SheetsV4::FilterCriteria::Representation - - collection :sort_specs, as: 'sortSpecs', class: Google::Apis::SheetsV4::SortSpec, decorator: Google::Apis::SheetsV4::SortSpec::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class AddProtectedRangeResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :protected_range, as: 'protectedRange', class: Google::Apis::SheetsV4::ProtectedRange, decorator: Google::Apis::SheetsV4::ProtectedRange::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport + end + + class BasicFilter + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class UpdateValuesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :updated_rows, as: 'updatedRows' - property :updated_data, as: 'updatedData', class: Google::Apis::SheetsV4::ValueRange, decorator: Google::Apis::SheetsV4::ValueRange::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :updated_columns, as: 'updatedColumns' - property :spreadsheet_id, as: 'spreadsheetId' - property :updated_range, as: 'updatedRange' - property :updated_cells, as: 'updatedCells' - end - end - - class ErrorValue - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - property :message, as: 'message' - end + include Google::Apis::Core::JsonObjectSupport end class PivotValue - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :source_column_offset, as: 'sourceColumnOffset' - property :name, as: 'name' - property :formula, as: 'formula' - property :summarize_function, as: 'summarizeFunction' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ErrorValue + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class CopySheetToAnotherSpreadsheetRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :destination_spreadsheet_id, as: 'destinationSpreadsheetId' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class PivotGroupSortValueBucket - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :values_index, as: 'valuesIndex' - collection :buckets, as: 'buckets', class: Google::Apis::SheetsV4::ExtendedValue, decorator: Google::Apis::SheetsV4::ExtendedValue::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class EmbeddedObjectPosition - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :new_sheet, as: 'newSheet' - property :sheet_id, as: 'sheetId' - property :overlay_position, as: 'overlayPosition', class: Google::Apis::SheetsV4::OverlayPosition, decorator: Google::Apis::SheetsV4::OverlayPosition::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class DeleteProtectedRangeRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :protected_range_id, as: 'protectedRangeId' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class AutoFillRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :use_alternate_series, as: 'useAlternateSeries' - property :source_and_destination, as: 'sourceAndDestination', class: Google::Apis::SheetsV4::SourceAndDestination, decorator: Google::Apis::SheetsV4::SourceAndDestination::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class GradientRule - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :midpoint, as: 'midpoint', class: Google::Apis::SheetsV4::InterpolationPoint, decorator: Google::Apis::SheetsV4::InterpolationPoint::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :minpoint, as: 'minpoint', class: Google::Apis::SheetsV4::InterpolationPoint, decorator: Google::Apis::SheetsV4::InterpolationPoint::Representation - - property :maxpoint, as: 'maxpoint', class: Google::Apis::SheetsV4::InterpolationPoint, decorator: Google::Apis::SheetsV4::InterpolationPoint::Representation - - end - end - - class SetBasicFilterRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :filter, as: 'filter', class: Google::Apis::SheetsV4::BasicFilter, decorator: Google::Apis::SheetsV4::BasicFilter::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class ClearValuesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SetBasicFilterRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class InterpolationPoint - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :value, as: 'value' - property :color, as: 'color', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :type, as: 'type' - end + include Google::Apis::Core::JsonObjectSupport end class DeleteEmbeddedObjectRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :object_id_prop, as: 'objectId' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class FindReplaceResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :values_changed, as: 'valuesChanged' - property :occurrences_changed, as: 'occurrencesChanged' - property :rows_changed, as: 'rowsChanged' - property :sheets_changed, as: 'sheetsChanged' - property :formulas_changed, as: 'formulasChanged' - end - end + class Representation < Google::Apis::Core::JsonRepresentation; end - class DeleteSheetRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :sheet_id, as: 'sheetId' - end + include Google::Apis::Core::JsonObjectSupport end class DuplicateFilterViewRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :filter_id, as: 'filterId' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DeleteSheetRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class UpdateConditionalFormatRuleResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :old_rule, as: 'oldRule', class: Google::Apis::SheetsV4::ConditionalFormatRule, decorator: Google::Apis::SheetsV4::ConditionalFormatRule::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :new_index, as: 'newIndex' - property :old_index, as: 'oldIndex' - property :new_rule, as: 'newRule', class: Google::Apis::SheetsV4::ConditionalFormatRule, decorator: Google::Apis::SheetsV4::ConditionalFormatRule::Representation - - end - end - - class ConditionValue - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :relative_date, as: 'relativeDate' - property :user_entered_value, as: 'userEnteredValue' - end + include Google::Apis::Core::JsonObjectSupport end class DuplicateSheetRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :new_sheet_id, as: 'newSheetId' - property :insert_sheet_index, as: 'insertSheetIndex' - property :new_sheet_name, as: 'newSheetName' - property :source_sheet_id, as: 'sourceSheetId' - end + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ConditionValue + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class ExtendedValue - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :number_value, as: 'numberValue' - property :error_value, as: 'errorValue', class: Google::Apis::SheetsV4::ErrorValue, decorator: Google::Apis::SheetsV4::ErrorValue::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :string_value, as: 'stringValue' - property :bool_value, as: 'boolValue' - property :formula_value, as: 'formulaValue' - end - end - - class BandedRange - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :row_properties, as: 'rowProperties', class: Google::Apis::SheetsV4::BandingProperties, decorator: Google::Apis::SheetsV4::BandingProperties::Representation - - property :column_properties, as: 'columnProperties', class: Google::Apis::SheetsV4::BandingProperties, decorator: Google::Apis::SheetsV4::BandingProperties::Representation - - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - property :banded_range_id, as: 'bandedRangeId' - end - end - - class BatchClearValuesResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :spreadsheet_id, as: 'spreadsheetId' - collection :cleared_ranges, as: 'clearedRanges' - end - end - - class Spreadsheet - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :spreadsheet_id, as: 'spreadsheetId' - collection :sheets, as: 'sheets', class: Google::Apis::SheetsV4::Sheet, decorator: Google::Apis::SheetsV4::Sheet::Representation - - collection :named_ranges, as: 'namedRanges', class: Google::Apis::SheetsV4::NamedRange, decorator: Google::Apis::SheetsV4::NamedRange::Representation - - property :spreadsheet_url, as: 'spreadsheetUrl' - property :properties, as: 'properties', class: Google::Apis::SheetsV4::SpreadsheetProperties, decorator: Google::Apis::SheetsV4::SpreadsheetProperties::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class AddChartRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :chart, as: 'chart', class: Google::Apis::SheetsV4::EmbeddedChart, decorator: Google::Apis::SheetsV4::EmbeddedChart::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport + end + + class Spreadsheet + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BatchClearValuesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BandedRange + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class UpdateProtectedRangeRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :protected_range, as: 'protectedRange', class: Google::Apis::SheetsV4::ProtectedRange, decorator: Google::Apis::SheetsV4::ProtectedRange::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :fields, as: 'fields' - end + include Google::Apis::Core::JsonObjectSupport end class TextFormat - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :foreground_color, as: 'foregroundColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :bold, as: 'bold' - property :font_family, as: 'fontFamily' - property :strikethrough, as: 'strikethrough' - property :italic, as: 'italic' - property :font_size, as: 'fontSize' - property :underline, as: 'underline' - end + include Google::Apis::Core::JsonObjectSupport end class AddSheetResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :properties, as: 'properties', class: Google::Apis::SheetsV4::SheetProperties, decorator: Google::Apis::SheetsV4::SheetProperties::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class AddFilterViewResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :filter, as: 'filter', class: Google::Apis::SheetsV4::FilterView, decorator: Google::Apis::SheetsV4::FilterView::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class IterativeCalculationSettings - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :convergence_threshold, as: 'convergenceThreshold' - property :max_iterations, as: 'maxIterations' - end - end + class Representation < Google::Apis::Core::JsonRepresentation; end - class SpreadsheetProperties - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :auto_recalc, as: 'autoRecalc' - property :default_format, as: 'defaultFormat', class: Google::Apis::SheetsV4::CellFormat, decorator: Google::Apis::SheetsV4::CellFormat::Representation - - property :time_zone, as: 'timeZone' - property :title, as: 'title' - property :locale, as: 'locale' - property :iterative_calculation_settings, as: 'iterativeCalculationSettings', class: Google::Apis::SheetsV4::IterativeCalculationSettings, decorator: Google::Apis::SheetsV4::IterativeCalculationSettings::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class OverlayPosition - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :width_pixels, as: 'widthPixels' - property :offset_x_pixels, as: 'offsetXPixels' - property :anchor_cell, as: 'anchorCell', class: Google::Apis::SheetsV4::GridCoordinate, decorator: Google::Apis::SheetsV4::GridCoordinate::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :offset_y_pixels, as: 'offsetYPixels' - property :height_pixels, as: 'heightPixels' - end + include Google::Apis::Core::JsonObjectSupport + end + + class SpreadsheetProperties + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class RepeatCellRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :fields, as: 'fields' - property :cell, as: 'cell', class: Google::Apis::SheetsV4::CellData, decorator: Google::Apis::SheetsV4::CellData::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class AddChartResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :chart, as: 'chart', class: Google::Apis::SheetsV4::EmbeddedChart, decorator: Google::Apis::SheetsV4::EmbeddedChart::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class InsertDimensionRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :range, as: 'range', class: Google::Apis::SheetsV4::DimensionRange, decorator: Google::Apis::SheetsV4::DimensionRange::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :inherit_from_before, as: 'inheritFromBefore' - end + include Google::Apis::Core::JsonObjectSupport end class UpdateSpreadsheetPropertiesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :properties, as: 'properties', class: Google::Apis::SheetsV4::SpreadsheetProperties, decorator: Google::Apis::SheetsV4::SpreadsheetProperties::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :fields, as: 'fields' - end - end - - class BatchUpdateValuesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :response_value_render_option, as: 'responseValueRenderOption' - property :include_values_in_response, as: 'includeValuesInResponse' - property :value_input_option, as: 'valueInputOption' - collection :data, as: 'data', class: Google::Apis::SheetsV4::ValueRange, decorator: Google::Apis::SheetsV4::ValueRange::Representation - - property :response_date_time_render_option, as: 'responseDateTimeRenderOption' - end + include Google::Apis::Core::JsonObjectSupport end class ProtectedRange - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :named_range_id, as: 'namedRangeId' - property :protected_range_id, as: 'protectedRangeId' - property :warning_only, as: 'warningOnly' - property :requesting_user_can_edit, as: 'requestingUserCanEdit' - property :editors, as: 'editors', class: Google::Apis::SheetsV4::Editors, decorator: Google::Apis::SheetsV4::Editors::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + include Google::Apis::Core::JsonObjectSupport + end - property :description, as: 'description' - collection :unprotected_ranges, as: 'unprotectedRanges', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + class BatchUpdateValuesRequest + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class DimensionProperties - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :pixel_size, as: 'pixelSize' - property :hidden_by_filter, as: 'hiddenByFilter' - property :hidden_by_user, as: 'hiddenByUser' - end - end + class Representation < Google::Apis::Core::JsonRepresentation; end - class DimensionRange - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :sheet_id, as: 'sheetId' - property :dimension, as: 'dimension' - property :start_index, as: 'startIndex' - property :end_index, as: 'endIndex' - end + include Google::Apis::Core::JsonObjectSupport end class NamedRange - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :named_range_id, as: 'namedRangeId' - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :name, as: 'name' - end + include Google::Apis::Core::JsonObjectSupport + end + + class DimensionRange + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport end class CutPasteRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :destination, as: 'destination', class: Google::Apis::SheetsV4::GridCoordinate, decorator: Google::Apis::SheetsV4::GridCoordinate::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - property :paste_type, as: 'pasteType' - end - end - - class BasicChartSeries - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :series, as: 'series', class: Google::Apis::SheetsV4::ChartData, decorator: Google::Apis::SheetsV4::ChartData::Representation - - property :type, as: 'type' - property :target_axis, as: 'targetAxis' - end + include Google::Apis::Core::JsonObjectSupport end class Borders - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :top, as: 'top', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :left, as: 'left', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + include Google::Apis::Core::JsonObjectSupport + end - property :right, as: 'right', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + class BasicChartSeries + class Representation < Google::Apis::Core::JsonRepresentation; end - property :bottom, as: 'bottom', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class AutoResizeDimensionsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :dimensions, as: 'dimensions', class: Google::Apis::SheetsV4::DimensionRange, decorator: Google::Apis::SheetsV4::DimensionRange::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - end + include Google::Apis::Core::JsonObjectSupport end class UpdateBordersRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :right, as: 'right', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + class Representation < Google::Apis::Core::JsonRepresentation; end - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - property :inner_horizontal, as: 'innerHorizontal', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation - - property :top, as: 'top', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation - - property :left, as: 'left', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation - - property :bottom, as: 'bottom', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation - - property :inner_vertical, as: 'innerVertical', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation - - end + include Google::Apis::Core::JsonObjectSupport end class CellFormat # @private class Representation < Google::Apis::Core::JsonRepresentation - property :number_format, as: 'numberFormat', class: Google::Apis::SheetsV4::NumberFormat, decorator: Google::Apis::SheetsV4::NumberFormat::Representation - - property :hyperlink_display_type, as: 'hyperlinkDisplayType' - property :horizontal_alignment, as: 'horizontalAlignment' - property :text_format, as: 'textFormat', class: Google::Apis::SheetsV4::TextFormat, decorator: Google::Apis::SheetsV4::TextFormat::Representation - property :background_color, as: 'backgroundColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + property :vertical_alignment, as: 'verticalAlignment' property :padding, as: 'padding', class: Google::Apis::SheetsV4::Padding, decorator: Google::Apis::SheetsV4::Padding::Representation - property :vertical_alignment, as: 'verticalAlignment' property :borders, as: 'borders', class: Google::Apis::SheetsV4::Borders, decorator: Google::Apis::SheetsV4::Borders::Representation property :text_direction, as: 'textDirection' property :wrap_strategy, as: 'wrapStrategy' property :text_rotation, as: 'textRotation', class: Google::Apis::SheetsV4::TextRotation, decorator: Google::Apis::SheetsV4::TextRotation::Representation + property :number_format, as: 'numberFormat', class: Google::Apis::SheetsV4::NumberFormat, decorator: Google::Apis::SheetsV4::NumberFormat::Representation + + property :horizontal_alignment, as: 'horizontalAlignment' + property :hyperlink_display_type, as: 'hyperlinkDisplayType' + property :text_format, as: 'textFormat', class: Google::Apis::SheetsV4::TextFormat, decorator: Google::Apis::SheetsV4::TextFormat::Representation + end end class ClearValuesResponse # @private class Representation < Google::Apis::Core::JsonRepresentation - property :spreadsheet_id, as: 'spreadsheetId' property :cleared_range, as: 'clearedRange' + property :spreadsheet_id, as: 'spreadsheetId' end end @@ -1482,12 +937,12 @@ module Google collection :rows, as: 'rows', class: Google::Apis::SheetsV4::PivotGroup, decorator: Google::Apis::SheetsV4::PivotGroup::Representation property :value_layout, as: 'valueLayout' - property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - collection :columns, as: 'columns', class: Google::Apis::SheetsV4::PivotGroup, decorator: Google::Apis::SheetsV4::PivotGroup::Representation collection :values, as: 'values', class: Google::Apis::SheetsV4::PivotValue, decorator: Google::Apis::SheetsV4::PivotValue::Representation + property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + end end @@ -1502,13 +957,13 @@ module Google class ValueRange # @private class Representation < Google::Apis::Core::JsonRepresentation + property :range, as: 'range' property :major_dimension, as: 'majorDimension' collection :values, as: 'values', :class => Array do include Representable::JSON::Collection items end - property :range, as: 'range' end end @@ -1533,6 +988,18 @@ module Google class Response # @private class Representation < Google::Apis::Core::JsonRepresentation + property :add_protected_range, as: 'addProtectedRange', class: Google::Apis::SheetsV4::AddProtectedRangeResponse, decorator: Google::Apis::SheetsV4::AddProtectedRangeResponse::Representation + + property :duplicate_sheet, as: 'duplicateSheet', class: Google::Apis::SheetsV4::DuplicateSheetResponse, decorator: Google::Apis::SheetsV4::DuplicateSheetResponse::Representation + + property :delete_conditional_format_rule, as: 'deleteConditionalFormatRule', class: Google::Apis::SheetsV4::DeleteConditionalFormatRuleResponse, decorator: Google::Apis::SheetsV4::DeleteConditionalFormatRuleResponse::Representation + + property :update_embedded_object_position, as: 'updateEmbeddedObjectPosition', class: Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionResponse, decorator: Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionResponse::Representation + + property :duplicate_filter_view, as: 'duplicateFilterView', class: Google::Apis::SheetsV4::DuplicateFilterViewResponse, decorator: Google::Apis::SheetsV4::DuplicateFilterViewResponse::Representation + + property :add_chart, as: 'addChart', class: Google::Apis::SheetsV4::AddChartResponse, decorator: Google::Apis::SheetsV4::AddChartResponse::Representation + property :find_replace, as: 'findReplace', class: Google::Apis::SheetsV4::FindReplaceResponse, decorator: Google::Apis::SheetsV4::FindReplaceResponse::Representation property :add_sheet, as: 'addSheet', class: Google::Apis::SheetsV4::AddSheetResponse, decorator: Google::Apis::SheetsV4::AddSheetResponse::Representation @@ -1545,18 +1012,6 @@ module Google property :add_banding, as: 'addBanding', class: Google::Apis::SheetsV4::AddBandingResponse, decorator: Google::Apis::SheetsV4::AddBandingResponse::Representation - property :add_protected_range, as: 'addProtectedRange', class: Google::Apis::SheetsV4::AddProtectedRangeResponse, decorator: Google::Apis::SheetsV4::AddProtectedRangeResponse::Representation - - property :duplicate_sheet, as: 'duplicateSheet', class: Google::Apis::SheetsV4::DuplicateSheetResponse, decorator: Google::Apis::SheetsV4::DuplicateSheetResponse::Representation - - property :update_embedded_object_position, as: 'updateEmbeddedObjectPosition', class: Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionResponse, decorator: Google::Apis::SheetsV4::UpdateEmbeddedObjectPositionResponse::Representation - - property :delete_conditional_format_rule, as: 'deleteConditionalFormatRule', class: Google::Apis::SheetsV4::DeleteConditionalFormatRuleResponse, decorator: Google::Apis::SheetsV4::DeleteConditionalFormatRuleResponse::Representation - - property :duplicate_filter_view, as: 'duplicateFilterView', class: Google::Apis::SheetsV4::DuplicateFilterViewResponse, decorator: Google::Apis::SheetsV4::DuplicateFilterViewResponse::Representation - - property :add_chart, as: 'addChart', class: Google::Apis::SheetsV4::AddChartResponse, decorator: Google::Apis::SheetsV4::AddChartResponse::Representation - end end @@ -1572,9 +1027,9 @@ module Google class TextFormatRun # @private class Representation < Google::Apis::Core::JsonRepresentation + property :start_index, as: 'startIndex' property :format, as: 'format', class: Google::Apis::SheetsV4::TextFormat, decorator: Google::Apis::SheetsV4::TextFormat::Representation - property :start_index, as: 'startIndex' end end @@ -1605,27 +1060,43 @@ module Google end end + class Border + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :width, as: 'width' + property :style, as: 'style' + property :color, as: 'color', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + + end + end + class GridData # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :row_data, as: 'rowData', class: Google::Apis::SheetsV4::RowData, decorator: Google::Apis::SheetsV4::RowData::Representation - property :start_row, as: 'startRow' collection :column_metadata, as: 'columnMetadata', class: Google::Apis::SheetsV4::DimensionProperties, decorator: Google::Apis::SheetsV4::DimensionProperties::Representation property :start_column, as: 'startColumn' collection :row_metadata, as: 'rowMetadata', class: Google::Apis::SheetsV4::DimensionProperties, decorator: Google::Apis::SheetsV4::DimensionProperties::Representation + collection :row_data, as: 'rowData', class: Google::Apis::SheetsV4::RowData, decorator: Google::Apis::SheetsV4::RowData::Representation + end end - class Border + class FindReplaceRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :style, as: 'style' - property :color, as: 'color', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - property :width, as: 'width' + property :sheet_id, as: 'sheetId' + property :match_case, as: 'matchCase' + property :all_sheets, as: 'allSheets' + property :include_formulas, as: 'includeFormulas' + property :match_entire_cell, as: 'matchEntireCell' + property :find, as: 'find' + property :search_by_regex, as: 'searchByRegex' + property :replacement, as: 'replacement' end end @@ -1638,22 +1109,6 @@ module Google end end - class FindReplaceRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :all_sheets, as: 'allSheets' - property :match_case, as: 'matchCase' - property :include_formulas, as: 'includeFormulas' - property :match_entire_cell, as: 'matchEntireCell' - property :search_by_regex, as: 'searchByRegex' - property :find, as: 'find' - property :replacement, as: 'replacement' - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - property :sheet_id, as: 'sheetId' - end - end - class AddSheetRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1665,13 +1120,13 @@ module Google class UpdateCellsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + property :start, as: 'start', class: Google::Apis::SheetsV4::GridCoordinate, decorator: Google::Apis::SheetsV4::GridCoordinate::Representation + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation collection :rows, as: 'rows', class: Google::Apis::SheetsV4::RowData, decorator: Google::Apis::SheetsV4::RowData::Representation property :fields, as: 'fields' - property :start, as: 'start', class: Google::Apis::SheetsV4::GridCoordinate, decorator: Google::Apis::SheetsV4::GridCoordinate::Representation - end end @@ -1686,9 +1141,9 @@ module Google class DeleteRangeRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + property :shift_dimension, as: 'shiftDimension' property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - property :shift_dimension, as: 'shiftDimension' end end @@ -1704,20 +1159,9 @@ module Google class UpdateSheetPropertiesRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + property :fields, as: 'fields' property :properties, as: 'properties', class: Google::Apis::SheetsV4::SheetProperties, decorator: Google::Apis::SheetsV4::SheetProperties::Representation - property :fields, as: 'fields' - end - end - - class GridProperties - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :frozen_row_count, as: 'frozenRowCount' - property :hide_gridlines, as: 'hideGridlines' - property :column_count, as: 'columnCount' - property :frozen_column_count, as: 'frozenColumnCount' - property :row_count, as: 'rowCount' end end @@ -1729,19 +1173,14 @@ module Google end end - class UpdateEmbeddedObjectPositionResponse + class GridProperties # @private class Representation < Google::Apis::Core::JsonRepresentation - property :position, as: 'position', class: Google::Apis::SheetsV4::EmbeddedObjectPosition, decorator: Google::Apis::SheetsV4::EmbeddedObjectPosition::Representation - - end - end - - class SortSpec - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :dimension_index, as: 'dimensionIndex' - property :sort_order, as: 'sortOrder' + property :row_count, as: 'rowCount' + property :frozen_row_count, as: 'frozenRowCount' + property :hide_gridlines, as: 'hideGridlines' + property :column_count, as: 'columnCount' + property :frozen_column_count, as: 'frozenColumnCount' end end @@ -1769,6 +1208,22 @@ module Google end end + class SortSpec + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :dimension_index, as: 'dimensionIndex' + property :sort_order, as: 'sortOrder' + end + end + + class UpdateEmbeddedObjectPositionResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :position, as: 'position', class: Google::Apis::SheetsV4::EmbeddedObjectPosition, decorator: Google::Apis::SheetsV4::EmbeddedObjectPosition::Representation + + end + end + class BooleanRule # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1779,15 +1234,6 @@ module Google end end - class PivotGroupValueMetadata - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :value, as: 'value', class: Google::Apis::SheetsV4::ExtendedValue, decorator: Google::Apis::SheetsV4::ExtendedValue::Representation - - property :collapsed, as: 'collapsed' - end - end - class FilterCriteria # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1797,6 +1243,15 @@ module Google end end + class PivotGroupValueMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :collapsed, as: 'collapsed' + property :value, as: 'value', class: Google::Apis::SheetsV4::ExtendedValue, decorator: Google::Apis::SheetsV4::ExtendedValue::Representation + + end + end + class Editors # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1817,17 +1272,6 @@ module Google end end - class DataValidationRule - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :show_custom_ui, as: 'showCustomUi' - property :strict, as: 'strict' - property :input_message, as: 'inputMessage' - property :condition, as: 'condition', class: Google::Apis::SheetsV4::BooleanCondition, decorator: Google::Apis::SheetsV4::BooleanCondition::Representation - - end - end - class BasicChartDomain # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1836,24 +1280,35 @@ module Google end end + class DataValidationRule + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :condition, as: 'condition', class: Google::Apis::SheetsV4::BooleanCondition, decorator: Google::Apis::SheetsV4::BooleanCondition::Representation + + property :show_custom_ui, as: 'showCustomUi' + property :strict, as: 'strict' + property :input_message, as: 'inputMessage' + end + end + class PasteDataRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' + property :html, as: 'html' property :coordinate, as: 'coordinate', class: Google::Apis::SheetsV4::GridCoordinate, decorator: Google::Apis::SheetsV4::GridCoordinate::Representation property :data, as: 'data' property :delimiter, as: 'delimiter' - property :type, as: 'type' - property :html, as: 'html' end end class AppendDimensionRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + property :length, as: 'length' property :sheet_id, as: 'sheetId' property :dimension, as: 'dimension' - property :length, as: 'length' end end @@ -1868,10 +1323,10 @@ module Google class UpdateEmbeddedObjectPositionRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + property :object_id_prop, as: 'objectId' property :new_position, as: 'newPosition', class: Google::Apis::SheetsV4::EmbeddedObjectPosition, decorator: Google::Apis::SheetsV4::EmbeddedObjectPosition::Representation property :fields, as: 'fields' - property :object_id_prop, as: 'objectId' end end @@ -1899,9 +1354,9 @@ module Google class UpdateFilterViewRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :fields, as: 'fields' property :filter, as: 'filter', class: Google::Apis::SheetsV4::FilterView, decorator: Google::Apis::SheetsV4::FilterView::Representation + property :fields, as: 'fields' end end @@ -1920,43 +1375,80 @@ module Google class CopyPasteRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation - - property :paste_type, as: 'pasteType' property :destination, as: 'destination', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation property :paste_orientation, as: 'pasteOrientation' - end - end - - class BooleanCondition - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - collection :values, as: 'values', class: Google::Apis::SheetsV4::ConditionValue, decorator: Google::Apis::SheetsV4::ConditionValue::Representation + property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + property :paste_type, as: 'pasteType' end end class Request # @private class Representation < Google::Apis::Core::JsonRepresentation + property :delete_embedded_object, as: 'deleteEmbeddedObject', class: Google::Apis::SheetsV4::DeleteEmbeddedObjectRequest, decorator: Google::Apis::SheetsV4::DeleteEmbeddedObjectRequest::Representation + + property :update_filter_view, as: 'updateFilterView', class: Google::Apis::SheetsV4::UpdateFilterViewRequest, decorator: Google::Apis::SheetsV4::UpdateFilterViewRequest::Representation + + property :add_banding, as: 'addBanding', class: Google::Apis::SheetsV4::AddBandingRequest, decorator: Google::Apis::SheetsV4::AddBandingRequest::Representation + + property :auto_resize_dimensions, as: 'autoResizeDimensions', class: Google::Apis::SheetsV4::AutoResizeDimensionsRequest, decorator: Google::Apis::SheetsV4::AutoResizeDimensionsRequest::Representation + + property :append_cells, as: 'appendCells', class: Google::Apis::SheetsV4::AppendCellsRequest, decorator: Google::Apis::SheetsV4::AppendCellsRequest::Representation + + property :cut_paste, as: 'cutPaste', class: Google::Apis::SheetsV4::CutPasteRequest, decorator: Google::Apis::SheetsV4::CutPasteRequest::Representation + + property :merge_cells, as: 'mergeCells', class: Google::Apis::SheetsV4::MergeCellsRequest, decorator: Google::Apis::SheetsV4::MergeCellsRequest::Representation + + property :update_named_range, as: 'updateNamedRange', class: Google::Apis::SheetsV4::UpdateNamedRangeRequest, decorator: Google::Apis::SheetsV4::UpdateNamedRangeRequest::Representation + + property :update_sheet_properties, as: 'updateSheetProperties', class: Google::Apis::SheetsV4::UpdateSheetPropertiesRequest, decorator: Google::Apis::SheetsV4::UpdateSheetPropertiesRequest::Representation + + property :delete_dimension, as: 'deleteDimension', class: Google::Apis::SheetsV4::DeleteDimensionRequest, decorator: Google::Apis::SheetsV4::DeleteDimensionRequest::Representation + + property :auto_fill, as: 'autoFill', class: Google::Apis::SheetsV4::AutoFillRequest, decorator: Google::Apis::SheetsV4::AutoFillRequest::Representation + + property :sort_range, as: 'sortRange', class: Google::Apis::SheetsV4::SortRangeRequest, decorator: Google::Apis::SheetsV4::SortRangeRequest::Representation + + property :delete_protected_range, as: 'deleteProtectedRange', class: Google::Apis::SheetsV4::DeleteProtectedRangeRequest, decorator: Google::Apis::SheetsV4::DeleteProtectedRangeRequest::Representation + + property :duplicate_filter_view, as: 'duplicateFilterView', class: Google::Apis::SheetsV4::DuplicateFilterViewRequest, decorator: Google::Apis::SheetsV4::DuplicateFilterViewRequest::Representation + + property :add_chart, as: 'addChart', class: Google::Apis::SheetsV4::AddChartRequest, decorator: Google::Apis::SheetsV4::AddChartRequest::Representation + + property :find_replace, as: 'findReplace', class: Google::Apis::SheetsV4::FindReplaceRequest, decorator: Google::Apis::SheetsV4::FindReplaceRequest::Representation + + property :text_to_columns, as: 'textToColumns', class: Google::Apis::SheetsV4::TextToColumnsRequest, decorator: Google::Apis::SheetsV4::TextToColumnsRequest::Representation + + property :update_chart_spec, as: 'updateChartSpec', class: Google::Apis::SheetsV4::UpdateChartSpecRequest, decorator: Google::Apis::SheetsV4::UpdateChartSpecRequest::Representation + + property :update_protected_range, as: 'updateProtectedRange', class: Google::Apis::SheetsV4::UpdateProtectedRangeRequest, decorator: Google::Apis::SheetsV4::UpdateProtectedRangeRequest::Representation + + property :add_sheet, as: 'addSheet', class: Google::Apis::SheetsV4::AddSheetRequest, decorator: Google::Apis::SheetsV4::AddSheetRequest::Representation + + property :copy_paste, as: 'copyPaste', class: Google::Apis::SheetsV4::CopyPasteRequest, decorator: Google::Apis::SheetsV4::CopyPasteRequest::Representation + + property :delete_filter_view, as: 'deleteFilterView', class: Google::Apis::SheetsV4::DeleteFilterViewRequest, decorator: Google::Apis::SheetsV4::DeleteFilterViewRequest::Representation + + property :insert_dimension, as: 'insertDimension', class: Google::Apis::SheetsV4::InsertDimensionRequest, decorator: Google::Apis::SheetsV4::InsertDimensionRequest::Representation + property :delete_range, as: 'deleteRange', class: Google::Apis::SheetsV4::DeleteRangeRequest, decorator: Google::Apis::SheetsV4::DeleteRangeRequest::Representation property :delete_banding, as: 'deleteBanding', class: Google::Apis::SheetsV4::DeleteBandingRequest, decorator: Google::Apis::SheetsV4::DeleteBandingRequest::Representation property :add_filter_view, as: 'addFilterView', class: Google::Apis::SheetsV4::AddFilterViewRequest, decorator: Google::Apis::SheetsV4::AddFilterViewRequest::Representation - property :update_borders, as: 'updateBorders', class: Google::Apis::SheetsV4::UpdateBordersRequest, decorator: Google::Apis::SheetsV4::UpdateBordersRequest::Representation - property :set_data_validation, as: 'setDataValidation', class: Google::Apis::SheetsV4::SetDataValidationRequest, decorator: Google::Apis::SheetsV4::SetDataValidationRequest::Representation + property :update_borders, as: 'updateBorders', class: Google::Apis::SheetsV4::UpdateBordersRequest, decorator: Google::Apis::SheetsV4::UpdateBordersRequest::Representation + property :delete_conditional_format_rule, as: 'deleteConditionalFormatRule', class: Google::Apis::SheetsV4::DeleteConditionalFormatRuleRequest, decorator: Google::Apis::SheetsV4::DeleteConditionalFormatRuleRequest::Representation - property :clear_basic_filter, as: 'clearBasicFilter', class: Google::Apis::SheetsV4::ClearBasicFilterRequest, decorator: Google::Apis::SheetsV4::ClearBasicFilterRequest::Representation - property :repeat_cell, as: 'repeatCell', class: Google::Apis::SheetsV4::RepeatCellRequest, decorator: Google::Apis::SheetsV4::RepeatCellRequest::Representation + property :clear_basic_filter, as: 'clearBasicFilter', class: Google::Apis::SheetsV4::ClearBasicFilterRequest, decorator: Google::Apis::SheetsV4::ClearBasicFilterRequest::Representation + property :append_dimension, as: 'appendDimension', class: Google::Apis::SheetsV4::AppendDimensionRequest, decorator: Google::Apis::SheetsV4::AppendDimensionRequest::Representation property :update_conditional_format_rule, as: 'updateConditionalFormatRule', class: Google::Apis::SheetsV4::UpdateConditionalFormatRuleRequest, decorator: Google::Apis::SheetsV4::UpdateConditionalFormatRuleRequest::Representation @@ -1993,51 +1485,14 @@ module Google property :update_spreadsheet_properties, as: 'updateSpreadsheetProperties', class: Google::Apis::SheetsV4::UpdateSpreadsheetPropertiesRequest, decorator: Google::Apis::SheetsV4::UpdateSpreadsheetPropertiesRequest::Representation - property :delete_embedded_object, as: 'deleteEmbeddedObject', class: Google::Apis::SheetsV4::DeleteEmbeddedObjectRequest, decorator: Google::Apis::SheetsV4::DeleteEmbeddedObjectRequest::Representation + end + end - property :update_filter_view, as: 'updateFilterView', class: Google::Apis::SheetsV4::UpdateFilterViewRequest, decorator: Google::Apis::SheetsV4::UpdateFilterViewRequest::Representation - - property :add_banding, as: 'addBanding', class: Google::Apis::SheetsV4::AddBandingRequest, decorator: Google::Apis::SheetsV4::AddBandingRequest::Representation - - property :append_cells, as: 'appendCells', class: Google::Apis::SheetsV4::AppendCellsRequest, decorator: Google::Apis::SheetsV4::AppendCellsRequest::Representation - - property :auto_resize_dimensions, as: 'autoResizeDimensions', class: Google::Apis::SheetsV4::AutoResizeDimensionsRequest, decorator: Google::Apis::SheetsV4::AutoResizeDimensionsRequest::Representation - - property :cut_paste, as: 'cutPaste', class: Google::Apis::SheetsV4::CutPasteRequest, decorator: Google::Apis::SheetsV4::CutPasteRequest::Representation - - property :merge_cells, as: 'mergeCells', class: Google::Apis::SheetsV4::MergeCellsRequest, decorator: Google::Apis::SheetsV4::MergeCellsRequest::Representation - - property :update_named_range, as: 'updateNamedRange', class: Google::Apis::SheetsV4::UpdateNamedRangeRequest, decorator: Google::Apis::SheetsV4::UpdateNamedRangeRequest::Representation - - property :update_sheet_properties, as: 'updateSheetProperties', class: Google::Apis::SheetsV4::UpdateSheetPropertiesRequest, decorator: Google::Apis::SheetsV4::UpdateSheetPropertiesRequest::Representation - - property :auto_fill, as: 'autoFill', class: Google::Apis::SheetsV4::AutoFillRequest, decorator: Google::Apis::SheetsV4::AutoFillRequest::Representation - - property :delete_dimension, as: 'deleteDimension', class: Google::Apis::SheetsV4::DeleteDimensionRequest, decorator: Google::Apis::SheetsV4::DeleteDimensionRequest::Representation - - property :sort_range, as: 'sortRange', class: Google::Apis::SheetsV4::SortRangeRequest, decorator: Google::Apis::SheetsV4::SortRangeRequest::Representation - - property :delete_protected_range, as: 'deleteProtectedRange', class: Google::Apis::SheetsV4::DeleteProtectedRangeRequest, decorator: Google::Apis::SheetsV4::DeleteProtectedRangeRequest::Representation - - property :duplicate_filter_view, as: 'duplicateFilterView', class: Google::Apis::SheetsV4::DuplicateFilterViewRequest, decorator: Google::Apis::SheetsV4::DuplicateFilterViewRequest::Representation - - property :add_chart, as: 'addChart', class: Google::Apis::SheetsV4::AddChartRequest, decorator: Google::Apis::SheetsV4::AddChartRequest::Representation - - property :find_replace, as: 'findReplace', class: Google::Apis::SheetsV4::FindReplaceRequest, decorator: Google::Apis::SheetsV4::FindReplaceRequest::Representation - - property :update_chart_spec, as: 'updateChartSpec', class: Google::Apis::SheetsV4::UpdateChartSpecRequest, decorator: Google::Apis::SheetsV4::UpdateChartSpecRequest::Representation - - property :text_to_columns, as: 'textToColumns', class: Google::Apis::SheetsV4::TextToColumnsRequest, decorator: Google::Apis::SheetsV4::TextToColumnsRequest::Representation - - property :update_protected_range, as: 'updateProtectedRange', class: Google::Apis::SheetsV4::UpdateProtectedRangeRequest, decorator: Google::Apis::SheetsV4::UpdateProtectedRangeRequest::Representation - - property :add_sheet, as: 'addSheet', class: Google::Apis::SheetsV4::AddSheetRequest, decorator: Google::Apis::SheetsV4::AddSheetRequest::Representation - - property :copy_paste, as: 'copyPaste', class: Google::Apis::SheetsV4::CopyPasteRequest, decorator: Google::Apis::SheetsV4::CopyPasteRequest::Representation - - property :delete_filter_view, as: 'deleteFilterView', class: Google::Apis::SheetsV4::DeleteFilterViewRequest, decorator: Google::Apis::SheetsV4::DeleteFilterViewRequest::Representation - - property :insert_dimension, as: 'insertDimension', class: Google::Apis::SheetsV4::InsertDimensionRequest, decorator: Google::Apis::SheetsV4::InsertDimensionRequest::Representation + class BooleanCondition + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' + collection :values, as: 'values', class: Google::Apis::SheetsV4::ConditionValue, decorator: Google::Apis::SheetsV4::ConditionValue::Representation end end @@ -2056,15 +1511,15 @@ module Google class BasicChartSpec # @private class Representation < Google::Apis::Core::JsonRepresentation + property :chart_type, as: 'chartType' + collection :series, as: 'series', class: Google::Apis::SheetsV4::BasicChartSeries, decorator: Google::Apis::SheetsV4::BasicChartSeries::Representation + + property :legend_position, as: 'legendPosition' collection :domains, as: 'domains', class: Google::Apis::SheetsV4::BasicChartDomain, decorator: Google::Apis::SheetsV4::BasicChartDomain::Representation property :header_count, as: 'headerCount' collection :axis, as: 'axis', class: Google::Apis::SheetsV4::BasicChartAxis, decorator: Google::Apis::SheetsV4::BasicChartAxis::Representation - property :chart_type, as: 'chartType' - collection :series, as: 'series', class: Google::Apis::SheetsV4::BasicChartSeries, decorator: Google::Apis::SheetsV4::BasicChartSeries::Representation - - property :legend_position, as: 'legendPosition' end end @@ -2081,54 +1536,54 @@ module Google class CellData # @private class Representation < Google::Apis::Core::JsonRepresentation - property :hyperlink, as: 'hyperlink' property :pivot_table, as: 'pivotTable', class: Google::Apis::SheetsV4::PivotTable, decorator: Google::Apis::SheetsV4::PivotTable::Representation property :user_entered_format, as: 'userEnteredFormat', class: Google::Apis::SheetsV4::CellFormat, decorator: Google::Apis::SheetsV4::CellFormat::Representation + property :note, as: 'note' property :effective_format, as: 'effectiveFormat', class: Google::Apis::SheetsV4::CellFormat, decorator: Google::Apis::SheetsV4::CellFormat::Representation - property :note, as: 'note' property :user_entered_value, as: 'userEnteredValue', class: Google::Apis::SheetsV4::ExtendedValue, decorator: Google::Apis::SheetsV4::ExtendedValue::Representation property :data_validation, as: 'dataValidation', class: Google::Apis::SheetsV4::DataValidationRule, decorator: Google::Apis::SheetsV4::DataValidationRule::Representation property :effective_value, as: 'effectiveValue', class: Google::Apis::SheetsV4::ExtendedValue, decorator: Google::Apis::SheetsV4::ExtendedValue::Representation + property :formatted_value, as: 'formattedValue' collection :text_format_runs, as: 'textFormatRuns', class: Google::Apis::SheetsV4::TextFormatRun, decorator: Google::Apis::SheetsV4::TextFormatRun::Representation - property :formatted_value, as: 'formattedValue' + property :hyperlink, as: 'hyperlink' end end class BatchUpdateSpreadsheetRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + collection :requests, as: 'requests', class: Google::Apis::SheetsV4::Request, decorator: Google::Apis::SheetsV4::Request::Representation + property :include_spreadsheet_in_response, as: 'includeSpreadsheetInResponse' collection :response_ranges, as: 'responseRanges' property :response_include_grid_data, as: 'responseIncludeGridData' - collection :requests, as: 'requests', class: Google::Apis::SheetsV4::Request, decorator: Google::Apis::SheetsV4::Request::Representation - end end class BasicChartAxis # @private class Representation < Google::Apis::Core::JsonRepresentation - property :position, as: 'position' - property :title, as: 'title' property :format, as: 'format', class: Google::Apis::SheetsV4::TextFormat, decorator: Google::Apis::SheetsV4::TextFormat::Representation + property :position, as: 'position' + property :title, as: 'title' end end class Padding # @private class Representation < Google::Apis::Core::JsonRepresentation + property :right, as: 'right' property :bottom, as: 'bottom' property :top, as: 'top' property :left, as: 'left' - property :right, as: 'right' end end @@ -2159,32 +1614,32 @@ module Google class BatchUpdateValuesResponse # @private class Representation < Google::Apis::Core::JsonRepresentation + property :total_updated_rows, as: 'totalUpdatedRows' + collection :responses, as: 'responses', class: Google::Apis::SheetsV4::UpdateValuesResponse, decorator: Google::Apis::SheetsV4::UpdateValuesResponse::Representation + property :total_updated_sheets, as: 'totalUpdatedSheets' property :total_updated_cells, as: 'totalUpdatedCells' property :total_updated_columns, as: 'totalUpdatedColumns' property :spreadsheet_id, as: 'spreadsheetId' - property :total_updated_rows, as: 'totalUpdatedRows' - collection :responses, as: 'responses', class: Google::Apis::SheetsV4::UpdateValuesResponse, decorator: Google::Apis::SheetsV4::UpdateValuesResponse::Representation - end end class SortRangeRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :sort_specs, as: 'sortSpecs', class: Google::Apis::SheetsV4::SortSpec, decorator: Google::Apis::SheetsV4::SortSpec::Representation - property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + collection :sort_specs, as: 'sortSpecs', class: Google::Apis::SheetsV4::SortSpec, decorator: Google::Apis::SheetsV4::SortSpec::Representation + end end class MergeCellsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :merge_type, as: 'mergeType' property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + property :merge_type, as: 'mergeType' end end @@ -2219,6 +1674,13 @@ module Google end end + class ClearBasicFilterRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :sheet_id, as: 'sheetId' + end + end + class TextToColumnsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -2229,10 +1691,10 @@ module Google end end - class ClearBasicFilterRequest + class DeleteBandingRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :sheet_id, as: 'sheetId' + property :banded_range_id, as: 'bandedRangeId' end end @@ -2247,13 +1709,6 @@ module Google end end - class DeleteBandingRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :banded_range_id, as: 'bandedRangeId' - end - end - class AppendValuesResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -2316,6 +1771,551 @@ module Google property :pattern, as: 'pattern' end end + + class SheetProperties + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :title, as: 'title' + property :index, as: 'index' + property :tab_color, as: 'tabColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + + property :sheet_id, as: 'sheetId' + property :right_to_left, as: 'rightToLeft' + property :hidden, as: 'hidden' + property :sheet_type, as: 'sheetType' + property :grid_properties, as: 'gridProperties', class: Google::Apis::SheetsV4::GridProperties, decorator: Google::Apis::SheetsV4::GridProperties::Representation + + end + end + + class UpdateDimensionPropertiesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :range, as: 'range', class: Google::Apis::SheetsV4::DimensionRange, decorator: Google::Apis::SheetsV4::DimensionRange::Representation + + property :fields, as: 'fields' + property :properties, as: 'properties', class: Google::Apis::SheetsV4::DimensionProperties, decorator: Google::Apis::SheetsV4::DimensionProperties::Representation + + end + end + + class SourceAndDestination + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :fill_length, as: 'fillLength' + property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :dimension, as: 'dimension' + end + end + + class FilterView + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :named_range_id, as: 'namedRangeId' + property :filter_view_id, as: 'filterViewId' + hash :criteria, as: 'criteria', class: Google::Apis::SheetsV4::FilterCriteria, decorator: Google::Apis::SheetsV4::FilterCriteria::Representation + + property :title, as: 'title' + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + collection :sort_specs, as: 'sortSpecs', class: Google::Apis::SheetsV4::SortSpec, decorator: Google::Apis::SheetsV4::SortSpec::Representation + + end + end + + class BandingProperties + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :first_band_color, as: 'firstBandColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + + property :second_band_color, as: 'secondBandColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + + property :footer_color, as: 'footerColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + + property :header_color, as: 'headerColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + + end + end + + class AddProtectedRangeResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :protected_range, as: 'protectedRange', class: Google::Apis::SheetsV4::ProtectedRange, decorator: Google::Apis::SheetsV4::ProtectedRange::Representation + + end + end + + class BasicFilter + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + hash :criteria, as: 'criteria', class: Google::Apis::SheetsV4::FilterCriteria, decorator: Google::Apis::SheetsV4::FilterCriteria::Representation + + collection :sort_specs, as: 'sortSpecs', class: Google::Apis::SheetsV4::SortSpec, decorator: Google::Apis::SheetsV4::SortSpec::Representation + + end + end + + class UpdateValuesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :updated_rows, as: 'updatedRows' + property :updated_data, as: 'updatedData', class: Google::Apis::SheetsV4::ValueRange, decorator: Google::Apis::SheetsV4::ValueRange::Representation + + property :updated_columns, as: 'updatedColumns' + property :spreadsheet_id, as: 'spreadsheetId' + property :updated_range, as: 'updatedRange' + property :updated_cells, as: 'updatedCells' + end + end + + class PivotValue + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :summarize_function, as: 'summarizeFunction' + property :source_column_offset, as: 'sourceColumnOffset' + property :name, as: 'name' + property :formula, as: 'formula' + end + end + + class ErrorValue + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' + property :message, as: 'message' + end + end + + class CopySheetToAnotherSpreadsheetRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :destination_spreadsheet_id, as: 'destinationSpreadsheetId' + end + end + + class PivotGroupSortValueBucket + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :buckets, as: 'buckets', class: Google::Apis::SheetsV4::ExtendedValue, decorator: Google::Apis::SheetsV4::ExtendedValue::Representation + + property :values_index, as: 'valuesIndex' + end + end + + class EmbeddedObjectPosition + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :new_sheet, as: 'newSheet' + property :sheet_id, as: 'sheetId' + property :overlay_position, as: 'overlayPosition', class: Google::Apis::SheetsV4::OverlayPosition, decorator: Google::Apis::SheetsV4::OverlayPosition::Representation + + end + end + + class DeleteProtectedRangeRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :protected_range_id, as: 'protectedRangeId' + end + end + + class AutoFillRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :use_alternate_series, as: 'useAlternateSeries' + property :source_and_destination, as: 'sourceAndDestination', class: Google::Apis::SheetsV4::SourceAndDestination, decorator: Google::Apis::SheetsV4::SourceAndDestination::Representation + + end + end + + class GradientRule + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :midpoint, as: 'midpoint', class: Google::Apis::SheetsV4::InterpolationPoint, decorator: Google::Apis::SheetsV4::InterpolationPoint::Representation + + property :minpoint, as: 'minpoint', class: Google::Apis::SheetsV4::InterpolationPoint, decorator: Google::Apis::SheetsV4::InterpolationPoint::Representation + + property :maxpoint, as: 'maxpoint', class: Google::Apis::SheetsV4::InterpolationPoint, decorator: Google::Apis::SheetsV4::InterpolationPoint::Representation + + end + end + + class ClearValuesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class SetBasicFilterRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :filter, as: 'filter', class: Google::Apis::SheetsV4::BasicFilter, decorator: Google::Apis::SheetsV4::BasicFilter::Representation + + end + end + + class InterpolationPoint + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' + property :value, as: 'value' + property :color, as: 'color', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + + end + end + + class DeleteEmbeddedObjectRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :object_id_prop, as: 'objectId' + end + end + + class FindReplaceResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :occurrences_changed, as: 'occurrencesChanged' + property :rows_changed, as: 'rowsChanged' + property :sheets_changed, as: 'sheetsChanged' + property :formulas_changed, as: 'formulasChanged' + property :values_changed, as: 'valuesChanged' + end + end + + class DuplicateFilterViewRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :filter_id, as: 'filterId' + end + end + + class DeleteSheetRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :sheet_id, as: 'sheetId' + end + end + + class UpdateConditionalFormatRuleResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :new_index, as: 'newIndex' + property :old_index, as: 'oldIndex' + property :new_rule, as: 'newRule', class: Google::Apis::SheetsV4::ConditionalFormatRule, decorator: Google::Apis::SheetsV4::ConditionalFormatRule::Representation + + property :old_rule, as: 'oldRule', class: Google::Apis::SheetsV4::ConditionalFormatRule, decorator: Google::Apis::SheetsV4::ConditionalFormatRule::Representation + + end + end + + class DuplicateSheetRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :insert_sheet_index, as: 'insertSheetIndex' + property :new_sheet_name, as: 'newSheetName' + property :source_sheet_id, as: 'sourceSheetId' + property :new_sheet_id, as: 'newSheetId' + end + end + + class ConditionValue + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :relative_date, as: 'relativeDate' + property :user_entered_value, as: 'userEnteredValue' + end + end + + class ExtendedValue + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :number_value, as: 'numberValue' + property :error_value, as: 'errorValue', class: Google::Apis::SheetsV4::ErrorValue, decorator: Google::Apis::SheetsV4::ErrorValue::Representation + + property :string_value, as: 'stringValue' + property :bool_value, as: 'boolValue' + property :formula_value, as: 'formulaValue' + end + end + + class AddChartRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :chart, as: 'chart', class: Google::Apis::SheetsV4::EmbeddedChart, decorator: Google::Apis::SheetsV4::EmbeddedChart::Representation + + end + end + + class Spreadsheet + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :properties, as: 'properties', class: Google::Apis::SheetsV4::SpreadsheetProperties, decorator: Google::Apis::SheetsV4::SpreadsheetProperties::Representation + + property :spreadsheet_id, as: 'spreadsheetId' + collection :sheets, as: 'sheets', class: Google::Apis::SheetsV4::Sheet, decorator: Google::Apis::SheetsV4::Sheet::Representation + + collection :named_ranges, as: 'namedRanges', class: Google::Apis::SheetsV4::NamedRange, decorator: Google::Apis::SheetsV4::NamedRange::Representation + + property :spreadsheet_url, as: 'spreadsheetUrl' + end + end + + class BatchClearValuesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :cleared_ranges, as: 'clearedRanges' + property :spreadsheet_id, as: 'spreadsheetId' + end + end + + class BandedRange + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :row_properties, as: 'rowProperties', class: Google::Apis::SheetsV4::BandingProperties, decorator: Google::Apis::SheetsV4::BandingProperties::Representation + + property :column_properties, as: 'columnProperties', class: Google::Apis::SheetsV4::BandingProperties, decorator: Google::Apis::SheetsV4::BandingProperties::Representation + + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :banded_range_id, as: 'bandedRangeId' + end + end + + class UpdateProtectedRangeRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :protected_range, as: 'protectedRange', class: Google::Apis::SheetsV4::ProtectedRange, decorator: Google::Apis::SheetsV4::ProtectedRange::Representation + + property :fields, as: 'fields' + end + end + + class TextFormat + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :underline, as: 'underline' + property :bold, as: 'bold' + property :foreground_color, as: 'foregroundColor', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation + + property :font_family, as: 'fontFamily' + property :strikethrough, as: 'strikethrough' + property :italic, as: 'italic' + property :font_size, as: 'fontSize' + end + end + + class AddSheetResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :properties, as: 'properties', class: Google::Apis::SheetsV4::SheetProperties, decorator: Google::Apis::SheetsV4::SheetProperties::Representation + + end + end + + class AddFilterViewResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :filter, as: 'filter', class: Google::Apis::SheetsV4::FilterView, decorator: Google::Apis::SheetsV4::FilterView::Representation + + end + end + + class IterativeCalculationSettings + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :convergence_threshold, as: 'convergenceThreshold' + property :max_iterations, as: 'maxIterations' + end + end + + class OverlayPosition + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :width_pixels, as: 'widthPixels' + property :offset_x_pixels, as: 'offsetXPixels' + property :anchor_cell, as: 'anchorCell', class: Google::Apis::SheetsV4::GridCoordinate, decorator: Google::Apis::SheetsV4::GridCoordinate::Representation + + property :offset_y_pixels, as: 'offsetYPixels' + property :height_pixels, as: 'heightPixels' + end + end + + class SpreadsheetProperties + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :default_format, as: 'defaultFormat', class: Google::Apis::SheetsV4::CellFormat, decorator: Google::Apis::SheetsV4::CellFormat::Representation + + property :auto_recalc, as: 'autoRecalc' + property :title, as: 'title' + property :time_zone, as: 'timeZone' + property :locale, as: 'locale' + property :iterative_calculation_settings, as: 'iterativeCalculationSettings', class: Google::Apis::SheetsV4::IterativeCalculationSettings, decorator: Google::Apis::SheetsV4::IterativeCalculationSettings::Representation + + end + end + + class RepeatCellRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :cell, as: 'cell', class: Google::Apis::SheetsV4::CellData, decorator: Google::Apis::SheetsV4::CellData::Representation + + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :fields, as: 'fields' + end + end + + class AddChartResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :chart, as: 'chart', class: Google::Apis::SheetsV4::EmbeddedChart, decorator: Google::Apis::SheetsV4::EmbeddedChart::Representation + + end + end + + class InsertDimensionRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :range, as: 'range', class: Google::Apis::SheetsV4::DimensionRange, decorator: Google::Apis::SheetsV4::DimensionRange::Representation + + property :inherit_from_before, as: 'inheritFromBefore' + end + end + + class UpdateSpreadsheetPropertiesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :fields, as: 'fields' + property :properties, as: 'properties', class: Google::Apis::SheetsV4::SpreadsheetProperties, decorator: Google::Apis::SheetsV4::SpreadsheetProperties::Representation + + end + end + + class ProtectedRange + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :requesting_user_can_edit, as: 'requestingUserCanEdit' + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :editors, as: 'editors', class: Google::Apis::SheetsV4::Editors, decorator: Google::Apis::SheetsV4::Editors::Representation + + property :description, as: 'description' + collection :unprotected_ranges, as: 'unprotectedRanges', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :named_range_id, as: 'namedRangeId' + property :protected_range_id, as: 'protectedRangeId' + property :warning_only, as: 'warningOnly' + end + end + + class BatchUpdateValuesRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :response_value_render_option, as: 'responseValueRenderOption' + property :include_values_in_response, as: 'includeValuesInResponse' + property :value_input_option, as: 'valueInputOption' + collection :data, as: 'data', class: Google::Apis::SheetsV4::ValueRange, decorator: Google::Apis::SheetsV4::ValueRange::Representation + + property :response_date_time_render_option, as: 'responseDateTimeRenderOption' + end + end + + class DimensionProperties + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :pixel_size, as: 'pixelSize' + property :hidden_by_filter, as: 'hiddenByFilter' + property :hidden_by_user, as: 'hiddenByUser' + end + end + + class NamedRange + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :named_range_id, as: 'namedRangeId' + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :name, as: 'name' + end + end + + class DimensionRange + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :start_index, as: 'startIndex' + property :end_index, as: 'endIndex' + property :sheet_id, as: 'sheetId' + property :dimension, as: 'dimension' + end + end + + class CutPasteRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :destination, as: 'destination', class: Google::Apis::SheetsV4::GridCoordinate, decorator: Google::Apis::SheetsV4::GridCoordinate::Representation + + property :source, as: 'source', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :paste_type, as: 'pasteType' + end + end + + class Borders + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :top, as: 'top', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + property :left, as: 'left', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + property :right, as: 'right', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + property :bottom, as: 'bottom', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + end + end + + class BasicChartSeries + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :series, as: 'series', class: Google::Apis::SheetsV4::ChartData, decorator: Google::Apis::SheetsV4::ChartData::Representation + + property :type, as: 'type' + property :target_axis, as: 'targetAxis' + end + end + + class AutoResizeDimensionsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :dimensions, as: 'dimensions', class: Google::Apis::SheetsV4::DimensionRange, decorator: Google::Apis::SheetsV4::DimensionRange::Representation + + end + end + + class UpdateBordersRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :top, as: 'top', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + property :left, as: 'left', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + property :bottom, as: 'bottom', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + property :inner_vertical, as: 'innerVertical', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + property :right, as: 'right', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + property :range, as: 'range', class: Google::Apis::SheetsV4::GridRange, decorator: Google::Apis::SheetsV4::GridRange::Representation + + property :inner_horizontal, as: 'innerHorizontal', class: Google::Apis::SheetsV4::Border, decorator: Google::Apis::SheetsV4::Border::Representation + + end + end end end end diff --git a/generated/google/apis/sheets_v4/service.rb b/generated/google/apis/sheets_v4/service.rb index 32a188f4c..5fe6484d7 100644 --- a/generated/google/apis/sheets_v4/service.rb +++ b/generated/google/apis/sheets_v4/service.rb @@ -32,16 +32,16 @@ module Google # # @see https://developers.google.com/sheets/ class SheetsService < 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://sheets.googleapis.com/', '') end @@ -69,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 # @@ -86,25 +86,25 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_spreadsheet(spreadsheet_id, ranges: nil, include_grid_data: nil, quota_user: nil, fields: nil, options: nil, &block) + def get_spreadsheet(spreadsheet_id, ranges: nil, include_grid_data: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v4/spreadsheets/{spreadsheetId}', options) command.response_representation = Google::Apis::SheetsV4::Spreadsheet::Representation command.response_class = Google::Apis::SheetsV4::Spreadsheet command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? command.query['ranges'] = ranges unless ranges.nil? command.query['includeGridData'] = include_grid_data unless include_grid_data.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end # Creates a spreadsheet, returning the newly created spreadsheet. # @param [Google::Apis::SheetsV4::Spreadsheet] spreadsheet_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -117,14 +117,14 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_spreadsheet(spreadsheet_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def create_spreadsheet(spreadsheet_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v4/spreadsheets', options) command.request_representation = Google::Apis::SheetsV4::Spreadsheet::Representation command.request_object = spreadsheet_object command.response_representation = Google::Apis::SheetsV4::Spreadsheet::Representation command.response_class = Google::Apis::SheetsV4::Spreadsheet - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -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,15 +164,15 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_update_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 @@ -182,13 +182,6 @@ module Google # The ID of the spreadsheet to retrieve data from. # @param [String] range # The A1 notation of the values to retrieve. - # @param [String] major_dimension - # The major dimension that results should use. - # For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, - # then requesting `range=A1:B2,majorDimension=ROWS` will return - # `[[1,2],[3,4]]`, - # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return - # `[[1,3],[2,4]]`. # @param [String] value_render_option # How values should be represented in the output. # The default render option is ValueRenderOption.FORMATTED_VALUE. @@ -197,11 +190,18 @@ module Google # This is ignored if value_render_option is # FORMATTED_VALUE. # The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER]. + # @param [String] major_dimension + # The major dimension that results should use. + # For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, + # then requesting `range=A1:B2,majorDimension=ROWS` will return + # `[[1,2],[3,4]]`, + # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return + # `[[1,3],[2,4]]`. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -214,17 +214,17 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_spreadsheet_values(spreadsheet_id, range, major_dimension: nil, value_render_option: nil, date_time_render_option: nil, quota_user: nil, fields: nil, options: nil, &block) + 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['majorDimension'] = major_dimension unless major_dimension.nil? command.query['valueRenderOption'] = value_render_option unless value_render_option.nil? command.query['dateTimeRenderOption'] = date_time_render_option unless date_time_render_option.nil? - command.query['quotaUser'] = quota_user unless quota_user.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 @@ -253,11 +253,11 @@ module Google # If the range to write was larger than than the range actually written, # the response will include all values in the requested range (excluding # trailing empty rows and columns). + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -270,7 +270,7 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_spreadsheet_value(spreadsheet_id, range, value_range_object = nil, 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) + def update_spreadsheet_value(spreadsheet_id, range, value_range_object = nil, response_value_render_option: nil, value_input_option: nil, response_date_time_render_option: nil, include_values_in_response: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:put, 'v4/spreadsheets/{spreadsheetId}/values/{range}', options) command.request_representation = Google::Apis::SheetsV4::ValueRange::Representation command.request_object = value_range_object @@ -282,8 +282,8 @@ module Google command.query['valueInputOption'] = value_input_option unless value_input_option.nil? command.query['responseDateTimeRenderOption'] = response_date_time_render_option unless response_date_time_render_option.nil? command.query['includeValuesInResponse'] = include_values_in_response unless include_values_in_response.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -294,11 +294,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 # @@ -311,54 +311,15 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_update_values(spreadsheet_id, batch_update_values_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def batch_update_values(spreadsheet_id, batch_update_values_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values:batchUpdate', options) command.request_representation = Google::Apis::SheetsV4::BatchUpdateValuesRequest::Representation command.request_object = batch_update_values_request_object command.response_representation = Google::Apis::SheetsV4::BatchUpdateValuesResponse::Representation command.response_class = Google::Apis::SheetsV4::BatchUpdateValuesResponse command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Clears values from a spreadsheet. - # The caller must specify the spreadsheet ID and range. - # Only values are cleared -- all other properties of the cell (such as - # formatting, data validation, etc..) are kept. - # @param [String] spreadsheet_id - # The ID of the spreadsheet to update. - # @param [String] range - # The A1 notation of the values to clear. - # @param [Google::Apis::SheetsV4::ClearValuesRequest] clear_values_request_object - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::SheetsV4::ClearValuesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::SheetsV4::ClearValuesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def clear_values(spreadsheet_id, range, clear_values_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) - command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values/{range}:clear', options) - command.request_representation = Google::Apis::SheetsV4::ClearValuesRequest::Representation - command.request_object = clear_values_request_object - command.response_representation = Google::Apis::SheetsV4::ClearValuesResponse::Representation - command.response_class = Google::Apis::SheetsV4::ClearValuesResponse - command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? - command.params['range'] = range unless range.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -366,14 +327,6 @@ module Google # The caller must specify the spreadsheet ID and one or more ranges. # @param [String] spreadsheet_id # The ID of the spreadsheet to retrieve data from. - # @param [String] value_render_option - # How values should be represented in the output. - # The default render option is ValueRenderOption.FORMATTED_VALUE. - # @param [String] date_time_render_option - # How dates, times, and durations should be represented in the output. - # This is ignored if value_render_option is - # FORMATTED_VALUE. - # The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER]. # @param [Array, String] ranges # The A1 notation of the values to retrieve. # @param [String] major_dimension @@ -383,11 +336,19 @@ module Google # `[[1,2],[3,4]]`, # whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return # `[[1,3],[2,4]]`. + # @param [String] value_render_option + # How values should be represented in the output. + # The default render option is ValueRenderOption.FORMATTED_VALUE. + # @param [String] date_time_render_option + # How dates, times, and durations should be represented in the output. + # This is ignored if value_render_option is + # FORMATTED_VALUE. + # The default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER]. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -400,17 +361,56 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_get_spreadsheet_values(spreadsheet_id, value_render_option: nil, date_time_render_option: nil, ranges: nil, major_dimension: nil, quota_user: nil, fields: nil, options: nil, &block) + def batch_get_spreadsheet_values(spreadsheet_id, ranges: nil, major_dimension: nil, value_render_option: nil, date_time_render_option: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v4/spreadsheets/{spreadsheetId}/values:batchGet', options) command.response_representation = Google::Apis::SheetsV4::BatchGetValuesResponse::Representation command.response_class = Google::Apis::SheetsV4::BatchGetValuesResponse command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? - command.query['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['valueRenderOption'] = value_render_option unless value_render_option.nil? + command.query['dateTimeRenderOption'] = date_time_render_option unless date_time_render_option.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # 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 @@ -433,6 +433,10 @@ module Google # The A1 notation of a range to search for a logical table of data. # Values will be appended after the last row of the table. # @param [Google::Apis::SheetsV4::ValueRange] value_range_object + # @param [Boolean] include_values_in_response + # 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] response_value_render_option # Determines how values in the response should be rendered. # The default render option is ValueRenderOption.FORMATTED_VALUE. @@ -445,15 +449,11 @@ module Google # 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 appended. By default, responses - # do not include the updated values. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -466,7 +466,7 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def append_spreadsheet_value(spreadsheet_id, range, value_range_object = nil, response_value_render_option: nil, insert_data_option: nil, value_input_option: nil, response_date_time_render_option: nil, include_values_in_response: nil, quota_user: nil, fields: nil, options: nil, &block) + def append_spreadsheet_value(spreadsheet_id, range, value_range_object = nil, include_values_in_response: nil, response_value_render_option: nil, insert_data_option: nil, value_input_option: nil, response_date_time_render_option: 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 @@ -474,13 +474,13 @@ module Google command.response_class = Google::Apis::SheetsV4::AppendValuesResponse command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? command.params['range'] = range unless range.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['insertDataOption'] = insert_data_option unless insert_data_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 +491,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 +508,15 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_clear_values(spreadsheet_id, batch_clear_values_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def batch_clear_values(spreadsheet_id, batch_clear_values_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v4/spreadsheets/{spreadsheetId}/values:batchClear', options) command.request_representation = Google::Apis::SheetsV4::BatchClearValuesRequest::Representation command.request_object = batch_clear_values_request_object command.response_representation = Google::Apis::SheetsV4::BatchClearValuesResponse::Representation command.response_class = Google::Apis::SheetsV4::BatchClearValuesResponse command.params['spreadsheetId'] = spreadsheet_id unless spreadsheet_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -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,16 +552,16 @@ 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 protected def apply_command_defaults(command) - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? end end end diff --git a/generated/google/apis/slides_v1.rb b/generated/google/apis/slides_v1.rb index 834d08386..41d16fedf 100644 --- a/generated/google/apis/slides_v1.rb +++ b/generated/google/apis/slides_v1.rb @@ -25,10 +25,7 @@ module Google # @see https://developers.google.com/slides/ module SlidesV1 VERSION = 'V1' - REVISION = '20170301' - - # View and manage your Google Slides presentations - AUTH_PRESENTATIONS = 'https://www.googleapis.com/auth/presentations' + REVISION = '20170323' # View your Google Slides presentations AUTH_PRESENTATIONS_READONLY = 'https://www.googleapis.com/auth/presentations.readonly' @@ -44,6 +41,9 @@ module Google # View and manage your spreadsheets in Google Drive AUTH_SPREADSHEETS = 'https://www.googleapis.com/auth/spreadsheets' + + # View and manage your Google Slides presentations + AUTH_PRESENTATIONS = 'https://www.googleapis.com/auth/presentations' end end end diff --git a/generated/google/apis/slides_v1/classes.rb b/generated/google/apis/slides_v1/classes.rb index e2d4354fc..624ccc444 100644 --- a/generated/google/apis/slides_v1/classes.rb +++ b/generated/google/apis/slides_v1/classes.rb @@ -22,6 +22,1744 @@ module Google module Apis module SlidesV1 + # Creates a new table. + class CreateTableRequest + include Google::Apis::Core::Hashable + + # Number of rows in the table. + # Corresponds to the JSON property `rows` + # @return [Fixnum] + attr_accessor :rows + + # A user-supplied object ID. + # If you specify an ID, it must be unique among all pages and page elements + # in the presentation. The ID must start with an alphanumeric character or an + # underscore (matches regex `[a-zA-Z0-9_]`); remaining characters + # may include those as well as a hyphen or colon (matches regex + # `[a-zA-Z0-9_-:]`). + # The length of the ID must not be less than 5 or greater than 50. + # If you don't specify an ID, a unique one is generated. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + # Number of columns in the table. + # Corresponds to the JSON property `columns` + # @return [Fixnum] + attr_accessor :columns + + # Common properties for a page element. + # Note: When you initially create a + # PageElement, the API may modify + # the values of both `size` and `transform`, but the + # visual size will be unchanged. + # Corresponds to the JSON property `elementProperties` + # @return [Google::Apis::SlidesV1::PageElementProperties] + attr_accessor :element_properties + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @rows = args[:rows] if args.key?(:rows) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + @columns = args[:columns] if args.key?(:columns) + @element_properties = args[:element_properties] if args.key?(:element_properties) + end + end + + # The result of creating a table. + class CreateTableResponse + include Google::Apis::Core::Hashable + + # The object ID of the created table. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + end + end + + # A PageElement kind representing a + # table. + class Table + include Google::Apis::Core::Hashable + + # Properties and contents of each row. + # Cells that span multiple rows are contained in only one of these rows and + # have a row_span greater + # than 1. + # Corresponds to the JSON property `tableRows` + # @return [Array] + attr_accessor :table_rows + + # Number of rows in the table. + # Corresponds to the JSON property `rows` + # @return [Fixnum] + attr_accessor :rows + + # Properties of each column. + # Corresponds to the JSON property `tableColumns` + # @return [Array] + attr_accessor :table_columns + + # Number of columns in the table. + # Corresponds to the JSON property `columns` + # @return [Fixnum] + attr_accessor :columns + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @table_rows = args[:table_rows] if args.key?(:table_rows) + @rows = args[:rows] if args.key?(:rows) + @table_columns = args[:table_columns] if args.key?(:table_columns) + @columns = args[:columns] if args.key?(:columns) + end + end + + # The page background fill. + class PageBackgroundFill + include Google::Apis::Core::Hashable + + # The stretched picture fill. The page or page element is filled entirely with + # the specified picture. The picture is stretched to fit its container. + # Corresponds to the JSON property `stretchedPictureFill` + # @return [Google::Apis::SlidesV1::StretchedPictureFill] + attr_accessor :stretched_picture_fill + + # A solid color fill. The page or page element is filled entirely with the + # specified color value. + # If any field is unset, its value may be inherited from a parent placeholder + # if it exists. + # Corresponds to the JSON property `solidFill` + # @return [Google::Apis::SlidesV1::SolidFill] + attr_accessor :solid_fill + + # The background fill property state. + # Updating the the fill on a page will implicitly update this field to + # `RENDERED`, unless another value is specified in the same request. To + # have no fill on a page, set this field to `NOT_RENDERED`. In this case, + # any other fill fields set in the same request will be ignored. + # Corresponds to the JSON property `propertyState` + # @return [String] + attr_accessor :property_state + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @stretched_picture_fill = args[:stretched_picture_fill] if args.key?(:stretched_picture_fill) + @solid_fill = args[:solid_fill] if args.key?(:solid_fill) + @property_state = args[:property_state] if args.key?(:property_state) + end + end + + # A PageElement kind representing + # a linked chart embedded from Google Sheets. + class SheetsChart + include Google::Apis::Core::Hashable + + # The ID of the specific chart in the Google Sheets spreadsheet that is + # embedded. + # Corresponds to the JSON property `chartId` + # @return [Fixnum] + attr_accessor :chart_id + + # The properties of the SheetsChart. + # Corresponds to the JSON property `sheetsChartProperties` + # @return [Google::Apis::SlidesV1::SheetsChartProperties] + attr_accessor :sheets_chart_properties + + # The URL of an image of the embedded chart, with a default lifetime of 30 + # minutes. This URL is tagged with the account of the requester. Anyone with + # the URL effectively accesses the image as the original requester. Access to + # the image may be lost if the presentation's sharing settings change. + # Corresponds to the JSON property `contentUrl` + # @return [String] + attr_accessor :content_url + + # The ID of the Google Sheets spreadsheet that contains the source chart. + # Corresponds to the JSON property `spreadsheetId` + # @return [String] + attr_accessor :spreadsheet_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @chart_id = args[:chart_id] if args.key?(:chart_id) + @sheets_chart_properties = args[:sheets_chart_properties] if args.key?(:sheets_chart_properties) + @content_url = args[:content_url] if args.key?(:content_url) + @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) + end + end + + # A solid color fill. The page or page element is filled entirely with the + # specified color value. + # If any field is unset, its value may be inherited from a parent placeholder + # if it exists. + class SolidFill + include Google::Apis::Core::Hashable + + # A themeable solid color value. + # Corresponds to the JSON property `color` + # @return [Google::Apis::SlidesV1::OpaqueColor] + attr_accessor :color + + # The fraction of this `color` that should be applied to the pixel. + # That is, the final pixel color is defined by the equation: + # pixel color = alpha * (color) + (1.0 - alpha) * (background color) + # This means that a value of 1.0 corresponds to a solid color, whereas + # a value of 0.0 corresponds to a completely transparent color. + # Corresponds to the JSON property `alpha` + # @return [Float] + attr_accessor :alpha + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @color = args[:color] if args.key?(:color) + @alpha = args[:alpha] if args.key?(:alpha) + end + end + + # A pair mapping a theme color type to the concrete color it represents. + class ThemeColorPair + include Google::Apis::Core::Hashable + + # An RGB color. + # Corresponds to the JSON property `color` + # @return [Google::Apis::SlidesV1::RgbColor] + attr_accessor :color + + # The type of the theme color. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @color = args[:color] if args.key?(:color) + @type = args[:type] if args.key?(:type) + end + end + + # A color that can either be fully opaque or fully transparent. + class OptionalColor + include Google::Apis::Core::Hashable + + # A themeable solid color value. + # Corresponds to the JSON property `opaqueColor` + # @return [Google::Apis::SlidesV1::OpaqueColor] + attr_accessor :opaque_color + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @opaque_color = args[:opaque_color] if args.key?(:opaque_color) + end + end + + # Common properties for a page element. + # Note: When you initially create a + # PageElement, the API may modify + # the values of both `size` and `transform`, but the + # visual size will be unchanged. + class PageElementProperties + include Google::Apis::Core::Hashable + + # The object ID of the page where the element is located. + # Corresponds to the JSON property `pageObjectId` + # @return [String] + attr_accessor :page_object_id + + # A width and height. + # Corresponds to the JSON property `size` + # @return [Google::Apis::SlidesV1::Size] + attr_accessor :size + + # AffineTransform uses a 3x3 matrix with an implied last row of [ 0 0 1 ] + # to transform source coordinates (x,y) into destination coordinates (x', y') + # according to: + # x' x = shear_y scale_y translate_y + # 1 [ 1 ] + # After transformation, + # x' = scale_x * x + shear_x * y + translate_x; + # y' = scale_y * y + shear_y * x + translate_y; + # This message is therefore composed of these six matrix elements. + # Corresponds to the JSON property `transform` + # @return [Google::Apis::SlidesV1::AffineTransform] + attr_accessor :transform + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @page_object_id = args[:page_object_id] if args.key?(:page_object_id) + @size = args[:size] if args.key?(:size) + @transform = args[:transform] if args.key?(:transform) + end + end + + # The properties of the SheetsChart. + class SheetsChartProperties + include Google::Apis::Core::Hashable + + # The properties of the Image. + # Corresponds to the JSON property `chartImageProperties` + # @return [Google::Apis::SlidesV1::ImageProperties] + attr_accessor :chart_image_properties + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @chart_image_properties = args[:chart_image_properties] if args.key?(:chart_image_properties) + end + end + + # The stretched picture fill. The page or page element is filled entirely with + # the specified picture. The picture is stretched to fit its container. + class StretchedPictureFill + include Google::Apis::Core::Hashable + + # Reading the content_url: + # An URL to a picture with a default lifetime of 30 minutes. + # This URL is tagged with the account of the requester. Anyone with the URL + # effectively accesses the picture as the original requester. Access to the + # picture may be lost if the presentation's sharing settings change. + # Writing the content_url: + # The picture is fetched once at insertion time and a copy is stored for + # display inside the presentation. Pictures must be less than 50MB in size, + # cannot exceed 25 megapixels, and must be in either in PNG, JPEG, or GIF + # format. + # Corresponds to the JSON property `contentUrl` + # @return [String] + attr_accessor :content_url + + # A width and height. + # Corresponds to the JSON property `size` + # @return [Google::Apis::SlidesV1::Size] + attr_accessor :size + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @content_url = args[:content_url] if args.key?(:content_url) + @size = args[:size] if args.key?(:size) + end + end + + # Update the styling of text in a Shape or + # Table. + class UpdateTextStyleRequest + include Google::Apis::Core::Hashable + + # The fields that should be updated. + # At least one field must be specified. The root `style` is implied and + # should not be specified. A single `"*"` can be used as short-hand for + # listing every field. + # For example, to update the text style to bold, set `fields` to `"bold"`. + # To reset a property to its default value, include its field name in the + # field mask but leave the field itself unset. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + # The object ID of the shape or table with the text to be styled. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + # Specifies a contiguous range of an indexed collection, such as characters in + # text. + # Corresponds to the JSON property `textRange` + # @return [Google::Apis::SlidesV1::Range] + attr_accessor :text_range + + # A location of a single table cell within a table. + # Corresponds to the JSON property `cellLocation` + # @return [Google::Apis::SlidesV1::TableCellLocation] + attr_accessor :cell_location + + # Represents the styling that can be applied to a TextRun. + # If this text is contained in a shape with a parent placeholder, then these + # text styles may be + # inherited from the parent. Which text styles are inherited depend on the + # nesting level of lists: + # * A text run in a paragraph that is not in a list will inherit its text style + # from the the newline character in the paragraph at the 0 nesting level of + # the list inside the parent placeholder. + # * A text run in a paragraph that is in a list will inherit its text style + # from the newline character in the paragraph at its corresponding nesting + # level of the list inside the parent placeholder. + # Inherited text styles are represented as unset fields in this message. If + # text is contained in a shape without a parent placeholder, unsetting these + # fields will revert the style to a value matching the defaults in the Slides + # editor. + # Corresponds to the JSON property `style` + # @return [Google::Apis::SlidesV1::TextStyle] + attr_accessor :style + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @fields = args[:fields] if args.key?(:fields) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + @text_range = args[:text_range] if args.key?(:text_range) + @cell_location = args[:cell_location] if args.key?(:cell_location) + @style = args[:style] if args.key?(:style) + end + end + + # Deletes a column from a table. + class DeleteTableColumnRequest + include Google::Apis::Core::Hashable + + # A location of a single table cell within a table. + # Corresponds to the JSON property `cellLocation` + # @return [Google::Apis::SlidesV1::TableCellLocation] + attr_accessor :cell_location + + # The table to delete columns from. + # Corresponds to the JSON property `tableObjectId` + # @return [String] + attr_accessor :table_object_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @cell_location = args[:cell_location] if args.key?(:cell_location) + @table_object_id = args[:table_object_id] if args.key?(:table_object_id) + end + end + + # A List describes the look and feel of bullets belonging to paragraphs + # associated with a list. A paragraph that is part of a list has an implicit + # reference to that list's ID. + class List + include Google::Apis::Core::Hashable + + # The ID of the list. + # Corresponds to the JSON property `listId` + # @return [String] + attr_accessor :list_id + + # A map of nesting levels to the properties of bullets at the associated + # level. A list has at most nine levels of nesting, so the possible values + # for the keys of this map are 0 through 8, inclusive. + # Corresponds to the JSON property `nestingLevel` + # @return [Hash] + attr_accessor :nesting_level + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @list_id = args[:list_id] if args.key?(:list_id) + @nesting_level = args[:nesting_level] if args.key?(:nesting_level) + end + end + + # Represents a font family and weight used to style a TextRun. + class WeightedFontFamily + include Google::Apis::Core::Hashable + + # The font family of the text. + # The font family can be any font from the Font menu in Slides or from + # [Google Fonts] (https://fonts.google.com/). If the font name is + # unrecognized, the text is rendered in `Arial`. + # Corresponds to the JSON property `fontFamily` + # @return [String] + attr_accessor :font_family + + # The rendered weight of the text. This field can have any value that is a + # multiple of `100` between `100` and `900`, inclusive. This range + # corresponds to the numerical values described in the CSS 2.1 + # Specification, [section 15.6](https://www.w3.org/TR/CSS21/fonts.html#font- + # boldness), + # with non-numerical values disallowed. Weights greater than or equal to + # `700` are considered bold, and weights less than `700`are not bold. The + # default value is `400` ("normal"). + # Corresponds to the JSON property `weight` + # @return [Fixnum] + attr_accessor :weight + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @font_family = args[:font_family] if args.key?(:font_family) + @weight = args[:weight] if args.key?(:weight) + end + end + + # A visual element rendered on a page. + class PageElement + include Google::Apis::Core::Hashable + + # A width and height. + # Corresponds to the JSON property `size` + # @return [Google::Apis::SlidesV1::Size] + attr_accessor :size + + # The title of the page element. Combined with description to display alt + # text. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # A PageElement kind representing + # a linked chart embedded from Google Sheets. + # Corresponds to the JSON property `sheetsChart` + # @return [Google::Apis::SlidesV1::SheetsChart] + attr_accessor :sheets_chart + + # A PageElement kind representing a + # video. + # Corresponds to the JSON property `video` + # @return [Google::Apis::SlidesV1::Video] + attr_accessor :video + + # A PageElement kind representing + # word art. + # Corresponds to the JSON property `wordArt` + # @return [Google::Apis::SlidesV1::WordArt] + attr_accessor :word_art + + # A PageElement kind representing a + # table. + # Corresponds to the JSON property `table` + # @return [Google::Apis::SlidesV1::Table] + attr_accessor :table + + # AffineTransform uses a 3x3 matrix with an implied last row of [ 0 0 1 ] + # to transform source coordinates (x,y) into destination coordinates (x', y') + # according to: + # x' x = shear_y scale_y translate_y + # 1 [ 1 ] + # After transformation, + # x' = scale_x * x + shear_x * y + translate_x; + # y' = scale_y * y + shear_y * x + translate_y; + # This message is therefore composed of these six matrix elements. + # Corresponds to the JSON property `transform` + # @return [Google::Apis::SlidesV1::AffineTransform] + attr_accessor :transform + + # The object ID for this page element. Object IDs used by + # google.apps.slides.v1.Page and + # google.apps.slides.v1.PageElement share the same namespace. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + # A PageElement kind representing a + # generic shape that does not have a more specific classification. + # Corresponds to the JSON property `shape` + # @return [Google::Apis::SlidesV1::Shape] + attr_accessor :shape + + # A PageElement kind representing a + # line, curved connector, or bent connector. + # Corresponds to the JSON property `line` + # @return [Google::Apis::SlidesV1::Line] + attr_accessor :line + + # The description of the page element. Combined with title to display alt + # text. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # A PageElement kind representing a + # joined collection of PageElements. + # Corresponds to the JSON property `elementGroup` + # @return [Google::Apis::SlidesV1::Group] + attr_accessor :element_group + + # A PageElement kind representing an + # image. + # Corresponds to the JSON property `image` + # @return [Google::Apis::SlidesV1::Image] + attr_accessor :image + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @size = args[:size] if args.key?(:size) + @title = args[:title] if args.key?(:title) + @sheets_chart = args[:sheets_chart] if args.key?(:sheets_chart) + @video = args[:video] if args.key?(:video) + @word_art = args[:word_art] if args.key?(:word_art) + @table = args[:table] if args.key?(:table) + @transform = args[:transform] if args.key?(:transform) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + @shape = args[:shape] if args.key?(:shape) + @line = args[:line] if args.key?(:line) + @description = args[:description] if args.key?(:description) + @element_group = args[:element_group] if args.key?(:element_group) + @image = args[:image] if args.key?(:image) + end + end + + # Creates an image. + class CreateImageRequest + include Google::Apis::Core::Hashable + + # A user-supplied object ID. + # If you specify an ID, it must be unique among all pages and page elements + # in the presentation. The ID must start with an alphanumeric character or an + # underscore (matches regex `[a-zA-Z0-9_]`); remaining characters + # may include those as well as a hyphen or colon (matches regex + # `[a-zA-Z0-9_-:]`). + # The length of the ID must not be less than 5 or greater than 50. + # If you don't specify an ID, a unique one is generated. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + # Common properties for a page element. + # Note: When you initially create a + # PageElement, the API may modify + # the values of both `size` and `transform`, but the + # visual size will be unchanged. + # Corresponds to the JSON property `elementProperties` + # @return [Google::Apis::SlidesV1::PageElementProperties] + attr_accessor :element_properties + + # The image URL. + # The image is fetched once at insertion time and a copy is stored for + # display inside the presentation. Images must be less than 50MB in size, + # cannot exceed 25 megapixels, and must be in either in PNG, JPEG, or GIF + # format. + # Corresponds to the JSON property `url` + # @return [String] + attr_accessor :url + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + @element_properties = args[:element_properties] if args.key?(:element_properties) + @url = args[:url] if args.key?(:url) + end + end + + # Creates bullets for all of the paragraphs that overlap with the given + # text index range. + # The nesting level of each paragraph will be determined by counting leading + # tabs in front of each paragraph. To avoid excess space between the bullet and + # the corresponding paragraph, these leading tabs are removed by this request. + # This may change the indices of parts of the text. + # If the paragraph immediately before paragraphs being updated is in a list + # with a matching preset, the paragraphs being updated are added to that + # preceding list. + class CreateParagraphBulletsRequest + include Google::Apis::Core::Hashable + + # The object ID of the shape or table containing the text to add bullets to. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + # Specifies a contiguous range of an indexed collection, such as characters in + # text. + # Corresponds to the JSON property `textRange` + # @return [Google::Apis::SlidesV1::Range] + attr_accessor :text_range + + # The kinds of bullet glyphs to be used. Defaults to the + # `BULLET_DISC_CIRCLE_SQUARE` preset. + # Corresponds to the JSON property `bulletPreset` + # @return [String] + attr_accessor :bullet_preset + + # A location of a single table cell within a table. + # Corresponds to the JSON property `cellLocation` + # @return [Google::Apis::SlidesV1::TableCellLocation] + attr_accessor :cell_location + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + @text_range = args[:text_range] if args.key?(:text_range) + @bullet_preset = args[:bullet_preset] if args.key?(:bullet_preset) + @cell_location = args[:cell_location] if args.key?(:cell_location) + end + end + + # A width and height. + class Size + include Google::Apis::Core::Hashable + + # A magnitude in a single direction in the specified units. + # Corresponds to the JSON property `width` + # @return [Google::Apis::SlidesV1::Dimension] + attr_accessor :width + + # A magnitude in a single direction in the specified units. + # Corresponds to the JSON property `height` + # @return [Google::Apis::SlidesV1::Dimension] + attr_accessor :height + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @width = args[:width] if args.key?(:width) + @height = args[:height] if args.key?(:height) + end + end + + # Represents the styling that can be applied to a TextRun. + # If this text is contained in a shape with a parent placeholder, then these + # text styles may be + # inherited from the parent. Which text styles are inherited depend on the + # nesting level of lists: + # * A text run in a paragraph that is not in a list will inherit its text style + # from the the newline character in the paragraph at the 0 nesting level of + # the list inside the parent placeholder. + # * A text run in a paragraph that is in a list will inherit its text style + # from the newline character in the paragraph at its corresponding nesting + # level of the list inside the parent placeholder. + # Inherited text styles are represented as unset fields in this message. If + # text is contained in a shape without a parent placeholder, unsetting these + # fields will revert the style to a value matching the defaults in the Slides + # editor. + class TextStyle + include Google::Apis::Core::Hashable + + # A color that can either be fully opaque or fully transparent. + # Corresponds to the JSON property `backgroundColor` + # @return [Google::Apis::SlidesV1::OptionalColor] + attr_accessor :background_color + + # Whether or not the text is underlined. + # Corresponds to the JSON property `underline` + # @return [Boolean] + attr_accessor :underline + alias_method :underline?, :underline + + # A hypertext link. + # Corresponds to the JSON property `link` + # @return [Google::Apis::SlidesV1::Link] + attr_accessor :link + + # Whether or not the text is rendered as bold. + # Corresponds to the JSON property `bold` + # @return [Boolean] + attr_accessor :bold + alias_method :bold?, :bold + + # A color that can either be fully opaque or fully transparent. + # Corresponds to the JSON property `foregroundColor` + # @return [Google::Apis::SlidesV1::OptionalColor] + attr_accessor :foreground_color + + # The font family of the text. + # The font family can be any font from the Font menu in Slides or from + # [Google Fonts] (https://fonts.google.com/). If the font name is + # unrecognized, the text is rendered in `Arial`. + # Some fonts can affect the weight of the text. If an update request + # specifies values for both `font_family` and `bold`, the explicitly-set + # `bold` value is used. + # Corresponds to the JSON property `fontFamily` + # @return [String] + attr_accessor :font_family + + # Whether or not the text is italicized. + # Corresponds to the JSON property `italic` + # @return [Boolean] + attr_accessor :italic + alias_method :italic?, :italic + + # Whether or not the text is struck through. + # Corresponds to the JSON property `strikethrough` + # @return [Boolean] + attr_accessor :strikethrough + alias_method :strikethrough?, :strikethrough + + # A magnitude in a single direction in the specified units. + # Corresponds to the JSON property `fontSize` + # @return [Google::Apis::SlidesV1::Dimension] + attr_accessor :font_size + + # The text's vertical offset from its normal position. + # Text with `SUPERSCRIPT` or `SUBSCRIPT` baseline offsets is automatically + # rendered in a smaller font size, computed based on the `font_size` field. + # The `font_size` itself is not affected by changes in this field. + # Corresponds to the JSON property `baselineOffset` + # @return [String] + attr_accessor :baseline_offset + + # Represents a font family and weight used to style a TextRun. + # Corresponds to the JSON property `weightedFontFamily` + # @return [Google::Apis::SlidesV1::WeightedFontFamily] + attr_accessor :weighted_font_family + + # Whether or not the text is in small capital letters. + # Corresponds to the JSON property `smallCaps` + # @return [Boolean] + attr_accessor :small_caps + alias_method :small_caps?, :small_caps + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @background_color = args[:background_color] if args.key?(:background_color) + @underline = args[:underline] if args.key?(:underline) + @link = args[:link] if args.key?(:link) + @bold = args[:bold] if args.key?(:bold) + @foreground_color = args[:foreground_color] if args.key?(:foreground_color) + @font_family = args[:font_family] if args.key?(:font_family) + @italic = args[:italic] if args.key?(:italic) + @strikethrough = args[:strikethrough] if args.key?(:strikethrough) + @font_size = args[:font_size] if args.key?(:font_size) + @baseline_offset = args[:baseline_offset] if args.key?(:baseline_offset) + @weighted_font_family = args[:weighted_font_family] if args.key?(:weighted_font_family) + @small_caps = args[:small_caps] if args.key?(:small_caps) + end + end + + # Update the properties of a Video. + class UpdateVideoPropertiesRequest + include Google::Apis::Core::Hashable + + # The properties of the Video. + # Corresponds to the JSON property `videoProperties` + # @return [Google::Apis::SlidesV1::VideoProperties] + attr_accessor :video_properties + + # The fields that should be updated. + # At least one field must be specified. The root `videoProperties` is + # implied and should not be specified. A single `"*"` can be used as + # short-hand for listing every field. + # For example to update the video outline color, set `fields` to + # `"outline.outlineFill.solidFill.color"`. + # To reset a property to its default value, include its field name in the + # field mask but leave the field itself unset. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + # The object ID of the video the updates are applied to. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @video_properties = args[:video_properties] if args.key?(:video_properties) + @fields = args[:fields] if args.key?(:fields) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + end + end + + # A single kind of update to apply to a presentation. + class Request + include Google::Apis::Core::Hashable + + # Creates an embedded Google Sheets chart. + # NOTE: Chart creation requires at least one of the spreadsheets.readonly, + # spreadsheets, drive.readonly, or drive OAuth scopes. + # Corresponds to the JSON property `createSheetsChart` + # @return [Google::Apis::SlidesV1::CreateSheetsChartRequest] + attr_accessor :create_sheets_chart + + # Replaces all shapes that match the given criteria with the provided Google + # Sheets chart. The chart will be scaled and centered to fit within the bounds + # of the original shape. + # NOTE: Replacing shapes with a chart requires at least one of the + # spreadsheets.readonly, spreadsheets, drive.readonly, or drive OAuth scopes. + # Corresponds to the JSON property `replaceAllShapesWithSheetsChart` + # @return [Google::Apis::SlidesV1::ReplaceAllShapesWithSheetsChartRequest] + attr_accessor :replace_all_shapes_with_sheets_chart + + # Updates the transform of a page element. + # Corresponds to the JSON property `updatePageElementTransform` + # @return [Google::Apis::SlidesV1::UpdatePageElementTransformRequest] + attr_accessor :update_page_element_transform + + # Update the styling of text in a Shape or + # Table. + # Corresponds to the JSON property `updateTextStyle` + # @return [Google::Apis::SlidesV1::UpdateTextStyleRequest] + attr_accessor :update_text_style + + # Replaces all shapes that match the given criteria with the provided image. + # Corresponds to the JSON property `replaceAllShapesWithImage` + # @return [Google::Apis::SlidesV1::ReplaceAllShapesWithImageRequest] + attr_accessor :replace_all_shapes_with_image + + # Replaces all instances of text matching a criteria with replace text. + # Corresponds to the JSON property `replaceAllText` + # @return [Google::Apis::SlidesV1::ReplaceAllTextRequest] + attr_accessor :replace_all_text + + # Update the properties of an Image. + # Corresponds to the JSON property `updateImageProperties` + # @return [Google::Apis::SlidesV1::UpdateImagePropertiesRequest] + attr_accessor :update_image_properties + + # Creates a new slide. + # Corresponds to the JSON property `createSlide` + # @return [Google::Apis::SlidesV1::CreateSlideRequest] + attr_accessor :create_slide + + # Inserts rows into a table. + # Corresponds to the JSON property `insertTableRows` + # @return [Google::Apis::SlidesV1::InsertTableRowsRequest] + attr_accessor :insert_table_rows + + # Updates the properties of a Line. + # Corresponds to the JSON property `updateLineProperties` + # @return [Google::Apis::SlidesV1::UpdateLinePropertiesRequest] + attr_accessor :update_line_properties + + # Updates the position of slides in the presentation. + # Corresponds to the JSON property `updateSlidesPosition` + # @return [Google::Apis::SlidesV1::UpdateSlidesPositionRequest] + attr_accessor :update_slides_position + + # Deletes a row from a table. + # Corresponds to the JSON property `deleteTableRow` + # @return [Google::Apis::SlidesV1::DeleteTableRowRequest] + attr_accessor :delete_table_row + + # Update the properties of a Shape. + # Corresponds to the JSON property `updateShapeProperties` + # @return [Google::Apis::SlidesV1::UpdateShapePropertiesRequest] + attr_accessor :update_shape_properties + + # Inserts text into a shape or a table cell. + # Corresponds to the JSON property `insertText` + # @return [Google::Apis::SlidesV1::InsertTextRequest] + attr_accessor :insert_text + + # Deletes text from a shape or a table cell. + # Corresponds to the JSON property `deleteText` + # @return [Google::Apis::SlidesV1::DeleteTextRequest] + attr_accessor :delete_text + + # Updates the properties of a Page. + # Corresponds to the JSON property `updatePageProperties` + # @return [Google::Apis::SlidesV1::UpdatePagePropertiesRequest] + attr_accessor :update_page_properties + + # Deletes bullets from all of the paragraphs that overlap with the given text + # index range. + # The nesting level of each paragraph will be visually preserved by adding + # indent to the start of the corresponding paragraph. + # Corresponds to the JSON property `deleteParagraphBullets` + # @return [Google::Apis::SlidesV1::DeleteParagraphBulletsRequest] + attr_accessor :delete_paragraph_bullets + + # Creates a new shape. + # Corresponds to the JSON property `createShape` + # @return [Google::Apis::SlidesV1::CreateShapeRequest] + attr_accessor :create_shape + + # Inserts columns into a table. + # Other columns in the table will be resized to fit the new column. + # Corresponds to the JSON property `insertTableColumns` + # @return [Google::Apis::SlidesV1::InsertTableColumnsRequest] + attr_accessor :insert_table_columns + + # Refreshes an embedded Google Sheets chart by replacing it with the latest + # version of the chart from Google Sheets. + # NOTE: Refreshing charts requires at least one of the spreadsheets.readonly, + # spreadsheets, drive.readonly, or drive OAuth scopes. + # Corresponds to the JSON property `refreshSheetsChart` + # @return [Google::Apis::SlidesV1::RefreshSheetsChartRequest] + attr_accessor :refresh_sheets_chart + + # Creates a new table. + # Corresponds to the JSON property `createTable` + # @return [Google::Apis::SlidesV1::CreateTableRequest] + attr_accessor :create_table + + # Update the properties of a TableCell. + # Corresponds to the JSON property `updateTableCellProperties` + # @return [Google::Apis::SlidesV1::UpdateTableCellPropertiesRequest] + attr_accessor :update_table_cell_properties + + # Deletes an object, either pages or + # page elements, from the + # presentation. + # Corresponds to the JSON property `deleteObject` + # @return [Google::Apis::SlidesV1::DeleteObjectRequest] + attr_accessor :delete_object + + # Updates the styling for all of the paragraphs within a Shape or Table that + # overlap with the given text index range. + # Corresponds to the JSON property `updateParagraphStyle` + # @return [Google::Apis::SlidesV1::UpdateParagraphStyleRequest] + attr_accessor :update_paragraph_style + + # Deletes a column from a table. + # Corresponds to the JSON property `deleteTableColumn` + # @return [Google::Apis::SlidesV1::DeleteTableColumnRequest] + attr_accessor :delete_table_column + + # Duplicates a slide or page element. + # When duplicating a slide, the duplicate slide will be created immediately + # following the specified slide. When duplicating a page element, the duplicate + # will be placed on the same page at the same position as the original. + # Corresponds to the JSON property `duplicateObject` + # @return [Google::Apis::SlidesV1::DuplicateObjectRequest] + attr_accessor :duplicate_object + + # Update the properties of a Video. + # Corresponds to the JSON property `updateVideoProperties` + # @return [Google::Apis::SlidesV1::UpdateVideoPropertiesRequest] + attr_accessor :update_video_properties + + # Creates a line. + # Corresponds to the JSON property `createLine` + # @return [Google::Apis::SlidesV1::CreateLineRequest] + attr_accessor :create_line + + # Creates an image. + # Corresponds to the JSON property `createImage` + # @return [Google::Apis::SlidesV1::CreateImageRequest] + attr_accessor :create_image + + # Creates bullets for all of the paragraphs that overlap with the given + # text index range. + # The nesting level of each paragraph will be determined by counting leading + # tabs in front of each paragraph. To avoid excess space between the bullet and + # the corresponding paragraph, these leading tabs are removed by this request. + # This may change the indices of parts of the text. + # If the paragraph immediately before paragraphs being updated is in a list + # with a matching preset, the paragraphs being updated are added to that + # preceding list. + # Corresponds to the JSON property `createParagraphBullets` + # @return [Google::Apis::SlidesV1::CreateParagraphBulletsRequest] + attr_accessor :create_paragraph_bullets + + # Creates a video. + # Corresponds to the JSON property `createVideo` + # @return [Google::Apis::SlidesV1::CreateVideoRequest] + attr_accessor :create_video + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @create_sheets_chart = args[:create_sheets_chart] if args.key?(:create_sheets_chart) + @replace_all_shapes_with_sheets_chart = args[:replace_all_shapes_with_sheets_chart] if args.key?(:replace_all_shapes_with_sheets_chart) + @update_page_element_transform = args[:update_page_element_transform] if args.key?(:update_page_element_transform) + @update_text_style = args[:update_text_style] if args.key?(:update_text_style) + @replace_all_shapes_with_image = args[:replace_all_shapes_with_image] if args.key?(:replace_all_shapes_with_image) + @replace_all_text = args[:replace_all_text] if args.key?(:replace_all_text) + @update_image_properties = args[:update_image_properties] if args.key?(:update_image_properties) + @create_slide = args[:create_slide] if args.key?(:create_slide) + @insert_table_rows = args[:insert_table_rows] if args.key?(:insert_table_rows) + @update_line_properties = args[:update_line_properties] if args.key?(:update_line_properties) + @update_slides_position = args[:update_slides_position] if args.key?(:update_slides_position) + @delete_table_row = args[:delete_table_row] if args.key?(:delete_table_row) + @update_shape_properties = args[:update_shape_properties] if args.key?(:update_shape_properties) + @insert_text = args[:insert_text] if args.key?(:insert_text) + @delete_text = args[:delete_text] if args.key?(:delete_text) + @update_page_properties = args[:update_page_properties] if args.key?(:update_page_properties) + @delete_paragraph_bullets = args[:delete_paragraph_bullets] if args.key?(:delete_paragraph_bullets) + @create_shape = args[:create_shape] if args.key?(:create_shape) + @insert_table_columns = args[:insert_table_columns] if args.key?(:insert_table_columns) + @refresh_sheets_chart = args[:refresh_sheets_chart] if args.key?(:refresh_sheets_chart) + @create_table = args[:create_table] if args.key?(:create_table) + @update_table_cell_properties = args[:update_table_cell_properties] if args.key?(:update_table_cell_properties) + @delete_object = args[:delete_object] if args.key?(:delete_object) + @update_paragraph_style = args[:update_paragraph_style] if args.key?(:update_paragraph_style) + @delete_table_column = args[:delete_table_column] if args.key?(:delete_table_column) + @duplicate_object = args[:duplicate_object] if args.key?(:duplicate_object) + @update_video_properties = args[:update_video_properties] if args.key?(:update_video_properties) + @create_line = args[:create_line] if args.key?(:create_line) + @create_image = args[:create_image] if args.key?(:create_image) + @create_paragraph_bullets = args[:create_paragraph_bullets] if args.key?(:create_paragraph_bullets) + @create_video = args[:create_video] if args.key?(:create_video) + end + end + + # Update the properties of an Image. + class UpdateImagePropertiesRequest + include Google::Apis::Core::Hashable + + # The fields that should be updated. + # At least one field must be specified. The root `imageProperties` is + # implied and should not be specified. A single `"*"` can be used as + # short-hand for listing every field. + # For example to update the image outline color, set `fields` to + # `"outline.outlineFill.solidFill.color"`. + # To reset a property to its default value, include its field name in the + # field mask but leave the field itself unset. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + # The properties of the Image. + # Corresponds to the JSON property `imageProperties` + # @return [Google::Apis::SlidesV1::ImageProperties] + attr_accessor :image_properties + + # The object ID of the image the updates are applied to. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @fields = args[:fields] if args.key?(:fields) + @image_properties = args[:image_properties] if args.key?(:image_properties) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + end + end + + # Styles that apply to a whole paragraph. + # If this text is contained in a shape with a parent placeholder, then these + # paragraph styles may be + # inherited from the parent. Which paragraph styles are inherited depend on the + # nesting level of lists: + # * A paragraph not in a list will inherit its paragraph style from the + # paragraph at the 0 nesting level of the list inside the parent placeholder. + # * A paragraph in a list will inherit its paragraph style from the paragraph + # at its corresponding nesting level of the list inside the parent + # placeholder. + # Inherited paragraph styles are represented as unset fields in this message. + class ParagraphStyle + include Google::Apis::Core::Hashable + + # A magnitude in a single direction in the specified units. + # Corresponds to the JSON property `spaceBelow` + # @return [Google::Apis::SlidesV1::Dimension] + attr_accessor :space_below + + # The text direction of this paragraph. If unset, the value defaults to + # LEFT_TO_RIGHT + # since text direction is not inherited. + # Corresponds to the JSON property `direction` + # @return [String] + attr_accessor :direction + + # The spacing mode for the paragraph. + # Corresponds to the JSON property `spacingMode` + # @return [String] + attr_accessor :spacing_mode + + # A magnitude in a single direction in the specified units. + # Corresponds to the JSON property `indentEnd` + # @return [Google::Apis::SlidesV1::Dimension] + attr_accessor :indent_end + + # A magnitude in a single direction in the specified units. + # Corresponds to the JSON property `indentStart` + # @return [Google::Apis::SlidesV1::Dimension] + attr_accessor :indent_start + + # A magnitude in a single direction in the specified units. + # Corresponds to the JSON property `spaceAbove` + # @return [Google::Apis::SlidesV1::Dimension] + attr_accessor :space_above + + # The text alignment for this paragraph. + # Corresponds to the JSON property `alignment` + # @return [String] + attr_accessor :alignment + + # The amount of space between lines, as a percentage of normal, where normal + # is represented as 100.0. If unset, the value is inherited from the parent. + # Corresponds to the JSON property `lineSpacing` + # @return [Float] + attr_accessor :line_spacing + + # A magnitude in a single direction in the specified units. + # Corresponds to the JSON property `indentFirstLine` + # @return [Google::Apis::SlidesV1::Dimension] + attr_accessor :indent_first_line + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @space_below = args[:space_below] if args.key?(:space_below) + @direction = args[:direction] if args.key?(:direction) + @spacing_mode = args[:spacing_mode] if args.key?(:spacing_mode) + @indent_end = args[:indent_end] if args.key?(:indent_end) + @indent_start = args[:indent_start] if args.key?(:indent_start) + @space_above = args[:space_above] if args.key?(:space_above) + @alignment = args[:alignment] if args.key?(:alignment) + @line_spacing = args[:line_spacing] if args.key?(:line_spacing) + @indent_first_line = args[:indent_first_line] if args.key?(:indent_first_line) + end + end + + # The result of replacing shapes with a Google Sheets chart. + class ReplaceAllShapesWithSheetsChartResponse + include Google::Apis::Core::Hashable + + # The number of shapes replaced with charts. + # Corresponds to the JSON property `occurrencesChanged` + # @return [Fixnum] + attr_accessor :occurrences_changed + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @occurrences_changed = args[:occurrences_changed] if args.key?(:occurrences_changed) + end + end + + # The properties of the TableCell. + class TableCellProperties + include Google::Apis::Core::Hashable + + # The table cell background fill. + # Corresponds to the JSON property `tableCellBackgroundFill` + # @return [Google::Apis::SlidesV1::TableCellBackgroundFill] + attr_accessor :table_cell_background_fill + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @table_cell_background_fill = args[:table_cell_background_fill] if args.key?(:table_cell_background_fill) + end + end + + # Refreshes an embedded Google Sheets chart by replacing it with the latest + # version of the chart from Google Sheets. + # NOTE: Refreshing charts requires at least one of the spreadsheets.readonly, + # spreadsheets, drive.readonly, or drive OAuth scopes. + class RefreshSheetsChartRequest + include Google::Apis::Core::Hashable + + # The object ID of the chart to refresh. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + end + end + + # The outline of a PageElement. + # If these fields are unset, they may be inherited from a parent placeholder + # if it exists. If there is no parent, the fields will default to the value + # used for new page elements created in the Slides editor, which may depend on + # the page element kind. + class Outline + include Google::Apis::Core::Hashable + + # The outline property state. + # Updating the the outline on a page element will implicitly update this + # field to`RENDERED`, unless another value is specified in the same request. + # To have no outline on a page element, set this field to `NOT_RENDERED`. In + # this case, any other outline fields set in the same request will be + # ignored. + # Corresponds to the JSON property `propertyState` + # @return [String] + attr_accessor :property_state + + # The fill of the outline. + # Corresponds to the JSON property `outlineFill` + # @return [Google::Apis::SlidesV1::OutlineFill] + attr_accessor :outline_fill + + # A magnitude in a single direction in the specified units. + # Corresponds to the JSON property `weight` + # @return [Google::Apis::SlidesV1::Dimension] + attr_accessor :weight + + # The dash style of the outline. + # Corresponds to the JSON property `dashStyle` + # @return [String] + attr_accessor :dash_style + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @property_state = args[:property_state] if args.key?(:property_state) + @outline_fill = args[:outline_fill] if args.key?(:outline_fill) + @weight = args[:weight] if args.key?(:weight) + @dash_style = args[:dash_style] if args.key?(:dash_style) + end + end + + # Properties of each column in a table. + class TableColumnProperties + include Google::Apis::Core::Hashable + + # A magnitude in a single direction in the specified units. + # Corresponds to the JSON property `columnWidth` + # @return [Google::Apis::SlidesV1::Dimension] + attr_accessor :column_width + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @column_width = args[:column_width] if args.key?(:column_width) + end + end + + # The properties of Page that are only + # relevant for pages with page_type NOTES. + class NotesProperties + include Google::Apis::Core::Hashable + + # The object ID of the shape on this notes page that contains the speaker + # notes for the corresponding slide. + # The actual shape may not always exist on the notes page. Inserting text + # using this object ID will automatically create the shape. In this case, the + # actual shape may have different object ID. The `GetPresentation` or + # `GetPage` action will always return the latest object ID. + # Corresponds to the JSON property `speakerNotesObjectId` + # @return [String] + attr_accessor :speaker_notes_object_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @speaker_notes_object_id = args[:speaker_notes_object_id] if args.key?(:speaker_notes_object_id) + end + end + + # The properties of a Shape. + # If the shape is a placeholder shape as determined by the + # placeholder field, then these + # properties may be inherited from a parent placeholder shape. + # Determining the rendered value of the property depends on the corresponding + # property_state field value. + class ShapeProperties + include Google::Apis::Core::Hashable + + # The outline of a PageElement. + # If these fields are unset, they may be inherited from a parent placeholder + # if it exists. If there is no parent, the fields will default to the value + # used for new page elements created in the Slides editor, which may depend on + # the page element kind. + # Corresponds to the JSON property `outline` + # @return [Google::Apis::SlidesV1::Outline] + attr_accessor :outline + + # The shape background fill. + # Corresponds to the JSON property `shapeBackgroundFill` + # @return [Google::Apis::SlidesV1::ShapeBackgroundFill] + attr_accessor :shape_background_fill + + # The shadow properties of a page element. + # If these fields are unset, they may be inherited from a parent placeholder + # if it exists. If there is no parent, the fields will default to the value + # used for new page elements created in the Slides editor, which may depend on + # the page element kind. + # Corresponds to the JSON property `shadow` + # @return [Google::Apis::SlidesV1::Shadow] + attr_accessor :shadow + + # A hypertext link. + # Corresponds to the JSON property `link` + # @return [Google::Apis::SlidesV1::Link] + attr_accessor :link + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @outline = args[:outline] if args.key?(:outline) + @shape_background_fill = args[:shape_background_fill] if args.key?(:shape_background_fill) + @shadow = args[:shadow] if args.key?(:shadow) + @link = args[:link] if args.key?(:link) + end + end + + # Properties and contents of each row in a table. + class TableRow + include Google::Apis::Core::Hashable + + # A magnitude in a single direction in the specified units. + # Corresponds to the JSON property `rowHeight` + # @return [Google::Apis::SlidesV1::Dimension] + attr_accessor :row_height + + # Properties and contents of each cell. + # Cells that span multiple columns are represented only once with a + # column_span greater + # than 1. As a result, the length of this collection does not always match + # the number of columns of the entire table. + # Corresponds to the JSON property `tableCells` + # @return [Array] + attr_accessor :table_cells + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @row_height = args[:row_height] if args.key?(:row_height) + @table_cells = args[:table_cells] if args.key?(:table_cells) + end + end + + # Update the properties of a TableCell. + class UpdateTableCellPropertiesRequest + include Google::Apis::Core::Hashable + + # The object ID of the table. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + # A table range represents a reference to a subset of a table. + # It's important to note that the cells specified by a table range do not + # necessarily form a rectangle. For example, let's say we have a 3 x 3 table + # where all the cells of the last row are merged together. The table looks + # like this: + # + # [ ] + # A table range with location = (0, 0), row span = 3 and column span = 2 + # specifies the following cells: + # x x + # [ x ] + # Corresponds to the JSON property `tableRange` + # @return [Google::Apis::SlidesV1::TableRange] + attr_accessor :table_range + + # The properties of the TableCell. + # Corresponds to the JSON property `tableCellProperties` + # @return [Google::Apis::SlidesV1::TableCellProperties] + attr_accessor :table_cell_properties + + # The fields that should be updated. + # At least one field must be specified. The root `tableCellProperties` is + # implied and should not be specified. A single `"*"` can be used as + # short-hand for listing every field. + # For example to update the table cell background solid fill color, set + # `fields` to `"tableCellBackgroundFill.solidFill.color"`. + # To reset a property to its default value, include its field name in the + # field mask but leave the field itself unset. + # Corresponds to the JSON property `fields` + # @return [String] + attr_accessor :fields + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + @table_range = args[:table_range] if args.key?(:table_range) + @table_cell_properties = args[:table_cell_properties] if args.key?(:table_cell_properties) + @fields = args[:fields] if args.key?(:fields) + end + end + + # Creates a new slide. + class CreateSlideRequest + include Google::Apis::Core::Hashable + + # Slide layout reference. This may reference either: + # - A predefined layout + # - One of the layouts in the presentation. + # Corresponds to the JSON property `slideLayoutReference` + # @return [Google::Apis::SlidesV1::LayoutReference] + attr_accessor :slide_layout_reference + + # A user-supplied object ID. + # If you specify an ID, it must be unique among all pages and page elements + # in the presentation. The ID must start with an alphanumeric character or an + # underscore (matches regex `[a-zA-Z0-9_]`); remaining characters + # may include those as well as a hyphen or colon (matches regex + # `[a-zA-Z0-9_-:]`). + # The length of the ID must not be less than 5 or greater than 50. + # If you don't specify an ID, a unique one is generated. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + # The optional zero-based index indicating where to insert the slides. + # If you don't specify an index, the new slide is created at the end. + # Corresponds to the JSON property `insertionIndex` + # @return [Fixnum] + attr_accessor :insertion_index + + # An optional list of object ID mappings from the placeholder(s) on the layout + # to the placeholder(s) + # that will be created on the new slide from that specified layout. Can only + # be used when `slide_layout_reference` is specified. + # Corresponds to the JSON property `placeholderIdMappings` + # @return [Array] + attr_accessor :placeholder_id_mappings + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @slide_layout_reference = args[:slide_layout_reference] if args.key?(:slide_layout_reference) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + @insertion_index = args[:insertion_index] if args.key?(:insertion_index) + @placeholder_id_mappings = args[:placeholder_id_mappings] if args.key?(:placeholder_id_mappings) + end + end + + # Request message for PresentationsService.BatchUpdatePresentation. + class BatchUpdatePresentationRequest + include Google::Apis::Core::Hashable + + # A list of updates to apply to the presentation. + # Corresponds to the JSON property `requests` + # @return [Array] + attr_accessor :requests + + # Provides control over how write requests are executed. + # Corresponds to the JSON property `writeControl` + # @return [Google::Apis::SlidesV1::WriteControl] + attr_accessor :write_control + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @requests = args[:requests] if args.key?(:requests) + @write_control = args[:write_control] if args.key?(:write_control) + end + end + + # The general text content. The text must reside in a compatible shape (e.g. + # text box or rectangle) or a table cell in a page. + class TextContent + include Google::Apis::Core::Hashable + + # The text contents broken down into its component parts, including styling + # information. This property is read-only. + # Corresponds to the JSON property `textElements` + # @return [Array] + attr_accessor :text_elements + + # The bulleted lists contained in this text, keyed by list ID. + # Corresponds to the JSON property `lists` + # @return [Hash] + attr_accessor :lists + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @text_elements = args[:text_elements] if args.key?(:text_elements) + @lists = args[:lists] if args.key?(:lists) + end + end + + # The result of creating an embedded Google Sheets chart. + class CreateSheetsChartResponse + include Google::Apis::Core::Hashable + + # The object ID of the created chart. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + end + end + + # Provides control over how write requests are executed. + class WriteControl + include Google::Apis::Core::Hashable + + # The revision ID of the presentation required for the write request. If + # specified and the `required_revision_id` doesn't exactly match the + # presentation's current `revision_id`, the request will not be processed and + # will return a 400 bad request error. + # Corresponds to the JSON property `requiredRevisionId` + # @return [String] + attr_accessor :required_revision_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @required_revision_id = args[:required_revision_id] if args.key?(:required_revision_id) + end + end + + # Deletes bullets from all of the paragraphs that overlap with the given text + # index range. + # The nesting level of each paragraph will be visually preserved by adding + # indent to the start of the corresponding paragraph. + class DeleteParagraphBulletsRequest + include Google::Apis::Core::Hashable + + # The object ID of the shape or table containing the text to delete bullets + # from. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + # Specifies a contiguous range of an indexed collection, such as characters in + # text. + # Corresponds to the JSON property `textRange` + # @return [Google::Apis::SlidesV1::Range] + attr_accessor :text_range + + # A location of a single table cell within a table. + # Corresponds to the JSON property `cellLocation` + # @return [Google::Apis::SlidesV1::TableCellLocation] + attr_accessor :cell_location + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + @text_range = args[:text_range] if args.key?(:text_range) + @cell_location = args[:cell_location] if args.key?(:cell_location) + end + end + + # A TextElement kind that represents the beginning of a new paragraph. + class ParagraphMarker + include Google::Apis::Core::Hashable + + # Describes the bullet of a paragraph. + # Corresponds to the JSON property `bullet` + # @return [Google::Apis::SlidesV1::Bullet] + attr_accessor :bullet + + # Styles that apply to a whole paragraph. + # If this text is contained in a shape with a parent placeholder, then these + # paragraph styles may be + # inherited from the parent. Which paragraph styles are inherited depend on the + # nesting level of lists: + # * A paragraph not in a list will inherit its paragraph style from the + # paragraph at the 0 nesting level of the list inside the parent placeholder. + # * A paragraph in a list will inherit its paragraph style from the paragraph + # at its corresponding nesting level of the list inside the parent + # placeholder. + # Inherited paragraph styles are represented as unset fields in this message. + # Corresponds to the JSON property `style` + # @return [Google::Apis::SlidesV1::ParagraphStyle] + attr_accessor :style + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @bullet = args[:bullet] if args.key?(:bullet) + @style = args[:style] if args.key?(:style) + end + end + # Inserts columns into a table. # Other columns in the table will be resized to fit the new column. class InsertTableColumnsRequest @@ -63,11 +1801,59 @@ module Google end end + # The thumbnail of a page. + class Thumbnail + include Google::Apis::Core::Hashable + + # The positive height in pixels of the thumbnail image. + # Corresponds to the JSON property `height` + # @return [Fixnum] + attr_accessor :height + + # The content URL of the thumbnail image. + # The URL to the image has a default lifetime of 30 minutes. + # This URL is tagged with the account of the requester. Anyone with the URL + # effectively accesses the image as the original requester. Access to the + # image may be lost if the presentation's sharing settings change. + # The mime type of the thumbnail image is the same as specified in the + # `GetPageThumbnailRequest`. + # Corresponds to the JSON property `contentUrl` + # @return [String] + attr_accessor :content_url + + # The positive width in pixels of the thumbnail image. + # Corresponds to the JSON property `width` + # @return [Fixnum] + attr_accessor :width + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @height = args[:height] if args.key?(:height) + @content_url = args[:content_url] if args.key?(:content_url) + @width = args[:width] if args.key?(:width) + end + end + # The user-specified ID mapping for a placeholder that will be created on a # slide from a specified layout. class LayoutPlaceholderIdMapping include Google::Apis::Core::Hashable + # The placeholder information that uniquely identifies a placeholder shape. + # Corresponds to the JSON property `layoutPlaceholder` + # @return [Google::Apis::SlidesV1::Placeholder] + attr_accessor :layout_placeholder + + # The object ID of the placeholder on a layout that will be applied + # to a slide. + # Corresponds to the JSON property `layoutPlaceholderObjectId` + # @return [String] + attr_accessor :layout_placeholder_object_id + # A user-supplied object ID for the placeholder identified above that to be # created onto a slide. # If you specify an ID, it must be unique among all pages and page elements @@ -81,26 +1867,15 @@ module Google # @return [String] attr_accessor :object_id_prop - # The placeholder information that uniquely identifies a placeholder shape. - # Corresponds to the JSON property `layoutPlaceholder` - # @return [Google::Apis::SlidesV1::Placeholder] - attr_accessor :layout_placeholder - - # The object ID of the placeholder on a layout that will be applied - # to a slide. - # Corresponds to the JSON property `layoutPlaceholderObjectId` - # @return [String] - attr_accessor :layout_placeholder_object_id - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) @layout_placeholder = args[:layout_placeholder] if args.key?(:layout_placeholder) @layout_placeholder_object_id = args[:layout_placeholder_object_id] if args.key?(:layout_placeholder_object_id) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) end end @@ -171,14 +1946,6 @@ module Google class Recolor include Google::Apis::Core::Hashable - # The name of the recolor effect. - # The name is determined from the `recolor_stops` by matching the gradient - # against the colors in the page's current color scheme. This property is - # read-only. - # Corresponds to the JSON property `name` - # @return [String] - attr_accessor :name - # The recolor effect is represented by a gradient, which is a list of color # stops. # The colors in the gradient will replace the corresponding colors at @@ -188,14 +1955,22 @@ module Google # @return [Array] attr_accessor :recolor_stops + # The name of the recolor effect. + # The name is determined from the `recolor_stops` by matching the gradient + # against the colors in the page's current color scheme. This property is + # read-only. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @name = args[:name] if args.key?(:name) @recolor_stops = args[:recolor_stops] if args.key?(:recolor_stops) + @name = args[:name] if args.key?(:name) end end @@ -243,6 +2018,11 @@ module Google class RgbColor include Google::Apis::Core::Hashable + # The red component of the color, from 0.0 to 1.0. + # Corresponds to the JSON property `red` + # @return [Float] + attr_accessor :red + # The green component of the color, from 0.0 to 1.0. # Corresponds to the JSON property `green` # @return [Float] @@ -253,20 +2033,15 @@ module Google # @return [Float] attr_accessor :blue - # The red component of the color, from 0.0 to 1.0. - # Corresponds to the JSON property `red` - # @return [Float] - attr_accessor :red - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @red = args[:red] if args.key?(:red) @green = args[:green] if args.key?(:green) @blue = args[:blue] if args.key?(:blue) - @red = args[:red] if args.key?(:red) end end @@ -439,68 +2214,24 @@ module Google class PageProperties include Google::Apis::Core::Hashable - # The page background fill. - # Corresponds to the JSON property `pageBackgroundFill` - # @return [Google::Apis::SlidesV1::PageBackgroundFill] - attr_accessor :page_background_fill - # The palette of predefined colors for a page. # Corresponds to the JSON property `colorScheme` # @return [Google::Apis::SlidesV1::ColorScheme] attr_accessor :color_scheme + # The page background fill. + # Corresponds to the JSON property `pageBackgroundFill` + # @return [Google::Apis::SlidesV1::PageBackgroundFill] + attr_accessor :page_background_fill + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @page_background_fill = args[:page_background_fill] if args.key?(:page_background_fill) @color_scheme = args[:color_scheme] if args.key?(:color_scheme) - end - end - - # Properties and contents of each table cell. - class TableCell - include Google::Apis::Core::Hashable - - # A location of a single table cell within a table. - # Corresponds to the JSON property `location` - # @return [Google::Apis::SlidesV1::TableCellLocation] - attr_accessor :location - - # Row span of the cell. - # Corresponds to the JSON property `rowSpan` - # @return [Fixnum] - attr_accessor :row_span - - # Column span of the cell. - # Corresponds to the JSON property `columnSpan` - # @return [Fixnum] - attr_accessor :column_span - - # The general text content. The text must reside in a compatible shape (e.g. - # text box or rectangle) or a table cell in a page. - # Corresponds to the JSON property `text` - # @return [Google::Apis::SlidesV1::TextContent] - attr_accessor :text - - # The properties of the TableCell. - # Corresponds to the JSON property `tableCellProperties` - # @return [Google::Apis::SlidesV1::TableCellProperties] - attr_accessor :table_cell_properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @location = args[:location] if args.key?(:location) - @row_span = args[:row_span] if args.key?(:row_span) - @column_span = args[:column_span] if args.key?(:column_span) - @text = args[:text] if args.key?(:text) - @table_cell_properties = args[:table_cell_properties] if args.key?(:table_cell_properties) + @page_background_fill = args[:page_background_fill] if args.key?(:page_background_fill) end end @@ -538,15 +2269,54 @@ module Google end end + # Properties and contents of each table cell. + class TableCell + include Google::Apis::Core::Hashable + + # The general text content. The text must reside in a compatible shape (e.g. + # text box or rectangle) or a table cell in a page. + # Corresponds to the JSON property `text` + # @return [Google::Apis::SlidesV1::TextContent] + attr_accessor :text + + # The properties of the TableCell. + # Corresponds to the JSON property `tableCellProperties` + # @return [Google::Apis::SlidesV1::TableCellProperties] + attr_accessor :table_cell_properties + + # A location of a single table cell within a table. + # Corresponds to the JSON property `location` + # @return [Google::Apis::SlidesV1::TableCellLocation] + attr_accessor :location + + # Row span of the cell. + # Corresponds to the JSON property `rowSpan` + # @return [Fixnum] + attr_accessor :row_span + + # Column span of the cell. + # Corresponds to the JSON property `columnSpan` + # @return [Fixnum] + attr_accessor :column_span + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @text = args[:text] if args.key?(:text) + @table_cell_properties = args[:table_cell_properties] if args.key?(:table_cell_properties) + @location = args[:location] if args.key?(:location) + @row_span = args[:row_span] if args.key?(:row_span) + @column_span = args[:column_span] if args.key?(:column_span) + end + end + # Updates the properties of a Line. class UpdateLinePropertiesRequest include Google::Apis::Core::Hashable - # The object ID of the line the update is applied to. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - # The properties of the Line. # When unset, these fields default to values that match the appearance of # new lines created in the Slides editor. @@ -566,15 +2336,20 @@ module Google # @return [String] attr_accessor :fields + # The object ID of the line the update is applied to. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) @line_properties = args[:line_properties] if args.key?(:line_properties) @fields = args[:fields] if args.key?(:fields) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) end end @@ -717,8 +2492,8 @@ module Google # @return [String] attr_accessor :parent_object_id - # The index of the placeholder. If the same placeholder types are the present - # in the same page, they would have different index values. + # The index of the placeholder. If the same placeholder types are present in + # the same page, they would have different index values. # Corresponds to the JSON property `index` # @return [Fixnum] attr_accessor :index @@ -820,9 +2595,11 @@ module Google # to the presentation. # The format of the revision ID may change over time, so it should be treated # opaquely. A returned revision ID is only guaranteed to be valid for 24 - # hours after it has been returned and cannot be shared across - # users. Callers can assume that if two revision IDs are equal then the - # presentation has not changed. + # hours after it has been returned and cannot be shared across users. If the + # revision ID is unchanged between calls, then the presentation has not + # changed. Conversely, a changed ID (for the same presentation and user) + # usually means the presentation has been updated; however, a changed ID can + # also be due to internal factors such as ID format changes. # Corresponds to the JSON property `revisionId` # @return [String] attr_accessor :revision_id @@ -838,17 +2615,17 @@ module Google # @return [Array] attr_accessor :page_elements + # The type of the page. + # Corresponds to the JSON property `pageType` + # @return [String] + attr_accessor :page_type + # The properties of Page that are only # relevant for pages with page_type NOTES. # Corresponds to the JSON property `notesProperties` # @return [Google::Apis::SlidesV1::NotesProperties] attr_accessor :notes_properties - # The type of the page. - # Corresponds to the JSON property `pageType` - # @return [String] - attr_accessor :page_type - # The properties of the Page. # The page will inherit properties from the parent page. Depending on the page # type the hierarchy is defined in either @@ -874,8 +2651,8 @@ module Google @revision_id = args[:revision_id] if args.key?(:revision_id) @layout_properties = args[:layout_properties] if args.key?(:layout_properties) @page_elements = args[:page_elements] if args.key?(:page_elements) - @notes_properties = args[:notes_properties] if args.key?(:notes_properties) @page_type = args[:page_type] if args.key?(:page_type) + @notes_properties = args[:notes_properties] if args.key?(:notes_properties) @page_properties = args[:page_properties] if args.key?(:page_properties) @slide_properties = args[:slide_properties] if args.key?(:slide_properties) end @@ -933,6 +2710,12 @@ module Google class CropProperties include Google::Apis::Core::Hashable + # The rotation angle of the crop window around its center, in radians. + # Rotation angle is applied after the offset. + # Corresponds to the JSON property `angle` + # @return [Float] + attr_accessor :angle + # The offset specifies the top edge of the crop rectangle that is located # below the original bounding rectangle top edge, relative to the object's # original height. @@ -961,23 +2744,17 @@ module Google # @return [Float] attr_accessor :bottom_offset - # The rotation angle of the crop window around its center, in radians. - # Rotation angle is applied after the offset. - # Corresponds to the JSON property `angle` - # @return [Float] - attr_accessor :angle - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @angle = args[:angle] if args.key?(:angle) @top_offset = args[:top_offset] if args.key?(:top_offset) @left_offset = args[:left_offset] if args.key?(:left_offset) @right_offset = args[:right_offset] if args.key?(:right_offset) @bottom_offset = args[:bottom_offset] if args.key?(:bottom_offset) - @angle = args[:angle] if args.key?(:angle) end end @@ -1023,49 +2800,11 @@ module Google end end - # A color and position in a gradient band. - class ColorStop - include Google::Apis::Core::Hashable - - # The alpha value of this color in the gradient band. Defaults to 1.0, - # fully opaque. - # Corresponds to the JSON property `alpha` - # @return [Float] - attr_accessor :alpha - - # The relative position of the color stop in the gradient band measured - # in percentage. The value should be in the interval [0.0, 1.0]. - # Corresponds to the JSON property `position` - # @return [Float] - attr_accessor :position - - # A themeable solid color value. - # Corresponds to the JSON property `color` - # @return [Google::Apis::SlidesV1::OpaqueColor] - attr_accessor :color - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @alpha = args[:alpha] if args.key?(:alpha) - @position = args[:position] if args.key?(:position) - @color = args[:color] if args.key?(:color) - end - end - # Specifies a contiguous range of an indexed collection, such as characters in # text. class Range include Google::Apis::Core::Hashable - # The type of range. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - # The optional zero-based index of the beginning of the collection. # Required for `SPECIFIC_RANGE` and `FROM_START_INDEX` ranges. # Corresponds to the JSON property `startIndex` @@ -1078,15 +2817,53 @@ module Google # @return [Fixnum] attr_accessor :end_index + # The type of range. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @type = args[:type] if args.key?(:type) @start_index = args[:start_index] if args.key?(:start_index) @end_index = args[:end_index] if args.key?(:end_index) + @type = args[:type] if args.key?(:type) + end + end + + # A color and position in a gradient band. + class ColorStop + include Google::Apis::Core::Hashable + + # A themeable solid color value. + # Corresponds to the JSON property `color` + # @return [Google::Apis::SlidesV1::OpaqueColor] + attr_accessor :color + + # The alpha value of this color in the gradient band. Defaults to 1.0, + # fully opaque. + # Corresponds to the JSON property `alpha` + # @return [Float] + attr_accessor :alpha + + # The relative position of the color stop in the gradient band measured + # in percentage. The value should be in the interval [0.0, 1.0]. + # Corresponds to the JSON property `position` + # @return [Float] + attr_accessor :position + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @color = args[:color] if args.key?(:color) + @alpha = args[:alpha] if args.key?(:alpha) + @position = args[:position] if args.key?(:position) end end @@ -1202,19 +2979,10 @@ module Google class Shadow include Google::Apis::Core::Hashable - # The shadow property state. - # Updating the the shadow on a page element will implicitly update this field - # to `RENDERED`, unless another value is specified in the same request. To - # have no shadow on a page element, set this field to `NOT_RENDERED`. In this - # case, any other shadow fields set in the same request will be ignored. - # Corresponds to the JSON property `propertyState` + # The type of the shadow. + # Corresponds to the JSON property `type` # @return [String] - attr_accessor :property_state - - # A magnitude in a single direction in the specified units. - # Corresponds to the JSON property `blurRadius` - # @return [Google::Apis::SlidesV1::Dimension] - attr_accessor :blur_radius + attr_accessor :type # AffineTransform uses a 3x3 matrix with an implied last row of [ 0 0 1 ] # to transform source coordinates (x,y) into destination coordinates (x', y') @@ -1229,11 +2997,6 @@ module Google # @return [Google::Apis::SlidesV1::AffineTransform] attr_accessor :transform - # The type of the shadow. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - # The alignment point of the shadow, that sets the origin for translate, # scale and skew of the shadow. # Corresponds to the JSON property `alignment` @@ -1256,20 +3019,34 @@ module Google attr_accessor :rotate_with_shape alias_method :rotate_with_shape?, :rotate_with_shape + # The shadow property state. + # Updating the the shadow on a page element will implicitly update this field + # to `RENDERED`, unless another value is specified in the same request. To + # have no shadow on a page element, set this field to `NOT_RENDERED`. In this + # case, any other shadow fields set in the same request will be ignored. + # Corresponds to the JSON property `propertyState` + # @return [String] + attr_accessor :property_state + + # A magnitude in a single direction in the specified units. + # Corresponds to the JSON property `blurRadius` + # @return [Google::Apis::SlidesV1::Dimension] + attr_accessor :blur_radius + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @property_state = args[:property_state] if args.key?(:property_state) - @blur_radius = args[:blur_radius] if args.key?(:blur_radius) - @transform = args[:transform] if args.key?(:transform) @type = args[:type] if args.key?(:type) + @transform = args[:transform] if args.key?(:transform) @alignment = args[:alignment] if args.key?(:alignment) @alpha = args[:alpha] if args.key?(:alpha) @color = args[:color] if args.key?(:color) @rotate_with_shape = args[:rotate_with_shape] if args.key?(:rotate_with_shape) + @property_state = args[:property_state] if args.key?(:property_state) + @blur_radius = args[:blur_radius] if args.key?(:blur_radius) end end @@ -1277,24 +3054,24 @@ module Google class DeleteTableRowRequest include Google::Apis::Core::Hashable - # A location of a single table cell within a table. - # Corresponds to the JSON property `cellLocation` - # @return [Google::Apis::SlidesV1::TableCellLocation] - attr_accessor :cell_location - # The table to delete rows from. # Corresponds to the JSON property `tableObjectId` # @return [String] attr_accessor :table_object_id + # A location of a single table cell within a table. + # Corresponds to the JSON property `cellLocation` + # @return [Google::Apis::SlidesV1::TableCellLocation] + attr_accessor :cell_location + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @cell_location = args[:cell_location] if args.key?(:cell_location) @table_object_id = args[:table_object_id] if args.key?(:table_object_id) + @cell_location = args[:cell_location] if args.key?(:cell_location) end end @@ -1302,6 +3079,21 @@ module Google class Bullet include Google::Apis::Core::Hashable + # The ID of the list this paragraph belongs to. + # Corresponds to the JSON property `listId` + # @return [String] + attr_accessor :list_id + + # The rendered bullet glyph for this paragraph. + # Corresponds to the JSON property `glyph` + # @return [String] + attr_accessor :glyph + + # The nesting level of this paragraph in the list. + # Corresponds to the JSON property `nestingLevel` + # @return [Fixnum] + attr_accessor :nesting_level + # Represents the styling that can be applied to a TextRun. # If this text is contained in a shape with a parent placeholder, then these # text styles may be @@ -1321,31 +3113,16 @@ module Google # @return [Google::Apis::SlidesV1::TextStyle] attr_accessor :bullet_style - # The ID of the list this paragraph belongs to. - # Corresponds to the JSON property `listId` - # @return [String] - attr_accessor :list_id - - # The rendered bullet glyph for this paragraph. - # Corresponds to the JSON property `glyph` - # @return [String] - attr_accessor :glyph - - # The nesting level of this paragraph in the list. - # Corresponds to the JSON property `nestingLevel` - # @return [Fixnum] - attr_accessor :nesting_level - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @bullet_style = args[:bullet_style] if args.key?(:bullet_style) @list_id = args[:list_id] if args.key?(:list_id) @glyph = args[:glyph] if args.key?(:glyph) @nesting_level = args[:nesting_level] if args.key?(:nesting_level) + @bullet_style = args[:bullet_style] if args.key?(:bullet_style) end end @@ -1371,6 +3148,25 @@ module Google end end + # The result of creating a line. + class CreateLineResponse + include Google::Apis::Core::Hashable + + # The object ID of the created line. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + end + end + # A location of a single table cell within a table. class TableCellLocation include Google::Apis::Core::Hashable @@ -1396,25 +3192,6 @@ module Google end end - # The result of creating a line. - class CreateLineResponse - include Google::Apis::Core::Hashable - - # The object ID of the created line. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - end - end - # The result of replacing text. class ReplaceAllTextResponse include Google::Apis::Core::Hashable @@ -1564,11 +3341,6 @@ module Google class Image include Google::Apis::Core::Hashable - # The properties of the Image. - # Corresponds to the JSON property `imageProperties` - # @return [Google::Apis::SlidesV1::ImageProperties] - attr_accessor :image_properties - # An URL to an image with a default lifetime of 30 minutes. # This URL is tagged with the account of the requester. Anyone with the URL # effectively accesses the image as the original requester. Access to the @@ -1577,14 +3349,82 @@ module Google # @return [String] attr_accessor :content_url + # The properties of the Image. + # Corresponds to the JSON property `imageProperties` + # @return [Google::Apis::SlidesV1::ImageProperties] + attr_accessor :image_properties + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @image_properties = args[:image_properties] if args.key?(:image_properties) @content_url = args[:content_url] if args.key?(:content_url) + @image_properties = args[:image_properties] if args.key?(:image_properties) + end + end + + # AffineTransform uses a 3x3 matrix with an implied last row of [ 0 0 1 ] + # to transform source coordinates (x,y) into destination coordinates (x', y') + # according to: + # x' x = shear_y scale_y translate_y + # 1 [ 1 ] + # After transformation, + # x' = scale_x * x + shear_x * y + translate_x; + # y' = scale_y * y + shear_y * x + translate_y; + # This message is therefore composed of these six matrix elements. + class AffineTransform + include Google::Apis::Core::Hashable + + # The Y coordinate shearing element. + # Corresponds to the JSON property `shearY` + # @return [Float] + attr_accessor :shear_y + + # The units for translate elements. + # Corresponds to the JSON property `unit` + # @return [String] + attr_accessor :unit + + # The X coordinate scaling element. + # Corresponds to the JSON property `scaleX` + # @return [Float] + attr_accessor :scale_x + + # The X coordinate shearing element. + # Corresponds to the JSON property `shearX` + # @return [Float] + attr_accessor :shear_x + + # The Y coordinate scaling element. + # Corresponds to the JSON property `scaleY` + # @return [Float] + attr_accessor :scale_y + + # The Y coordinate translation element. + # Corresponds to the JSON property `translateY` + # @return [Float] + attr_accessor :translate_y + + # The X coordinate translation element. + # Corresponds to the JSON property `translateX` + # @return [Float] + attr_accessor :translate_x + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @shear_y = args[:shear_y] if args.key?(:shear_y) + @unit = args[:unit] if args.key?(:unit) + @scale_x = args[:scale_x] if args.key?(:scale_x) + @shear_x = args[:shear_x] if args.key?(:shear_x) + @scale_y = args[:scale_y] if args.key?(:scale_y) + @translate_y = args[:translate_y] if args.key?(:translate_y) + @translate_x = args[:translate_x] if args.key?(:translate_x) end end @@ -1641,69 +3481,6 @@ module Google end end - # AffineTransform uses a 3x3 matrix with an implied last row of [ 0 0 1 ] - # to transform source coordinates (x,y) into destination coordinates (x', y') - # according to: - # x' x = shear_y scale_y translate_y - # 1 [ 1 ] - # After transformation, - # x' = scale_x * x + shear_x * y + translate_x; - # y' = scale_y * y + shear_y * x + translate_y; - # This message is therefore composed of these six matrix elements. - class AffineTransform - include Google::Apis::Core::Hashable - - # The units for translate elements. - # Corresponds to the JSON property `unit` - # @return [String] - attr_accessor :unit - - # The X coordinate scaling element. - # Corresponds to the JSON property `scaleX` - # @return [Float] - attr_accessor :scale_x - - # The X coordinate shearing element. - # Corresponds to the JSON property `shearX` - # @return [Float] - attr_accessor :shear_x - - # The Y coordinate scaling element. - # Corresponds to the JSON property `scaleY` - # @return [Float] - attr_accessor :scale_y - - # The Y coordinate translation element. - # Corresponds to the JSON property `translateY` - # @return [Float] - attr_accessor :translate_y - - # The X coordinate translation element. - # Corresponds to the JSON property `translateX` - # @return [Float] - attr_accessor :translate_x - - # The Y coordinate shearing element. - # Corresponds to the JSON property `shearY` - # @return [Float] - attr_accessor :shear_y - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @unit = args[:unit] if args.key?(:unit) - @scale_x = args[:scale_x] if args.key?(:scale_x) - @shear_x = args[:shear_x] if args.key?(:shear_x) - @scale_y = args[:scale_y] if args.key?(:scale_y) - @translate_y = args[:translate_y] if args.key?(:translate_y) - @translate_x = args[:translate_x] if args.key?(:translate_x) - @shear_y = args[:shear_y] if args.key?(:shear_y) - end - end - # A TextElement kind that represents auto text. class AutoText include Google::Apis::Core::Hashable @@ -1768,38 +3545,6 @@ module Google end end - # Deletes text from a shape or a table cell. - class DeleteTextRequest - include Google::Apis::Core::Hashable - - # The object ID of the shape or table from which the text will be deleted. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - # Specifies a contiguous range of an indexed collection, such as characters in - # text. - # Corresponds to the JSON property `textRange` - # @return [Google::Apis::SlidesV1::Range] - attr_accessor :text_range - - # A location of a single table cell within a table. - # Corresponds to the JSON property `cellLocation` - # @return [Google::Apis::SlidesV1::TableCellLocation] - attr_accessor :cell_location - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - @text_range = args[:text_range] if args.key?(:text_range) - @cell_location = args[:cell_location] if args.key?(:cell_location) - end - end - # Updates the transform of a page element. class UpdatePageElementTransformRequest include Google::Apis::Core::Hashable @@ -1839,6 +3584,38 @@ module Google end end + # Deletes text from a shape or a table cell. + class DeleteTextRequest + include Google::Apis::Core::Hashable + + # The object ID of the shape or table from which the text will be deleted. + # Corresponds to the JSON property `objectId` + # @return [String] + attr_accessor :object_id_prop + + # Specifies a contiguous range of an indexed collection, such as characters in + # text. + # Corresponds to the JSON property `textRange` + # @return [Google::Apis::SlidesV1::Range] + attr_accessor :text_range + + # A location of a single table cell within a table. + # Corresponds to the JSON property `cellLocation` + # @return [Google::Apis::SlidesV1::TableCellLocation] + attr_accessor :cell_location + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + @text_range = args[:text_range] if args.key?(:text_range) + @cell_location = args[:cell_location] if args.key?(:cell_location) + end + end + # Deletes an object, either pages or # page elements, from the # presentation. @@ -1864,31 +3641,6 @@ module Google end end - # A magnitude in a single direction in the specified units. - class Dimension - include Google::Apis::Core::Hashable - - # The magnitude. - # Corresponds to the JSON property `magnitude` - # @return [Float] - attr_accessor :magnitude - - # The units for magnitude. - # Corresponds to the JSON property `unit` - # @return [String] - attr_accessor :unit - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @magnitude = args[:magnitude] if args.key?(:magnitude) - @unit = args[:unit] if args.key?(:unit) - end - end - # A TextElement describes the content of a range of indices in the text content # of a Shape or TableCell. class TextElement @@ -1935,6 +3687,31 @@ module Google end end + # A magnitude in a single direction in the specified units. + class Dimension + include Google::Apis::Core::Hashable + + # The magnitude. + # Corresponds to the JSON property `magnitude` + # @return [Float] + attr_accessor :magnitude + + # The units for magnitude. + # Corresponds to the JSON property `unit` + # @return [String] + attr_accessor :unit + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @magnitude = args[:magnitude] if args.key?(:magnitude) + @unit = args[:unit] if args.key?(:unit) + end + end + # The fill of the line. class LineFill include Google::Apis::Core::Hashable @@ -1984,6 +3761,16 @@ module Google class InsertTableRowsRequest include Google::Apis::Core::Hashable + # A location of a single table cell within a table. + # Corresponds to the JSON property `cellLocation` + # @return [Google::Apis::SlidesV1::TableCellLocation] + attr_accessor :cell_location + + # The table to insert rows into. + # Corresponds to the JSON property `tableObjectId` + # @return [String] + attr_accessor :table_object_id + # Whether to insert new rows below the reference cell location. # - `True`: insert below the cell. # - `False`: insert above the cell. @@ -1997,26 +3784,16 @@ module Google # @return [Fixnum] attr_accessor :number - # A location of a single table cell within a table. - # Corresponds to the JSON property `cellLocation` - # @return [Google::Apis::SlidesV1::TableCellLocation] - attr_accessor :cell_location - - # The table to insert rows into. - # Corresponds to the JSON property `tableObjectId` - # @return [String] - attr_accessor :table_object_id - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @insert_below = args[:insert_below] if args.key?(:insert_below) - @number = args[:number] if args.key?(:number) @cell_location = args[:cell_location] if args.key?(:cell_location) @table_object_id = args[:table_object_id] if args.key?(:table_object_id) + @insert_below = args[:insert_below] if args.key?(:insert_below) + @number = args[:number] if args.key?(:number) end end @@ -2052,96 +3829,10 @@ module Google end end - # The properties of the Line. - # When unset, these fields default to values that match the appearance of - # new lines created in the Slides editor. - class LineProperties - include Google::Apis::Core::Hashable - - # The dash style of the line. - # Corresponds to the JSON property `dashStyle` - # @return [String] - attr_accessor :dash_style - - # A hypertext link. - # Corresponds to the JSON property `link` - # @return [Google::Apis::SlidesV1::Link] - attr_accessor :link - - # The style of the arrow at the end of the line. - # Corresponds to the JSON property `endArrow` - # @return [String] - attr_accessor :end_arrow - - # The style of the arrow at the beginning of the line. - # Corresponds to the JSON property `startArrow` - # @return [String] - attr_accessor :start_arrow - - # A magnitude in a single direction in the specified units. - # Corresponds to the JSON property `weight` - # @return [Google::Apis::SlidesV1::Dimension] - attr_accessor :weight - - # The fill of the line. - # Corresponds to the JSON property `lineFill` - # @return [Google::Apis::SlidesV1::LineFill] - attr_accessor :line_fill - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dash_style = args[:dash_style] if args.key?(:dash_style) - @link = args[:link] if args.key?(:link) - @end_arrow = args[:end_arrow] if args.key?(:end_arrow) - @start_arrow = args[:start_arrow] if args.key?(:start_arrow) - @weight = args[:weight] if args.key?(:weight) - @line_fill = args[:line_fill] if args.key?(:line_fill) - end - end - # A Google Slides presentation. class Presentation include Google::Apis::Core::Hashable - # A page in a presentation. - # Corresponds to the JSON property `notesMaster` - # @return [Google::Apis::SlidesV1::Page] - attr_accessor :notes_master - - # The title of the presentation. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # The layouts in the presentation. A layout is a template that determines - # how content is arranged and styled on the slides that inherit from that - # layout. - # Corresponds to the JSON property `layouts` - # @return [Array] - attr_accessor :layouts - - # The slide masters in the presentation. A slide master contains all common - # page elements and the common properties for a set of layouts. They serve - # three purposes: - # - Placeholder shapes on a master contain the default text styles and shape - # properties of all placeholder shapes on pages that use that master. - # - The master page properties define the common page properties inherited by - # its layouts. - # - Any other shapes on the master slide will appear on all slides using that - # master, regardless of their layout. - # Corresponds to the JSON property `masters` - # @return [Array] - attr_accessor :masters - - # The locale of the presentation, as an IETF BCP 47 language tag. - # Corresponds to the JSON property `locale` - # @return [String] - attr_accessor :locale - # A width and height. # Corresponds to the JSON property `pageSize` # @return [Google::Apis::SlidesV1::Size] @@ -2164,28 +3855,116 @@ module Google # presentation. # The format of the revision ID may change over time, so it should be treated # opaquely. A returned revision ID is only guaranteed to be valid for 24 - # hours after it has been returned and cannot be shared across users. Callers - # can assume that if two revision IDs are equal then the presentation has not - # changed. + # hours after it has been returned and cannot be shared across users. If the + # revision ID is unchanged between calls, then the presentation has not + # changed. Conversely, a changed ID (for the same presentation and user) + # usually means the presentation has been updated; however, a changed ID can + # also be due to internal factors such as ID format changes. # Corresponds to the JSON property `revisionId` # @return [String] attr_accessor :revision_id + # A page in a presentation. + # Corresponds to the JSON property `notesMaster` + # @return [Google::Apis::SlidesV1::Page] + attr_accessor :notes_master + + # The layouts in the presentation. A layout is a template that determines + # how content is arranged and styled on the slides that inherit from that + # layout. + # Corresponds to the JSON property `layouts` + # @return [Array] + attr_accessor :layouts + + # The title of the presentation. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # The slide masters in the presentation. A slide master contains all common + # page elements and the common properties for a set of layouts. They serve + # three purposes: + # - Placeholder shapes on a master contain the default text styles and shape + # properties of all placeholder shapes on pages that use that master. + # - The master page properties define the common page properties inherited by + # its layouts. + # - Any other shapes on the master slide will appear on all slides using that + # master, regardless of their layout. + # Corresponds to the JSON property `masters` + # @return [Array] + attr_accessor :masters + + # The locale of the presentation, as an IETF BCP 47 language tag. + # Corresponds to the JSON property `locale` + # @return [String] + attr_accessor :locale + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @notes_master = args[:notes_master] if args.key?(:notes_master) - @title = args[:title] if args.key?(:title) - @layouts = args[:layouts] if args.key?(:layouts) - @masters = args[:masters] if args.key?(:masters) - @locale = args[:locale] if args.key?(:locale) @page_size = args[:page_size] if args.key?(:page_size) @presentation_id = args[:presentation_id] if args.key?(:presentation_id) @slides = args[:slides] if args.key?(:slides) @revision_id = args[:revision_id] if args.key?(:revision_id) + @notes_master = args[:notes_master] if args.key?(:notes_master) + @layouts = args[:layouts] if args.key?(:layouts) + @title = args[:title] if args.key?(:title) + @masters = args[:masters] if args.key?(:masters) + @locale = args[:locale] if args.key?(:locale) + end + end + + # The properties of the Line. + # When unset, these fields default to values that match the appearance of + # new lines created in the Slides editor. + class LineProperties + include Google::Apis::Core::Hashable + + # A hypertext link. + # Corresponds to the JSON property `link` + # @return [Google::Apis::SlidesV1::Link] + attr_accessor :link + + # The dash style of the line. + # Corresponds to the JSON property `dashStyle` + # @return [String] + attr_accessor :dash_style + + # The style of the arrow at the beginning of the line. + # Corresponds to the JSON property `startArrow` + # @return [String] + attr_accessor :start_arrow + + # The style of the arrow at the end of the line. + # Corresponds to the JSON property `endArrow` + # @return [String] + attr_accessor :end_arrow + + # A magnitude in a single direction in the specified units. + # Corresponds to the JSON property `weight` + # @return [Google::Apis::SlidesV1::Dimension] + attr_accessor :weight + + # The fill of the line. + # Corresponds to the JSON property `lineFill` + # @return [Google::Apis::SlidesV1::LineFill] + attr_accessor :line_fill + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @link = args[:link] if args.key?(:link) + @dash_style = args[:dash_style] if args.key?(:dash_style) + @start_arrow = args[:start_arrow] if args.key?(:start_arrow) + @end_arrow = args[:end_arrow] if args.key?(:end_arrow) + @weight = args[:weight] if args.key?(:weight) + @line_fill = args[:line_fill] if args.key?(:line_fill) end end @@ -2227,17 +4006,17 @@ module Google # @return [Google::Apis::SlidesV1::Shadow] attr_accessor :shadow - # A hypertext link. - # Corresponds to the JSON property `link` - # @return [Google::Apis::SlidesV1::Link] - attr_accessor :link - # The contrast effect of the image. The value should be in the interval # [-1.0, 1.0], where 0 means no effect. This property is read-only. # Corresponds to the JSON property `contrast` # @return [Float] attr_accessor :contrast + # A hypertext link. + # Corresponds to the JSON property `link` + # @return [Google::Apis::SlidesV1::Link] + attr_accessor :link + # A recolor effect applied on an image. # Corresponds to the JSON property `recolor` # @return [Google::Apis::SlidesV1::Recolor] @@ -2293,8 +4072,8 @@ module Google # Update properties of this object def update!(**args) @shadow = args[:shadow] if args.key?(:shadow) - @link = args[:link] if args.key?(:link) @contrast = args[:contrast] if args.key?(:contrast) + @link = args[:link] if args.key?(:link) @recolor = args[:recolor] if args.key?(:recolor) @crop_properties = args[:crop_properties] if args.key?(:crop_properties) @outline = args[:outline] if args.key?(:outline) @@ -2327,6 +4106,11 @@ module Google class Line include Google::Apis::Core::Hashable + # The type of the line. + # Corresponds to the JSON property `lineType` + # @return [String] + attr_accessor :line_type + # The properties of the Line. # When unset, these fields default to values that match the appearance of # new lines created in the Slides editor. @@ -2334,45 +4118,14 @@ module Google # @return [Google::Apis::SlidesV1::LineProperties] attr_accessor :line_properties - # The type of the line. - # Corresponds to the JSON property `lineType` - # @return [String] - attr_accessor :line_type - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @line_properties = args[:line_properties] if args.key?(:line_properties) @line_type = args[:line_type] if args.key?(:line_type) - end - end - - # Response message from a batch update. - class BatchUpdatePresentationResponse - include Google::Apis::Core::Hashable - - # The presentation the updates were applied to. - # Corresponds to the JSON property `presentationId` - # @return [String] - attr_accessor :presentation_id - - # The reply of the updates. This maps 1:1 with the updates, although - # replies to some requests may be empty. - # Corresponds to the JSON property `replies` - # @return [Array] - attr_accessor :replies - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @presentation_id = args[:presentation_id] if args.key?(:presentation_id) - @replies = args[:replies] if args.key?(:replies) + @line_properties = args[:line_properties] if args.key?(:line_properties) end end @@ -2382,6 +4135,11 @@ module Google class CreateSheetsChartRequest include Google::Apis::Core::Hashable + # The ID of the specific chart in the Google Sheets spreadsheet. + # Corresponds to the JSON property `chartId` + # @return [Fixnum] + attr_accessor :chart_id + # A user-supplied object ID. # If specified, the ID must be unique among all pages and page elements in # the presentation. The ID should start with a word character [a-zA-Z0-9_] @@ -2412,10 +4170,34 @@ module Google # @return [String] attr_accessor :linking_mode - # The ID of the specific chart in the Google Sheets spreadsheet. - # Corresponds to the JSON property `chartId` - # @return [Fixnum] - attr_accessor :chart_id + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @chart_id = args[:chart_id] if args.key?(:chart_id) + @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) + @element_properties = args[:element_properties] if args.key?(:element_properties) + @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) + @linking_mode = args[:linking_mode] if args.key?(:linking_mode) + end + end + + # Response message from a batch update. + class BatchUpdatePresentationResponse + include Google::Apis::Core::Hashable + + # The presentation the updates were applied to. + # Corresponds to the JSON property `presentationId` + # @return [String] + attr_accessor :presentation_id + + # The reply of the updates. This maps 1:1 with the updates, although + # replies to some requests may be empty. + # Corresponds to the JSON property `replies` + # @return [Array] + attr_accessor :replies def initialize(**args) update!(**args) @@ -2423,11 +4205,8 @@ module Google # Update properties of this object def update!(**args) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - @element_properties = args[:element_properties] if args.key?(:element_properties) - @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) - @linking_mode = args[:linking_mode] if args.key?(:linking_mode) - @chart_id = args[:chart_id] if args.key?(:chart_id) + @presentation_id = args[:presentation_id] if args.key?(:presentation_id) + @replies = args[:replies] if args.key?(:replies) end end @@ -2455,6 +4234,11 @@ module Google class SlideProperties include Google::Apis::Core::Hashable + # A page in a presentation. + # Corresponds to the JSON property `notesPage` + # @return [Google::Apis::SlidesV1::Page] + attr_accessor :notes_page + # The object ID of the layout that this slide is based on. # Corresponds to the JSON property `layoutObjectId` # @return [String] @@ -2465,20 +4249,15 @@ module Google # @return [String] attr_accessor :master_object_id - # A page in a presentation. - # Corresponds to the JSON property `notesPage` - # @return [Google::Apis::SlidesV1::Page] - attr_accessor :notes_page - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @notes_page = args[:notes_page] if args.key?(:notes_page) @layout_object_id = args[:layout_object_id] if args.key?(:layout_object_id) @master_object_id = args[:master_object_id] if args.key?(:master_object_id) - @notes_page = args[:notes_page] if args.key?(:notes_page) end end @@ -2486,6 +4265,31 @@ module Google class Response include Google::Apis::Core::Hashable + # The result of creating an image. + # Corresponds to the JSON property `createImage` + # @return [Google::Apis::SlidesV1::CreateImageResponse] + attr_accessor :create_image + + # The result of creating a video. + # Corresponds to the JSON property `createVideo` + # @return [Google::Apis::SlidesV1::CreateVideoResponse] + attr_accessor :create_video + + # The result of replacing shapes with a Google Sheets chart. + # Corresponds to the JSON property `replaceAllShapesWithSheetsChart` + # @return [Google::Apis::SlidesV1::ReplaceAllShapesWithSheetsChartResponse] + attr_accessor :replace_all_shapes_with_sheets_chart + + # The result of creating an embedded Google Sheets chart. + # Corresponds to the JSON property `createSheetsChart` + # @return [Google::Apis::SlidesV1::CreateSheetsChartResponse] + attr_accessor :create_sheets_chart + + # The result of replacing shapes with an image. + # Corresponds to the JSON property `replaceAllShapesWithImage` + # @return [Google::Apis::SlidesV1::ReplaceAllShapesWithImageResponse] + attr_accessor :replace_all_shapes_with_image + # The result of creating a table. # Corresponds to the JSON property `createTable` # @return [Google::Apis::SlidesV1::CreateTableResponse] @@ -2516,30 +4320,42 @@ module Google # @return [Google::Apis::SlidesV1::CreateLineResponse] attr_accessor :create_line - # The result of creating an image. - # Corresponds to the JSON property `createImage` - # @return [Google::Apis::SlidesV1::CreateImageResponse] - attr_accessor :create_image + def initialize(**args) + update!(**args) + end - # The result of creating a video. - # Corresponds to the JSON property `createVideo` - # @return [Google::Apis::SlidesV1::CreateVideoResponse] - attr_accessor :create_video + # Update properties of this object + def update!(**args) + @create_image = args[:create_image] if args.key?(:create_image) + @create_video = args[:create_video] if args.key?(:create_video) + @replace_all_shapes_with_sheets_chart = args[:replace_all_shapes_with_sheets_chart] if args.key?(:replace_all_shapes_with_sheets_chart) + @create_sheets_chart = args[:create_sheets_chart] if args.key?(:create_sheets_chart) + @replace_all_shapes_with_image = args[:replace_all_shapes_with_image] if args.key?(:replace_all_shapes_with_image) + @create_table = args[:create_table] if args.key?(:create_table) + @replace_all_text = args[:replace_all_text] if args.key?(:replace_all_text) + @create_slide = args[:create_slide] if args.key?(:create_slide) + @create_shape = args[:create_shape] if args.key?(:create_shape) + @duplicate_object = args[:duplicate_object] if args.key?(:duplicate_object) + @create_line = args[:create_line] if args.key?(:create_line) + end + end - # The result of replacing shapes with a Google Sheets chart. - # Corresponds to the JSON property `replaceAllShapesWithSheetsChart` - # @return [Google::Apis::SlidesV1::ReplaceAllShapesWithSheetsChartResponse] - attr_accessor :replace_all_shapes_with_sheets_chart + # A criteria that matches a specific string of text in a shape or table. + class SubstringMatchCriteria + include Google::Apis::Core::Hashable - # The result of creating an embedded Google Sheets chart. - # Corresponds to the JSON property `createSheetsChart` - # @return [Google::Apis::SlidesV1::CreateSheetsChartResponse] - attr_accessor :create_sheets_chart + # The text to search for in the shape or table. + # Corresponds to the JSON property `text` + # @return [String] + attr_accessor :text - # The result of replacing shapes with an image. - # Corresponds to the JSON property `replaceAllShapesWithImage` - # @return [Google::Apis::SlidesV1::ReplaceAllShapesWithImageResponse] - attr_accessor :replace_all_shapes_with_image + # Indicates whether the search should respect case: + # - `True`: the search is case sensitive. + # - `False`: the search is case insensitive. + # Corresponds to the JSON property `matchCase` + # @return [Boolean] + attr_accessor :match_case + alias_method :match_case?, :match_case def initialize(**args) update!(**args) @@ -2547,17 +4363,35 @@ module Google # Update properties of this object def update!(**args) - @create_table = args[:create_table] if args.key?(:create_table) - @replace_all_text = args[:replace_all_text] if args.key?(:replace_all_text) - @create_slide = args[:create_slide] if args.key?(:create_slide) - @create_shape = args[:create_shape] if args.key?(:create_shape) - @duplicate_object = args[:duplicate_object] if args.key?(:duplicate_object) - @create_line = args[:create_line] if args.key?(:create_line) - @create_image = args[:create_image] if args.key?(:create_image) - @create_video = args[:create_video] if args.key?(:create_video) - @replace_all_shapes_with_sheets_chart = args[:replace_all_shapes_with_sheets_chart] if args.key?(:replace_all_shapes_with_sheets_chart) - @create_sheets_chart = args[:create_sheets_chart] if args.key?(:create_sheets_chart) - @replace_all_shapes_with_image = args[:replace_all_shapes_with_image] if args.key?(:replace_all_shapes_with_image) + @text = args[:text] if args.key?(:text) + @match_case = args[:match_case] if args.key?(:match_case) + end + end + + # Slide layout reference. This may reference either: + # - A predefined layout + # - One of the layouts in the presentation. + class LayoutReference + include Google::Apis::Core::Hashable + + # Predefined layout. + # Corresponds to the JSON property `predefinedLayout` + # @return [String] + attr_accessor :predefined_layout + + # Layout ID: the object ID of one of the layouts in the presentation. + # Corresponds to the JSON property `layoutId` + # @return [String] + attr_accessor :layout_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @predefined_layout = args[:predefined_layout] if args.key?(:predefined_layout) + @layout_id = args[:layout_id] if args.key?(:layout_id) end end @@ -2601,61 +4435,6 @@ module Google end end - # Slide layout reference. This may reference either: - # - A predefined layout - # - One of the layouts in the presentation. - class LayoutReference - include Google::Apis::Core::Hashable - - # Layout ID: the object ID of one of the layouts in the presentation. - # Corresponds to the JSON property `layoutId` - # @return [String] - attr_accessor :layout_id - - # Predefined layout. - # Corresponds to the JSON property `predefinedLayout` - # @return [String] - attr_accessor :predefined_layout - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @layout_id = args[:layout_id] if args.key?(:layout_id) - @predefined_layout = args[:predefined_layout] if args.key?(:predefined_layout) - end - end - - # A criteria that matches a specific string of text in a shape or table. - class SubstringMatchCriteria - include Google::Apis::Core::Hashable - - # The text to search for in the shape or table. - # Corresponds to the JSON property `text` - # @return [String] - attr_accessor :text - - # Indicates whether the search should respect case: - # - `True`: the search is case sensitive. - # - `False`: the search is case insensitive. - # Corresponds to the JSON property `matchCase` - # @return [Boolean] - attr_accessor :match_case - alias_method :match_case?, :match_case - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @text = args[:text] if args.key?(:text) - @match_case = args[:match_case] if args.key?(:match_case) - end - end - # A table range represents a reference to a subset of a table. # It's important to note that the cells specified by a table range do not # necessarily form a rectangle. For example, let's say we have a 3 x 3 table @@ -2670,6 +4449,11 @@ module Google class TableRange include Google::Apis::Core::Hashable + # The column span of the table range. + # Corresponds to the JSON property `columnSpan` + # @return [Fixnum] + attr_accessor :column_span + # A location of a single table cell within a table. # Corresponds to the JSON property `location` # @return [Google::Apis::SlidesV1::TableCellLocation] @@ -2680,1717 +4464,15 @@ module Google # @return [Fixnum] attr_accessor :row_span - # The column span of the table range. - # Corresponds to the JSON property `columnSpan` - # @return [Fixnum] - attr_accessor :column_span - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @column_span = args[:column_span] if args.key?(:column_span) @location = args[:location] if args.key?(:location) @row_span = args[:row_span] if args.key?(:row_span) - @column_span = args[:column_span] if args.key?(:column_span) - end - end - - # Creates a new table. - class CreateTableRequest - include Google::Apis::Core::Hashable - - # Number of rows in the table. - # Corresponds to the JSON property `rows` - # @return [Fixnum] - attr_accessor :rows - - # A user-supplied object ID. - # If you specify an ID, it must be unique among all pages and page elements - # in the presentation. The ID must start with an alphanumeric character or an - # underscore (matches regex `[a-zA-Z0-9_]`); remaining characters - # may include those as well as a hyphen or colon (matches regex - # `[a-zA-Z0-9_-:]`). - # The length of the ID must not be less than 5 or greater than 50. - # If you don't specify an ID, a unique one is generated. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - # Number of columns in the table. - # Corresponds to the JSON property `columns` - # @return [Fixnum] - attr_accessor :columns - - # Common properties for a page element. - # Note: When you initially create a - # PageElement, the API may modify - # the values of both `size` and `transform`, but the - # visual size will be unchanged. - # Corresponds to the JSON property `elementProperties` - # @return [Google::Apis::SlidesV1::PageElementProperties] - attr_accessor :element_properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @rows = args[:rows] if args.key?(:rows) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - @columns = args[:columns] if args.key?(:columns) - @element_properties = args[:element_properties] if args.key?(:element_properties) - end - end - - # The result of creating a table. - class CreateTableResponse - include Google::Apis::Core::Hashable - - # The object ID of the created table. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - end - end - - # A PageElement kind representing a - # table. - class Table - include Google::Apis::Core::Hashable - - # Properties of each column. - # Corresponds to the JSON property `tableColumns` - # @return [Array] - attr_accessor :table_columns - - # Number of columns in the table. - # Corresponds to the JSON property `columns` - # @return [Fixnum] - attr_accessor :columns - - # Properties and contents of each row. - # Cells that span multiple rows are contained in only one of these rows and - # have a row_span greater - # than 1. - # Corresponds to the JSON property `tableRows` - # @return [Array] - attr_accessor :table_rows - - # Number of rows in the table. - # Corresponds to the JSON property `rows` - # @return [Fixnum] - attr_accessor :rows - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @table_columns = args[:table_columns] if args.key?(:table_columns) - @columns = args[:columns] if args.key?(:columns) - @table_rows = args[:table_rows] if args.key?(:table_rows) - @rows = args[:rows] if args.key?(:rows) - end - end - - # The page background fill. - class PageBackgroundFill - include Google::Apis::Core::Hashable - - # A solid color fill. The page or page element is filled entirely with the - # specified color value. - # If any field is unset, its value may be inherited from a parent placeholder - # if it exists. - # Corresponds to the JSON property `solidFill` - # @return [Google::Apis::SlidesV1::SolidFill] - attr_accessor :solid_fill - - # The background fill property state. - # Updating the the fill on a page will implicitly update this field to - # `RENDERED`, unless another value is specified in the same request. To - # have no fill on a page, set this field to `NOT_RENDERED`. In this case, - # any other fill fields set in the same request will be ignored. - # Corresponds to the JSON property `propertyState` - # @return [String] - attr_accessor :property_state - - # The stretched picture fill. The page or page element is filled entirely with - # the specified picture. The picture is stretched to fit its container. - # Corresponds to the JSON property `stretchedPictureFill` - # @return [Google::Apis::SlidesV1::StretchedPictureFill] - attr_accessor :stretched_picture_fill - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @solid_fill = args[:solid_fill] if args.key?(:solid_fill) - @property_state = args[:property_state] if args.key?(:property_state) - @stretched_picture_fill = args[:stretched_picture_fill] if args.key?(:stretched_picture_fill) - end - end - - # A PageElement kind representing - # a linked chart embedded from Google Sheets. - class SheetsChart - include Google::Apis::Core::Hashable - - # The properties of the SheetsChart. - # Corresponds to the JSON property `sheetsChartProperties` - # @return [Google::Apis::SlidesV1::SheetsChartProperties] - attr_accessor :sheets_chart_properties - - # The URL of an image of the embedded chart, with a default lifetime of 30 - # minutes. This URL is tagged with the account of the requester. Anyone with - # the URL effectively accesses the image as the original requester. Access to - # the image may be lost if the presentation's sharing settings change. - # Corresponds to the JSON property `contentUrl` - # @return [String] - attr_accessor :content_url - - # The ID of the Google Sheets spreadsheet that contains the source chart. - # Corresponds to the JSON property `spreadsheetId` - # @return [String] - attr_accessor :spreadsheet_id - - # The ID of the specific chart in the Google Sheets spreadsheet that is - # embedded. - # Corresponds to the JSON property `chartId` - # @return [Fixnum] - attr_accessor :chart_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @sheets_chart_properties = args[:sheets_chart_properties] if args.key?(:sheets_chart_properties) - @content_url = args[:content_url] if args.key?(:content_url) - @spreadsheet_id = args[:spreadsheet_id] if args.key?(:spreadsheet_id) - @chart_id = args[:chart_id] if args.key?(:chart_id) - end - end - - # A solid color fill. The page or page element is filled entirely with the - # specified color value. - # If any field is unset, its value may be inherited from a parent placeholder - # if it exists. - class SolidFill - include Google::Apis::Core::Hashable - - # The fraction of this `color` that should be applied to the pixel. - # That is, the final pixel color is defined by the equation: - # pixel color = alpha * (color) + (1.0 - alpha) * (background color) - # This means that a value of 1.0 corresponds to a solid color, whereas - # a value of 0.0 corresponds to a completely transparent color. - # Corresponds to the JSON property `alpha` - # @return [Float] - attr_accessor :alpha - - # A themeable solid color value. - # Corresponds to the JSON property `color` - # @return [Google::Apis::SlidesV1::OpaqueColor] - attr_accessor :color - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @alpha = args[:alpha] if args.key?(:alpha) - @color = args[:color] if args.key?(:color) - end - end - - # A pair mapping a theme color type to the concrete color it represents. - class ThemeColorPair - include Google::Apis::Core::Hashable - - # An RGB color. - # Corresponds to the JSON property `color` - # @return [Google::Apis::SlidesV1::RgbColor] - attr_accessor :color - - # The type of the theme color. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @color = args[:color] if args.key?(:color) - @type = args[:type] if args.key?(:type) - end - end - - # A color that can either be fully opaque or fully transparent. - class OptionalColor - include Google::Apis::Core::Hashable - - # A themeable solid color value. - # Corresponds to the JSON property `opaqueColor` - # @return [Google::Apis::SlidesV1::OpaqueColor] - attr_accessor :opaque_color - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @opaque_color = args[:opaque_color] if args.key?(:opaque_color) - end - end - - # Common properties for a page element. - # Note: When you initially create a - # PageElement, the API may modify - # the values of both `size` and `transform`, but the - # visual size will be unchanged. - class PageElementProperties - include Google::Apis::Core::Hashable - - # AffineTransform uses a 3x3 matrix with an implied last row of [ 0 0 1 ] - # to transform source coordinates (x,y) into destination coordinates (x', y') - # according to: - # x' x = shear_y scale_y translate_y - # 1 [ 1 ] - # After transformation, - # x' = scale_x * x + shear_x * y + translate_x; - # y' = scale_y * y + shear_y * x + translate_y; - # This message is therefore composed of these six matrix elements. - # Corresponds to the JSON property `transform` - # @return [Google::Apis::SlidesV1::AffineTransform] - attr_accessor :transform - - # The object ID of the page where the element is located. - # Corresponds to the JSON property `pageObjectId` - # @return [String] - attr_accessor :page_object_id - - # A width and height. - # Corresponds to the JSON property `size` - # @return [Google::Apis::SlidesV1::Size] - attr_accessor :size - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @transform = args[:transform] if args.key?(:transform) - @page_object_id = args[:page_object_id] if args.key?(:page_object_id) - @size = args[:size] if args.key?(:size) - end - end - - # The properties of the SheetsChart. - class SheetsChartProperties - include Google::Apis::Core::Hashable - - # The properties of the Image. - # Corresponds to the JSON property `chartImageProperties` - # @return [Google::Apis::SlidesV1::ImageProperties] - attr_accessor :chart_image_properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @chart_image_properties = args[:chart_image_properties] if args.key?(:chart_image_properties) - end - end - - # The stretched picture fill. The page or page element is filled entirely with - # the specified picture. The picture is stretched to fit its container. - class StretchedPictureFill - include Google::Apis::Core::Hashable - - # A width and height. - # Corresponds to the JSON property `size` - # @return [Google::Apis::SlidesV1::Size] - attr_accessor :size - - # Reading the content_url: - # An URL to a picture with a default lifetime of 30 minutes. - # This URL is tagged with the account of the requester. Anyone with the URL - # effectively accesses the picture as the original requester. Access to the - # picture may be lost if the presentation's sharing settings change. - # Writing the content_url: - # The picture is fetched once at insertion time and a copy is stored for - # display inside the presentation. Pictures must be less than 50MB in size, - # cannot exceed 25 megapixels, and must be in either in PNG, JPEG, or GIF - # format. - # Corresponds to the JSON property `contentUrl` - # @return [String] - attr_accessor :content_url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @size = args[:size] if args.key?(:size) - @content_url = args[:content_url] if args.key?(:content_url) - end - end - - # Deletes a column from a table. - class DeleteTableColumnRequest - include Google::Apis::Core::Hashable - - # A location of a single table cell within a table. - # Corresponds to the JSON property `cellLocation` - # @return [Google::Apis::SlidesV1::TableCellLocation] - attr_accessor :cell_location - - # The table to delete columns from. - # Corresponds to the JSON property `tableObjectId` - # @return [String] - attr_accessor :table_object_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cell_location = args[:cell_location] if args.key?(:cell_location) - @table_object_id = args[:table_object_id] if args.key?(:table_object_id) - end - end - - # Update the styling of text in a Shape or - # Table. - class UpdateTextStyleRequest - include Google::Apis::Core::Hashable - - # A location of a single table cell within a table. - # Corresponds to the JSON property `cellLocation` - # @return [Google::Apis::SlidesV1::TableCellLocation] - attr_accessor :cell_location - - # Represents the styling that can be applied to a TextRun. - # If this text is contained in a shape with a parent placeholder, then these - # text styles may be - # inherited from the parent. Which text styles are inherited depend on the - # nesting level of lists: - # * A text run in a paragraph that is not in a list will inherit its text style - # from the the newline character in the paragraph at the 0 nesting level of - # the list inside the parent placeholder. - # * A text run in a paragraph that is in a list will inherit its text style - # from the newline character in the paragraph at its corresponding nesting - # level of the list inside the parent placeholder. - # Inherited text styles are represented as unset fields in this message. If - # text is contained in a shape without a parent placeholder, unsetting these - # fields will revert the style to a value matching the defaults in the Slides - # editor. - # Corresponds to the JSON property `style` - # @return [Google::Apis::SlidesV1::TextStyle] - attr_accessor :style - - # The fields that should be updated. - # At least one field must be specified. The root `style` is implied and - # should not be specified. A single `"*"` can be used as short-hand for - # listing every field. - # For example, to update the text style to bold, set `fields` to `"bold"`. - # To reset a property to its default value, include its field name in the - # field mask but leave the field itself unset. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - # The object ID of the shape or table with the text to be styled. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - # Specifies a contiguous range of an indexed collection, such as characters in - # text. - # Corresponds to the JSON property `textRange` - # @return [Google::Apis::SlidesV1::Range] - attr_accessor :text_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cell_location = args[:cell_location] if args.key?(:cell_location) - @style = args[:style] if args.key?(:style) - @fields = args[:fields] if args.key?(:fields) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - @text_range = args[:text_range] if args.key?(:text_range) - end - end - - # A List describes the look and feel of bullets belonging to paragraphs - # associated with a list. A paragraph that is part of a list has an implicit - # reference to that list's ID. - class List - include Google::Apis::Core::Hashable - - # The ID of the list. - # Corresponds to the JSON property `listId` - # @return [String] - attr_accessor :list_id - - # A map of nesting levels to the properties of bullets at the associated - # level. A list has at most nine levels of nesting, so the possible values - # for the keys of this map are 0 through 8, inclusive. - # Corresponds to the JSON property `nestingLevel` - # @return [Hash] - attr_accessor :nesting_level - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @list_id = args[:list_id] if args.key?(:list_id) - @nesting_level = args[:nesting_level] if args.key?(:nesting_level) - end - end - - # A visual element rendered on a page. - class PageElement - include Google::Apis::Core::Hashable - - # A PageElement kind representing a - # line, curved connector, or bent connector. - # Corresponds to the JSON property `line` - # @return [Google::Apis::SlidesV1::Line] - attr_accessor :line - - # The description of the page element. Combined with title to display alt - # text. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # A PageElement kind representing a - # joined collection of PageElements. - # Corresponds to the JSON property `elementGroup` - # @return [Google::Apis::SlidesV1::Group] - attr_accessor :element_group - - # A PageElement kind representing an - # image. - # Corresponds to the JSON property `image` - # @return [Google::Apis::SlidesV1::Image] - attr_accessor :image - - # A width and height. - # Corresponds to the JSON property `size` - # @return [Google::Apis::SlidesV1::Size] - attr_accessor :size - - # The title of the page element. Combined with description to display alt - # text. - # Corresponds to the JSON property `title` - # @return [String] - attr_accessor :title - - # A PageElement kind representing - # a linked chart embedded from Google Sheets. - # Corresponds to the JSON property `sheetsChart` - # @return [Google::Apis::SlidesV1::SheetsChart] - attr_accessor :sheets_chart - - # A PageElement kind representing a - # video. - # Corresponds to the JSON property `video` - # @return [Google::Apis::SlidesV1::Video] - attr_accessor :video - - # A PageElement kind representing - # word art. - # Corresponds to the JSON property `wordArt` - # @return [Google::Apis::SlidesV1::WordArt] - attr_accessor :word_art - - # A PageElement kind representing a - # table. - # Corresponds to the JSON property `table` - # @return [Google::Apis::SlidesV1::Table] - attr_accessor :table - - # AffineTransform uses a 3x3 matrix with an implied last row of [ 0 0 1 ] - # to transform source coordinates (x,y) into destination coordinates (x', y') - # according to: - # x' x = shear_y scale_y translate_y - # 1 [ 1 ] - # After transformation, - # x' = scale_x * x + shear_x * y + translate_x; - # y' = scale_y * y + shear_y * x + translate_y; - # This message is therefore composed of these six matrix elements. - # Corresponds to the JSON property `transform` - # @return [Google::Apis::SlidesV1::AffineTransform] - attr_accessor :transform - - # The object ID for this page element. Object IDs used by - # google.apps.slides.v1.Page and - # google.apps.slides.v1.PageElement share the same namespace. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - # A PageElement kind representing a - # generic shape that does not have a more specific classification. - # Corresponds to the JSON property `shape` - # @return [Google::Apis::SlidesV1::Shape] - attr_accessor :shape - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @line = args[:line] if args.key?(:line) - @description = args[:description] if args.key?(:description) - @element_group = args[:element_group] if args.key?(:element_group) - @image = args[:image] if args.key?(:image) - @size = args[:size] if args.key?(:size) - @title = args[:title] if args.key?(:title) - @sheets_chart = args[:sheets_chart] if args.key?(:sheets_chart) - @video = args[:video] if args.key?(:video) - @word_art = args[:word_art] if args.key?(:word_art) - @table = args[:table] if args.key?(:table) - @transform = args[:transform] if args.key?(:transform) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - @shape = args[:shape] if args.key?(:shape) - end - end - - # Creates an image. - class CreateImageRequest - include Google::Apis::Core::Hashable - - # A user-supplied object ID. - # If you specify an ID, it must be unique among all pages and page elements - # in the presentation. The ID must start with an alphanumeric character or an - # underscore (matches regex `[a-zA-Z0-9_]`); remaining characters - # may include those as well as a hyphen or colon (matches regex - # `[a-zA-Z0-9_-:]`). - # The length of the ID must not be less than 5 or greater than 50. - # If you don't specify an ID, a unique one is generated. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - # Common properties for a page element. - # Note: When you initially create a - # PageElement, the API may modify - # the values of both `size` and `transform`, but the - # visual size will be unchanged. - # Corresponds to the JSON property `elementProperties` - # @return [Google::Apis::SlidesV1::PageElementProperties] - attr_accessor :element_properties - - # The image URL. - # The image is fetched once at insertion time and a copy is stored for - # display inside the presentation. Images must be less than 50MB in size, - # cannot exceed 25 megapixels, and must be in either in PNG, JPEG, or GIF - # format. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - @element_properties = args[:element_properties] if args.key?(:element_properties) - @url = args[:url] if args.key?(:url) - end - end - - # Creates bullets for all of the paragraphs that overlap with the given - # text index range. - # The nesting level of each paragraph will be determined by counting leading - # tabs in front of each paragraph. To avoid excess space between the bullet and - # the corresponding paragraph, these leading tabs are removed by this request. - # This may change the indices of parts of the text. - # If the paragraph immediately before paragraphs being updated is in a list - # with a matching preset, the paragraphs being updated are added to that - # preceding list. - class CreateParagraphBulletsRequest - include Google::Apis::Core::Hashable - - # The object ID of the shape or table containing the text to add bullets to. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - # Specifies a contiguous range of an indexed collection, such as characters in - # text. - # Corresponds to the JSON property `textRange` - # @return [Google::Apis::SlidesV1::Range] - attr_accessor :text_range - - # The kinds of bullet glyphs to be used. Defaults to the - # `BULLET_DISC_CIRCLE_SQUARE` preset. - # Corresponds to the JSON property `bulletPreset` - # @return [String] - attr_accessor :bullet_preset - - # A location of a single table cell within a table. - # Corresponds to the JSON property `cellLocation` - # @return [Google::Apis::SlidesV1::TableCellLocation] - attr_accessor :cell_location - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - @text_range = args[:text_range] if args.key?(:text_range) - @bullet_preset = args[:bullet_preset] if args.key?(:bullet_preset) - @cell_location = args[:cell_location] if args.key?(:cell_location) - end - end - - # A width and height. - class Size - include Google::Apis::Core::Hashable - - # A magnitude in a single direction in the specified units. - # Corresponds to the JSON property `height` - # @return [Google::Apis::SlidesV1::Dimension] - attr_accessor :height - - # A magnitude in a single direction in the specified units. - # Corresponds to the JSON property `width` - # @return [Google::Apis::SlidesV1::Dimension] - attr_accessor :width - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @height = args[:height] if args.key?(:height) - @width = args[:width] if args.key?(:width) - end - end - - # Represents the styling that can be applied to a TextRun. - # If this text is contained in a shape with a parent placeholder, then these - # text styles may be - # inherited from the parent. Which text styles are inherited depend on the - # nesting level of lists: - # * A text run in a paragraph that is not in a list will inherit its text style - # from the the newline character in the paragraph at the 0 nesting level of - # the list inside the parent placeholder. - # * A text run in a paragraph that is in a list will inherit its text style - # from the newline character in the paragraph at its corresponding nesting - # level of the list inside the parent placeholder. - # Inherited text styles are represented as unset fields in this message. If - # text is contained in a shape without a parent placeholder, unsetting these - # fields will revert the style to a value matching the defaults in the Slides - # editor. - class TextStyle - include Google::Apis::Core::Hashable - - # A hypertext link. - # Corresponds to the JSON property `link` - # @return [Google::Apis::SlidesV1::Link] - attr_accessor :link - - # Whether or not the text is underlined. - # Corresponds to the JSON property `underline` - # @return [Boolean] - attr_accessor :underline - alias_method :underline?, :underline - - # Whether or not the text is rendered as bold. - # Corresponds to the JSON property `bold` - # @return [Boolean] - attr_accessor :bold - alias_method :bold?, :bold - - # A color that can either be fully opaque or fully transparent. - # Corresponds to the JSON property `foregroundColor` - # @return [Google::Apis::SlidesV1::OptionalColor] - attr_accessor :foreground_color - - # The font family of the text. - # The font family can be any font from the Font menu in Slides or from - # [Google Fonts] (https://fonts.google.com/). If the font name is - # unrecognized, the text is rendered in `Arial`. - # Some fonts can affect the weight of the text. If an update request - # specifies values for both `font_family` and `bold`, the explicitly-set - # `bold` value is used. - # Corresponds to the JSON property `fontFamily` - # @return [String] - attr_accessor :font_family - - # Whether or not the text is struck through. - # Corresponds to the JSON property `strikethrough` - # @return [Boolean] - attr_accessor :strikethrough - alias_method :strikethrough?, :strikethrough - - # Whether or not the text is italicized. - # Corresponds to the JSON property `italic` - # @return [Boolean] - attr_accessor :italic - alias_method :italic?, :italic - - # A magnitude in a single direction in the specified units. - # Corresponds to the JSON property `fontSize` - # @return [Google::Apis::SlidesV1::Dimension] - attr_accessor :font_size - - # Whether or not the text is in small capital letters. - # Corresponds to the JSON property `smallCaps` - # @return [Boolean] - attr_accessor :small_caps - alias_method :small_caps?, :small_caps - - # The text's vertical offset from its normal position. - # Text with `SUPERSCRIPT` or `SUBSCRIPT` baseline offsets is automatically - # rendered in a smaller font size, computed based on the `font_size` field. - # The `font_size` itself is not affected by changes in this field. - # Corresponds to the JSON property `baselineOffset` - # @return [String] - attr_accessor :baseline_offset - - # A color that can either be fully opaque or fully transparent. - # Corresponds to the JSON property `backgroundColor` - # @return [Google::Apis::SlidesV1::OptionalColor] - attr_accessor :background_color - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @link = args[:link] if args.key?(:link) - @underline = args[:underline] if args.key?(:underline) - @bold = args[:bold] if args.key?(:bold) - @foreground_color = args[:foreground_color] if args.key?(:foreground_color) - @font_family = args[:font_family] if args.key?(:font_family) - @strikethrough = args[:strikethrough] if args.key?(:strikethrough) - @italic = args[:italic] if args.key?(:italic) - @font_size = args[:font_size] if args.key?(:font_size) - @small_caps = args[:small_caps] if args.key?(:small_caps) - @baseline_offset = args[:baseline_offset] if args.key?(:baseline_offset) - @background_color = args[:background_color] if args.key?(:background_color) - end - end - - # Update the properties of a Video. - class UpdateVideoPropertiesRequest - include Google::Apis::Core::Hashable - - # The properties of the Video. - # Corresponds to the JSON property `videoProperties` - # @return [Google::Apis::SlidesV1::VideoProperties] - attr_accessor :video_properties - - # The fields that should be updated. - # At least one field must be specified. The root `videoProperties` is - # implied and should not be specified. A single `"*"` can be used as - # short-hand for listing every field. - # For example to update the video outline color, set `fields` to - # `"outline.outlineFill.solidFill.color"`. - # To reset a property to its default value, include its field name in the - # field mask but leave the field itself unset. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - # The object ID of the video the updates are applied to. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @video_properties = args[:video_properties] if args.key?(:video_properties) - @fields = args[:fields] if args.key?(:fields) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - end - end - - # A single kind of update to apply to a presentation. - class Request - include Google::Apis::Core::Hashable - - # Inserts rows into a table. - # Corresponds to the JSON property `insertTableRows` - # @return [Google::Apis::SlidesV1::InsertTableRowsRequest] - attr_accessor :insert_table_rows - - # Creates a new slide. - # Corresponds to the JSON property `createSlide` - # @return [Google::Apis::SlidesV1::CreateSlideRequest] - attr_accessor :create_slide - - # Updates the properties of a Line. - # Corresponds to the JSON property `updateLineProperties` - # @return [Google::Apis::SlidesV1::UpdateLinePropertiesRequest] - attr_accessor :update_line_properties - - # Updates the position of slides in the presentation. - # Corresponds to the JSON property `updateSlidesPosition` - # @return [Google::Apis::SlidesV1::UpdateSlidesPositionRequest] - attr_accessor :update_slides_position - - # Deletes a row from a table. - # Corresponds to the JSON property `deleteTableRow` - # @return [Google::Apis::SlidesV1::DeleteTableRowRequest] - attr_accessor :delete_table_row - - # Update the properties of a Shape. - # Corresponds to the JSON property `updateShapeProperties` - # @return [Google::Apis::SlidesV1::UpdateShapePropertiesRequest] - attr_accessor :update_shape_properties - - # Inserts text into a shape or a table cell. - # Corresponds to the JSON property `insertText` - # @return [Google::Apis::SlidesV1::InsertTextRequest] - attr_accessor :insert_text - - # Deletes text from a shape or a table cell. - # Corresponds to the JSON property `deleteText` - # @return [Google::Apis::SlidesV1::DeleteTextRequest] - attr_accessor :delete_text - - # Updates the properties of a Page. - # Corresponds to the JSON property `updatePageProperties` - # @return [Google::Apis::SlidesV1::UpdatePagePropertiesRequest] - attr_accessor :update_page_properties - - # Deletes bullets from all of the paragraphs that overlap with the given text - # index range. - # The nesting level of each paragraph will be visually preserved by adding - # indent to the start of the corresponding paragraph. - # Corresponds to the JSON property `deleteParagraphBullets` - # @return [Google::Apis::SlidesV1::DeleteParagraphBulletsRequest] - attr_accessor :delete_paragraph_bullets - - # Creates a new shape. - # Corresponds to the JSON property `createShape` - # @return [Google::Apis::SlidesV1::CreateShapeRequest] - attr_accessor :create_shape - - # Inserts columns into a table. - # Other columns in the table will be resized to fit the new column. - # Corresponds to the JSON property `insertTableColumns` - # @return [Google::Apis::SlidesV1::InsertTableColumnsRequest] - attr_accessor :insert_table_columns - - # Refreshes an embedded Google Sheets chart by replacing it with the latest - # version of the chart from Google Sheets. - # NOTE: Refreshing charts requires at least one of the spreadsheets.readonly, - # spreadsheets, drive.readonly, or drive OAuth scopes. - # Corresponds to the JSON property `refreshSheetsChart` - # @return [Google::Apis::SlidesV1::RefreshSheetsChartRequest] - attr_accessor :refresh_sheets_chart - - # Update the properties of a TableCell. - # Corresponds to the JSON property `updateTableCellProperties` - # @return [Google::Apis::SlidesV1::UpdateTableCellPropertiesRequest] - attr_accessor :update_table_cell_properties - - # Creates a new table. - # Corresponds to the JSON property `createTable` - # @return [Google::Apis::SlidesV1::CreateTableRequest] - attr_accessor :create_table - - # Deletes an object, either pages or - # page elements, from the - # presentation. - # Corresponds to the JSON property `deleteObject` - # @return [Google::Apis::SlidesV1::DeleteObjectRequest] - attr_accessor :delete_object - - # Updates the styling for all of the paragraphs within a Shape or Table that - # overlap with the given text index range. - # Corresponds to the JSON property `updateParagraphStyle` - # @return [Google::Apis::SlidesV1::UpdateParagraphStyleRequest] - attr_accessor :update_paragraph_style - - # Deletes a column from a table. - # Corresponds to the JSON property `deleteTableColumn` - # @return [Google::Apis::SlidesV1::DeleteTableColumnRequest] - attr_accessor :delete_table_column - - # Duplicates a slide or page element. - # When duplicating a slide, the duplicate slide will be created immediately - # following the specified slide. When duplicating a page element, the duplicate - # will be placed on the same page at the same position as the original. - # Corresponds to the JSON property `duplicateObject` - # @return [Google::Apis::SlidesV1::DuplicateObjectRequest] - attr_accessor :duplicate_object - - # Update the properties of a Video. - # Corresponds to the JSON property `updateVideoProperties` - # @return [Google::Apis::SlidesV1::UpdateVideoPropertiesRequest] - attr_accessor :update_video_properties - - # Creates a line. - # Corresponds to the JSON property `createLine` - # @return [Google::Apis::SlidesV1::CreateLineRequest] - attr_accessor :create_line - - # Creates an image. - # Corresponds to the JSON property `createImage` - # @return [Google::Apis::SlidesV1::CreateImageRequest] - attr_accessor :create_image - - # Creates bullets for all of the paragraphs that overlap with the given - # text index range. - # The nesting level of each paragraph will be determined by counting leading - # tabs in front of each paragraph. To avoid excess space between the bullet and - # the corresponding paragraph, these leading tabs are removed by this request. - # This may change the indices of parts of the text. - # If the paragraph immediately before paragraphs being updated is in a list - # with a matching preset, the paragraphs being updated are added to that - # preceding list. - # Corresponds to the JSON property `createParagraphBullets` - # @return [Google::Apis::SlidesV1::CreateParagraphBulletsRequest] - attr_accessor :create_paragraph_bullets - - # Creates a video. - # Corresponds to the JSON property `createVideo` - # @return [Google::Apis::SlidesV1::CreateVideoRequest] - attr_accessor :create_video - - # Creates an embedded Google Sheets chart. - # NOTE: Chart creation requires at least one of the spreadsheets.readonly, - # spreadsheets, drive.readonly, or drive OAuth scopes. - # Corresponds to the JSON property `createSheetsChart` - # @return [Google::Apis::SlidesV1::CreateSheetsChartRequest] - attr_accessor :create_sheets_chart - - # Replaces all shapes that match the given criteria with the provided Google - # Sheets chart. The chart will be scaled and centered to fit within the bounds - # of the original shape. - # NOTE: Replacing shapes with a chart requires at least one of the - # spreadsheets.readonly, spreadsheets, drive.readonly, or drive OAuth scopes. - # Corresponds to the JSON property `replaceAllShapesWithSheetsChart` - # @return [Google::Apis::SlidesV1::ReplaceAllShapesWithSheetsChartRequest] - attr_accessor :replace_all_shapes_with_sheets_chart - - # Updates the transform of a page element. - # Corresponds to the JSON property `updatePageElementTransform` - # @return [Google::Apis::SlidesV1::UpdatePageElementTransformRequest] - attr_accessor :update_page_element_transform - - # Update the styling of text in a Shape or - # Table. - # Corresponds to the JSON property `updateTextStyle` - # @return [Google::Apis::SlidesV1::UpdateTextStyleRequest] - attr_accessor :update_text_style - - # Replaces all shapes that match the given criteria with the provided image. - # Corresponds to the JSON property `replaceAllShapesWithImage` - # @return [Google::Apis::SlidesV1::ReplaceAllShapesWithImageRequest] - attr_accessor :replace_all_shapes_with_image - - # Replaces all instances of text matching a criteria with replace text. - # Corresponds to the JSON property `replaceAllText` - # @return [Google::Apis::SlidesV1::ReplaceAllTextRequest] - attr_accessor :replace_all_text - - # Update the properties of an Image. - # Corresponds to the JSON property `updateImageProperties` - # @return [Google::Apis::SlidesV1::UpdateImagePropertiesRequest] - attr_accessor :update_image_properties - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @insert_table_rows = args[:insert_table_rows] if args.key?(:insert_table_rows) - @create_slide = args[:create_slide] if args.key?(:create_slide) - @update_line_properties = args[:update_line_properties] if args.key?(:update_line_properties) - @update_slides_position = args[:update_slides_position] if args.key?(:update_slides_position) - @delete_table_row = args[:delete_table_row] if args.key?(:delete_table_row) - @update_shape_properties = args[:update_shape_properties] if args.key?(:update_shape_properties) - @insert_text = args[:insert_text] if args.key?(:insert_text) - @delete_text = args[:delete_text] if args.key?(:delete_text) - @update_page_properties = args[:update_page_properties] if args.key?(:update_page_properties) - @delete_paragraph_bullets = args[:delete_paragraph_bullets] if args.key?(:delete_paragraph_bullets) - @create_shape = args[:create_shape] if args.key?(:create_shape) - @insert_table_columns = args[:insert_table_columns] if args.key?(:insert_table_columns) - @refresh_sheets_chart = args[:refresh_sheets_chart] if args.key?(:refresh_sheets_chart) - @update_table_cell_properties = args[:update_table_cell_properties] if args.key?(:update_table_cell_properties) - @create_table = args[:create_table] if args.key?(:create_table) - @delete_object = args[:delete_object] if args.key?(:delete_object) - @update_paragraph_style = args[:update_paragraph_style] if args.key?(:update_paragraph_style) - @delete_table_column = args[:delete_table_column] if args.key?(:delete_table_column) - @duplicate_object = args[:duplicate_object] if args.key?(:duplicate_object) - @update_video_properties = args[:update_video_properties] if args.key?(:update_video_properties) - @create_line = args[:create_line] if args.key?(:create_line) - @create_image = args[:create_image] if args.key?(:create_image) - @create_paragraph_bullets = args[:create_paragraph_bullets] if args.key?(:create_paragraph_bullets) - @create_video = args[:create_video] if args.key?(:create_video) - @create_sheets_chart = args[:create_sheets_chart] if args.key?(:create_sheets_chart) - @replace_all_shapes_with_sheets_chart = args[:replace_all_shapes_with_sheets_chart] if args.key?(:replace_all_shapes_with_sheets_chart) - @update_page_element_transform = args[:update_page_element_transform] if args.key?(:update_page_element_transform) - @update_text_style = args[:update_text_style] if args.key?(:update_text_style) - @replace_all_shapes_with_image = args[:replace_all_shapes_with_image] if args.key?(:replace_all_shapes_with_image) - @replace_all_text = args[:replace_all_text] if args.key?(:replace_all_text) - @update_image_properties = args[:update_image_properties] if args.key?(:update_image_properties) - end - end - - # Update the properties of an Image. - class UpdateImagePropertiesRequest - include Google::Apis::Core::Hashable - - # The fields that should be updated. - # At least one field must be specified. The root `imageProperties` is - # implied and should not be specified. A single `"*"` can be used as - # short-hand for listing every field. - # For example to update the image outline color, set `fields` to - # `"outline.outlineFill.solidFill.color"`. - # To reset a property to its default value, include its field name in the - # field mask but leave the field itself unset. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - # The properties of the Image. - # Corresponds to the JSON property `imageProperties` - # @return [Google::Apis::SlidesV1::ImageProperties] - attr_accessor :image_properties - - # The object ID of the image the updates are applied to. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @fields = args[:fields] if args.key?(:fields) - @image_properties = args[:image_properties] if args.key?(:image_properties) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - end - end - - # Styles that apply to a whole paragraph. - # If this text is contained in a shape with a parent placeholder, then these - # paragraph styles may be - # inherited from the parent. Which paragraph styles are inherited depend on the - # nesting level of lists: - # * A paragraph not in a list will inherit its paragraph style from the - # paragraph at the 0 nesting level of the list inside the parent placeholder. - # * A paragraph in a list will inherit its paragraph style from the paragraph - # at its corresponding nesting level of the list inside the parent - # placeholder. - # Inherited paragraph styles are represented as unset fields in this message. - class ParagraphStyle - include Google::Apis::Core::Hashable - - # A magnitude in a single direction in the specified units. - # Corresponds to the JSON property `spaceBelow` - # @return [Google::Apis::SlidesV1::Dimension] - attr_accessor :space_below - - # The text direction of this paragraph. If unset, the value defaults to - # LEFT_TO_RIGHT - # since text direction is not inherited. - # Corresponds to the JSON property `direction` - # @return [String] - attr_accessor :direction - - # The spacing mode for the paragraph. - # Corresponds to the JSON property `spacingMode` - # @return [String] - attr_accessor :spacing_mode - - # A magnitude in a single direction in the specified units. - # Corresponds to the JSON property `indentEnd` - # @return [Google::Apis::SlidesV1::Dimension] - attr_accessor :indent_end - - # A magnitude in a single direction in the specified units. - # Corresponds to the JSON property `indentStart` - # @return [Google::Apis::SlidesV1::Dimension] - attr_accessor :indent_start - - # A magnitude in a single direction in the specified units. - # Corresponds to the JSON property `spaceAbove` - # @return [Google::Apis::SlidesV1::Dimension] - attr_accessor :space_above - - # The text alignment for this paragraph. - # Corresponds to the JSON property `alignment` - # @return [String] - attr_accessor :alignment - - # The amount of space between lines, as a percentage of normal, where normal - # is represented as 100.0. If unset, the value is inherited from the parent. - # Corresponds to the JSON property `lineSpacing` - # @return [Float] - attr_accessor :line_spacing - - # A magnitude in a single direction in the specified units. - # Corresponds to the JSON property `indentFirstLine` - # @return [Google::Apis::SlidesV1::Dimension] - attr_accessor :indent_first_line - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @space_below = args[:space_below] if args.key?(:space_below) - @direction = args[:direction] if args.key?(:direction) - @spacing_mode = args[:spacing_mode] if args.key?(:spacing_mode) - @indent_end = args[:indent_end] if args.key?(:indent_end) - @indent_start = args[:indent_start] if args.key?(:indent_start) - @space_above = args[:space_above] if args.key?(:space_above) - @alignment = args[:alignment] if args.key?(:alignment) - @line_spacing = args[:line_spacing] if args.key?(:line_spacing) - @indent_first_line = args[:indent_first_line] if args.key?(:indent_first_line) - end - end - - # The result of replacing shapes with a Google Sheets chart. - class ReplaceAllShapesWithSheetsChartResponse - include Google::Apis::Core::Hashable - - # The number of shapes replaced with charts. - # Corresponds to the JSON property `occurrencesChanged` - # @return [Fixnum] - attr_accessor :occurrences_changed - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @occurrences_changed = args[:occurrences_changed] if args.key?(:occurrences_changed) - end - end - - # The properties of the TableCell. - class TableCellProperties - include Google::Apis::Core::Hashable - - # The table cell background fill. - # Corresponds to the JSON property `tableCellBackgroundFill` - # @return [Google::Apis::SlidesV1::TableCellBackgroundFill] - attr_accessor :table_cell_background_fill - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @table_cell_background_fill = args[:table_cell_background_fill] if args.key?(:table_cell_background_fill) - end - end - - # The outline of a PageElement. - # If these fields are unset, they may be inherited from a parent placeholder - # if it exists. If there is no parent, the fields will default to the value - # used for new page elements created in the Slides editor, which may depend on - # the page element kind. - class Outline - include Google::Apis::Core::Hashable - - # The fill of the outline. - # Corresponds to the JSON property `outlineFill` - # @return [Google::Apis::SlidesV1::OutlineFill] - attr_accessor :outline_fill - - # A magnitude in a single direction in the specified units. - # Corresponds to the JSON property `weight` - # @return [Google::Apis::SlidesV1::Dimension] - attr_accessor :weight - - # The dash style of the outline. - # Corresponds to the JSON property `dashStyle` - # @return [String] - attr_accessor :dash_style - - # The outline property state. - # Updating the the outline on a page element will implicitly update this - # field to`RENDERED`, unless another value is specified in the same request. - # To have no outline on a page element, set this field to `NOT_RENDERED`. In - # this case, any other outline fields set in the same request will be - # ignored. - # Corresponds to the JSON property `propertyState` - # @return [String] - attr_accessor :property_state - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @outline_fill = args[:outline_fill] if args.key?(:outline_fill) - @weight = args[:weight] if args.key?(:weight) - @dash_style = args[:dash_style] if args.key?(:dash_style) - @property_state = args[:property_state] if args.key?(:property_state) - end - end - - # Refreshes an embedded Google Sheets chart by replacing it with the latest - # version of the chart from Google Sheets. - # NOTE: Refreshing charts requires at least one of the spreadsheets.readonly, - # spreadsheets, drive.readonly, or drive OAuth scopes. - class RefreshSheetsChartRequest - include Google::Apis::Core::Hashable - - # The object ID of the chart to refresh. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - end - end - - # Properties of each column in a table. - class TableColumnProperties - include Google::Apis::Core::Hashable - - # A magnitude in a single direction in the specified units. - # Corresponds to the JSON property `columnWidth` - # @return [Google::Apis::SlidesV1::Dimension] - attr_accessor :column_width - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @column_width = args[:column_width] if args.key?(:column_width) - end - end - - # The properties of a Shape. - # If the shape is a placeholder shape as determined by the - # placeholder field, then these - # properties may be inherited from a parent placeholder shape. - # Determining the rendered value of the property depends on the corresponding - # property_state field value. - class ShapeProperties - include Google::Apis::Core::Hashable - - # A hypertext link. - # Corresponds to the JSON property `link` - # @return [Google::Apis::SlidesV1::Link] - attr_accessor :link - - # The outline of a PageElement. - # If these fields are unset, they may be inherited from a parent placeholder - # if it exists. If there is no parent, the fields will default to the value - # used for new page elements created in the Slides editor, which may depend on - # the page element kind. - # Corresponds to the JSON property `outline` - # @return [Google::Apis::SlidesV1::Outline] - attr_accessor :outline - - # The shape background fill. - # Corresponds to the JSON property `shapeBackgroundFill` - # @return [Google::Apis::SlidesV1::ShapeBackgroundFill] - attr_accessor :shape_background_fill - - # The shadow properties of a page element. - # If these fields are unset, they may be inherited from a parent placeholder - # if it exists. If there is no parent, the fields will default to the value - # used for new page elements created in the Slides editor, which may depend on - # the page element kind. - # Corresponds to the JSON property `shadow` - # @return [Google::Apis::SlidesV1::Shadow] - attr_accessor :shadow - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @link = args[:link] if args.key?(:link) - @outline = args[:outline] if args.key?(:outline) - @shape_background_fill = args[:shape_background_fill] if args.key?(:shape_background_fill) - @shadow = args[:shadow] if args.key?(:shadow) - end - end - - # The properties of Page that are only - # relevant for pages with page_type NOTES. - class NotesProperties - include Google::Apis::Core::Hashable - - # The object ID of the shape on this notes page that contains the speaker - # notes for the corresponding slide. - # The actual shape may not always exist on the notes page. Inserting text - # using this object ID will automatically create the shape. In this case, the - # actual shape may have different object ID. The `GetPresentation` or - # `GetPage` action will always return the latest object ID. - # Corresponds to the JSON property `speakerNotesObjectId` - # @return [String] - attr_accessor :speaker_notes_object_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @speaker_notes_object_id = args[:speaker_notes_object_id] if args.key?(:speaker_notes_object_id) - end - end - - # Properties and contents of each row in a table. - class TableRow - include Google::Apis::Core::Hashable - - # A magnitude in a single direction in the specified units. - # Corresponds to the JSON property `rowHeight` - # @return [Google::Apis::SlidesV1::Dimension] - attr_accessor :row_height - - # Properties and contents of each cell. - # Cells that span multiple columns are represented only once with a - # column_span greater - # than 1. As a result, the length of this collection does not always match - # the number of columns of the entire table. - # Corresponds to the JSON property `tableCells` - # @return [Array] - attr_accessor :table_cells - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @row_height = args[:row_height] if args.key?(:row_height) - @table_cells = args[:table_cells] if args.key?(:table_cells) - end - end - - # Update the properties of a TableCell. - class UpdateTableCellPropertiesRequest - include Google::Apis::Core::Hashable - - # The object ID of the table. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - # A table range represents a reference to a subset of a table. - # It's important to note that the cells specified by a table range do not - # necessarily form a rectangle. For example, let's say we have a 3 x 3 table - # where all the cells of the last row are merged together. The table looks - # like this: - # - # [ ] - # A table range with location = (0, 0), row span = 3 and column span = 2 - # specifies the following cells: - # x x - # [ x ] - # Corresponds to the JSON property `tableRange` - # @return [Google::Apis::SlidesV1::TableRange] - attr_accessor :table_range - - # The properties of the TableCell. - # Corresponds to the JSON property `tableCellProperties` - # @return [Google::Apis::SlidesV1::TableCellProperties] - attr_accessor :table_cell_properties - - # The fields that should be updated. - # At least one field must be specified. The root `tableCellProperties` is - # implied and should not be specified. A single `"*"` can be used as - # short-hand for listing every field. - # For example to update the table cell background solid fill color, set - # `fields` to `"tableCellBackgroundFill.solidFill.color"`. - # To reset a property to its default value, include its field name in the - # field mask but leave the field itself unset. - # Corresponds to the JSON property `fields` - # @return [String] - attr_accessor :fields - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - @table_range = args[:table_range] if args.key?(:table_range) - @table_cell_properties = args[:table_cell_properties] if args.key?(:table_cell_properties) - @fields = args[:fields] if args.key?(:fields) - end - end - - # Creates a new slide. - class CreateSlideRequest - include Google::Apis::Core::Hashable - - # Slide layout reference. This may reference either: - # - A predefined layout - # - One of the layouts in the presentation. - # Corresponds to the JSON property `slideLayoutReference` - # @return [Google::Apis::SlidesV1::LayoutReference] - attr_accessor :slide_layout_reference - - # A user-supplied object ID. - # If you specify an ID, it must be unique among all pages and page elements - # in the presentation. The ID must start with an alphanumeric character or an - # underscore (matches regex `[a-zA-Z0-9_]`); remaining characters - # may include those as well as a hyphen or colon (matches regex - # `[a-zA-Z0-9_-:]`). - # The length of the ID must not be less than 5 or greater than 50. - # If you don't specify an ID, a unique one is generated. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - # The optional zero-based index indicating where to insert the slides. - # If you don't specify an index, the new slide is created at the end. - # Corresponds to the JSON property `insertionIndex` - # @return [Fixnum] - attr_accessor :insertion_index - - # An optional list of object ID mappings from the placeholder(s) on the layout - # to the placeholder(s) - # that will be created on the new slide from that specified layout. Can only - # be used when `slide_layout_reference` is specified. - # Corresponds to the JSON property `placeholderIdMappings` - # @return [Array] - attr_accessor :placeholder_id_mappings - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @slide_layout_reference = args[:slide_layout_reference] if args.key?(:slide_layout_reference) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - @insertion_index = args[:insertion_index] if args.key?(:insertion_index) - @placeholder_id_mappings = args[:placeholder_id_mappings] if args.key?(:placeholder_id_mappings) - end - end - - # Request message for PresentationsService.BatchUpdatePresentation. - class BatchUpdatePresentationRequest - include Google::Apis::Core::Hashable - - # Provides control over how write requests are executed. - # Corresponds to the JSON property `writeControl` - # @return [Google::Apis::SlidesV1::WriteControl] - attr_accessor :write_control - - # A list of updates to apply to the presentation. - # Corresponds to the JSON property `requests` - # @return [Array] - attr_accessor :requests - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @write_control = args[:write_control] if args.key?(:write_control) - @requests = args[:requests] if args.key?(:requests) - end - end - - # The general text content. The text must reside in a compatible shape (e.g. - # text box or rectangle) or a table cell in a page. - class TextContent - include Google::Apis::Core::Hashable - - # The bulleted lists contained in this text, keyed by list ID. - # Corresponds to the JSON property `lists` - # @return [Hash] - attr_accessor :lists - - # The text contents broken down into its component parts, including styling - # information. This property is read-only. - # Corresponds to the JSON property `textElements` - # @return [Array] - attr_accessor :text_elements - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @lists = args[:lists] if args.key?(:lists) - @text_elements = args[:text_elements] if args.key?(:text_elements) - end - end - - # The result of creating an embedded Google Sheets chart. - class CreateSheetsChartResponse - include Google::Apis::Core::Hashable - - # The object ID of the created chart. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - end - end - - # Provides control over how write requests are executed. - class WriteControl - include Google::Apis::Core::Hashable - - # The revision ID of the presentation required for the write request. If - # specified and the `required_revision_id` doesn't exactly match the - # presentation's current `revision_id`, the request will not be processed and - # will return a 400 bad request error. - # Corresponds to the JSON property `requiredRevisionId` - # @return [String] - attr_accessor :required_revision_id - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @required_revision_id = args[:required_revision_id] if args.key?(:required_revision_id) - end - end - - # Deletes bullets from all of the paragraphs that overlap with the given text - # index range. - # The nesting level of each paragraph will be visually preserved by adding - # indent to the start of the corresponding paragraph. - class DeleteParagraphBulletsRequest - include Google::Apis::Core::Hashable - - # A location of a single table cell within a table. - # Corresponds to the JSON property `cellLocation` - # @return [Google::Apis::SlidesV1::TableCellLocation] - attr_accessor :cell_location - - # The object ID of the shape or table containing the text to delete bullets - # from. - # Corresponds to the JSON property `objectId` - # @return [String] - attr_accessor :object_id_prop - - # Specifies a contiguous range of an indexed collection, such as characters in - # text. - # Corresponds to the JSON property `textRange` - # @return [Google::Apis::SlidesV1::Range] - attr_accessor :text_range - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @cell_location = args[:cell_location] if args.key?(:cell_location) - @object_id_prop = args[:object_id_prop] if args.key?(:object_id_prop) - @text_range = args[:text_range] if args.key?(:text_range) - end - end - - # A TextElement kind that represents the beginning of a new paragraph. - class ParagraphMarker - include Google::Apis::Core::Hashable - - # Styles that apply to a whole paragraph. - # If this text is contained in a shape with a parent placeholder, then these - # paragraph styles may be - # inherited from the parent. Which paragraph styles are inherited depend on the - # nesting level of lists: - # * A paragraph not in a list will inherit its paragraph style from the - # paragraph at the 0 nesting level of the list inside the parent placeholder. - # * A paragraph in a list will inherit its paragraph style from the paragraph - # at its corresponding nesting level of the list inside the parent - # placeholder. - # Inherited paragraph styles are represented as unset fields in this message. - # Corresponds to the JSON property `style` - # @return [Google::Apis::SlidesV1::ParagraphStyle] - attr_accessor :style - - # Describes the bullet of a paragraph. - # Corresponds to the JSON property `bullet` - # @return [Google::Apis::SlidesV1::Bullet] - attr_accessor :bullet - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @style = args[:style] if args.key?(:style) - @bullet = args[:bullet] if args.key?(:bullet) end end end diff --git a/generated/google/apis/slides_v1/representations.rb b/generated/google/apis/slides_v1/representations.rb index 6daf2283c..f5847d596 100644 --- a/generated/google/apis/slides_v1/representations.rb +++ b/generated/google/apis/slides_v1/representations.rb @@ -22,12 +22,258 @@ module Google module Apis module SlidesV1 + class CreateTableRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CreateTableResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Table + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PageBackgroundFill + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SheetsChart + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SolidFill + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ThemeColorPair + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class OptionalColor + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PageElementProperties + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SheetsChartProperties + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class StretchedPictureFill + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpdateTextStyleRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DeleteTableColumnRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class List + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class WeightedFontFamily + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PageElement + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CreateImageRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CreateParagraphBulletsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Size + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TextStyle + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpdateVideoPropertiesRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Request + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpdateImagePropertiesRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ParagraphStyle + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ReplaceAllShapesWithSheetsChartResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TableCellProperties + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RefreshSheetsChartRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Outline + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TableColumnProperties + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class NotesProperties + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ShapeProperties + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TableRow + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UpdateTableCellPropertiesRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CreateSlideRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BatchUpdatePresentationRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TextContent + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CreateSheetsChartResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class WriteControl + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DeleteParagraphBulletsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ParagraphMarker + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class InsertTableColumnsRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class Thumbnail + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class LayoutPlaceholderIdMapping class Representation < Google::Apis::Core::JsonRepresentation; end @@ -100,13 +346,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class TableCell + class NestingLevel class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class NestingLevel + class TableCell class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -184,13 +430,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class ColorStop + class Range class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Range + class ColorStop class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -238,13 +484,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class TableCellLocation + class CreateLineResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class CreateLineResponse + class TableCellLocation class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -280,13 +526,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class InsertTextRequest + class AffineTransform class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class AffineTransform + class InsertTextRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -304,13 +550,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class DeleteTextRequest + class UpdatePageElementTransformRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class UpdatePageElementTransformRequest + class DeleteTextRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -322,13 +568,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class Dimension + class TextElement class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class TextElement + class Dimension class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -358,13 +604,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class LineProperties + class Presentation class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class Presentation + class LineProperties class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -394,13 +640,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class BatchUpdatePresentationResponse + class CreateSheetsChartRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class CreateSheetsChartRequest + class BatchUpdatePresentationResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -424,7 +670,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class TextRun + class SubstringMatchCriteria class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -436,7 +682,7 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class SubstringMatchCriteria + class TextRun class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -449,237 +695,493 @@ module Google end class CreateTableRequest - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :rows, as: 'rows' + property :object_id_prop, as: 'objectId' + property :columns, as: 'columns' + property :element_properties, as: 'elementProperties', class: Google::Apis::SlidesV1::PageElementProperties, decorator: Google::Apis::SlidesV1::PageElementProperties::Representation - include Google::Apis::Core::JsonObjectSupport + end end class CreateTableResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :object_id_prop, as: 'objectId' + end end class Table - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :table_rows, as: 'tableRows', class: Google::Apis::SlidesV1::TableRow, decorator: Google::Apis::SlidesV1::TableRow::Representation - include Google::Apis::Core::JsonObjectSupport + property :rows, as: 'rows' + collection :table_columns, as: 'tableColumns', class: Google::Apis::SlidesV1::TableColumnProperties, decorator: Google::Apis::SlidesV1::TableColumnProperties::Representation + + property :columns, as: 'columns' + end end class PageBackgroundFill - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :stretched_picture_fill, as: 'stretchedPictureFill', class: Google::Apis::SlidesV1::StretchedPictureFill, decorator: Google::Apis::SlidesV1::StretchedPictureFill::Representation - include Google::Apis::Core::JsonObjectSupport + property :solid_fill, as: 'solidFill', class: Google::Apis::SlidesV1::SolidFill, decorator: Google::Apis::SlidesV1::SolidFill::Representation + + property :property_state, as: 'propertyState' + end end class SheetsChart - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :chart_id, as: 'chartId' + property :sheets_chart_properties, as: 'sheetsChartProperties', class: Google::Apis::SlidesV1::SheetsChartProperties, decorator: Google::Apis::SlidesV1::SheetsChartProperties::Representation - include Google::Apis::Core::JsonObjectSupport + property :content_url, as: 'contentUrl' + property :spreadsheet_id, as: 'spreadsheetId' + end end class SolidFill - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :color, as: 'color', class: Google::Apis::SlidesV1::OpaqueColor, decorator: Google::Apis::SlidesV1::OpaqueColor::Representation - include Google::Apis::Core::JsonObjectSupport + property :alpha, as: 'alpha' + end end class ThemeColorPair - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :color, as: 'color', class: Google::Apis::SlidesV1::RgbColor, decorator: Google::Apis::SlidesV1::RgbColor::Representation - include Google::Apis::Core::JsonObjectSupport + property :type, as: 'type' + end end class OptionalColor - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :opaque_color, as: 'opaqueColor', class: Google::Apis::SlidesV1::OpaqueColor, decorator: Google::Apis::SlidesV1::OpaqueColor::Representation - include Google::Apis::Core::JsonObjectSupport + end end class PageElementProperties - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :page_object_id, as: 'pageObjectId' + property :size, as: 'size', class: Google::Apis::SlidesV1::Size, decorator: Google::Apis::SlidesV1::Size::Representation - include Google::Apis::Core::JsonObjectSupport + property :transform, as: 'transform', class: Google::Apis::SlidesV1::AffineTransform, decorator: Google::Apis::SlidesV1::AffineTransform::Representation + + end end class SheetsChartProperties - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :chart_image_properties, as: 'chartImageProperties', class: Google::Apis::SlidesV1::ImageProperties, decorator: Google::Apis::SlidesV1::ImageProperties::Representation - include Google::Apis::Core::JsonObjectSupport + end end class StretchedPictureFill - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :content_url, as: 'contentUrl' + property :size, as: 'size', class: Google::Apis::SlidesV1::Size, decorator: Google::Apis::SlidesV1::Size::Representation - include Google::Apis::Core::JsonObjectSupport - end - - class DeleteTableColumnRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + end end class UpdateTextStyleRequest - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :fields, as: 'fields' + property :object_id_prop, as: 'objectId' + property :text_range, as: 'textRange', class: Google::Apis::SlidesV1::Range, decorator: Google::Apis::SlidesV1::Range::Representation - include Google::Apis::Core::JsonObjectSupport + property :cell_location, as: 'cellLocation', class: Google::Apis::SlidesV1::TableCellLocation, decorator: Google::Apis::SlidesV1::TableCellLocation::Representation + + property :style, as: 'style', class: Google::Apis::SlidesV1::TextStyle, decorator: Google::Apis::SlidesV1::TextStyle::Representation + + end + end + + class DeleteTableColumnRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :cell_location, as: 'cellLocation', class: Google::Apis::SlidesV1::TableCellLocation, decorator: Google::Apis::SlidesV1::TableCellLocation::Representation + + property :table_object_id, as: 'tableObjectId' + end end class List - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :list_id, as: 'listId' + hash :nesting_level, as: 'nestingLevel', class: Google::Apis::SlidesV1::NestingLevel, decorator: Google::Apis::SlidesV1::NestingLevel::Representation - include Google::Apis::Core::JsonObjectSupport + end + end + + class WeightedFontFamily + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :font_family, as: 'fontFamily' + property :weight, as: 'weight' + end end class PageElement - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :size, as: 'size', class: Google::Apis::SlidesV1::Size, decorator: Google::Apis::SlidesV1::Size::Representation - include Google::Apis::Core::JsonObjectSupport + property :title, as: 'title' + property :sheets_chart, as: 'sheetsChart', class: Google::Apis::SlidesV1::SheetsChart, decorator: Google::Apis::SlidesV1::SheetsChart::Representation + + property :video, as: 'video', class: Google::Apis::SlidesV1::Video, decorator: Google::Apis::SlidesV1::Video::Representation + + property :word_art, as: 'wordArt', class: Google::Apis::SlidesV1::WordArt, decorator: Google::Apis::SlidesV1::WordArt::Representation + + property :table, as: 'table', class: Google::Apis::SlidesV1::Table, decorator: Google::Apis::SlidesV1::Table::Representation + + property :transform, as: 'transform', class: Google::Apis::SlidesV1::AffineTransform, decorator: Google::Apis::SlidesV1::AffineTransform::Representation + + property :object_id_prop, as: 'objectId' + property :shape, as: 'shape', class: Google::Apis::SlidesV1::Shape, decorator: Google::Apis::SlidesV1::Shape::Representation + + property :line, as: 'line', class: Google::Apis::SlidesV1::Line, decorator: Google::Apis::SlidesV1::Line::Representation + + property :description, as: 'description' + property :element_group, as: 'elementGroup', class: Google::Apis::SlidesV1::Group, decorator: Google::Apis::SlidesV1::Group::Representation + + property :image, as: 'image', class: Google::Apis::SlidesV1::Image, decorator: Google::Apis::SlidesV1::Image::Representation + + end end class CreateImageRequest - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :object_id_prop, as: 'objectId' + property :element_properties, as: 'elementProperties', class: Google::Apis::SlidesV1::PageElementProperties, decorator: Google::Apis::SlidesV1::PageElementProperties::Representation - include Google::Apis::Core::JsonObjectSupport + property :url, as: 'url' + end end class CreateParagraphBulletsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :object_id_prop, as: 'objectId' + property :text_range, as: 'textRange', class: Google::Apis::SlidesV1::Range, decorator: Google::Apis::SlidesV1::Range::Representation - include Google::Apis::Core::JsonObjectSupport + property :bullet_preset, as: 'bulletPreset' + property :cell_location, as: 'cellLocation', class: Google::Apis::SlidesV1::TableCellLocation, decorator: Google::Apis::SlidesV1::TableCellLocation::Representation + + end end class Size - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :width, as: 'width', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation - include Google::Apis::Core::JsonObjectSupport + property :height, as: 'height', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation + + end end class TextStyle - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :background_color, as: 'backgroundColor', class: Google::Apis::SlidesV1::OptionalColor, decorator: Google::Apis::SlidesV1::OptionalColor::Representation - include Google::Apis::Core::JsonObjectSupport + property :underline, as: 'underline' + property :link, as: 'link', class: Google::Apis::SlidesV1::Link, decorator: Google::Apis::SlidesV1::Link::Representation + + property :bold, as: 'bold' + property :foreground_color, as: 'foregroundColor', class: Google::Apis::SlidesV1::OptionalColor, decorator: Google::Apis::SlidesV1::OptionalColor::Representation + + property :font_family, as: 'fontFamily' + property :italic, as: 'italic' + property :strikethrough, as: 'strikethrough' + property :font_size, as: 'fontSize', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation + + property :baseline_offset, as: 'baselineOffset' + property :weighted_font_family, as: 'weightedFontFamily', class: Google::Apis::SlidesV1::WeightedFontFamily, decorator: Google::Apis::SlidesV1::WeightedFontFamily::Representation + + property :small_caps, as: 'smallCaps' + end end class UpdateVideoPropertiesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :video_properties, as: 'videoProperties', class: Google::Apis::SlidesV1::VideoProperties, decorator: Google::Apis::SlidesV1::VideoProperties::Representation - include Google::Apis::Core::JsonObjectSupport + property :fields, as: 'fields' + property :object_id_prop, as: 'objectId' + end end class Request - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_sheets_chart, as: 'createSheetsChart', class: Google::Apis::SlidesV1::CreateSheetsChartRequest, decorator: Google::Apis::SlidesV1::CreateSheetsChartRequest::Representation - include Google::Apis::Core::JsonObjectSupport + property :replace_all_shapes_with_sheets_chart, as: 'replaceAllShapesWithSheetsChart', class: Google::Apis::SlidesV1::ReplaceAllShapesWithSheetsChartRequest, decorator: Google::Apis::SlidesV1::ReplaceAllShapesWithSheetsChartRequest::Representation + + property :update_page_element_transform, as: 'updatePageElementTransform', class: Google::Apis::SlidesV1::UpdatePageElementTransformRequest, decorator: Google::Apis::SlidesV1::UpdatePageElementTransformRequest::Representation + + property :update_text_style, as: 'updateTextStyle', class: Google::Apis::SlidesV1::UpdateTextStyleRequest, decorator: Google::Apis::SlidesV1::UpdateTextStyleRequest::Representation + + property :replace_all_shapes_with_image, as: 'replaceAllShapesWithImage', class: Google::Apis::SlidesV1::ReplaceAllShapesWithImageRequest, decorator: Google::Apis::SlidesV1::ReplaceAllShapesWithImageRequest::Representation + + property :replace_all_text, as: 'replaceAllText', class: Google::Apis::SlidesV1::ReplaceAllTextRequest, decorator: Google::Apis::SlidesV1::ReplaceAllTextRequest::Representation + + property :update_image_properties, as: 'updateImageProperties', class: Google::Apis::SlidesV1::UpdateImagePropertiesRequest, decorator: Google::Apis::SlidesV1::UpdateImagePropertiesRequest::Representation + + property :create_slide, as: 'createSlide', class: Google::Apis::SlidesV1::CreateSlideRequest, decorator: Google::Apis::SlidesV1::CreateSlideRequest::Representation + + property :insert_table_rows, as: 'insertTableRows', class: Google::Apis::SlidesV1::InsertTableRowsRequest, decorator: Google::Apis::SlidesV1::InsertTableRowsRequest::Representation + + property :update_line_properties, as: 'updateLineProperties', class: Google::Apis::SlidesV1::UpdateLinePropertiesRequest, decorator: Google::Apis::SlidesV1::UpdateLinePropertiesRequest::Representation + + property :update_slides_position, as: 'updateSlidesPosition', class: Google::Apis::SlidesV1::UpdateSlidesPositionRequest, decorator: Google::Apis::SlidesV1::UpdateSlidesPositionRequest::Representation + + property :delete_table_row, as: 'deleteTableRow', class: Google::Apis::SlidesV1::DeleteTableRowRequest, decorator: Google::Apis::SlidesV1::DeleteTableRowRequest::Representation + + property :update_shape_properties, as: 'updateShapeProperties', class: Google::Apis::SlidesV1::UpdateShapePropertiesRequest, decorator: Google::Apis::SlidesV1::UpdateShapePropertiesRequest::Representation + + property :insert_text, as: 'insertText', class: Google::Apis::SlidesV1::InsertTextRequest, decorator: Google::Apis::SlidesV1::InsertTextRequest::Representation + + property :delete_text, as: 'deleteText', class: Google::Apis::SlidesV1::DeleteTextRequest, decorator: Google::Apis::SlidesV1::DeleteTextRequest::Representation + + property :update_page_properties, as: 'updatePageProperties', class: Google::Apis::SlidesV1::UpdatePagePropertiesRequest, decorator: Google::Apis::SlidesV1::UpdatePagePropertiesRequest::Representation + + property :delete_paragraph_bullets, as: 'deleteParagraphBullets', class: Google::Apis::SlidesV1::DeleteParagraphBulletsRequest, decorator: Google::Apis::SlidesV1::DeleteParagraphBulletsRequest::Representation + + property :create_shape, as: 'createShape', class: Google::Apis::SlidesV1::CreateShapeRequest, decorator: Google::Apis::SlidesV1::CreateShapeRequest::Representation + + property :insert_table_columns, as: 'insertTableColumns', class: Google::Apis::SlidesV1::InsertTableColumnsRequest, decorator: Google::Apis::SlidesV1::InsertTableColumnsRequest::Representation + + property :refresh_sheets_chart, as: 'refreshSheetsChart', class: Google::Apis::SlidesV1::RefreshSheetsChartRequest, decorator: Google::Apis::SlidesV1::RefreshSheetsChartRequest::Representation + + property :create_table, as: 'createTable', class: Google::Apis::SlidesV1::CreateTableRequest, decorator: Google::Apis::SlidesV1::CreateTableRequest::Representation + + property :update_table_cell_properties, as: 'updateTableCellProperties', class: Google::Apis::SlidesV1::UpdateTableCellPropertiesRequest, decorator: Google::Apis::SlidesV1::UpdateTableCellPropertiesRequest::Representation + + property :delete_object, as: 'deleteObject', class: Google::Apis::SlidesV1::DeleteObjectRequest, decorator: Google::Apis::SlidesV1::DeleteObjectRequest::Representation + + property :update_paragraph_style, as: 'updateParagraphStyle', class: Google::Apis::SlidesV1::UpdateParagraphStyleRequest, decorator: Google::Apis::SlidesV1::UpdateParagraphStyleRequest::Representation + + property :delete_table_column, as: 'deleteTableColumn', class: Google::Apis::SlidesV1::DeleteTableColumnRequest, decorator: Google::Apis::SlidesV1::DeleteTableColumnRequest::Representation + + property :duplicate_object, as: 'duplicateObject', class: Google::Apis::SlidesV1::DuplicateObjectRequest, decorator: Google::Apis::SlidesV1::DuplicateObjectRequest::Representation + + property :update_video_properties, as: 'updateVideoProperties', class: Google::Apis::SlidesV1::UpdateVideoPropertiesRequest, decorator: Google::Apis::SlidesV1::UpdateVideoPropertiesRequest::Representation + + property :create_line, as: 'createLine', class: Google::Apis::SlidesV1::CreateLineRequest, decorator: Google::Apis::SlidesV1::CreateLineRequest::Representation + + property :create_image, as: 'createImage', class: Google::Apis::SlidesV1::CreateImageRequest, decorator: Google::Apis::SlidesV1::CreateImageRequest::Representation + + property :create_paragraph_bullets, as: 'createParagraphBullets', class: Google::Apis::SlidesV1::CreateParagraphBulletsRequest, decorator: Google::Apis::SlidesV1::CreateParagraphBulletsRequest::Representation + + property :create_video, as: 'createVideo', class: Google::Apis::SlidesV1::CreateVideoRequest, decorator: Google::Apis::SlidesV1::CreateVideoRequest::Representation + + end end class UpdateImagePropertiesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :fields, as: 'fields' + property :image_properties, as: 'imageProperties', class: Google::Apis::SlidesV1::ImageProperties, decorator: Google::Apis::SlidesV1::ImageProperties::Representation - include Google::Apis::Core::JsonObjectSupport + property :object_id_prop, as: 'objectId' + end end class ParagraphStyle - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :space_below, as: 'spaceBelow', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation - include Google::Apis::Core::JsonObjectSupport + property :direction, as: 'direction' + property :spacing_mode, as: 'spacingMode' + property :indent_end, as: 'indentEnd', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation + + property :indent_start, as: 'indentStart', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation + + property :space_above, as: 'spaceAbove', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation + + property :alignment, as: 'alignment' + property :line_spacing, as: 'lineSpacing' + property :indent_first_line, as: 'indentFirstLine', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation + + end end class ReplaceAllShapesWithSheetsChartResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :occurrences_changed, as: 'occurrencesChanged' + end end class TableCellProperties - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :table_cell_background_fill, as: 'tableCellBackgroundFill', class: Google::Apis::SlidesV1::TableCellBackgroundFill, decorator: Google::Apis::SlidesV1::TableCellBackgroundFill::Representation - include Google::Apis::Core::JsonObjectSupport - end - - class Outline - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + end end class RefreshSheetsChartRequest - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :object_id_prop, as: 'objectId' + end + end - include Google::Apis::Core::JsonObjectSupport + class Outline + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :property_state, as: 'propertyState' + property :outline_fill, as: 'outlineFill', class: Google::Apis::SlidesV1::OutlineFill, decorator: Google::Apis::SlidesV1::OutlineFill::Representation + + property :weight, as: 'weight', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation + + property :dash_style, as: 'dashStyle' + end end class TableColumnProperties - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :column_width, as: 'columnWidth', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation - include Google::Apis::Core::JsonObjectSupport - end - - class ShapeProperties - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + end end class NotesProperties - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :speaker_notes_object_id, as: 'speakerNotesObjectId' + end + end - include Google::Apis::Core::JsonObjectSupport + class ShapeProperties + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :outline, as: 'outline', class: Google::Apis::SlidesV1::Outline, decorator: Google::Apis::SlidesV1::Outline::Representation + + property :shape_background_fill, as: 'shapeBackgroundFill', class: Google::Apis::SlidesV1::ShapeBackgroundFill, decorator: Google::Apis::SlidesV1::ShapeBackgroundFill::Representation + + property :shadow, as: 'shadow', class: Google::Apis::SlidesV1::Shadow, decorator: Google::Apis::SlidesV1::Shadow::Representation + + property :link, as: 'link', class: Google::Apis::SlidesV1::Link, decorator: Google::Apis::SlidesV1::Link::Representation + + end end class TableRow - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :row_height, as: 'rowHeight', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation - include Google::Apis::Core::JsonObjectSupport + collection :table_cells, as: 'tableCells', class: Google::Apis::SlidesV1::TableCell, decorator: Google::Apis::SlidesV1::TableCell::Representation + + end end class UpdateTableCellPropertiesRequest - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :object_id_prop, as: 'objectId' + property :table_range, as: 'tableRange', class: Google::Apis::SlidesV1::TableRange, decorator: Google::Apis::SlidesV1::TableRange::Representation - include Google::Apis::Core::JsonObjectSupport + property :table_cell_properties, as: 'tableCellProperties', class: Google::Apis::SlidesV1::TableCellProperties, decorator: Google::Apis::SlidesV1::TableCellProperties::Representation + + property :fields, as: 'fields' + end end class CreateSlideRequest - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :slide_layout_reference, as: 'slideLayoutReference', class: Google::Apis::SlidesV1::LayoutReference, decorator: Google::Apis::SlidesV1::LayoutReference::Representation - include Google::Apis::Core::JsonObjectSupport + property :object_id_prop, as: 'objectId' + property :insertion_index, as: 'insertionIndex' + collection :placeholder_id_mappings, as: 'placeholderIdMappings', class: Google::Apis::SlidesV1::LayoutPlaceholderIdMapping, decorator: Google::Apis::SlidesV1::LayoutPlaceholderIdMapping::Representation + + end end class BatchUpdatePresentationRequest - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :requests, as: 'requests', class: Google::Apis::SlidesV1::Request, decorator: Google::Apis::SlidesV1::Request::Representation - include Google::Apis::Core::JsonObjectSupport + property :write_control, as: 'writeControl', class: Google::Apis::SlidesV1::WriteControl, decorator: Google::Apis::SlidesV1::WriteControl::Representation + + end end class TextContent - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :text_elements, as: 'textElements', class: Google::Apis::SlidesV1::TextElement, decorator: Google::Apis::SlidesV1::TextElement::Representation - include Google::Apis::Core::JsonObjectSupport + hash :lists, as: 'lists', class: Google::Apis::SlidesV1::List, decorator: Google::Apis::SlidesV1::List::Representation + + end end class CreateSheetsChartResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :object_id_prop, as: 'objectId' + end end class WriteControl - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :required_revision_id, as: 'requiredRevisionId' + end end class DeleteParagraphBulletsRequest - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :object_id_prop, as: 'objectId' + property :text_range, as: 'textRange', class: Google::Apis::SlidesV1::Range, decorator: Google::Apis::SlidesV1::Range::Representation - include Google::Apis::Core::JsonObjectSupport + property :cell_location, as: 'cellLocation', class: Google::Apis::SlidesV1::TableCellLocation, decorator: Google::Apis::SlidesV1::TableCellLocation::Representation + + end end class ParagraphMarker - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :bullet, as: 'bullet', class: Google::Apis::SlidesV1::Bullet, decorator: Google::Apis::SlidesV1::Bullet::Representation - include Google::Apis::Core::JsonObjectSupport + property :style, as: 'style', class: Google::Apis::SlidesV1::ParagraphStyle, decorator: Google::Apis::SlidesV1::ParagraphStyle::Representation + + end end class InsertTableColumnsRequest @@ -693,13 +1195,22 @@ module Google end end + class Thumbnail + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :height, as: 'height' + property :content_url, as: 'contentUrl' + property :width, as: 'width' + end + end + class LayoutPlaceholderIdMapping # @private class Representation < Google::Apis::Core::JsonRepresentation - property :object_id_prop, as: 'objectId' property :layout_placeholder, as: 'layoutPlaceholder', class: Google::Apis::SlidesV1::Placeholder, decorator: Google::Apis::SlidesV1::Placeholder::Representation property :layout_placeholder_object_id, as: 'layoutPlaceholderObjectId' + property :object_id_prop, as: 'objectId' end end @@ -723,9 +1234,9 @@ module Google class Recolor # @private class Representation < Google::Apis::Core::JsonRepresentation - property :name, as: 'name' collection :recolor_stops, as: 'recolorStops', class: Google::Apis::SlidesV1::ColorStop, decorator: Google::Apis::SlidesV1::ColorStop::Representation + property :name, as: 'name' end end @@ -742,9 +1253,9 @@ module Google class RgbColor # @private class Representation < Google::Apis::Core::JsonRepresentation + property :red, as: 'red' property :green, as: 'green' property :blue, as: 'blue' - property :red, as: 'red' end end @@ -796,23 +1307,9 @@ module Google class PageProperties # @private class Representation < Google::Apis::Core::JsonRepresentation - property :page_background_fill, as: 'pageBackgroundFill', class: Google::Apis::SlidesV1::PageBackgroundFill, decorator: Google::Apis::SlidesV1::PageBackgroundFill::Representation - property :color_scheme, as: 'colorScheme', class: Google::Apis::SlidesV1::ColorScheme, decorator: Google::Apis::SlidesV1::ColorScheme::Representation - end - end - - class TableCell - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :location, as: 'location', class: Google::Apis::SlidesV1::TableCellLocation, decorator: Google::Apis::SlidesV1::TableCellLocation::Representation - - property :row_span, as: 'rowSpan' - property :column_span, as: 'columnSpan' - property :text, as: 'text', class: Google::Apis::SlidesV1::TextContent, decorator: Google::Apis::SlidesV1::TextContent::Representation - - property :table_cell_properties, as: 'tableCellProperties', class: Google::Apis::SlidesV1::TableCellProperties, decorator: Google::Apis::SlidesV1::TableCellProperties::Representation + property :page_background_fill, as: 'pageBackgroundFill', class: Google::Apis::SlidesV1::PageBackgroundFill, decorator: Google::Apis::SlidesV1::PageBackgroundFill::Representation end end @@ -825,13 +1322,27 @@ module Google end end + class TableCell + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :text, as: 'text', class: Google::Apis::SlidesV1::TextContent, decorator: Google::Apis::SlidesV1::TextContent::Representation + + property :table_cell_properties, as: 'tableCellProperties', class: Google::Apis::SlidesV1::TableCellProperties, decorator: Google::Apis::SlidesV1::TableCellProperties::Representation + + property :location, as: 'location', class: Google::Apis::SlidesV1::TableCellLocation, decorator: Google::Apis::SlidesV1::TableCellLocation::Representation + + property :row_span, as: 'rowSpan' + property :column_span, as: 'columnSpan' + end + end + class UpdateLinePropertiesRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :object_id_prop, as: 'objectId' property :line_properties, as: 'lineProperties', class: Google::Apis::SlidesV1::LineProperties, decorator: Google::Apis::SlidesV1::LineProperties::Representation property :fields, as: 'fields' + property :object_id_prop, as: 'objectId' end end @@ -905,9 +1416,9 @@ module Google collection :page_elements, as: 'pageElements', class: Google::Apis::SlidesV1::PageElement, decorator: Google::Apis::SlidesV1::PageElement::Representation + property :page_type, as: 'pageType' property :notes_properties, as: 'notesProperties', class: Google::Apis::SlidesV1::NotesProperties, decorator: Google::Apis::SlidesV1::NotesProperties::Representation - property :page_type, as: 'pageType' property :page_properties, as: 'pageProperties', class: Google::Apis::SlidesV1::PageProperties, decorator: Google::Apis::SlidesV1::PageProperties::Representation property :slide_properties, as: 'slideProperties', class: Google::Apis::SlidesV1::SlideProperties, decorator: Google::Apis::SlidesV1::SlideProperties::Representation @@ -927,11 +1438,11 @@ module Google class CropProperties # @private class Representation < Google::Apis::Core::JsonRepresentation + property :angle, as: 'angle' property :top_offset, as: 'topOffset' property :left_offset, as: 'leftOffset' property :right_offset, as: 'rightOffset' property :bottom_offset, as: 'bottomOffset' - property :angle, as: 'angle' end end @@ -946,22 +1457,22 @@ module Google end end - class ColorStop - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :alpha, as: 'alpha' - property :position, as: 'position' - property :color, as: 'color', class: Google::Apis::SlidesV1::OpaqueColor, decorator: Google::Apis::SlidesV1::OpaqueColor::Representation - - end - end - class Range # @private class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' property :start_index, as: 'startIndex' property :end_index, as: 'endIndex' + property :type, as: 'type' + end + end + + class ColorStop + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :color, as: 'color', class: Google::Apis::SlidesV1::OpaqueColor, decorator: Google::Apis::SlidesV1::OpaqueColor::Representation + + property :alpha, as: 'alpha' + property :position, as: 'position' end end @@ -996,37 +1507,37 @@ module Google class Shadow # @private class Representation < Google::Apis::Core::JsonRepresentation - property :property_state, as: 'propertyState' - property :blur_radius, as: 'blurRadius', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation - + property :type, as: 'type' property :transform, as: 'transform', class: Google::Apis::SlidesV1::AffineTransform, decorator: Google::Apis::SlidesV1::AffineTransform::Representation - property :type, as: 'type' property :alignment, as: 'alignment' property :alpha, as: 'alpha' property :color, as: 'color', class: Google::Apis::SlidesV1::OpaqueColor, decorator: Google::Apis::SlidesV1::OpaqueColor::Representation property :rotate_with_shape, as: 'rotateWithShape' + property :property_state, as: 'propertyState' + property :blur_radius, as: 'blurRadius', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation + end end class DeleteTableRowRequest # @private class Representation < Google::Apis::Core::JsonRepresentation + property :table_object_id, as: 'tableObjectId' property :cell_location, as: 'cellLocation', class: Google::Apis::SlidesV1::TableCellLocation, decorator: Google::Apis::SlidesV1::TableCellLocation::Representation - property :table_object_id, as: 'tableObjectId' end end class Bullet # @private class Representation < Google::Apis::Core::JsonRepresentation - property :bullet_style, as: 'bulletStyle', class: Google::Apis::SlidesV1::TextStyle, decorator: Google::Apis::SlidesV1::TextStyle::Representation - property :list_id, as: 'listId' property :glyph, as: 'glyph' property :nesting_level, as: 'nestingLevel' + property :bullet_style, as: 'bulletStyle', class: Google::Apis::SlidesV1::TextStyle, decorator: Google::Apis::SlidesV1::TextStyle::Representation + end end @@ -1038,6 +1549,13 @@ module Google end end + class CreateLineResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :object_id_prop, as: 'objectId' + end + end + class TableCellLocation # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1046,13 +1564,6 @@ module Google end end - class CreateLineResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :object_id_prop, as: 'objectId' - end - end - class ReplaceAllTextResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1098,9 +1609,22 @@ module Google class Image # @private class Representation < Google::Apis::Core::JsonRepresentation + property :content_url, as: 'contentUrl' property :image_properties, as: 'imageProperties', class: Google::Apis::SlidesV1::ImageProperties, decorator: Google::Apis::SlidesV1::ImageProperties::Representation - property :content_url, as: 'contentUrl' + end + end + + class AffineTransform + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :shear_y, as: 'shearY' + property :unit, as: 'unit' + property :scale_x, as: 'scaleX' + property :shear_x, as: 'shearX' + property :scale_y, as: 'scaleY' + property :translate_y, as: 'translateY' + property :translate_x, as: 'translateX' end end @@ -1115,19 +1639,6 @@ module Google end end - class AffineTransform - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :unit, as: 'unit' - property :scale_x, as: 'scaleX' - property :shear_x, as: 'shearX' - property :scale_y, as: 'scaleY' - property :translate_y, as: 'translateY' - property :translate_x, as: 'translateX' - property :shear_y, as: 'shearY' - end - end - class AutoText # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1145,6 +1656,16 @@ module Google end end + class UpdatePageElementTransformRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :object_id_prop, as: 'objectId' + property :transform, as: 'transform', class: Google::Apis::SlidesV1::AffineTransform, decorator: Google::Apis::SlidesV1::AffineTransform::Representation + + property :apply_mode, as: 'applyMode' + end + end + class DeleteTextRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1156,16 +1677,6 @@ module Google end end - class UpdatePageElementTransformRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :object_id_prop, as: 'objectId' - property :transform, as: 'transform', class: Google::Apis::SlidesV1::AffineTransform, decorator: Google::Apis::SlidesV1::AffineTransform::Representation - - property :apply_mode, as: 'applyMode' - end - end - class DeleteObjectRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1173,14 +1684,6 @@ module Google end end - class Dimension - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :magnitude, as: 'magnitude' - property :unit, as: 'unit' - end - end - class TextElement # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1195,6 +1698,14 @@ module Google end end + class Dimension + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :magnitude, as: 'magnitude' + property :unit, as: 'unit' + end + end + class LineFill # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1214,11 +1725,11 @@ module Google class InsertTableRowsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation - property :insert_below, as: 'insertBelow' - property :number, as: 'number' property :cell_location, as: 'cellLocation', class: Google::Apis::SlidesV1::TableCellLocation, decorator: Google::Apis::SlidesV1::TableCellLocation::Representation property :table_object_id, as: 'tableObjectId' + property :insert_below, as: 'insertBelow' + property :number, as: 'number' end end @@ -1231,38 +1742,38 @@ module Google end end - class LineProperties - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :dash_style, as: 'dashStyle' - property :link, as: 'link', class: Google::Apis::SlidesV1::Link, decorator: Google::Apis::SlidesV1::Link::Representation - - property :end_arrow, as: 'endArrow' - property :start_arrow, as: 'startArrow' - property :weight, as: 'weight', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation - - property :line_fill, as: 'lineFill', class: Google::Apis::SlidesV1::LineFill, decorator: Google::Apis::SlidesV1::LineFill::Representation - - end - end - class Presentation # @private class Representation < Google::Apis::Core::JsonRepresentation - property :notes_master, as: 'notesMaster', class: Google::Apis::SlidesV1::Page, decorator: Google::Apis::SlidesV1::Page::Representation - - property :title, as: 'title' - collection :layouts, as: 'layouts', class: Google::Apis::SlidesV1::Page, decorator: Google::Apis::SlidesV1::Page::Representation - - collection :masters, as: 'masters', class: Google::Apis::SlidesV1::Page, decorator: Google::Apis::SlidesV1::Page::Representation - - property :locale, as: 'locale' property :page_size, as: 'pageSize', class: Google::Apis::SlidesV1::Size, decorator: Google::Apis::SlidesV1::Size::Representation property :presentation_id, as: 'presentationId' collection :slides, as: 'slides', class: Google::Apis::SlidesV1::Page, decorator: Google::Apis::SlidesV1::Page::Representation property :revision_id, as: 'revisionId' + property :notes_master, as: 'notesMaster', class: Google::Apis::SlidesV1::Page, decorator: Google::Apis::SlidesV1::Page::Representation + + collection :layouts, as: 'layouts', class: Google::Apis::SlidesV1::Page, decorator: Google::Apis::SlidesV1::Page::Representation + + property :title, as: 'title' + collection :masters, as: 'masters', class: Google::Apis::SlidesV1::Page, decorator: Google::Apis::SlidesV1::Page::Representation + + property :locale, as: 'locale' + end + end + + class LineProperties + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :link, as: 'link', class: Google::Apis::SlidesV1::Link, decorator: Google::Apis::SlidesV1::Link::Representation + + property :dash_style, as: 'dashStyle' + property :start_arrow, as: 'startArrow' + property :end_arrow, as: 'endArrow' + property :weight, as: 'weight', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation + + property :line_fill, as: 'lineFill', class: Google::Apis::SlidesV1::LineFill, decorator: Google::Apis::SlidesV1::LineFill::Representation + end end @@ -1280,9 +1791,9 @@ module Google class Representation < Google::Apis::Core::JsonRepresentation property :shadow, as: 'shadow', class: Google::Apis::SlidesV1::Shadow, decorator: Google::Apis::SlidesV1::Shadow::Representation + property :contrast, as: 'contrast' property :link, as: 'link', class: Google::Apis::SlidesV1::Link, decorator: Google::Apis::SlidesV1::Link::Representation - property :contrast, as: 'contrast' property :recolor, as: 'recolor', class: Google::Apis::SlidesV1::Recolor, decorator: Google::Apis::SlidesV1::Recolor::Representation property :crop_properties, as: 'cropProperties', class: Google::Apis::SlidesV1::CropProperties, decorator: Google::Apis::SlidesV1::CropProperties::Representation @@ -1304,9 +1815,21 @@ module Google class Line # @private class Representation < Google::Apis::Core::JsonRepresentation + property :line_type, as: 'lineType' property :line_properties, as: 'lineProperties', class: Google::Apis::SlidesV1::LineProperties, decorator: Google::Apis::SlidesV1::LineProperties::Representation - property :line_type, as: 'lineType' + end + end + + class CreateSheetsChartRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :chart_id, as: 'chartId' + property :object_id_prop, as: 'objectId' + property :element_properties, as: 'elementProperties', class: Google::Apis::SlidesV1::PageElementProperties, decorator: Google::Apis::SlidesV1::PageElementProperties::Representation + + property :spreadsheet_id, as: 'spreadsheetId' + property :linking_mode, as: 'linkingMode' end end @@ -1319,18 +1842,6 @@ module Google end end - class CreateSheetsChartRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :object_id_prop, as: 'objectId' - property :element_properties, as: 'elementProperties', class: Google::Apis::SlidesV1::PageElementProperties, decorator: Google::Apis::SlidesV1::PageElementProperties::Representation - - property :spreadsheet_id, as: 'spreadsheetId' - property :linking_mode, as: 'linkingMode' - property :chart_id, as: 'chartId' - end - end - class CreateImageResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1341,16 +1852,26 @@ module Google class SlideProperties # @private class Representation < Google::Apis::Core::JsonRepresentation - property :layout_object_id, as: 'layoutObjectId' - property :master_object_id, as: 'masterObjectId' property :notes_page, as: 'notesPage', class: Google::Apis::SlidesV1::Page, decorator: Google::Apis::SlidesV1::Page::Representation + property :layout_object_id, as: 'layoutObjectId' + property :master_object_id, as: 'masterObjectId' end end class Response # @private class Representation < Google::Apis::Core::JsonRepresentation + property :create_image, as: 'createImage', class: Google::Apis::SlidesV1::CreateImageResponse, decorator: Google::Apis::SlidesV1::CreateImageResponse::Representation + + property :create_video, as: 'createVideo', class: Google::Apis::SlidesV1::CreateVideoResponse, decorator: Google::Apis::SlidesV1::CreateVideoResponse::Representation + + property :replace_all_shapes_with_sheets_chart, as: 'replaceAllShapesWithSheetsChart', class: Google::Apis::SlidesV1::ReplaceAllShapesWithSheetsChartResponse, decorator: Google::Apis::SlidesV1::ReplaceAllShapesWithSheetsChartResponse::Representation + + property :create_sheets_chart, as: 'createSheetsChart', class: Google::Apis::SlidesV1::CreateSheetsChartResponse, decorator: Google::Apis::SlidesV1::CreateSheetsChartResponse::Representation + + property :replace_all_shapes_with_image, as: 'replaceAllShapesWithImage', class: Google::Apis::SlidesV1::ReplaceAllShapesWithImageResponse, decorator: Google::Apis::SlidesV1::ReplaceAllShapesWithImageResponse::Representation + property :create_table, as: 'createTable', class: Google::Apis::SlidesV1::CreateTableResponse, decorator: Google::Apis::SlidesV1::CreateTableResponse::Representation property :replace_all_text, as: 'replaceAllText', class: Google::Apis::SlidesV1::ReplaceAllTextResponse, decorator: Google::Apis::SlidesV1::ReplaceAllTextResponse::Representation @@ -1363,16 +1884,22 @@ module Google property :create_line, as: 'createLine', class: Google::Apis::SlidesV1::CreateLineResponse, decorator: Google::Apis::SlidesV1::CreateLineResponse::Representation - property :create_image, as: 'createImage', class: Google::Apis::SlidesV1::CreateImageResponse, decorator: Google::Apis::SlidesV1::CreateImageResponse::Representation + end + end - property :create_video, as: 'createVideo', class: Google::Apis::SlidesV1::CreateVideoResponse, decorator: Google::Apis::SlidesV1::CreateVideoResponse::Representation - - property :replace_all_shapes_with_sheets_chart, as: 'replaceAllShapesWithSheetsChart', class: Google::Apis::SlidesV1::ReplaceAllShapesWithSheetsChartResponse, decorator: Google::Apis::SlidesV1::ReplaceAllShapesWithSheetsChartResponse::Representation - - property :create_sheets_chart, as: 'createSheetsChart', class: Google::Apis::SlidesV1::CreateSheetsChartResponse, decorator: Google::Apis::SlidesV1::CreateSheetsChartResponse::Representation - - property :replace_all_shapes_with_image, as: 'replaceAllShapesWithImage', class: Google::Apis::SlidesV1::ReplaceAllShapesWithImageResponse, decorator: Google::Apis::SlidesV1::ReplaceAllShapesWithImageResponse::Representation + class SubstringMatchCriteria + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :text, as: 'text' + property :match_case, as: 'matchCase' + end + end + class LayoutReference + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :predefined_layout, as: 'predefinedLayout' + property :layout_id, as: 'layoutId' end end @@ -1385,509 +1912,13 @@ module Google end end - class LayoutReference - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :layout_id, as: 'layoutId' - property :predefined_layout, as: 'predefinedLayout' - end - end - - class SubstringMatchCriteria - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :text, as: 'text' - property :match_case, as: 'matchCase' - end - end - class TableRange # @private class Representation < Google::Apis::Core::JsonRepresentation + property :column_span, as: 'columnSpan' property :location, as: 'location', class: Google::Apis::SlidesV1::TableCellLocation, decorator: Google::Apis::SlidesV1::TableCellLocation::Representation property :row_span, as: 'rowSpan' - property :column_span, as: 'columnSpan' - end - end - - class CreateTableRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :rows, as: 'rows' - property :object_id_prop, as: 'objectId' - property :columns, as: 'columns' - property :element_properties, as: 'elementProperties', class: Google::Apis::SlidesV1::PageElementProperties, decorator: Google::Apis::SlidesV1::PageElementProperties::Representation - - end - end - - class CreateTableResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :object_id_prop, as: 'objectId' - end - end - - class Table - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :table_columns, as: 'tableColumns', class: Google::Apis::SlidesV1::TableColumnProperties, decorator: Google::Apis::SlidesV1::TableColumnProperties::Representation - - property :columns, as: 'columns' - collection :table_rows, as: 'tableRows', class: Google::Apis::SlidesV1::TableRow, decorator: Google::Apis::SlidesV1::TableRow::Representation - - property :rows, as: 'rows' - end - end - - class PageBackgroundFill - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :solid_fill, as: 'solidFill', class: Google::Apis::SlidesV1::SolidFill, decorator: Google::Apis::SlidesV1::SolidFill::Representation - - property :property_state, as: 'propertyState' - property :stretched_picture_fill, as: 'stretchedPictureFill', class: Google::Apis::SlidesV1::StretchedPictureFill, decorator: Google::Apis::SlidesV1::StretchedPictureFill::Representation - - end - end - - class SheetsChart - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :sheets_chart_properties, as: 'sheetsChartProperties', class: Google::Apis::SlidesV1::SheetsChartProperties, decorator: Google::Apis::SlidesV1::SheetsChartProperties::Representation - - property :content_url, as: 'contentUrl' - property :spreadsheet_id, as: 'spreadsheetId' - property :chart_id, as: 'chartId' - end - end - - class SolidFill - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :alpha, as: 'alpha' - property :color, as: 'color', class: Google::Apis::SlidesV1::OpaqueColor, decorator: Google::Apis::SlidesV1::OpaqueColor::Representation - - end - end - - class ThemeColorPair - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :color, as: 'color', class: Google::Apis::SlidesV1::RgbColor, decorator: Google::Apis::SlidesV1::RgbColor::Representation - - property :type, as: 'type' - end - end - - class OptionalColor - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :opaque_color, as: 'opaqueColor', class: Google::Apis::SlidesV1::OpaqueColor, decorator: Google::Apis::SlidesV1::OpaqueColor::Representation - - end - end - - class PageElementProperties - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :transform, as: 'transform', class: Google::Apis::SlidesV1::AffineTransform, decorator: Google::Apis::SlidesV1::AffineTransform::Representation - - property :page_object_id, as: 'pageObjectId' - property :size, as: 'size', class: Google::Apis::SlidesV1::Size, decorator: Google::Apis::SlidesV1::Size::Representation - - end - end - - class SheetsChartProperties - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :chart_image_properties, as: 'chartImageProperties', class: Google::Apis::SlidesV1::ImageProperties, decorator: Google::Apis::SlidesV1::ImageProperties::Representation - - end - end - - class StretchedPictureFill - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :size, as: 'size', class: Google::Apis::SlidesV1::Size, decorator: Google::Apis::SlidesV1::Size::Representation - - property :content_url, as: 'contentUrl' - end - end - - class DeleteTableColumnRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :cell_location, as: 'cellLocation', class: Google::Apis::SlidesV1::TableCellLocation, decorator: Google::Apis::SlidesV1::TableCellLocation::Representation - - property :table_object_id, as: 'tableObjectId' - end - end - - class UpdateTextStyleRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :cell_location, as: 'cellLocation', class: Google::Apis::SlidesV1::TableCellLocation, decorator: Google::Apis::SlidesV1::TableCellLocation::Representation - - property :style, as: 'style', class: Google::Apis::SlidesV1::TextStyle, decorator: Google::Apis::SlidesV1::TextStyle::Representation - - property :fields, as: 'fields' - property :object_id_prop, as: 'objectId' - property :text_range, as: 'textRange', class: Google::Apis::SlidesV1::Range, decorator: Google::Apis::SlidesV1::Range::Representation - - end - end - - class List - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :list_id, as: 'listId' - hash :nesting_level, as: 'nestingLevel', class: Google::Apis::SlidesV1::NestingLevel, decorator: Google::Apis::SlidesV1::NestingLevel::Representation - - end - end - - class PageElement - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :line, as: 'line', class: Google::Apis::SlidesV1::Line, decorator: Google::Apis::SlidesV1::Line::Representation - - property :description, as: 'description' - property :element_group, as: 'elementGroup', class: Google::Apis::SlidesV1::Group, decorator: Google::Apis::SlidesV1::Group::Representation - - property :image, as: 'image', class: Google::Apis::SlidesV1::Image, decorator: Google::Apis::SlidesV1::Image::Representation - - property :size, as: 'size', class: Google::Apis::SlidesV1::Size, decorator: Google::Apis::SlidesV1::Size::Representation - - property :title, as: 'title' - property :sheets_chart, as: 'sheetsChart', class: Google::Apis::SlidesV1::SheetsChart, decorator: Google::Apis::SlidesV1::SheetsChart::Representation - - property :video, as: 'video', class: Google::Apis::SlidesV1::Video, decorator: Google::Apis::SlidesV1::Video::Representation - - property :word_art, as: 'wordArt', class: Google::Apis::SlidesV1::WordArt, decorator: Google::Apis::SlidesV1::WordArt::Representation - - property :table, as: 'table', class: Google::Apis::SlidesV1::Table, decorator: Google::Apis::SlidesV1::Table::Representation - - property :transform, as: 'transform', class: Google::Apis::SlidesV1::AffineTransform, decorator: Google::Apis::SlidesV1::AffineTransform::Representation - - property :object_id_prop, as: 'objectId' - property :shape, as: 'shape', class: Google::Apis::SlidesV1::Shape, decorator: Google::Apis::SlidesV1::Shape::Representation - - end - end - - class CreateImageRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :object_id_prop, as: 'objectId' - property :element_properties, as: 'elementProperties', class: Google::Apis::SlidesV1::PageElementProperties, decorator: Google::Apis::SlidesV1::PageElementProperties::Representation - - property :url, as: 'url' - end - end - - class CreateParagraphBulletsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :object_id_prop, as: 'objectId' - property :text_range, as: 'textRange', class: Google::Apis::SlidesV1::Range, decorator: Google::Apis::SlidesV1::Range::Representation - - property :bullet_preset, as: 'bulletPreset' - property :cell_location, as: 'cellLocation', class: Google::Apis::SlidesV1::TableCellLocation, decorator: Google::Apis::SlidesV1::TableCellLocation::Representation - - end - end - - class Size - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :height, as: 'height', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation - - property :width, as: 'width', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation - - end - end - - class TextStyle - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :link, as: 'link', class: Google::Apis::SlidesV1::Link, decorator: Google::Apis::SlidesV1::Link::Representation - - property :underline, as: 'underline' - property :bold, as: 'bold' - property :foreground_color, as: 'foregroundColor', class: Google::Apis::SlidesV1::OptionalColor, decorator: Google::Apis::SlidesV1::OptionalColor::Representation - - property :font_family, as: 'fontFamily' - property :strikethrough, as: 'strikethrough' - property :italic, as: 'italic' - property :font_size, as: 'fontSize', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation - - property :small_caps, as: 'smallCaps' - property :baseline_offset, as: 'baselineOffset' - property :background_color, as: 'backgroundColor', class: Google::Apis::SlidesV1::OptionalColor, decorator: Google::Apis::SlidesV1::OptionalColor::Representation - - end - end - - class UpdateVideoPropertiesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :video_properties, as: 'videoProperties', class: Google::Apis::SlidesV1::VideoProperties, decorator: Google::Apis::SlidesV1::VideoProperties::Representation - - property :fields, as: 'fields' - property :object_id_prop, as: 'objectId' - end - end - - class Request - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :insert_table_rows, as: 'insertTableRows', class: Google::Apis::SlidesV1::InsertTableRowsRequest, decorator: Google::Apis::SlidesV1::InsertTableRowsRequest::Representation - - property :create_slide, as: 'createSlide', class: Google::Apis::SlidesV1::CreateSlideRequest, decorator: Google::Apis::SlidesV1::CreateSlideRequest::Representation - - property :update_line_properties, as: 'updateLineProperties', class: Google::Apis::SlidesV1::UpdateLinePropertiesRequest, decorator: Google::Apis::SlidesV1::UpdateLinePropertiesRequest::Representation - - property :update_slides_position, as: 'updateSlidesPosition', class: Google::Apis::SlidesV1::UpdateSlidesPositionRequest, decorator: Google::Apis::SlidesV1::UpdateSlidesPositionRequest::Representation - - property :delete_table_row, as: 'deleteTableRow', class: Google::Apis::SlidesV1::DeleteTableRowRequest, decorator: Google::Apis::SlidesV1::DeleteTableRowRequest::Representation - - property :update_shape_properties, as: 'updateShapeProperties', class: Google::Apis::SlidesV1::UpdateShapePropertiesRequest, decorator: Google::Apis::SlidesV1::UpdateShapePropertiesRequest::Representation - - property :insert_text, as: 'insertText', class: Google::Apis::SlidesV1::InsertTextRequest, decorator: Google::Apis::SlidesV1::InsertTextRequest::Representation - - property :delete_text, as: 'deleteText', class: Google::Apis::SlidesV1::DeleteTextRequest, decorator: Google::Apis::SlidesV1::DeleteTextRequest::Representation - - property :update_page_properties, as: 'updatePageProperties', class: Google::Apis::SlidesV1::UpdatePagePropertiesRequest, decorator: Google::Apis::SlidesV1::UpdatePagePropertiesRequest::Representation - - property :delete_paragraph_bullets, as: 'deleteParagraphBullets', class: Google::Apis::SlidesV1::DeleteParagraphBulletsRequest, decorator: Google::Apis::SlidesV1::DeleteParagraphBulletsRequest::Representation - - property :create_shape, as: 'createShape', class: Google::Apis::SlidesV1::CreateShapeRequest, decorator: Google::Apis::SlidesV1::CreateShapeRequest::Representation - - property :insert_table_columns, as: 'insertTableColumns', class: Google::Apis::SlidesV1::InsertTableColumnsRequest, decorator: Google::Apis::SlidesV1::InsertTableColumnsRequest::Representation - - property :refresh_sheets_chart, as: 'refreshSheetsChart', class: Google::Apis::SlidesV1::RefreshSheetsChartRequest, decorator: Google::Apis::SlidesV1::RefreshSheetsChartRequest::Representation - - property :update_table_cell_properties, as: 'updateTableCellProperties', class: Google::Apis::SlidesV1::UpdateTableCellPropertiesRequest, decorator: Google::Apis::SlidesV1::UpdateTableCellPropertiesRequest::Representation - - property :create_table, as: 'createTable', class: Google::Apis::SlidesV1::CreateTableRequest, decorator: Google::Apis::SlidesV1::CreateTableRequest::Representation - - property :delete_object, as: 'deleteObject', class: Google::Apis::SlidesV1::DeleteObjectRequest, decorator: Google::Apis::SlidesV1::DeleteObjectRequest::Representation - - property :update_paragraph_style, as: 'updateParagraphStyle', class: Google::Apis::SlidesV1::UpdateParagraphStyleRequest, decorator: Google::Apis::SlidesV1::UpdateParagraphStyleRequest::Representation - - property :delete_table_column, as: 'deleteTableColumn', class: Google::Apis::SlidesV1::DeleteTableColumnRequest, decorator: Google::Apis::SlidesV1::DeleteTableColumnRequest::Representation - - property :duplicate_object, as: 'duplicateObject', class: Google::Apis::SlidesV1::DuplicateObjectRequest, decorator: Google::Apis::SlidesV1::DuplicateObjectRequest::Representation - - property :update_video_properties, as: 'updateVideoProperties', class: Google::Apis::SlidesV1::UpdateVideoPropertiesRequest, decorator: Google::Apis::SlidesV1::UpdateVideoPropertiesRequest::Representation - - property :create_line, as: 'createLine', class: Google::Apis::SlidesV1::CreateLineRequest, decorator: Google::Apis::SlidesV1::CreateLineRequest::Representation - - property :create_image, as: 'createImage', class: Google::Apis::SlidesV1::CreateImageRequest, decorator: Google::Apis::SlidesV1::CreateImageRequest::Representation - - property :create_paragraph_bullets, as: 'createParagraphBullets', class: Google::Apis::SlidesV1::CreateParagraphBulletsRequest, decorator: Google::Apis::SlidesV1::CreateParagraphBulletsRequest::Representation - - property :create_video, as: 'createVideo', class: Google::Apis::SlidesV1::CreateVideoRequest, decorator: Google::Apis::SlidesV1::CreateVideoRequest::Representation - - property :create_sheets_chart, as: 'createSheetsChart', class: Google::Apis::SlidesV1::CreateSheetsChartRequest, decorator: Google::Apis::SlidesV1::CreateSheetsChartRequest::Representation - - property :replace_all_shapes_with_sheets_chart, as: 'replaceAllShapesWithSheetsChart', class: Google::Apis::SlidesV1::ReplaceAllShapesWithSheetsChartRequest, decorator: Google::Apis::SlidesV1::ReplaceAllShapesWithSheetsChartRequest::Representation - - property :update_page_element_transform, as: 'updatePageElementTransform', class: Google::Apis::SlidesV1::UpdatePageElementTransformRequest, decorator: Google::Apis::SlidesV1::UpdatePageElementTransformRequest::Representation - - property :update_text_style, as: 'updateTextStyle', class: Google::Apis::SlidesV1::UpdateTextStyleRequest, decorator: Google::Apis::SlidesV1::UpdateTextStyleRequest::Representation - - property :replace_all_shapes_with_image, as: 'replaceAllShapesWithImage', class: Google::Apis::SlidesV1::ReplaceAllShapesWithImageRequest, decorator: Google::Apis::SlidesV1::ReplaceAllShapesWithImageRequest::Representation - - property :replace_all_text, as: 'replaceAllText', class: Google::Apis::SlidesV1::ReplaceAllTextRequest, decorator: Google::Apis::SlidesV1::ReplaceAllTextRequest::Representation - - property :update_image_properties, as: 'updateImageProperties', class: Google::Apis::SlidesV1::UpdateImagePropertiesRequest, decorator: Google::Apis::SlidesV1::UpdateImagePropertiesRequest::Representation - - end - end - - class UpdateImagePropertiesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :fields, as: 'fields' - property :image_properties, as: 'imageProperties', class: Google::Apis::SlidesV1::ImageProperties, decorator: Google::Apis::SlidesV1::ImageProperties::Representation - - property :object_id_prop, as: 'objectId' - end - end - - class ParagraphStyle - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :space_below, as: 'spaceBelow', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation - - property :direction, as: 'direction' - property :spacing_mode, as: 'spacingMode' - property :indent_end, as: 'indentEnd', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation - - property :indent_start, as: 'indentStart', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation - - property :space_above, as: 'spaceAbove', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation - - property :alignment, as: 'alignment' - property :line_spacing, as: 'lineSpacing' - property :indent_first_line, as: 'indentFirstLine', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation - - end - end - - class ReplaceAllShapesWithSheetsChartResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :occurrences_changed, as: 'occurrencesChanged' - end - end - - class TableCellProperties - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :table_cell_background_fill, as: 'tableCellBackgroundFill', class: Google::Apis::SlidesV1::TableCellBackgroundFill, decorator: Google::Apis::SlidesV1::TableCellBackgroundFill::Representation - - end - end - - class Outline - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :outline_fill, as: 'outlineFill', class: Google::Apis::SlidesV1::OutlineFill, decorator: Google::Apis::SlidesV1::OutlineFill::Representation - - property :weight, as: 'weight', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation - - property :dash_style, as: 'dashStyle' - property :property_state, as: 'propertyState' - end - end - - class RefreshSheetsChartRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :object_id_prop, as: 'objectId' - end - end - - class TableColumnProperties - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :column_width, as: 'columnWidth', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation - - end - end - - class ShapeProperties - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :link, as: 'link', class: Google::Apis::SlidesV1::Link, decorator: Google::Apis::SlidesV1::Link::Representation - - property :outline, as: 'outline', class: Google::Apis::SlidesV1::Outline, decorator: Google::Apis::SlidesV1::Outline::Representation - - property :shape_background_fill, as: 'shapeBackgroundFill', class: Google::Apis::SlidesV1::ShapeBackgroundFill, decorator: Google::Apis::SlidesV1::ShapeBackgroundFill::Representation - - property :shadow, as: 'shadow', class: Google::Apis::SlidesV1::Shadow, decorator: Google::Apis::SlidesV1::Shadow::Representation - - end - end - - class NotesProperties - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :speaker_notes_object_id, as: 'speakerNotesObjectId' - end - end - - class TableRow - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :row_height, as: 'rowHeight', class: Google::Apis::SlidesV1::Dimension, decorator: Google::Apis::SlidesV1::Dimension::Representation - - collection :table_cells, as: 'tableCells', class: Google::Apis::SlidesV1::TableCell, decorator: Google::Apis::SlidesV1::TableCell::Representation - - end - end - - class UpdateTableCellPropertiesRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :object_id_prop, as: 'objectId' - property :table_range, as: 'tableRange', class: Google::Apis::SlidesV1::TableRange, decorator: Google::Apis::SlidesV1::TableRange::Representation - - property :table_cell_properties, as: 'tableCellProperties', class: Google::Apis::SlidesV1::TableCellProperties, decorator: Google::Apis::SlidesV1::TableCellProperties::Representation - - property :fields, as: 'fields' - end - end - - class CreateSlideRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :slide_layout_reference, as: 'slideLayoutReference', class: Google::Apis::SlidesV1::LayoutReference, decorator: Google::Apis::SlidesV1::LayoutReference::Representation - - property :object_id_prop, as: 'objectId' - property :insertion_index, as: 'insertionIndex' - collection :placeholder_id_mappings, as: 'placeholderIdMappings', class: Google::Apis::SlidesV1::LayoutPlaceholderIdMapping, decorator: Google::Apis::SlidesV1::LayoutPlaceholderIdMapping::Representation - - end - end - - class BatchUpdatePresentationRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :write_control, as: 'writeControl', class: Google::Apis::SlidesV1::WriteControl, decorator: Google::Apis::SlidesV1::WriteControl::Representation - - collection :requests, as: 'requests', class: Google::Apis::SlidesV1::Request, decorator: Google::Apis::SlidesV1::Request::Representation - - end - end - - class TextContent - # @private - class Representation < Google::Apis::Core::JsonRepresentation - hash :lists, as: 'lists', class: Google::Apis::SlidesV1::List, decorator: Google::Apis::SlidesV1::List::Representation - - collection :text_elements, as: 'textElements', class: Google::Apis::SlidesV1::TextElement, decorator: Google::Apis::SlidesV1::TextElement::Representation - - end - end - - class CreateSheetsChartResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :object_id_prop, as: 'objectId' - end - end - - class WriteControl - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :required_revision_id, as: 'requiredRevisionId' - end - end - - class DeleteParagraphBulletsRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :cell_location, as: 'cellLocation', class: Google::Apis::SlidesV1::TableCellLocation, decorator: Google::Apis::SlidesV1::TableCellLocation::Representation - - property :object_id_prop, as: 'objectId' - property :text_range, as: 'textRange', class: Google::Apis::SlidesV1::Range, decorator: Google::Apis::SlidesV1::Range::Representation - - end - end - - class ParagraphMarker - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :style, as: 'style', class: Google::Apis::SlidesV1::ParagraphStyle, decorator: Google::Apis::SlidesV1::ParagraphStyle::Representation - - property :bullet, as: 'bullet', class: Google::Apis::SlidesV1::Bullet, decorator: Google::Apis::SlidesV1::Bullet::Representation - end end end diff --git a/generated/google/apis/slides_v1/service.rb b/generated/google/apis/slides_v1/service.rb index dfaf80d34..6b37870ea 100644 --- a/generated/google/apis/slides_v1/service.rb +++ b/generated/google/apis/slides_v1/service.rb @@ -49,11 +49,11 @@ module Google # Gets the latest version of the specified presentation. # @param [String] presentation_id # The ID of the presentation to retrieve. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -66,13 +66,13 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_presentation(presentation_id, quota_user: nil, fields: nil, options: nil, &block) + def get_presentation(presentation_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/presentations/{+presentationId}', options) command.response_representation = Google::Apis::SlidesV1::Presentation::Representation command.response_class = Google::Apis::SlidesV1::Presentation command.params['presentationId'] = presentation_id unless presentation_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -80,11 +80,11 @@ module Google # fields in the request are ignored. # Returns the created presentation. # @param [Google::Apis::SlidesV1::Presentation] presentation_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -97,14 +97,14 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_presentation(presentation_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def create_presentation(presentation_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/presentations', options) command.request_representation = Google::Apis::SlidesV1::Presentation::Representation command.request_object = presentation_object command.response_representation = Google::Apis::SlidesV1::Presentation::Representation command.response_class = Google::Apis::SlidesV1::Presentation - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -128,11 +128,11 @@ module Google # @param [String] presentation_id # The presentation to apply the updates to. # @param [Google::Apis::SlidesV1::BatchUpdatePresentationRequest] batch_update_presentation_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -145,15 +145,58 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def batch_update_presentation(presentation_id, batch_update_presentation_request_object = nil, quota_user: nil, fields: nil, options: nil, &block) + def batch_update_presentation(presentation_id, batch_update_presentation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/presentations/{presentationId}:batchUpdate', options) command.request_representation = Google::Apis::SlidesV1::BatchUpdatePresentationRequest::Representation command.request_object = batch_update_presentation_request_object command.response_representation = Google::Apis::SlidesV1::BatchUpdatePresentationResponse::Representation command.response_class = Google::Apis::SlidesV1::BatchUpdatePresentationResponse command.params['presentationId'] = presentation_id unless presentation_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Generates a thumbnail of the latest version of the specified page in the + # presentation and returns a URL to the thumbnail image. + # @param [String] presentation_id + # The ID of the presentation to retrieve. + # @param [String] page_object_id + # The object ID of the page whose thumbnail to retrieve. + # @param [String] thumbnail_properties_mime_type + # The optional mime type of the thumbnail image. + # If you don't specify the mime type, the default mime type will be PNG. + # @param [String] thumbnail_properties_thumbnail_size + # The optional thumbnail image size. + # If you don't specify the size, the server chooses a default size of the + # image. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::SlidesV1::Thumbnail] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::SlidesV1::Thumbnail] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_presentation_page_thumbnail(presentation_id, page_object_id, thumbnail_properties_mime_type: nil, thumbnail_properties_thumbnail_size: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/presentations/{presentationId}/pages/{pageObjectId}/thumbnail', options) + command.response_representation = Google::Apis::SlidesV1::Thumbnail::Representation + command.response_class = Google::Apis::SlidesV1::Thumbnail + command.params['presentationId'] = presentation_id unless presentation_id.nil? + command.params['pageObjectId'] = page_object_id unless page_object_id.nil? + command.query['thumbnailProperties.mimeType'] = thumbnail_properties_mime_type unless thumbnail_properties_mime_type.nil? + command.query['thumbnailProperties.thumbnailSize'] = thumbnail_properties_thumbnail_size unless thumbnail_properties_thumbnail_size.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -162,11 +205,11 @@ module Google # The ID of the presentation to retrieve. # @param [String] page_object_id # The object ID of the page to retrieve. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -179,14 +222,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_presentation_page(presentation_id, page_object_id, quota_user: nil, fields: nil, options: nil, &block) + def get_presentation_page(presentation_id, page_object_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/presentations/{presentationId}/pages/{pageObjectId}', options) command.response_representation = Google::Apis::SlidesV1::Page::Representation command.response_class = Google::Apis::SlidesV1::Page command.params['presentationId'] = presentation_id unless presentation_id.nil? command.params['pageObjectId'] = page_object_id unless page_object_id.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end diff --git a/generated/google/apis/speech_v1beta1.rb b/generated/google/apis/speech_v1beta1.rb index 3af024540..03a17a176 100644 --- a/generated/google/apis/speech_v1beta1.rb +++ b/generated/google/apis/speech_v1beta1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/speech/ module SpeechV1beta1 VERSION = 'V1beta1' - REVISION = '20170303' + REVISION = '20170323' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/speech_v1beta1/classes.rb b/generated/google/apis/speech_v1beta1/classes.rb index d539b3c84..97b11a714 100644 --- a/generated/google/apis/speech_v1beta1/classes.rb +++ b/generated/google/apis/speech_v1beta1/classes.rb @@ -22,6 +22,171 @@ module Google module Apis module SpeechV1beta1 + # Alternative hypotheses (a.k.a. n-best list). + class SpeechRecognitionAlternative + include Google::Apis::Core::Hashable + + # *Output-only* The confidence estimate between 0.0 and 1.0. A higher number + # indicates an estimated greater likelihood that the recognized words are + # correct. This field is typically provided only for the top hypothesis, and + # only for `is_final=true` results. Clients should not rely on the + # `confidence` field as it is not guaranteed to be accurate, or even set, in + # any of the results. + # The default of 0.0 is a sentinel value indicating `confidence` was not set. + # Corresponds to the JSON property `confidence` + # @return [Float] + attr_accessor :confidence + + # *Output-only* Transcript text representing the words that the user spoke. + # Corresponds to the JSON property `transcript` + # @return [String] + attr_accessor :transcript + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @confidence = args[:confidence] if args.key?(:confidence) + @transcript = args[:transcript] if args.key?(:transcript) + end + end + + # Provides "hints" to the speech recognizer to favor specific words and phrases + # in the results. + class SpeechContext + include Google::Apis::Core::Hashable + + # *Optional* A list of strings containing words and phrases "hints" so that + # the speech recognition is more likely to recognize them. This can be used + # to improve the accuracy for specific words and phrases, for example, if + # specific commands are typically spoken by the user. This can also be used + # to add additional words to the vocabulary of the recognizer. See + # [usage limits](https://cloud.google.com/speech/limits#content). + # Corresponds to the JSON property `phrases` + # @return [Array] + attr_accessor :phrases + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @phrases = args[:phrases] if args.key?(:phrases) + end + end + + # The response message for Operations.ListOperations. + class ListOperationsResponse + include Google::Apis::Core::Hashable + + # The standard List next-page token. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # A list of operations that matches the specified filter in the request. + # Corresponds to the JSON property `operations` + # @return [Array] + attr_accessor :operations + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @operations = args[:operations] if args.key?(:operations) + end + end + + # A speech recognition result corresponding to a portion of the audio. + class SpeechRecognitionResult + include Google::Apis::Core::Hashable + + # *Output-only* May contain one or more recognition hypotheses (up to the + # maximum specified in `max_alternatives`). + # Corresponds to the JSON property `alternatives` + # @return [Array] + attr_accessor :alternatives + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @alternatives = args[:alternatives] if args.key?(:alternatives) + end + end + + # The top-level message sent by the client for the `AsyncRecognize` method. + class AsyncRecognizeRequest + include Google::Apis::Core::Hashable + + # Provides information to the recognizer that specifies how to process the + # request. + # Corresponds to the JSON property `config` + # @return [Google::Apis::SpeechV1beta1::RecognitionConfig] + attr_accessor :config + + # Contains audio data in the encoding specified in the `RecognitionConfig`. + # Either `content` or `uri` must be supplied. Supplying both or neither + # returns google.rpc.Code.INVALID_ARGUMENT. See + # [audio limits](https://cloud.google.com/speech/limits#content). + # Corresponds to the JSON property `audio` + # @return [Google::Apis::SpeechV1beta1::RecognitionAudio] + attr_accessor :audio + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @config = args[:config] if args.key?(:config) + @audio = args[:audio] if args.key?(:audio) + end + end + + # Contains audio data in the encoding specified in the `RecognitionConfig`. + # Either `content` or `uri` must be supplied. Supplying both or neither + # returns google.rpc.Code.INVALID_ARGUMENT. See + # [audio limits](https://cloud.google.com/speech/limits#content). + class RecognitionAudio + include Google::Apis::Core::Hashable + + # The audio data bytes encoded as specified in + # `RecognitionConfig`. Note: as with all bytes fields, protobuffers use a + # pure binary representation, whereas JSON representations use base64. + # Corresponds to the JSON property `content` + # @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 + # This resource represents a long-running operation that is the result of a # network API call. class Operation @@ -216,28 +381,6 @@ module Google end end - # The only message returned to the client by `SyncRecognize`. method. It - # contains the result as zero or more sequential `SpeechRecognitionResult` - # messages. - class SyncRecognizeResponse - include Google::Apis::Core::Hashable - - # *Output-only* Sequential list of transcription results corresponding to - # sequential portions of audio. - # Corresponds to the JSON property `results` - # @return [Array] - attr_accessor :results - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @results = args[:results] if args.key?(:results) - end - end - # 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: @@ -280,13 +423,6 @@ module Google class Status include Google::Apis::Core::Hashable - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # google.rpc.Status.details field, or localized by the client. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - # A list of messages that carry the error details. There will be a # common set of message types for APIs to use. # Corresponds to the JSON property `details` @@ -298,15 +434,44 @@ module Google # @return [Fixnum] attr_accessor :code + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # google.rpc.Status.details field, or localized by the client. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @message = args[:message] if args.key?(:message) @details = args[:details] if args.key?(:details) @code = args[:code] if args.key?(:code) + @message = args[:message] if args.key?(:message) + end + end + + # The only message returned to the client by `SyncRecognize`. method. It + # contains the result as zero or more sequential `SpeechRecognitionResult` + # messages. + class SyncRecognizeResponse + include Google::Apis::Core::Hashable + + # *Output-only* Sequential list of transcription results corresponding to + # sequential portions of audio. + # Corresponds to the JSON property `results` + # @return [Array] + attr_accessor :results + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @results = args[:results] if args.key?(:results) end end @@ -328,171 +493,6 @@ module Google def update!(**args) end end - - # Alternative hypotheses (a.k.a. n-best list). - class SpeechRecognitionAlternative - include Google::Apis::Core::Hashable - - # *Output-only* The confidence estimate between 0.0 and 1.0. A higher number - # indicates an estimated greater likelihood that the recognized words are - # correct. This field is typically provided only for the top hypothesis, and - # only for `is_final=true` results. Clients should not rely on the - # `confidence` field as it is not guaranteed to be accurate, or even set, in - # any of the results. - # The default of 0.0 is a sentinel value indicating `confidence` was not set. - # Corresponds to the JSON property `confidence` - # @return [Float] - attr_accessor :confidence - - # *Output-only* Transcript text representing the words that the user spoke. - # Corresponds to the JSON property `transcript` - # @return [String] - attr_accessor :transcript - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @confidence = args[:confidence] if args.key?(:confidence) - @transcript = args[:transcript] if args.key?(:transcript) - end - end - - # Provides "hints" to the speech recognizer to favor specific words and phrases - # in the results. - class SpeechContext - include Google::Apis::Core::Hashable - - # *Optional* A list of strings containing words and phrases "hints" so that - # the speech recognition is more likely to recognize them. This can be used - # to improve the accuracy for specific words and phrases, for example, if - # specific commands are typically spoken by the user. This can also be used - # to add additional words to the vocabulary of the recognizer. See - # [usage limits](https://cloud.google.com/speech/limits#content). - # Corresponds to the JSON property `phrases` - # @return [Array] - attr_accessor :phrases - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @phrases = args[:phrases] if args.key?(:phrases) - end - end - - # The response message for Operations.ListOperations. - class ListOperationsResponse - include Google::Apis::Core::Hashable - - # The standard List next-page token. - # Corresponds to the JSON property `nextPageToken` - # @return [String] - attr_accessor :next_page_token - - # A list of operations that matches the specified filter in the request. - # Corresponds to the JSON property `operations` - # @return [Array] - attr_accessor :operations - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @next_page_token = args[:next_page_token] if args.key?(:next_page_token) - @operations = args[:operations] if args.key?(:operations) - end - end - - # A speech recognition result corresponding to a portion of the audio. - class SpeechRecognitionResult - include Google::Apis::Core::Hashable - - # *Output-only* May contain one or more recognition hypotheses (up to the - # maximum specified in `max_alternatives`). - # Corresponds to the JSON property `alternatives` - # @return [Array] - attr_accessor :alternatives - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @alternatives = args[:alternatives] if args.key?(:alternatives) - end - end - - # 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 - - # 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 - - # 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 - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @uri = args[:uri] if args.key?(:uri) - @content = args[:content] if args.key?(:content) - end - end - - # The top-level message sent by the client for the `AsyncRecognize` method. - class AsyncRecognizeRequest - include Google::Apis::Core::Hashable - - # Provides information to the recognizer that specifies how to process the - # request. - # Corresponds to the JSON property `config` - # @return [Google::Apis::SpeechV1beta1::RecognitionConfig] - attr_accessor :config - - # Contains audio data in the encoding specified in the `RecognitionConfig`. - # Either `content` or `uri` must be supplied. Supplying both or neither - # returns google.rpc.Code.INVALID_ARGUMENT. See - # [audio limits](https://cloud.google.com/speech/limits#content). - # Corresponds to the JSON property `audio` - # @return [Google::Apis::SpeechV1beta1::RecognitionAudio] - attr_accessor :audio - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @config = args[:config] if args.key?(:config) - @audio = args[:audio] if args.key?(:audio) - end - end end end end diff --git a/generated/google/apis/speech_v1beta1/representations.rb b/generated/google/apis/speech_v1beta1/representations.rb index 9adbb1d19..e6ce8beae 100644 --- a/generated/google/apis/speech_v1beta1/representations.rb +++ b/generated/google/apis/speech_v1beta1/representations.rb @@ -22,42 +22,6 @@ module Google module Apis module SpeechV1beta1 - class Operation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class RecognitionConfig - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SyncRecognizeRequest - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class SyncRecognizeResponse - 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 Empty - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class SpeechRecognitionAlternative class Representation < Google::Apis::Core::JsonRepresentation; end @@ -82,18 +46,104 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class AsyncRecognizeRequest + 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 Operation class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class RecognitionConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SyncRecognizeRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Status + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class SyncRecognizeResponse + 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 SpeechRecognitionAlternative + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :confidence, as: 'confidence' + property :transcript, as: 'transcript' + end + end + + class SpeechContext + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :phrases, as: 'phrases' + end + end + + class ListOperationsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :operations, as: 'operations', class: Google::Apis::SpeechV1beta1::Operation, decorator: Google::Apis::SpeechV1beta1::Operation::Representation + + end + end + + class SpeechRecognitionResult + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :alternatives, as: 'alternatives', class: Google::Apis::SpeechV1beta1::SpeechRecognitionAlternative, decorator: Google::Apis::SpeechV1beta1::SpeechRecognitionAlternative::Representation + + end + end + + class AsyncRecognizeRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :config, as: 'config', class: Google::Apis::SpeechV1beta1::RecognitionConfig, decorator: Google::Apis::SpeechV1beta1::RecognitionConfig::Representation + + property :audio, as: 'audio', class: Google::Apis::SpeechV1beta1::RecognitionAudio, decorator: Google::Apis::SpeechV1beta1::RecognitionAudio::Representation + + end + end + + class RecognitionAudio + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :content, :base64 => true, as: 'content' + property :uri, as: 'uri' + end + end + class Operation # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -129,6 +179,15 @@ module Google end end + class Status + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :details, as: 'details' + property :code, as: 'code' + property :message, as: 'message' + end + end + class SyncRecognizeResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -137,70 +196,11 @@ module Google end end - class Status - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :message, as: 'message' - collection :details, as: 'details' - property :code, as: 'code' - end - end - class Empty # @private class Representation < Google::Apis::Core::JsonRepresentation end end - - class SpeechRecognitionAlternative - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :confidence, as: 'confidence' - property :transcript, as: 'transcript' - end - end - - class SpeechContext - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :phrases, as: 'phrases' - end - end - - class ListOperationsResponse - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :next_page_token, as: 'nextPageToken' - collection :operations, as: 'operations', class: Google::Apis::SpeechV1beta1::Operation, decorator: Google::Apis::SpeechV1beta1::Operation::Representation - - end - end - - class SpeechRecognitionResult - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :alternatives, as: 'alternatives', class: Google::Apis::SpeechV1beta1::SpeechRecognitionAlternative, decorator: Google::Apis::SpeechV1beta1::SpeechRecognitionAlternative::Representation - - end - end - - class RecognitionAudio - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :uri, as: 'uri' - property :content, :base64 => true, as: 'content' - end - end - - class AsyncRecognizeRequest - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :config, as: 'config', class: Google::Apis::SpeechV1beta1::RecognitionConfig, decorator: Google::Apis::SpeechV1beta1::RecognitionConfig::Representation - - property :audio, as: 'audio', class: Google::Apis::SpeechV1beta1::RecognitionAudio, decorator: Google::Apis::SpeechV1beta1::RecognitionAudio::Representation - - end - end end end end diff --git a/generated/google/apis/speech_v1beta1/service.rb b/generated/google/apis/speech_v1beta1/service.rb index 38f334bae..00f4124d2 100644 --- a/generated/google/apis/speech_v1beta1/service.rb +++ b/generated/google/apis/speech_v1beta1/service.rb @@ -46,72 +46,6 @@ module Google super('https://speech.googleapis.com/', '') 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] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [String] fields - # Selector specifying which fields to include 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 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, 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? - command.query['fields'] = fields unless fields.nil? - execute_or_queue_command(command, &block) - end - - # Performs asynchronous speech recognition: receive results via the - # [google.longrunning.Operations] - # (/speech/reference/rest/v1beta1/operations#Operation) - # interface. Returns either an - # `Operation.error` or an `Operation.response` which contains - # an `AsyncRecognizeResponse` message. - # @param [Google::Apis::SpeechV1beta1::AsyncRecognizeRequest] async_recognize_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::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 async_recognize_speech(async_recognize_request_object = nil, quota_user: nil, fields: 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? - 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 @@ -188,14 +122,14 @@ module Google # 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] filter + # The standard list filter. # @param [String] name # The name of the operation collection. # @param [String] page_token # The standard list page token. # @param [Fixnum] page_size # The standard list page size. - # @param [String] filter - # The standard list filter. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. @@ -213,14 +147,14 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_operations(name: nil, page_token: nil, page_size: nil, filter: nil, quota_user: nil, fields: nil, options: nil, &block) + def list_operations(filter: nil, name: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block) command = make_simple_command(:get, 'v1beta1/operations', options) command.response_representation = Google::Apis::SpeechV1beta1::ListOperationsResponse::Representation command.response_class = Google::Apis::SpeechV1beta1::ListOperationsResponse + command.query['filter'] = filter unless filter.nil? command.query['name'] = name unless name.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['pageSize'] = page_size unless page_size.nil? - command.query['filter'] = filter unless filter.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) @@ -257,6 +191,72 @@ module Google command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end + + # Performs asynchronous speech recognition: receive results via the + # [google.longrunning.Operations] + # (/speech/reference/rest/v1beta1/operations#Operation) + # interface. Returns either an + # `Operation.error` or an `Operation.response` which contains + # an `AsyncRecognizeResponse` message. + # @param [Google::Apis::SpeechV1beta1::AsyncRecognizeRequest] async_recognize_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::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 async_recognize_speech(async_recognize_request_object = nil, quota_user: nil, fields: 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? + 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] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include 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 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, 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? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end protected diff --git a/generated/google/apis/storage_v1.rb b/generated/google/apis/storage_v1.rb index 84dffa00c..c4c25ca37 100644 --- a/generated/google/apis/storage_v1.rb +++ b/generated/google/apis/storage_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/storage/docs/json_api/ module StorageV1 VERSION = 'V1' - REVISION = '20170224' + REVISION = '20170308' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/storage_v1/classes.rb b/generated/google/apis/storage_v1/classes.rb index 457e601a7..1dea3431d 100644 --- a/generated/google/apis/storage_v1/classes.rb +++ b/generated/google/apis/storage_v1/classes.rb @@ -1198,6 +1198,116 @@ module Google end end + # A bucket/object IAM policy. + class Policy + include Google::Apis::Core::Hashable + + # An association between a role, which comes with a set of permissions, and + # members who may assume that role. + # Corresponds to the JSON property `bindings` + # @return [Array] + attr_accessor :bindings + + # HTTP 1.1 Entity tag for the policy. + # Corresponds to the JSON property `etag` + # @return [String] + attr_accessor :etag + + # The kind of item this is. For policies, this is always storage#policy. This + # field is ignored on input. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The ID of the resource to which this policy belongs. Will be of the form + # buckets/bucket for buckets, and buckets/bucket/objects/object for objects. A + # specific generation may be specified by appending #generationNumber to the end + # of the object name, e.g. buckets/my-bucket/objects/data.txt#17. The current + # generation can be denoted with #0. This field is ignored on input. + # Corresponds to the JSON property `resourceId` + # @return [String] + attr_accessor :resource_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @bindings = args[:bindings] if args.key?(:bindings) + @etag = args[:etag] if args.key?(:etag) + @kind = args[:kind] if args.key?(:kind) + @resource_id = args[:resource_id] if args.key?(:resource_id) + end + + # + class Binding + include Google::Apis::Core::Hashable + + # A collection of identifiers for members who may assume the provided role. + # Recognized identifiers are as follows: + # - allUsers — A special identifier that represents anyone 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 account. For + # example, user:alice@gmail.com or user:joe@example.com. + # - serviceAccount:emailid — An email address that represents a service account. + # For example, serviceAccount:my-other-app@appspot.gserviceaccount.com . + # - group:emailid — An email address that represents a Google group. For example, + # group:admins@example.com. + # - domain:domain — A Google Apps domain name that represents all the users of + # that domain. For example, domain:google.com or domain:example.com. + # - projectOwner:projectid — Owners of the given project. For example, + # projectOwner:my-example-project + # - projectEditor:projectid — Editors of the given project. For example, + # projectEditor:my-example-project + # - projectViewer:projectid — Viewers of the given project. For example, + # projectViewer:my-example-project + # Corresponds to the JSON property `members` + # @return [Array] + attr_accessor :members + + # The role to which members belong. Two types of roles are supported: new IAM + # roles, which grant permissions that do not map directly to those provided by + # ACLs, and legacy IAM roles, which do map directly to ACL permissions. All + # roles are of the format roles/storage.specificRole. + # The new IAM roles are: + # - roles/storage.admin — Full control of Google Cloud Storage resources. + # - roles/storage.objectViewer — Read-Only access to Google Cloud Storage + # objects. + # - roles/storage.objectCreator — Access to create objects in Google Cloud + # Storage. + # - roles/storage.objectAdmin — Full control of Google Cloud Storage objects. + # The legacy IAM roles are: + # - roles/storage.legacyObjectReader — Read-only access to objects without + # listing. Equivalent to an ACL entry on an object with the READER role. + # - roles/storage.legacyObjectOwner — Read/write access to existing objects + # without listing. Equivalent to an ACL entry on an object with the OWNER role. + # - roles/storage.legacyBucketReader — Read access to buckets with object + # listing. Equivalent to an ACL entry on a bucket with the READER role. + # - roles/storage.legacyBucketWriter — Read access to buckets with object + # listing/creation/deletion. Equivalent to an ACL entry on a bucket with the + # WRITER role. + # - roles/storage.legacyBucketOwner — Read and write access to existing buckets + # with object listing/creation/deletion. Equivalent to an ACL entry on a bucket + # with the OWNER role. + # Corresponds to the JSON property `role` + # @return [String] + attr_accessor :role + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @members = args[:members] if args.key?(:members) + @role = args[:role] if args.key?(:role) + end + end + end + # A rewrite response. class RewriteResponse include Google::Apis::Core::Hashable @@ -1251,6 +1361,47 @@ module Google @total_bytes_rewritten = args[:total_bytes_rewritten] if args.key?(:total_bytes_rewritten) end end + + # A storage.(buckets|objects).testIamPermissions response. + class TestIamPermissionsResponse + include Google::Apis::Core::Hashable + + # The kind of item this is. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The permissions held by the caller. Permissions are always of the format + # storage.resource.capability, where resource is one of buckets or objects. The + # supported permissions are as follows: + # - storage.buckets.delete — Delete bucket. + # - storage.buckets.get — Read bucket metadata. + # - storage.buckets.getIamPolicy — Read bucket IAM policy. + # - storage.buckets.create — Create bucket. + # - storage.buckets.list — List buckets. + # - storage.buckets.setIamPolicy — Update bucket IAM policy. + # - storage.buckets.update — Update bucket metadata. + # - storage.objects.delete — Delete object. + # - storage.objects.get — Read object data and metadata. + # - storage.objects.getIamPolicy — Read object IAM policy. + # - storage.objects.create — Create object. + # - storage.objects.list — List objects. + # - storage.objects.setIamPolicy — Update object IAM policy. + # - storage.objects.update — Update object metadata. + # Corresponds to the JSON property `permissions` + # @return [Array] + attr_accessor :permissions + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @kind = args[:kind] if args.key?(:kind) + @permissions = args[:permissions] if args.key?(:permissions) + end + end end end end diff --git a/generated/google/apis/storage_v1/representations.rb b/generated/google/apis/storage_v1/representations.rb index c8677e5ac..41de24be7 100644 --- a/generated/google/apis/storage_v1/representations.rb +++ b/generated/google/apis/storage_v1/representations.rb @@ -172,12 +172,30 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class Policy + class Representation < Google::Apis::Core::JsonRepresentation; end + + class Binding + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + include Google::Apis::Core::JsonObjectSupport + end + class RewriteResponse 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 Bucket # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -485,6 +503,25 @@ module Google end end + class Policy + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :bindings, as: 'bindings', class: Google::Apis::StorageV1::Policy::Binding, decorator: Google::Apis::StorageV1::Policy::Binding::Representation + + property :etag, :base64 => true, as: 'etag' + property :kind, as: 'kind' + property :resource_id, as: 'resourceId' + end + + class Binding + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :members, as: 'members' + property :role, as: 'role' + end + end + end + class RewriteResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -497,6 +534,14 @@ module Google property :total_bytes_rewritten, as: 'totalBytesRewritten' end end + + class TestIamPermissionsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :kind, as: 'kind' + collection :permissions, as: 'permissions' + end + end end end end diff --git a/generated/google/apis/storage_v1/service.rb b/generated/google/apis/storage_v1/service.rb index 1ef19b2f9..ec5306b7d 100644 --- a/generated/google/apis/storage_v1/service.rb +++ b/generated/google/apis/storage_v1/service.rb @@ -373,6 +373,41 @@ module Google execute_or_queue_command(command, &block) end + # Returns an IAM policy for the specified bucket. + # @param [String] bucket + # Name of a bucket. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # Overrides userIp if both are provided. + # @param [String] user_ip + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::StorageV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::StorageV1::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_bucket_iam_policy(bucket, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, 'b/{bucket}/iam', options) + command.response_representation = Google::Apis::StorageV1::Policy::Representation + command.response_class = Google::Apis::StorageV1::Policy + command.params['bucket'] = bucket unless bucket.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + # Creates a new bucket. # @param [String] project # A valid API project identifier. @@ -527,6 +562,83 @@ module Google execute_or_queue_command(command, &block) end + # Updates an IAM policy for the specified bucket. + # @param [String] bucket + # Name of a bucket. + # @param [Google::Apis::StorageV1::Policy] policy_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # Overrides userIp if both are provided. + # @param [String] user_ip + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::StorageV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::StorageV1::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_bucket_iam_policy(bucket, policy_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:put, 'b/{bucket}/iam', options) + command.request_representation = Google::Apis::StorageV1::Policy::Representation + command.request_object = policy_object + command.response_representation = Google::Apis::StorageV1::Policy::Representation + command.response_class = Google::Apis::StorageV1::Policy + command.params['bucket'] = bucket unless bucket.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Tests a set of permissions on the given bucket to see which, if any, are held + # by the caller. + # @param [String] bucket + # Name of a bucket. + # @param [Array, String] permissions + # Permissions to test. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # Overrides userIp if both are provided. + # @param [String] user_ip + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::StorageV1::TestIamPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::StorageV1::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_bucket_iam_permissions(bucket, permissions, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, 'b/{bucket}/iam/testPermissions', options) + command.response_representation = Google::Apis::StorageV1::TestIamPermissionsResponse::Representation + command.response_class = Google::Apis::StorageV1::TestIamPermissionsResponse + command.params['bucket'] = bucket unless bucket.nil? + command.query['permissions'] = permissions unless permissions.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + # Updates a bucket. Changes to the bucket will be readable immediately after # writing, but configuration changes may take time to propagate. # @param [String] bucket @@ -1431,6 +1543,49 @@ module Google execute_or_queue_command(command, &block) end + # Returns an IAM policy for the specified object. + # @param [String] bucket + # Name of the bucket in which the object resides. + # @param [String] object + # Name of the object. For information about how to URL encode object names to be + # path safe, see Encoding URI Path Parts. + # @param [String] generation + # If present, selects a specific revision of this object (as opposed to the + # latest version, the 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. + # Overrides userIp if both are provided. + # @param [String] user_ip + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::StorageV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::StorageV1::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_object_iam_policy(bucket, object, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, 'b/{bucket}/o/{object}/iam', options) + command.response_representation = Google::Apis::StorageV1::Policy::Representation + command.response_class = Google::Apis::StorageV1::Policy + command.params['bucket'] = bucket unless bucket.nil? + command.params['object'] = object unless object.nil? + command.query['generation'] = generation unless generation.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + # Stores a new object and metadata. # @param [String] bucket # Name of the bucket in which to store the new object. Overrides the provided @@ -1756,6 +1911,99 @@ module Google execute_or_queue_command(command, &block) end + # Updates an IAM policy for the specified object. + # @param [String] bucket + # Name of the bucket in which the object resides. + # @param [String] object + # Name of the object. For information about how to URL encode object names to be + # path safe, see Encoding URI Path Parts. + # @param [Google::Apis::StorageV1::Policy] policy_object + # @param [String] generation + # If present, selects a specific revision of this object (as opposed to the + # latest version, the 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. + # Overrides userIp if both are provided. + # @param [String] user_ip + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::StorageV1::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::StorageV1::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_object_iam_policy(bucket, object, policy_object = nil, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:put, 'b/{bucket}/o/{object}/iam', options) + command.request_representation = Google::Apis::StorageV1::Policy::Representation + command.request_object = policy_object + command.response_representation = Google::Apis::StorageV1::Policy::Representation + command.response_class = Google::Apis::StorageV1::Policy + command.params['bucket'] = bucket unless bucket.nil? + command.params['object'] = object unless object.nil? + command.query['generation'] = generation unless generation.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Tests a set of permissions on the given object to see which, if any, are held + # by the caller. + # @param [String] bucket + # Name of the bucket in which the object resides. + # @param [String] object + # Name of the object. For information about how to URL encode object names to be + # path safe, see Encoding URI Path Parts. + # @param [Array, String] permissions + # Permissions to test. + # @param [String] generation + # If present, selects a specific revision of this object (as opposed to the + # latest version, the 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. + # Overrides userIp if both are provided. + # @param [String] user_ip + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::StorageV1::TestIamPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::StorageV1::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_object_iam_permissions(bucket, object, permissions, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, 'b/{bucket}/o/{object}/iam/testPermissions', options) + command.response_representation = Google::Apis::StorageV1::TestIamPermissionsResponse::Representation + command.response_class = Google::Apis::StorageV1::TestIamPermissionsResponse + command.params['bucket'] = bucket unless bucket.nil? + command.params['object'] = object unless object.nil? + command.query['generation'] = generation unless generation.nil? + command.query['permissions'] = permissions unless permissions.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + # Updates an object's metadata. # @param [String] bucket # Name of the bucket in which the object resides. diff --git a/generated/google/apis/vision_v1.rb b/generated/google/apis/vision_v1.rb index 884bb7a78..0b1992c12 100644 --- a/generated/google/apis/vision_v1.rb +++ b/generated/google/apis/vision_v1.rb @@ -27,7 +27,7 @@ module Google # @see https://cloud.google.com/vision/ module VisionV1 VERSION = 'V1' - REVISION = '20170301' + REVISION = '20170321' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/vision_v1/classes.rb b/generated/google/apis/vision_v1/classes.rb index b318a8d4a..191a74b87 100644 --- a/generated/google/apis/vision_v1/classes.rb +++ b/generated/google/apis/vision_v1/classes.rb @@ -22,6 +22,652 @@ module Google module Apis module VisionV1 + # Request for performing Google Cloud Vision API tasks over a user-provided + # image, with user-requested features. + class AnnotateImageRequest + include Google::Apis::Core::Hashable + + # Client image to perform Google Cloud Vision API tasks over. + # Corresponds to the JSON property `image` + # @return [Google::Apis::VisionV1::Image] + attr_accessor :image + + # Requested features. + # Corresponds to the JSON property `features` + # @return [Array] + attr_accessor :features + + # Image context and/or feature-specific parameters. + # Corresponds to the JSON property `imageContext` + # @return [Google::Apis::VisionV1::ImageContext] + attr_accessor :image_context + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @image = args[:image] if args.key?(:image) + @features = args[:features] if args.key?(:features) + @image_context = args[:image_context] if args.key?(:image_context) + end + end + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` which can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting purpose. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + class Status + include Google::Apis::Core::Hashable + + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # google.rpc.Status.details field, or localized by the client. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + # A list of messages that carry the error details. There will be a + # common set of message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @code = args[:code] if args.key?(:code) + @message = args[:message] if args.key?(:message) + @details = args[:details] if args.key?(:details) + end + end + + # Rectangle determined by min and max `LatLng` pairs. + class LatLongRect + include Google::Apis::Core::Hashable + + # An object representing a latitude/longitude pair. This is expressed as a pair + # of doubles representing degrees latitude and degrees longitude. Unless + # specified otherwise, this must conform to the + # WGS84 + # standard. Values must be within normalized ranges. + # Example of normalization code in Python: + # def NormalizeLongitude(longitude): + # """Wraps decimal degrees longitude to [-180.0, 180.0].""" + # q, r = divmod(longitude, 360.0) + # if r > 180.0 or (r == 180.0 and q <= -1.0): + # return r - 360.0 + # return r + # def NormalizeLatLng(latitude, longitude): + # """Wraps decimal degrees latitude and longitude to + # [-90.0, 90.0] and [-180.0, 180.0], respectively.""" + # r = latitude % 360.0 + # if r <= 90.0: + # return r, NormalizeLongitude(longitude) + # elif r >= 270.0: + # return r - 360, NormalizeLongitude(longitude) + # else: + # return 180 - r, NormalizeLongitude(longitude + 180.0) + # assert 180.0 == NormalizeLongitude(180.0) + # assert -180.0 == NormalizeLongitude(-180.0) + # assert -179.0 == NormalizeLongitude(181.0) + # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) + # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) + # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) + # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) + # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) + # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) + # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) + # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) + # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) + # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) + # The code in logs/storage/validator/logs_validator_traits.cc treats this type + # as if it were annotated as ST_LOCATION. + # Corresponds to the JSON property `minLatLng` + # @return [Google::Apis::VisionV1::LatLng] + attr_accessor :min_lat_lng + + # An object representing a latitude/longitude pair. This is expressed as a pair + # of doubles representing degrees latitude and degrees longitude. Unless + # specified otherwise, this must conform to the + # WGS84 + # standard. Values must be within normalized ranges. + # Example of normalization code in Python: + # def NormalizeLongitude(longitude): + # """Wraps decimal degrees longitude to [-180.0, 180.0].""" + # q, r = divmod(longitude, 360.0) + # if r > 180.0 or (r == 180.0 and q <= -1.0): + # return r - 360.0 + # return r + # def NormalizeLatLng(latitude, longitude): + # """Wraps decimal degrees latitude and longitude to + # [-90.0, 90.0] and [-180.0, 180.0], respectively.""" + # r = latitude % 360.0 + # if r <= 90.0: + # return r, NormalizeLongitude(longitude) + # elif r >= 270.0: + # return r - 360, NormalizeLongitude(longitude) + # else: + # return 180 - r, NormalizeLongitude(longitude + 180.0) + # assert 180.0 == NormalizeLongitude(180.0) + # assert -180.0 == NormalizeLongitude(-180.0) + # assert -179.0 == NormalizeLongitude(181.0) + # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) + # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) + # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) + # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) + # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) + # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) + # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) + # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) + # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) + # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) + # The code in logs/storage/validator/logs_validator_traits.cc treats this type + # as if it were annotated as ST_LOCATION. + # Corresponds to the JSON property `maxLatLng` + # @return [Google::Apis::VisionV1::LatLng] + attr_accessor :max_lat_lng + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @min_lat_lng = args[:min_lat_lng] if args.key?(:min_lat_lng) + @max_lat_lng = args[:max_lat_lng] if args.key?(:max_lat_lng) + end + end + + # A single symbol representation. + class Symbol + include Google::Apis::Core::Hashable + + # The actual UTF-8 representation of the symbol. + # Corresponds to the JSON property `text` + # @return [String] + attr_accessor :text + + # Additional information detected on the structural component. + # Corresponds to the JSON property `property` + # @return [Google::Apis::VisionV1::TextProperty] + attr_accessor :property + + # A bounding polygon for the detected image annotation. + # Corresponds to the JSON property `boundingBox` + # @return [Google::Apis::VisionV1::BoundingPoly] + attr_accessor :bounding_box + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @text = args[:text] if args.key?(:text) + @property = args[:property] if args.key?(:property) + @bounding_box = args[:bounding_box] if args.key?(:bounding_box) + end + end + + # Set of crop hints that are used to generate new crops when serving images. + class CropHintsAnnotation + include Google::Apis::Core::Hashable + + # Crop hint results. + # Corresponds to the JSON property `cropHints` + # @return [Array] + attr_accessor :crop_hints + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @crop_hints = args[:crop_hints] if args.key?(:crop_hints) + end + end + + # An object representing a latitude/longitude pair. This is expressed as a pair + # of doubles representing degrees latitude and degrees longitude. Unless + # specified otherwise, this must conform to the + # WGS84 + # standard. Values must be within normalized ranges. + # Example of normalization code in Python: + # def NormalizeLongitude(longitude): + # """Wraps decimal degrees longitude to [-180.0, 180.0].""" + # q, r = divmod(longitude, 360.0) + # if r > 180.0 or (r == 180.0 and q <= -1.0): + # return r - 360.0 + # return r + # def NormalizeLatLng(latitude, longitude): + # """Wraps decimal degrees latitude and longitude to + # [-90.0, 90.0] and [-180.0, 180.0], respectively.""" + # r = latitude % 360.0 + # if r <= 90.0: + # return r, NormalizeLongitude(longitude) + # elif r >= 270.0: + # return r - 360, NormalizeLongitude(longitude) + # else: + # return 180 - r, NormalizeLongitude(longitude + 180.0) + # assert 180.0 == NormalizeLongitude(180.0) + # assert -180.0 == NormalizeLongitude(-180.0) + # assert -179.0 == NormalizeLongitude(181.0) + # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) + # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) + # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) + # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) + # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) + # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) + # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) + # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) + # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) + # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) + # The code in logs/storage/validator/logs_validator_traits.cc treats this type + # as if it were annotated as ST_LOCATION. + class LatLng + include Google::Apis::Core::Hashable + + # The latitude in degrees. It must be in the range [-90.0, +90.0]. + # Corresponds to the JSON property `latitude` + # @return [Float] + attr_accessor :latitude + + # The longitude in degrees. It must be in the range [-180.0, +180.0]. + # Corresponds to the JSON property `longitude` + # @return [Float] + attr_accessor :longitude + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @latitude = args[:latitude] if args.key?(:latitude) + @longitude = args[:longitude] if args.key?(:longitude) + end + end + + # Represents a color in the RGBA color space. This representation is designed + # for simplicity of conversion to/from color representations in various + # languages over compactness; for example, the fields of this representation + # can be trivially provided to the constructor of "java.awt.Color" in Java; it + # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" + # method in iOS; and, with just a little work, it can be easily formatted into + # a CSS "rgba()" string in JavaScript, as well. Here are some examples: + # Example (Java): + # import com.google.type.Color; + # // ... + # public static java.awt.Color fromProto(Color protocolor) ` + # float alpha = protocolor.hasAlpha() + # ? protocolor.getAlpha().getValue() + # : 1.0; + # return new java.awt.Color( + # protocolor.getRed(), + # protocolor.getGreen(), + # protocolor.getBlue(), + # alpha); + # ` + # public static Color toProto(java.awt.Color color) ` + # float red = (float) color.getRed(); + # float green = (float) color.getGreen(); + # float blue = (float) color.getBlue(); + # float denominator = 255.0; + # Color.Builder resultBuilder = + # Color + # .newBuilder() + # .setRed(red / denominator) + # .setGreen(green / denominator) + # .setBlue(blue / denominator); + # int alpha = color.getAlpha(); + # if (alpha != 255) ` + # result.setAlpha( + # FloatValue + # .newBuilder() + # .setValue(((float) alpha) / denominator) + # .build()); + # ` + # return resultBuilder.build(); + # ` + # // ... + # Example (iOS / Obj-C): + # // ... + # static UIColor* fromProto(Color* protocolor) ` + # float red = [protocolor red]; + # float green = [protocolor green]; + # float blue = [protocolor blue]; + # FloatValue* alpha_wrapper = [protocolor alpha]; + # float alpha = 1.0; + # if (alpha_wrapper != nil) ` + # alpha = [alpha_wrapper value]; + # ` + # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; + # ` + # static Color* toProto(UIColor* color) ` + # CGFloat red, green, blue, alpha; + # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` + # return nil; + # ` + # Color* result = [Color alloc] init]; + # [result setRed:red]; + # [result setGreen:green]; + # [result setBlue:blue]; + # if (alpha <= 0.9999) ` + # [result setAlpha:floatWrapperWithValue(alpha)]; + # ` + # [result autorelease]; + # return result; + # ` + # // ... + # Example (JavaScript): + # // ... + # var protoToCssColor = function(rgb_color) ` + # var redFrac = rgb_color.red || 0.0; + # var greenFrac = rgb_color.green || 0.0; + # var blueFrac = rgb_color.blue || 0.0; + # var red = Math.floor(redFrac * 255); + # var green = Math.floor(greenFrac * 255); + # var blue = Math.floor(blueFrac * 255); + # if (!('alpha' in rgb_color)) ` + # return rgbToCssColor_(red, green, blue); + # ` + # var alphaFrac = rgb_color.alpha.value || 0.0; + # var rgbParams = [red, green, blue].join(','); + # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); + # `; + # var rgbToCssColor_ = function(red, green, blue) ` + # var rgbNumber = new Number((red << 16) | (green << 8) | blue); + # var hexString = rgbNumber.toString(16); + # var missingZeros = 6 - hexString.length; + # var resultBuilder = ['#']; + # for (var i = 0; i < missingZeros; i++) ` + # resultBuilder.push('0'); + # ` + # resultBuilder.push(hexString); + # return resultBuilder.join(''); + # `; + # // ... + class Color + include Google::Apis::Core::Hashable + + # The amount of green in the color as a value in the interval [0, 1]. + # Corresponds to the JSON property `green` + # @return [Float] + attr_accessor :green + + # The amount of blue in the color as a value in the interval [0, 1]. + # Corresponds to the JSON property `blue` + # @return [Float] + attr_accessor :blue + + # The fraction of this color that should be applied to the pixel. That is, + # the final pixel color is defined by the equation: + # pixel color = alpha * (this color) + (1.0 - alpha) * (background color) + # This means that a value of 1.0 corresponds to a solid color, whereas + # a value of 0.0 corresponds to a completely transparent color. This + # uses a wrapper message rather than a simple float scalar so that it is + # possible to distinguish between a default value and the value being unset. + # If omitted, this color object is to be rendered as a solid color + # (as if the alpha value had been explicitly given with a value of 1.0). + # Corresponds to the JSON property `alpha` + # @return [Float] + attr_accessor :alpha + + # The amount of red in the color as a value in the interval [0, 1]. + # Corresponds to the JSON property `red` + # @return [Float] + attr_accessor :red + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @green = args[:green] if args.key?(:green) + @blue = args[:blue] if args.key?(:blue) + @alpha = args[:alpha] if args.key?(:alpha) + @red = args[:red] if args.key?(:red) + end + end + + # Stores image properties, such as dominant colors. + class ImageProperties + include Google::Apis::Core::Hashable + + # Set of dominant colors and their corresponding scores. + # Corresponds to the JSON property `dominantColors` + # @return [Google::Apis::VisionV1::DominantColorsAnnotation] + attr_accessor :dominant_colors + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @dominant_colors = args[:dominant_colors] if args.key?(:dominant_colors) + end + end + + # Users describe the type of Google Cloud Vision API tasks to perform over + # images by using *Feature*s. Each Feature indicates a type of image + # detection task to perform. Features encode the Cloud Vision API + # vertical to operate on and the number of top-scoring results to return. + class Feature + include Google::Apis::Core::Hashable + + # The feature type. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + # Maximum number of results of this type. + # Corresponds to the JSON property `maxResults` + # @return [Fixnum] + attr_accessor :max_results + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @type = args[:type] if args.key?(:type) + @max_results = args[:max_results] if args.key?(:max_results) + end + end + + # Set of features pertaining to the image, computed by computer vision + # methods over safe-search verticals (for example, adult, spoof, medical, + # violence). + class SafeSearchAnnotation + include Google::Apis::Core::Hashable + + # Represents the adult content likelihood for the image. + # Corresponds to the JSON property `adult` + # @return [String] + attr_accessor :adult + + # Spoof likelihood. The likelihood that an modification + # was made to the image's canonical version to make it appear + # funny or offensive. + # Corresponds to the JSON property `spoof` + # @return [String] + attr_accessor :spoof + + # Likelihood that this is a medical image. + # Corresponds to the JSON property `medical` + # @return [String] + attr_accessor :medical + + # Violence likelihood. + # Corresponds to the JSON property `violence` + # @return [String] + attr_accessor :violence + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @adult = args[:adult] if args.key?(:adult) + @spoof = args[:spoof] if args.key?(:spoof) + @medical = args[:medical] if args.key?(:medical) + @violence = args[:violence] if args.key?(:violence) + end + end + + # Set of dominant colors and their corresponding scores. + class DominantColorsAnnotation + include Google::Apis::Core::Hashable + + # RGB color values with their score and pixel fraction. + # Corresponds to the JSON property `colors` + # @return [Array] + attr_accessor :colors + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @colors = args[:colors] if args.key?(:colors) + end + end + + # TextAnnotation contains a structured representation of OCR extracted text. + # The hierarchy of an OCR extracted text structure is like this: + # TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol + # Each structural component, starting from Page, may further have their own + # properties. Properties describe detected languages, breaks etc.. Please + # refer to the google.cloud.vision.v1.TextAnnotation.TextProperty message + # definition below for more detail. + class TextAnnotation + include Google::Apis::Core::Hashable + + # List of pages detected by OCR. + # Corresponds to the JSON property `pages` + # @return [Array] + attr_accessor :pages + + # UTF-8 text detected on the pages. + # Corresponds to the JSON property `text` + # @return [String] + attr_accessor :text + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @pages = args[:pages] if args.key?(:pages) + @text = args[:text] if args.key?(:text) + end + end + + # A vertex represents a 2D point in the image. + # NOTE: the vertex coordinates are in the same scale as the original image. + class Vertex + include Google::Apis::Core::Hashable + + # X coordinate. + # Corresponds to the JSON property `x` + # @return [Fixnum] + attr_accessor :x + + # Y coordinate. + # Corresponds to the JSON property `y` + # @return [Fixnum] + attr_accessor :y + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @x = args[:x] if args.key?(:x) + @y = args[:y] if args.key?(:y) + end + end + + # Detected language for a structural component. + class DetectedLanguage + include Google::Apis::Core::Hashable + + # Confidence of detected language. Range [0, 1]. + # Corresponds to the JSON property `confidence` + # @return [Float] + attr_accessor :confidence + + # The BCP-47 language code, such as "en-US" or "sr-Latn". For more + # information, see + # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + # Corresponds to the JSON property `languageCode` + # @return [String] + attr_accessor :language_code + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @confidence = args[:confidence] if args.key?(:confidence) + @language_code = args[:language_code] if args.key?(:language_code) + end + end + # Entity deduced from similar images on the Internet. class WebEntity include Google::Apis::Core::Hashable @@ -54,6 +700,31 @@ module Google end end + # Additional information detected on the structural component. + class TextProperty + include Google::Apis::Core::Hashable + + # Detected start or end of a structural component. + # Corresponds to the JSON property `detectedBreak` + # @return [Google::Apis::VisionV1::DetectedBreak] + attr_accessor :detected_break + + # A list of detected languages together with confidence. + # Corresponds to the JSON property `detectedLanguages` + # @return [Array] + attr_accessor :detected_languages + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @detected_break = args[:detected_break] if args.key?(:detected_break) + @detected_languages = args[:detected_languages] if args.key?(:detected_languages) + end + end + # A bounding polygon for the detected image annotation. class BoundingPoly include Google::Apis::Core::Hashable @@ -73,35 +744,53 @@ module Google end end - # Additional information detected on the structural component. - class TextProperty - include Google::Apis::Core::Hashable - - # A list of detected languages together with confidence. - # Corresponds to the JSON property `detectedLanguages` - # @return [Array] - attr_accessor :detected_languages - - # Detected start or end of a structural component. - # Corresponds to the JSON property `detectedBreak` - # @return [Google::Apis::VisionV1::DetectedBreak] - attr_accessor :detected_break - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @detected_languages = args[:detected_languages] if args.key?(:detected_languages) - @detected_break = args[:detected_break] if args.key?(:detected_break) - end - end - # Response to an image annotation request. class AnnotateImageResponse include Google::Apis::Core::Hashable + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` which can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting purpose. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + # Corresponds to the JSON property `error` + # @return [Google::Apis::VisionV1::Status] + attr_accessor :error + # TextAnnotation contains a structured representation of OCR extracted text. # The hierarchy of an OCR extracted text structure is like this: # TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol @@ -160,55 +849,13 @@ module Google # @return [Array] attr_accessor :label_annotations - # The `Status` type defines a logical error model that is suitable for different - # programming environments, including REST APIs and RPC APIs. It is used by - # [gRPC](https://github.com/grpc). The error model is designed to be: - # - Simple to use and understand for most users - # - Flexible enough to meet unexpected needs - # # Overview - # The `Status` message contains three pieces of data: error code, error message, - # and error details. The error code should be an enum value of - # google.rpc.Code, but it may accept additional error codes if needed. The - # error message should be a developer-facing English message that helps - # developers *understand* and *resolve* the error. If a localized user-facing - # error message is needed, put the localized message in the error details or - # localize it in the client. The optional error details may contain arbitrary - # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. - # # Language mapping - # The `Status` message is the logical representation of the error model, but it - # is not necessarily the actual wire format. When the `Status` message is - # exposed in different client libraries and different wire protocols, it can be - # mapped differently. For example, it will likely be mapped to some exceptions - # in Java, but more likely mapped to some error codes in C. - # # Other uses - # The error model and the `Status` message can be used in a variety of - # environments, either with or without APIs, to provide a - # consistent developer experience across different environments. - # Example uses of this error model include: - # - Partial errors. If a service needs to return partial errors to the client, - # it may embed the `Status` in the normal response to indicate the partial - # errors. - # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. - # - Batch operations. If a client uses batch request and batch response, the - # `Status` message should be used directly inside batch response, one for - # each error sub-response. - # - Asynchronous operations. If an API call embeds asynchronous operation - # results in its response, the status of those operations should be - # represented directly using the `Status` message. - # - Logging. If some API errors are stored in logs, the message `Status` could - # be used directly after any stripping needed for security/privacy reasons. - # Corresponds to the JSON property `error` - # @return [Google::Apis::VisionV1::Status] - attr_accessor :error - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @error = args[:error] if args.key?(:error) @full_text_annotation = args[:full_text_annotation] if args.key?(:full_text_annotation) @landmark_annotations = args[:landmark_annotations] if args.key?(:landmark_annotations) @text_annotations = args[:text_annotations] if args.key?(:text_annotations) @@ -219,7 +866,6 @@ module Google @crop_hints_annotation = args[:crop_hints_annotation] if args.key?(:crop_hints_annotation) @safe_search_annotation = args[:safe_search_annotation] if args.key?(:safe_search_annotation) @label_annotations = args[:label_annotations] if args.key?(:label_annotations) - @error = args[:error] if args.key?(:error) end end @@ -284,6 +930,111 @@ module Google end end + # Relevant information for the image from the Internet. + class WebDetection + include Google::Apis::Core::Hashable + + # Fully matching images from the Internet. + # They're definite neardups and most often a copy of the query image with + # merely a size change. + # Corresponds to the JSON property `fullMatchingImages` + # @return [Array] + attr_accessor :full_matching_images + + # Deduced entities from similar images on the Internet. + # Corresponds to the JSON property `webEntities` + # @return [Array] + attr_accessor :web_entities + + # Web pages containing the matching images from the Internet. + # Corresponds to the JSON property `pagesWithMatchingImages` + # @return [Array] + attr_accessor :pages_with_matching_images + + # Partial matching images from the Internet. + # Those images are similar enough to share some key-point features. For + # example an original image will likely have partial matching for its crops. + # Corresponds to the JSON property `partialMatchingImages` + # @return [Array] + attr_accessor :partial_matching_images + + # The visually similar image results. + # Corresponds to the JSON property `visuallySimilarImages` + # @return [Array] + attr_accessor :visually_similar_images + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @full_matching_images = args[:full_matching_images] if args.key?(:full_matching_images) + @web_entities = args[:web_entities] if args.key?(:web_entities) + @pages_with_matching_images = args[:pages_with_matching_images] if args.key?(:pages_with_matching_images) + @partial_matching_images = args[:partial_matching_images] if args.key?(:partial_matching_images) + @visually_similar_images = args[:visually_similar_images] if args.key?(:visually_similar_images) + end + end + + # Response to a batch image annotation request. + class BatchAnnotateImagesResponse + include Google::Apis::Core::Hashable + + # Individual responses to image annotation requests within the batch. + # Corresponds to the JSON property `responses` + # @return [Array] + attr_accessor :responses + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @responses = args[:responses] if args.key?(:responses) + end + end + + # External image source (Google Cloud Storage image location). + class ImageSource + include Google::Apis::Core::Hashable + + # Image URI which supports: + # 1) Google Cloud Storage image URI, which must be in the following form: + # `gs://bucket_name/object_name` (for details, see + # [Google Cloud Storage Request + # URIs](https://cloud.google.com/storage/docs/reference-uris)). + # NOTE: Cloud Storage object versioning is not supported. + # 2) Publicly accessible image HTTP/HTTPS URL. + # This is preferred over the legacy `gcs_image_uri` above. When both + # `gcs_image_uri` and `image_uri` are specified, `image_uri` takes + # precedence. + # Corresponds to the JSON property `imageUri` + # @return [String] + attr_accessor :image_uri + + # NOTE: For new code `image_uri` below is preferred. + # Google Cloud Storage image URI, which must be in the following form: + # `gs://bucket_name/object_name` (for details, see + # [Google Cloud Storage Request + # URIs](https://cloud.google.com/storage/docs/reference-uris)). + # NOTE: Cloud Storage object versioning is not supported. + # Corresponds to the JSON property `gcsImageUri` + # @return [String] + attr_accessor :gcs_image_uri + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @image_uri = args[:image_uri] if args.key?(:image_uri) + @gcs_image_uri = args[:gcs_image_uri] if args.key?(:gcs_image_uri) + end + end + # Detected entity location information. class LocationInfo include Google::Apis::Core::Hashable @@ -339,45 +1090,6 @@ module Google end end - # External image source (Google Cloud Storage image location). - class ImageSource - include Google::Apis::Core::Hashable - - # NOTE: For new code `image_uri` below is preferred. - # Google Cloud Storage image URI, which must be in the following form: - # `gs://bucket_name/object_name` (for details, see - # [Google Cloud Storage Request - # URIs](https://cloud.google.com/storage/docs/reference-uris)). - # NOTE: Cloud Storage object versioning is not supported. - # Corresponds to the JSON property `gcsImageUri` - # @return [String] - attr_accessor :gcs_image_uri - - # Image URI which supports: - # 1) Google Cloud Storage image URI, which must be in the following form: - # `gs://bucket_name/object_name` (for details, see - # [Google Cloud Storage Request - # URIs](https://cloud.google.com/storage/docs/reference-uris)). - # NOTE: Cloud Storage object versioning is not supported. - # 2) Publicly accessible image HTTP/HTTPS URL. - # This is preferred over the legacy `gcs_image_uri` above. When both - # `gcs_image_uri` and `image_uri` are specified, `image_uri` takes - # precedence. - # Corresponds to the JSON property `imageUri` - # @return [String] - attr_accessor :image_uri - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @gcs_image_uri = args[:gcs_image_uri] if args.key?(:gcs_image_uri) - @image_uri = args[:image_uri] if args.key?(:image_uri) - end - end - # A `Property` consists of a user-supplied name/value pair. class Property include Google::Apis::Core::Hashable @@ -409,66 +1121,6 @@ module Google end end - # Relevant information for the image from the Internet. - class WebDetection - include Google::Apis::Core::Hashable - - # Partial matching images from the Internet. - # Those images are similar enough to share some key-point features. For - # example an original image will likely have partial matching for its crops. - # Corresponds to the JSON property `partialMatchingImages` - # @return [Array] - attr_accessor :partial_matching_images - - # Fully matching images from the Internet. - # They're definite neardups and most often a copy of the query image with - # merely a size change. - # Corresponds to the JSON property `fullMatchingImages` - # @return [Array] - attr_accessor :full_matching_images - - # Deduced entities from similar images on the Internet. - # Corresponds to the JSON property `webEntities` - # @return [Array] - attr_accessor :web_entities - - # Web pages containing the matching images from the Internet. - # Corresponds to the JSON property `pagesWithMatchingImages` - # @return [Array] - attr_accessor :pages_with_matching_images - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @partial_matching_images = args[:partial_matching_images] if args.key?(:partial_matching_images) - @full_matching_images = args[:full_matching_images] if args.key?(:full_matching_images) - @web_entities = args[:web_entities] if args.key?(:web_entities) - @pages_with_matching_images = args[:pages_with_matching_images] if args.key?(:pages_with_matching_images) - end - end - - # Response to a batch image annotation request. - class BatchAnnotateImagesResponse - include Google::Apis::Core::Hashable - - # Individual responses to image annotation requests within the batch. - # Corresponds to the JSON property `responses` - # @return [Array] - attr_accessor :responses - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @responses = args[:responses] if args.key?(:responses) - end - end - # A 3D position in the image, used primarily for Face detection landmarks. # A valid Position must have both x and y coordinates. # The position coordinates are in the same scale as the original image. @@ -506,25 +1158,25 @@ module Google class WebPage include Google::Apis::Core::Hashable - # The result web page URL. - # Corresponds to the JSON property `url` - # @return [String] - attr_accessor :url - # Overall relevancy score for the web page. # Not normalized and not comparable across different image queries. # Corresponds to the JSON property `score` # @return [Float] attr_accessor :score + # The result web page URL. + # Corresponds to the JSON property `url` + # @return [String] + attr_accessor :url + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @url = args[:url] if args.key?(:url) @score = args[:score] if args.key?(:score) + @url = args[:url] if args.key?(:url) end end @@ -533,6 +1185,11 @@ module Google class ColorInfo include Google::Apis::Core::Hashable + # Image-specific score for this color. Value in range [0, 1]. + # Corresponds to the JSON property `score` + # @return [Float] + attr_accessor :score + # The fraction of pixels the color occupies in the image. # Value in range [0, 1]. # Corresponds to the JSON property `pixelFraction` @@ -642,20 +1299,15 @@ module Google # @return [Google::Apis::VisionV1::Color] attr_accessor :color - # Image-specific score for this color. Value in range [0, 1]. - # Corresponds to the JSON property `score` - # @return [Float] - attr_accessor :score - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @score = args[:score] if args.key?(:score) @pixel_fraction = args[:pixel_fraction] if args.key?(:pixel_fraction) @color = args[:color] if args.key?(:color) - @score = args[:score] if args.key?(:score) end end @@ -663,6 +1315,46 @@ module Google class EntityAnnotation include Google::Apis::Core::Hashable + # Opaque entity ID. Some IDs may be available in + # [Google Knowledge Graph Search API](https://developers.google.com/knowledge- + # graph/). + # Corresponds to the JSON property `mid` + # @return [String] + attr_accessor :mid + + # The accuracy of the entity detection in an image. + # For example, for an image in which the "Eiffel Tower" entity is detected, + # this field represents the confidence that there is a tower in the query + # image. Range [0, 1]. + # Corresponds to the JSON property `confidence` + # @return [Float] + attr_accessor :confidence + + # The language code for the locale in which the entity textual + # `description` is expressed. + # Corresponds to the JSON property `locale` + # @return [String] + attr_accessor :locale + + # A bounding polygon for the detected image annotation. + # Corresponds to the JSON property `boundingPoly` + # @return [Google::Apis::VisionV1::BoundingPoly] + attr_accessor :bounding_poly + + # Entity textual description, expressed in its `locale` language. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The relevancy of the ICA (Image Content Annotation) label to the + # image. For example, the relevancy of "tower" is likely higher to an image + # containing the detected "Eiffel Tower" than to an image containing a + # detected distant towering building, even though the confidence that + # there is a tower in each image may be the same. Range [0, 1]. + # Corresponds to the JSON property `topicality` + # @return [Float] + attr_accessor :topicality + # Some entities may have optional user-supplied `Property` (name/value) # fields, such a score or string that qualifies the entity. # Corresponds to the JSON property `properties` @@ -683,61 +1375,21 @@ module Google # @return [Array] attr_accessor :locations - # Opaque entity ID. Some IDs may be available in - # [Google Knowledge Graph Search API](https://developers.google.com/knowledge- - # graph/). - # Corresponds to the JSON property `mid` - # @return [String] - attr_accessor :mid - - # The accuracy of the entity detection in an image. - # For example, for an image in which the "Eiffel Tower" entity is detected, - # this field represents the confidence that there is a tower in the query - # image. Range [0, 1]. - # Corresponds to the JSON property `confidence` - # @return [Float] - attr_accessor :confidence - - # A bounding polygon for the detected image annotation. - # Corresponds to the JSON property `boundingPoly` - # @return [Google::Apis::VisionV1::BoundingPoly] - attr_accessor :bounding_poly - - # The language code for the locale in which the entity textual - # `description` is expressed. - # Corresponds to the JSON property `locale` - # @return [String] - attr_accessor :locale - - # Entity textual description, expressed in its `locale` language. - # Corresponds to the JSON property `description` - # @return [String] - attr_accessor :description - - # The relevancy of the ICA (Image Content Annotation) label to the - # image. For example, the relevancy of "tower" is likely higher to an image - # containing the detected "Eiffel Tower" than to an image containing a - # detected distant towering building, even though the confidence that - # there is a tower in each image may be the same. Range [0, 1]. - # Corresponds to the JSON property `topicality` - # @return [Float] - attr_accessor :topicality - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @mid = args[:mid] if args.key?(:mid) + @confidence = args[:confidence] if args.key?(:confidence) + @locale = args[:locale] if args.key?(:locale) + @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly) + @description = args[:description] if args.key?(:description) + @topicality = args[:topicality] if args.key?(:topicality) @properties = args[:properties] if args.key?(:properties) @score = args[:score] if args.key?(:score) @locations = args[:locations] if args.key?(:locations) - @mid = args[:mid] if args.key?(:mid) - @confidence = args[:confidence] if args.key?(:confidence) - @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly) - @locale = args[:locale] if args.key?(:locale) - @description = args[:description] if args.key?(:description) - @topicality = args[:topicality] if args.key?(:topicality) end end @@ -834,11 +1486,6 @@ module Google class Word include Google::Apis::Core::Hashable - # Additional information detected on the structural component. - # Corresponds to the JSON property `property` - # @return [Google::Apis::VisionV1::TextProperty] - attr_accessor :property - # A bounding polygon for the detected image annotation. # Corresponds to the JSON property `boundingBox` # @return [Google::Apis::VisionV1::BoundingPoly] @@ -850,15 +1497,20 @@ module Google # @return [Array] attr_accessor :symbols + # Additional information detected on the structural component. + # Corresponds to the JSON property `property` + # @return [Google::Apis::VisionV1::TextProperty] + attr_accessor :property + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @property = args[:property] if args.key?(:property) @bounding_box = args[:bounding_box] if args.key?(:bounding_box) @symbols = args[:symbols] if args.key?(:symbols) + @property = args[:property] if args.key?(:property) end end @@ -924,10 +1576,46 @@ module Google class FaceAnnotation include Google::Apis::Core::Hashable - # Under-exposed likelihood. - # Corresponds to the JSON property `underExposedLikelihood` + # Pitch angle, which indicates the upwards/downwards angle that the face is + # pointing relative to the image's horizontal plane. Range [-180,180]. + # Corresponds to the JSON property `tiltAngle` + # @return [Float] + attr_accessor :tilt_angle + + # A bounding polygon for the detected image annotation. + # Corresponds to the JSON property `fdBoundingPoly` + # @return [Google::Apis::VisionV1::BoundingPoly] + attr_accessor :fd_bounding_poly + + # Anger likelihood. + # Corresponds to the JSON property `angerLikelihood` # @return [String] - attr_accessor :under_exposed_likelihood + attr_accessor :anger_likelihood + + # Detected face landmarks. + # Corresponds to the JSON property `landmarks` + # @return [Array] + attr_accessor :landmarks + + # Surprise likelihood. + # Corresponds to the JSON property `surpriseLikelihood` + # @return [String] + attr_accessor :surprise_likelihood + + # Face landmarking confidence. Range [0, 1]. + # Corresponds to the JSON property `landmarkingConfidence` + # @return [Float] + attr_accessor :landmarking_confidence + + # Joy likelihood. + # Corresponds to the JSON property `joyLikelihood` + # @return [String] + attr_accessor :joy_likelihood + + # Detection confidence. Range [0, 1]. + # Corresponds to the JSON property `detectionConfidence` + # @return [Float] + attr_accessor :detection_confidence # Yaw angle, which indicates the leftward/rightward angle that the face is # pointing relative to the vertical plane perpendicular to the image. Range @@ -936,10 +1624,10 @@ module Google # @return [Float] attr_accessor :pan_angle - # Detection confidence. Range [0, 1]. - # Corresponds to the JSON property `detectionConfidence` - # @return [Float] - attr_accessor :detection_confidence + # Under-exposed likelihood. + # Corresponds to the JSON property `underExposedLikelihood` + # @return [String] + attr_accessor :under_exposed_likelihood # Blurred likelihood. # Corresponds to the JSON property `blurredLikelihood` @@ -968,63 +1656,27 @@ module Google # @return [String] attr_accessor :sorrow_likelihood - # Pitch angle, which indicates the upwards/downwards angle that the face is - # pointing relative to the image's horizontal plane. Range [-180,180]. - # Corresponds to the JSON property `tiltAngle` - # @return [Float] - attr_accessor :tilt_angle - - # A bounding polygon for the detected image annotation. - # Corresponds to the JSON property `fdBoundingPoly` - # @return [Google::Apis::VisionV1::BoundingPoly] - attr_accessor :fd_bounding_poly - - # Anger likelihood. - # Corresponds to the JSON property `angerLikelihood` - # @return [String] - attr_accessor :anger_likelihood - - # Detected face landmarks. - # Corresponds to the JSON property `landmarks` - # @return [Array] - attr_accessor :landmarks - - # Surprise likelihood. - # Corresponds to the JSON property `surpriseLikelihood` - # @return [String] - attr_accessor :surprise_likelihood - - # Joy likelihood. - # Corresponds to the JSON property `joyLikelihood` - # @return [String] - attr_accessor :joy_likelihood - - # Face landmarking confidence. Range [0, 1]. - # Corresponds to the JSON property `landmarkingConfidence` - # @return [Float] - attr_accessor :landmarking_confidence - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @under_exposed_likelihood = args[:under_exposed_likelihood] if args.key?(:under_exposed_likelihood) - @pan_angle = args[:pan_angle] if args.key?(:pan_angle) - @detection_confidence = args[:detection_confidence] if args.key?(:detection_confidence) - @blurred_likelihood = args[:blurred_likelihood] if args.key?(:blurred_likelihood) - @headwear_likelihood = args[:headwear_likelihood] if args.key?(:headwear_likelihood) - @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly) - @roll_angle = args[:roll_angle] if args.key?(:roll_angle) - @sorrow_likelihood = args[:sorrow_likelihood] if args.key?(:sorrow_likelihood) @tilt_angle = args[:tilt_angle] if args.key?(:tilt_angle) @fd_bounding_poly = args[:fd_bounding_poly] if args.key?(:fd_bounding_poly) @anger_likelihood = args[:anger_likelihood] if args.key?(:anger_likelihood) @landmarks = args[:landmarks] if args.key?(:landmarks) @surprise_likelihood = args[:surprise_likelihood] if args.key?(:surprise_likelihood) - @joy_likelihood = args[:joy_likelihood] if args.key?(:joy_likelihood) @landmarking_confidence = args[:landmarking_confidence] if args.key?(:landmarking_confidence) + @joy_likelihood = args[:joy_likelihood] if args.key?(:joy_likelihood) + @detection_confidence = args[:detection_confidence] if args.key?(:detection_confidence) + @pan_angle = args[:pan_angle] if args.key?(:pan_angle) + @under_exposed_likelihood = args[:under_exposed_likelihood] if args.key?(:under_exposed_likelihood) + @blurred_likelihood = args[:blurred_likelihood] if args.key?(:blurred_likelihood) + @headwear_likelihood = args[:headwear_likelihood] if args.key?(:headwear_likelihood) + @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly) + @roll_angle = args[:roll_angle] if args.key?(:roll_angle) + @sorrow_likelihood = args[:sorrow_likelihood] if args.key?(:sorrow_likelihood) end end @@ -1147,652 +1799,6 @@ module Google @height = args[:height] if args.key?(:height) end end - - # Request for performing Google Cloud Vision API tasks over a user-provided - # image, with user-requested features. - class AnnotateImageRequest - include Google::Apis::Core::Hashable - - # Client image to perform Google Cloud Vision API tasks over. - # Corresponds to the JSON property `image` - # @return [Google::Apis::VisionV1::Image] - attr_accessor :image - - # Requested features. - # Corresponds to the JSON property `features` - # @return [Array] - attr_accessor :features - - # Image context and/or feature-specific parameters. - # Corresponds to the JSON property `imageContext` - # @return [Google::Apis::VisionV1::ImageContext] - attr_accessor :image_context - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @image = args[:image] if args.key?(:image) - @features = args[:features] if args.key?(:features) - @image_context = args[:image_context] if args.key?(:image_context) - end - end - - # The `Status` type defines a logical error model that is suitable for different - # programming environments, including REST APIs and RPC APIs. It is used by - # [gRPC](https://github.com/grpc). The error model is designed to be: - # - Simple to use and understand for most users - # - Flexible enough to meet unexpected needs - # # Overview - # The `Status` message contains three pieces of data: error code, error message, - # and error details. The error code should be an enum value of - # google.rpc.Code, but it may accept additional error codes if needed. The - # error message should be a developer-facing English message that helps - # developers *understand* and *resolve* the error. If a localized user-facing - # error message is needed, put the localized message in the error details or - # localize it in the client. The optional error details may contain arbitrary - # information about the error. There is a predefined set of error detail types - # in the package `google.rpc` which can be used for common error conditions. - # # Language mapping - # The `Status` message is the logical representation of the error model, but it - # is not necessarily the actual wire format. When the `Status` message is - # exposed in different client libraries and different wire protocols, it can be - # mapped differently. For example, it will likely be mapped to some exceptions - # in Java, but more likely mapped to some error codes in C. - # # Other uses - # The error model and the `Status` message can be used in a variety of - # environments, either with or without APIs, to provide a - # consistent developer experience across different environments. - # Example uses of this error model include: - # - Partial errors. If a service needs to return partial errors to the client, - # it may embed the `Status` in the normal response to indicate the partial - # errors. - # - Workflow errors. A typical workflow has multiple steps. Each step may - # have a `Status` message for error reporting purpose. - # - Batch operations. If a client uses batch request and batch response, the - # `Status` message should be used directly inside batch response, one for - # each error sub-response. - # - Asynchronous operations. If an API call embeds asynchronous operation - # results in its response, the status of those operations should be - # represented directly using the `Status` message. - # - Logging. If some API errors are stored in logs, the message `Status` could - # be used directly after any stripping needed for security/privacy reasons. - class Status - include Google::Apis::Core::Hashable - - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # google.rpc.Status.details field, or localized by the client. - # Corresponds to the JSON property `message` - # @return [String] - attr_accessor :message - - # A list of messages that carry the error details. There will be a - # common set of message types for APIs to use. - # Corresponds to the JSON property `details` - # @return [Array>] - attr_accessor :details - - # The status code, which should be an enum value of google.rpc.Code. - # Corresponds to the JSON property `code` - # @return [Fixnum] - attr_accessor :code - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @message = args[:message] if args.key?(:message) - @details = args[:details] if args.key?(:details) - @code = args[:code] if args.key?(:code) - end - end - - # A single symbol representation. - class Symbol - include Google::Apis::Core::Hashable - - # Additional information detected on the structural component. - # Corresponds to the JSON property `property` - # @return [Google::Apis::VisionV1::TextProperty] - attr_accessor :property - - # A bounding polygon for the detected image annotation. - # Corresponds to the JSON property `boundingBox` - # @return [Google::Apis::VisionV1::BoundingPoly] - attr_accessor :bounding_box - - # The actual UTF-8 representation of the symbol. - # Corresponds to the JSON property `text` - # @return [String] - attr_accessor :text - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @property = args[:property] if args.key?(:property) - @bounding_box = args[:bounding_box] if args.key?(:bounding_box) - @text = args[:text] if args.key?(:text) - end - end - - # Rectangle determined by min and max `LatLng` pairs. - class LatLongRect - include Google::Apis::Core::Hashable - - # An object representing a latitude/longitude pair. This is expressed as a pair - # of doubles representing degrees latitude and degrees longitude. Unless - # specified otherwise, this must conform to the - # WGS84 - # standard. Values must be within normalized ranges. - # Example of normalization code in Python: - # def NormalizeLongitude(longitude): - # """Wraps decimal degrees longitude to [-180.0, 180.0].""" - # q, r = divmod(longitude, 360.0) - # if r > 180.0 or (r == 180.0 and q <= -1.0): - # return r - 360.0 - # return r - # def NormalizeLatLng(latitude, longitude): - # """Wraps decimal degrees latitude and longitude to - # [-90.0, 90.0] and [-180.0, 180.0], respectively.""" - # r = latitude % 360.0 - # if r <= 90.0: - # return r, NormalizeLongitude(longitude) - # elif r >= 270.0: - # return r - 360, NormalizeLongitude(longitude) - # else: - # return 180 - r, NormalizeLongitude(longitude + 180.0) - # assert 180.0 == NormalizeLongitude(180.0) - # assert -180.0 == NormalizeLongitude(-180.0) - # assert -179.0 == NormalizeLongitude(181.0) - # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) - # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) - # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) - # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) - # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) - # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) - # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) - # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) - # The code in logs/storage/validator/logs_validator_traits.cc treats this type - # as if it were annotated as ST_LOCATION. - # Corresponds to the JSON property `minLatLng` - # @return [Google::Apis::VisionV1::LatLng] - attr_accessor :min_lat_lng - - # An object representing a latitude/longitude pair. This is expressed as a pair - # of doubles representing degrees latitude and degrees longitude. Unless - # specified otherwise, this must conform to the - # WGS84 - # standard. Values must be within normalized ranges. - # Example of normalization code in Python: - # def NormalizeLongitude(longitude): - # """Wraps decimal degrees longitude to [-180.0, 180.0].""" - # q, r = divmod(longitude, 360.0) - # if r > 180.0 or (r == 180.0 and q <= -1.0): - # return r - 360.0 - # return r - # def NormalizeLatLng(latitude, longitude): - # """Wraps decimal degrees latitude and longitude to - # [-90.0, 90.0] and [-180.0, 180.0], respectively.""" - # r = latitude % 360.0 - # if r <= 90.0: - # return r, NormalizeLongitude(longitude) - # elif r >= 270.0: - # return r - 360, NormalizeLongitude(longitude) - # else: - # return 180 - r, NormalizeLongitude(longitude + 180.0) - # assert 180.0 == NormalizeLongitude(180.0) - # assert -180.0 == NormalizeLongitude(-180.0) - # assert -179.0 == NormalizeLongitude(181.0) - # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) - # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) - # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) - # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) - # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) - # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) - # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) - # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) - # The code in logs/storage/validator/logs_validator_traits.cc treats this type - # as if it were annotated as ST_LOCATION. - # Corresponds to the JSON property `maxLatLng` - # @return [Google::Apis::VisionV1::LatLng] - attr_accessor :max_lat_lng - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @min_lat_lng = args[:min_lat_lng] if args.key?(:min_lat_lng) - @max_lat_lng = args[:max_lat_lng] if args.key?(:max_lat_lng) - end - end - - # Set of crop hints that are used to generate new crops when serving images. - class CropHintsAnnotation - include Google::Apis::Core::Hashable - - # Crop hint results. - # Corresponds to the JSON property `cropHints` - # @return [Array] - attr_accessor :crop_hints - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @crop_hints = args[:crop_hints] if args.key?(:crop_hints) - end - end - - # An object representing a latitude/longitude pair. This is expressed as a pair - # of doubles representing degrees latitude and degrees longitude. Unless - # specified otherwise, this must conform to the - # WGS84 - # standard. Values must be within normalized ranges. - # Example of normalization code in Python: - # def NormalizeLongitude(longitude): - # """Wraps decimal degrees longitude to [-180.0, 180.0].""" - # q, r = divmod(longitude, 360.0) - # if r > 180.0 or (r == 180.0 and q <= -1.0): - # return r - 360.0 - # return r - # def NormalizeLatLng(latitude, longitude): - # """Wraps decimal degrees latitude and longitude to - # [-90.0, 90.0] and [-180.0, 180.0], respectively.""" - # r = latitude % 360.0 - # if r <= 90.0: - # return r, NormalizeLongitude(longitude) - # elif r >= 270.0: - # return r - 360, NormalizeLongitude(longitude) - # else: - # return 180 - r, NormalizeLongitude(longitude + 180.0) - # assert 180.0 == NormalizeLongitude(180.0) - # assert -180.0 == NormalizeLongitude(-180.0) - # assert -179.0 == NormalizeLongitude(181.0) - # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) - # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) - # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) - # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) - # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) - # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) - # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) - # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) - # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) - # The code in logs/storage/validator/logs_validator_traits.cc treats this type - # as if it were annotated as ST_LOCATION. - class LatLng - include Google::Apis::Core::Hashable - - # The longitude in degrees. It must be in the range [-180.0, +180.0]. - # Corresponds to the JSON property `longitude` - # @return [Float] - attr_accessor :longitude - - # The latitude in degrees. It must be in the range [-90.0, +90.0]. - # Corresponds to the JSON property `latitude` - # @return [Float] - attr_accessor :latitude - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @longitude = args[:longitude] if args.key?(:longitude) - @latitude = args[:latitude] if args.key?(:latitude) - end - end - - # Represents a color in the RGBA color space. This representation is designed - # for simplicity of conversion to/from color representations in various - # languages over compactness; for example, the fields of this representation - # can be trivially provided to the constructor of "java.awt.Color" in Java; it - # can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha" - # method in iOS; and, with just a little work, it can be easily formatted into - # a CSS "rgba()" string in JavaScript, as well. Here are some examples: - # Example (Java): - # import com.google.type.Color; - # // ... - # public static java.awt.Color fromProto(Color protocolor) ` - # float alpha = protocolor.hasAlpha() - # ? protocolor.getAlpha().getValue() - # : 1.0; - # return new java.awt.Color( - # protocolor.getRed(), - # protocolor.getGreen(), - # protocolor.getBlue(), - # alpha); - # ` - # public static Color toProto(java.awt.Color color) ` - # float red = (float) color.getRed(); - # float green = (float) color.getGreen(); - # float blue = (float) color.getBlue(); - # float denominator = 255.0; - # Color.Builder resultBuilder = - # Color - # .newBuilder() - # .setRed(red / denominator) - # .setGreen(green / denominator) - # .setBlue(blue / denominator); - # int alpha = color.getAlpha(); - # if (alpha != 255) ` - # result.setAlpha( - # FloatValue - # .newBuilder() - # .setValue(((float) alpha) / denominator) - # .build()); - # ` - # return resultBuilder.build(); - # ` - # // ... - # Example (iOS / Obj-C): - # // ... - # static UIColor* fromProto(Color* protocolor) ` - # float red = [protocolor red]; - # float green = [protocolor green]; - # float blue = [protocolor blue]; - # FloatValue* alpha_wrapper = [protocolor alpha]; - # float alpha = 1.0; - # if (alpha_wrapper != nil) ` - # alpha = [alpha_wrapper value]; - # ` - # return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; - # ` - # static Color* toProto(UIColor* color) ` - # CGFloat red, green, blue, alpha; - # if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) ` - # return nil; - # ` - # Color* result = [Color alloc] init]; - # [result setRed:red]; - # [result setGreen:green]; - # [result setBlue:blue]; - # if (alpha <= 0.9999) ` - # [result setAlpha:floatWrapperWithValue(alpha)]; - # ` - # [result autorelease]; - # return result; - # ` - # // ... - # Example (JavaScript): - # // ... - # var protoToCssColor = function(rgb_color) ` - # var redFrac = rgb_color.red || 0.0; - # var greenFrac = rgb_color.green || 0.0; - # var blueFrac = rgb_color.blue || 0.0; - # var red = Math.floor(redFrac * 255); - # var green = Math.floor(greenFrac * 255); - # var blue = Math.floor(blueFrac * 255); - # if (!('alpha' in rgb_color)) ` - # return rgbToCssColor_(red, green, blue); - # ` - # var alphaFrac = rgb_color.alpha.value || 0.0; - # var rgbParams = [red, green, blue].join(','); - # return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); - # `; - # var rgbToCssColor_ = function(red, green, blue) ` - # var rgbNumber = new Number((red << 16) | (green << 8) | blue); - # var hexString = rgbNumber.toString(16); - # var missingZeros = 6 - hexString.length; - # var resultBuilder = ['#']; - # for (var i = 0; i < missingZeros; i++) ` - # resultBuilder.push('0'); - # ` - # resultBuilder.push(hexString); - # return resultBuilder.join(''); - # `; - # // ... - class Color - include Google::Apis::Core::Hashable - - # The amount of red in the color as a value in the interval [0, 1]. - # Corresponds to the JSON property `red` - # @return [Float] - attr_accessor :red - - # The amount of green in the color as a value in the interval [0, 1]. - # Corresponds to the JSON property `green` - # @return [Float] - attr_accessor :green - - # The amount of blue in the color as a value in the interval [0, 1]. - # Corresponds to the JSON property `blue` - # @return [Float] - attr_accessor :blue - - # The fraction of this color that should be applied to the pixel. That is, - # the final pixel color is defined by the equation: - # pixel color = alpha * (this color) + (1.0 - alpha) * (background color) - # This means that a value of 1.0 corresponds to a solid color, whereas - # a value of 0.0 corresponds to a completely transparent color. This - # uses a wrapper message rather than a simple float scalar so that it is - # possible to distinguish between a default value and the value being unset. - # If omitted, this color object is to be rendered as a solid color - # (as if the alpha value had been explicitly given with a value of 1.0). - # Corresponds to the JSON property `alpha` - # @return [Float] - attr_accessor :alpha - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @red = args[:red] if args.key?(:red) - @green = args[:green] if args.key?(:green) - @blue = args[:blue] if args.key?(:blue) - @alpha = args[:alpha] if args.key?(:alpha) - end - end - - # Users describe the type of Google Cloud Vision API tasks to perform over - # images by using *Feature*s. Each Feature indicates a type of image - # detection task to perform. Features encode the Cloud Vision API - # vertical to operate on and the number of top-scoring results to return. - class Feature - include Google::Apis::Core::Hashable - - # The feature type. - # Corresponds to the JSON property `type` - # @return [String] - attr_accessor :type - - # Maximum number of results of this type. - # Corresponds to the JSON property `maxResults` - # @return [Fixnum] - attr_accessor :max_results - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @type = args[:type] if args.key?(:type) - @max_results = args[:max_results] if args.key?(:max_results) - end - end - - # Stores image properties, such as dominant colors. - class ImageProperties - include Google::Apis::Core::Hashable - - # Set of dominant colors and their corresponding scores. - # Corresponds to the JSON property `dominantColors` - # @return [Google::Apis::VisionV1::DominantColorsAnnotation] - attr_accessor :dominant_colors - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @dominant_colors = args[:dominant_colors] if args.key?(:dominant_colors) - end - end - - # Set of features pertaining to the image, computed by computer vision - # methods over safe-search verticals (for example, adult, spoof, medical, - # violence). - class SafeSearchAnnotation - include Google::Apis::Core::Hashable - - # Spoof likelihood. The likelihood that an modification - # was made to the image's canonical version to make it appear - # funny or offensive. - # Corresponds to the JSON property `spoof` - # @return [String] - attr_accessor :spoof - - # Likelihood that this is a medical image. - # Corresponds to the JSON property `medical` - # @return [String] - attr_accessor :medical - - # Violence likelihood. - # Corresponds to the JSON property `violence` - # @return [String] - attr_accessor :violence - - # Represents the adult content likelihood for the image. - # Corresponds to the JSON property `adult` - # @return [String] - attr_accessor :adult - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @spoof = args[:spoof] if args.key?(:spoof) - @medical = args[:medical] if args.key?(:medical) - @violence = args[:violence] if args.key?(:violence) - @adult = args[:adult] if args.key?(:adult) - end - end - - # Set of dominant colors and their corresponding scores. - class DominantColorsAnnotation - include Google::Apis::Core::Hashable - - # RGB color values with their score and pixel fraction. - # Corresponds to the JSON property `colors` - # @return [Array] - attr_accessor :colors - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @colors = args[:colors] if args.key?(:colors) - end - end - - # TextAnnotation contains a structured representation of OCR extracted text. - # The hierarchy of an OCR extracted text structure is like this: - # TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol - # Each structural component, starting from Page, may further have their own - # properties. Properties describe detected languages, breaks etc.. Please - # refer to the google.cloud.vision.v1.TextAnnotation.TextProperty message - # definition below for more detail. - class TextAnnotation - include Google::Apis::Core::Hashable - - # List of pages detected by OCR. - # Corresponds to the JSON property `pages` - # @return [Array] - attr_accessor :pages - - # UTF-8 text detected on the pages. - # Corresponds to the JSON property `text` - # @return [String] - attr_accessor :text - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @pages = args[:pages] if args.key?(:pages) - @text = args[:text] if args.key?(:text) - end - end - - # Detected language for a structural component. - class DetectedLanguage - include Google::Apis::Core::Hashable - - # The BCP-47 language code, such as "en-US" or "sr-Latn". For more - # information, see - # http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. - # Corresponds to the JSON property `languageCode` - # @return [String] - attr_accessor :language_code - - # Confidence of detected language. Range [0, 1]. - # Corresponds to the JSON property `confidence` - # @return [Float] - attr_accessor :confidence - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @language_code = args[:language_code] if args.key?(:language_code) - @confidence = args[:confidence] if args.key?(:confidence) - end - end - - # A vertex represents a 2D point in the image. - # NOTE: the vertex coordinates are in the same scale as the original image. - class Vertex - include Google::Apis::Core::Hashable - - # Y coordinate. - # Corresponds to the JSON property `y` - # @return [Fixnum] - attr_accessor :y - - # X coordinate. - # Corresponds to the JSON property `x` - # @return [Fixnum] - attr_accessor :x - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @y = args[:y] if args.key?(:y) - @x = args[:x] if args.key?(:x) - end - end end end end diff --git a/generated/google/apis/vision_v1/representations.rb b/generated/google/apis/vision_v1/representations.rb index 5da736f03..2763b7dff 100644 --- a/generated/google/apis/vision_v1/representations.rb +++ b/generated/google/apis/vision_v1/representations.rb @@ -22,19 +22,103 @@ module Google module Apis module VisionV1 + class AnnotateImageRequest + 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 LatLongRect + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Symbol + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CropHintsAnnotation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class LatLng + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Color + 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 Feature + 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 DominantColorsAnnotation + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TextAnnotation + 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 DetectedLanguage + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class WebEntity class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class BoundingPoly + class TextProperty class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end - class TextProperty + class BoundingPoly class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -58,7 +142,13 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class LocationInfo + class WebDetection + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BatchAnnotateImagesResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -70,24 +160,18 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class LocationInfo + 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 WebDetection - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class BatchAnnotateImagesResponse - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class Position class Representation < Google::Apis::Core::JsonRepresentation; end @@ -179,87 +263,130 @@ module Google end class AnnotateImageRequest - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :image, as: 'image', class: Google::Apis::VisionV1::Image, decorator: Google::Apis::VisionV1::Image::Representation - include Google::Apis::Core::JsonObjectSupport + collection :features, as: 'features', class: Google::Apis::VisionV1::Feature, decorator: Google::Apis::VisionV1::Feature::Representation + + property :image_context, as: 'imageContext', class: Google::Apis::VisionV1::ImageContext, decorator: Google::Apis::VisionV1::ImageContext::Representation + + end end class Status - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Symbol - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :code, as: 'code' + property :message, as: 'message' + collection :details, as: 'details' + end end class LatLongRect - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :min_lat_lng, as: 'minLatLng', class: Google::Apis::VisionV1::LatLng, decorator: Google::Apis::VisionV1::LatLng::Representation - include Google::Apis::Core::JsonObjectSupport + property :max_lat_lng, as: 'maxLatLng', class: Google::Apis::VisionV1::LatLng, decorator: Google::Apis::VisionV1::LatLng::Representation + + end + end + + class Symbol + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :text, as: 'text' + property :property, as: 'property', class: Google::Apis::VisionV1::TextProperty, decorator: Google::Apis::VisionV1::TextProperty::Representation + + property :bounding_box, as: 'boundingBox', class: Google::Apis::VisionV1::BoundingPoly, decorator: Google::Apis::VisionV1::BoundingPoly::Representation + + end end class CropHintsAnnotation - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :crop_hints, as: 'cropHints', class: Google::Apis::VisionV1::CropHint, decorator: Google::Apis::VisionV1::CropHint::Representation - include Google::Apis::Core::JsonObjectSupport + end end class LatLng - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :latitude, as: 'latitude' + property :longitude, as: 'longitude' + end end class Color - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - - class Feature - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :green, as: 'green' + property :blue, as: 'blue' + property :alpha, as: 'alpha' + property :red, as: 'red' + end end class ImageProperties - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :dominant_colors, as: 'dominantColors', class: Google::Apis::VisionV1::DominantColorsAnnotation, decorator: Google::Apis::VisionV1::DominantColorsAnnotation::Representation - include Google::Apis::Core::JsonObjectSupport + end + end + + class Feature + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :type, as: 'type' + property :max_results, as: 'maxResults' + end end class SafeSearchAnnotation - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :adult, as: 'adult' + property :spoof, as: 'spoof' + property :medical, as: 'medical' + property :violence, as: 'violence' + end end class DominantColorsAnnotation - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :colors, as: 'colors', class: Google::Apis::VisionV1::ColorInfo, decorator: Google::Apis::VisionV1::ColorInfo::Representation - include Google::Apis::Core::JsonObjectSupport + end end class TextAnnotation - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :pages, as: 'pages', class: Google::Apis::VisionV1::Page, decorator: Google::Apis::VisionV1::Page::Representation - include Google::Apis::Core::JsonObjectSupport - end - - class DetectedLanguage - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport + property :text, as: 'text' + end end class Vertex - class Representation < Google::Apis::Core::JsonRepresentation; end + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :x, as: 'x' + property :y, as: 'y' + end + end - include Google::Apis::Core::JsonObjectSupport + class DetectedLanguage + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :confidence, as: 'confidence' + property :language_code, as: 'languageCode' + end end class WebEntity @@ -271,6 +398,16 @@ module Google end end + class TextProperty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :detected_break, as: 'detectedBreak', class: Google::Apis::VisionV1::DetectedBreak, decorator: Google::Apis::VisionV1::DetectedBreak::Representation + + collection :detected_languages, as: 'detectedLanguages', class: Google::Apis::VisionV1::DetectedLanguage, decorator: Google::Apis::VisionV1::DetectedLanguage::Representation + + end + end + class BoundingPoly # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -279,19 +416,11 @@ module Google end end - class TextProperty - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :detected_languages, as: 'detectedLanguages', class: Google::Apis::VisionV1::DetectedLanguage, decorator: Google::Apis::VisionV1::DetectedLanguage::Representation - - property :detected_break, as: 'detectedBreak', class: Google::Apis::VisionV1::DetectedBreak, decorator: Google::Apis::VisionV1::DetectedBreak::Representation - - end - end - class AnnotateImageResponse # @private class Representation < Google::Apis::Core::JsonRepresentation + property :error, as: 'error', class: Google::Apis::VisionV1::Status, decorator: Google::Apis::VisionV1::Status::Representation + property :full_text_annotation, as: 'fullTextAnnotation', class: Google::Apis::VisionV1::TextAnnotation, decorator: Google::Apis::VisionV1::TextAnnotation::Representation collection :landmark_annotations, as: 'landmarkAnnotations', class: Google::Apis::VisionV1::EntityAnnotation, decorator: Google::Apis::VisionV1::EntityAnnotation::Representation @@ -312,8 +441,6 @@ module Google collection :label_annotations, as: 'labelAnnotations', class: Google::Apis::VisionV1::EntityAnnotation, decorator: Google::Apis::VisionV1::EntityAnnotation::Representation - property :error, as: 'error', class: Google::Apis::VisionV1::Status, decorator: Google::Apis::VisionV1::Status::Representation - end end @@ -337,42 +464,19 @@ module Google end end - class LocationInfo - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :lat_lng, as: 'latLng', class: Google::Apis::VisionV1::LatLng, decorator: Google::Apis::VisionV1::LatLng::Representation - - end - end - - class ImageSource - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :gcs_image_uri, as: 'gcsImageUri' - property :image_uri, as: 'imageUri' - end - end - - class Property - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :value, as: 'value' - property :uint64_value, as: 'uint64Value' - property :name, as: 'name' - end - end - class WebDetection # @private class Representation < Google::Apis::Core::JsonRepresentation - collection :partial_matching_images, as: 'partialMatchingImages', class: Google::Apis::VisionV1::WebImage, decorator: Google::Apis::VisionV1::WebImage::Representation - collection :full_matching_images, as: 'fullMatchingImages', class: Google::Apis::VisionV1::WebImage, decorator: Google::Apis::VisionV1::WebImage::Representation collection :web_entities, as: 'webEntities', class: Google::Apis::VisionV1::WebEntity, decorator: Google::Apis::VisionV1::WebEntity::Representation collection :pages_with_matching_images, as: 'pagesWithMatchingImages', class: Google::Apis::VisionV1::WebPage, decorator: Google::Apis::VisionV1::WebPage::Representation + collection :partial_matching_images, as: 'partialMatchingImages', class: Google::Apis::VisionV1::WebImage, decorator: Google::Apis::VisionV1::WebImage::Representation + + collection :visually_similar_images, as: 'visuallySimilarImages', class: Google::Apis::VisionV1::WebImage, decorator: Google::Apis::VisionV1::WebImage::Representation + end end @@ -384,6 +488,31 @@ module Google end end + class ImageSource + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :image_uri, as: 'imageUri' + property :gcs_image_uri, as: 'gcsImageUri' + 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 Property + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :value, as: 'value' + property :uint64_value, as: 'uint64Value' + property :name, as: 'name' + end + end + class Position # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -396,36 +525,36 @@ module Google class WebPage # @private class Representation < Google::Apis::Core::JsonRepresentation - property :url, as: 'url' property :score, as: 'score' + property :url, as: 'url' end end class ColorInfo # @private class Representation < Google::Apis::Core::JsonRepresentation + property :score, as: 'score' property :pixel_fraction, as: 'pixelFraction' property :color, as: 'color', class: Google::Apis::VisionV1::Color, decorator: Google::Apis::VisionV1::Color::Representation - property :score, as: 'score' end end class EntityAnnotation # @private class Representation < Google::Apis::Core::JsonRepresentation + property :mid, as: 'mid' + property :confidence, as: 'confidence' + property :locale, as: 'locale' + property :bounding_poly, as: 'boundingPoly', class: Google::Apis::VisionV1::BoundingPoly, decorator: Google::Apis::VisionV1::BoundingPoly::Representation + + property :description, as: 'description' + property :topicality, as: 'topicality' collection :properties, as: 'properties', class: Google::Apis::VisionV1::Property, decorator: Google::Apis::VisionV1::Property::Representation property :score, as: 'score' collection :locations, as: 'locations', class: Google::Apis::VisionV1::LocationInfo, decorator: Google::Apis::VisionV1::LocationInfo::Representation - property :mid, as: 'mid' - property :confidence, as: 'confidence' - property :bounding_poly, as: 'boundingPoly', class: Google::Apis::VisionV1::BoundingPoly, decorator: Google::Apis::VisionV1::BoundingPoly::Representation - - property :locale, as: 'locale' - property :description, as: 'description' - property :topicality, as: 'topicality' end end @@ -459,12 +588,12 @@ module Google class Word # @private class Representation < Google::Apis::Core::JsonRepresentation - property :property, as: 'property', class: Google::Apis::VisionV1::TextProperty, decorator: Google::Apis::VisionV1::TextProperty::Representation - property :bounding_box, as: 'boundingBox', class: Google::Apis::VisionV1::BoundingPoly, decorator: Google::Apis::VisionV1::BoundingPoly::Representation collection :symbols, as: 'symbols', class: Google::Apis::VisionV1::Symbol, decorator: Google::Apis::VisionV1::Symbol::Representation + property :property, as: 'property', class: Google::Apis::VisionV1::TextProperty, decorator: Google::Apis::VisionV1::TextProperty::Representation + end end @@ -492,15 +621,6 @@ module Google class FaceAnnotation # @private class Representation < Google::Apis::Core::JsonRepresentation - 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' property :fd_bounding_poly, as: 'fdBoundingPoly', class: Google::Apis::VisionV1::BoundingPoly, decorator: Google::Apis::VisionV1::BoundingPoly::Representation @@ -508,8 +628,17 @@ module Google collection :landmarks, as: 'landmarks', class: Google::Apis::VisionV1::Landmark, decorator: Google::Apis::VisionV1::Landmark::Representation property :surprise_likelihood, as: 'surpriseLikelihood' - property :joy_likelihood, as: 'joyLikelihood' property :landmarking_confidence, as: 'landmarkingConfidence' + property :joy_likelihood, as: 'joyLikelihood' + property :detection_confidence, as: 'detectionConfidence' + property :pan_angle, as: 'panAngle' + property :under_exposed_likelihood, as: 'underExposedLikelihood' + property :blurred_likelihood, as: 'blurredLikelihood' + property :headwear_likelihood, as: 'headwearLikelihood' + property :bounding_poly, as: 'boundingPoly', class: Google::Apis::VisionV1::BoundingPoly, decorator: Google::Apis::VisionV1::BoundingPoly::Representation + + property :roll_angle, as: 'rollAngle' + property :sorrow_likelihood, as: 'sorrowLikelihood' end end @@ -551,133 +680,6 @@ module Google property :height, as: 'height' end 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 - - collection :features, as: 'features', class: Google::Apis::VisionV1::Feature, decorator: Google::Apis::VisionV1::Feature::Representation - - property :image_context, as: 'imageContext', class: Google::Apis::VisionV1::ImageContext, decorator: Google::Apis::VisionV1::ImageContext::Representation - - end - end - - class Status - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :message, as: 'message' - collection :details, as: 'details' - property :code, as: 'code' - end - end - - class Symbol - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :property, as: 'property', class: Google::Apis::VisionV1::TextProperty, decorator: Google::Apis::VisionV1::TextProperty::Representation - - property :bounding_box, as: 'boundingBox', class: Google::Apis::VisionV1::BoundingPoly, decorator: Google::Apis::VisionV1::BoundingPoly::Representation - - property :text, as: 'text' - end - end - - class LatLongRect - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :min_lat_lng, as: 'minLatLng', class: Google::Apis::VisionV1::LatLng, decorator: Google::Apis::VisionV1::LatLng::Representation - - property :max_lat_lng, as: 'maxLatLng', class: Google::Apis::VisionV1::LatLng, decorator: Google::Apis::VisionV1::LatLng::Representation - - end - end - - class CropHintsAnnotation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :crop_hints, as: 'cropHints', class: Google::Apis::VisionV1::CropHint, decorator: Google::Apis::VisionV1::CropHint::Representation - - end - end - - class LatLng - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :longitude, as: 'longitude' - property :latitude, as: 'latitude' - end - end - - class Color - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :red, as: 'red' - property :green, as: 'green' - property :blue, as: 'blue' - property :alpha, as: 'alpha' - end - end - - class Feature - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :type, as: 'type' - property :max_results, as: 'maxResults' - end - end - - class ImageProperties - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :dominant_colors, as: 'dominantColors', class: Google::Apis::VisionV1::DominantColorsAnnotation, decorator: Google::Apis::VisionV1::DominantColorsAnnotation::Representation - - end - end - - class SafeSearchAnnotation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :spoof, as: 'spoof' - property :medical, as: 'medical' - property :violence, as: 'violence' - property :adult, as: 'adult' - 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 TextAnnotation - # @private - class Representation < Google::Apis::Core::JsonRepresentation - collection :pages, as: 'pages', class: Google::Apis::VisionV1::Page, decorator: Google::Apis::VisionV1::Page::Representation - - property :text, as: 'text' - end - end - - class DetectedLanguage - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :language_code, as: 'languageCode' - property :confidence, as: 'confidence' - end - end - - class Vertex - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :y, as: 'y' - property :x, as: 'x' - end - end end end end diff --git a/generated/google/apis/webmasters_v3.rb b/generated/google/apis/webmasters_v3.rb index e4fdf4fef..fcc54d297 100644 --- a/generated/google/apis/webmasters_v3.rb +++ b/generated/google/apis/webmasters_v3.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/webmaster-tools/ module WebmastersV3 VERSION = 'V3' - REVISION = '20170117' + REVISION = '20170322' # View and manage Search Console data for your verified sites AUTH_WEBMASTERS = 'https://www.googleapis.com/auth/webmasters' diff --git a/generated/google/apis/youtube_analytics_v1.rb b/generated/google/apis/youtube_analytics_v1.rb index 35eb1d4c4..6fa76c7af 100644 --- a/generated/google/apis/youtube_analytics_v1.rb +++ b/generated/google/apis/youtube_analytics_v1.rb @@ -25,7 +25,7 @@ module Google # @see http://developers.google.com/youtube/analytics/ module YoutubeAnalyticsV1 VERSION = 'V1' - REVISION = '20170306' + REVISION = '20170322' # Manage your YouTube account AUTH_YOUTUBE = 'https://www.googleapis.com/auth/youtube' diff --git a/generated/google/apis/youtube_partner_v1.rb b/generated/google/apis/youtube_partner_v1.rb index c2ff69ae5..0bec9f330 100644 --- a/generated/google/apis/youtube_partner_v1.rb +++ b/generated/google/apis/youtube_partner_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://developers.google.com/youtube/partner/ module YoutubePartnerV1 VERSION = 'V1' - REVISION = '20170228' + REVISION = '20170321' # View and manage your assets and associated content on YouTube AUTH_YOUTUBEPARTNER = 'https://www.googleapis.com/auth/youtubepartner' diff --git a/generated/google/apis/youtube_partner_v1/classes.rb b/generated/google/apis/youtube_partner_v1/classes.rb index dc00d4ca8..119a118d6 100644 --- a/generated/google/apis/youtube_partner_v1/classes.rb +++ b/generated/google/apis/youtube_partner_v1/classes.rb @@ -2609,6 +2609,84 @@ module Google end end + # + class Package + include Google::Apis::Core::Hashable + + # The package's metadata file contents. + # Corresponds to the JSON property `content` + # @return [String] + attr_accessor :content + + # An ID that YouTube assigns and uses to uniquely identify the package. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # The type of the API resource. For package resources, this value is + # youtubePartner#package. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The desired locale of the error messages as defined in BCP 47 (http://tools. + # ietf.org/html/bcp47). For example, "en-US" or "de". If not specified we will + # return the error messages in English ("en"). + # Corresponds to the JSON property `locale` + # @return [String] + attr_accessor :locale + + # The uploader name. + # Corresponds to the JSON property `uploaderName` + # @return [String] + attr_accessor :uploader_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @content = args[:content] if args.key?(:content) + @id = args[:id] if args.key?(:id) + @kind = args[:kind] if args.key?(:kind) + @locale = args[:locale] if args.key?(:locale) + @uploader_name = args[:uploader_name] if args.key?(:uploader_name) + end + end + + # + class PackageInsertResponse + include Google::Apis::Core::Hashable + + # The list of errors and/or warnings. + # Corresponds to the JSON property `errors` + # @return [Array] + attr_accessor :errors + + # The type of the API response. For this operation, the value is youtubePartner# + # packageInsert. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The package resource. + # Corresponds to the JSON property `resource` + # @return [Google::Apis::YoutubePartnerV1::Package] + attr_accessor :resource + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @errors = args[:errors] if args.key?(:errors) + @kind = args[:kind] if args.key?(:kind) + @resource = args[:resource] if args.key?(:resource) + end + end + # class PageInfo include Google::Apis::Core::Hashable diff --git a/generated/google/apis/youtube_partner_v1/representations.rb b/generated/google/apis/youtube_partner_v1/representations.rb index 9392a0a64..8d476c77f 100644 --- a/generated/google/apis/youtube_partner_v1/representations.rb +++ b/generated/google/apis/youtube_partner_v1/representations.rb @@ -346,6 +346,18 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class Package + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PackageInsertResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class PageInfo class Representation < Google::Apis::Core::JsonRepresentation; end @@ -1201,6 +1213,28 @@ module Google end end + class Package + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :content, as: 'content' + property :id, as: 'id' + property :kind, as: 'kind' + property :locale, as: 'locale' + property :uploader_name, as: 'uploaderName' + end + end + + class PackageInsertResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :errors, as: 'errors', class: Google::Apis::YoutubePartnerV1::ValidateError, decorator: Google::Apis::YoutubePartnerV1::ValidateError::Representation + + property :kind, as: 'kind' + property :resource, as: 'resource', class: Google::Apis::YoutubePartnerV1::Package, decorator: Google::Apis::YoutubePartnerV1::Package::Representation + + end + end + class PageInfo # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/youtube_partner_v1/service.rb b/generated/google/apis/youtube_partner_v1/service.rb index fbbb89739..6bc95c3b0 100644 --- a/generated/google/apis/youtube_partner_v1/service.rb +++ b/generated/google/apis/youtube_partner_v1/service.rb @@ -2219,6 +2219,46 @@ module Google execute_or_queue_command(command, &block) end + # Inserts a metadata-only package. + # @param [Google::Apis::YoutubePartnerV1::Package] package_object + # @param [String] on_behalf_of_content_owner + # The onBehalfOfContentOwner parameter identifies the content owner that the + # user is acting on behalf of. This parameter supports users whose accounts are + # associated with multiple content owners. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # Overrides userIp if both are provided. + # @param [String] user_ip + # IP address of the site where the request originates. Use this if you want to + # enforce per-user limits. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::YoutubePartnerV1::PackageInsertResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::YoutubePartnerV1::PackageInsertResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def insert_package(package_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, 'package', options) + command.request_representation = Google::Apis::YoutubePartnerV1::Package::Representation + command.request_object = package_object + command.response_representation = Google::Apis::YoutubePartnerV1::PackageInsertResponse::Representation + command.response_class = Google::Apis::YoutubePartnerV1::PackageInsertResponse + 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? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + # Retrieves the specified saved policy. # @param [String] policy_id # The policyId parameter specifies a value that uniquely identifies the policy diff --git a/generated/google/apis/youtubereporting_v1.rb b/generated/google/apis/youtubereporting_v1.rb index 9d91a9771..4465c11dd 100644 --- a/generated/google/apis/youtubereporting_v1.rb +++ b/generated/google/apis/youtubereporting_v1.rb @@ -26,13 +26,13 @@ module Google # @see https://developers.google.com/youtube/reporting/v1/reports/ module YoutubereportingV1 VERSION = 'V1' - REVISION = '20170308' - - # View monetary and non-monetary YouTube Analytics reports for your YouTube content - AUTH_YT_ANALYTICS_MONETARY_READONLY = 'https://www.googleapis.com/auth/yt-analytics-monetary.readonly' + REVISION = '20170326' # View YouTube Analytics reports for your YouTube content AUTH_YT_ANALYTICS_READONLY = 'https://www.googleapis.com/auth/yt-analytics.readonly' + + # View monetary and non-monetary YouTube Analytics reports for your YouTube content + AUTH_YT_ANALYTICS_MONETARY_READONLY = 'https://www.googleapis.com/auth/yt-analytics-monetary.readonly' end end end diff --git a/generated/google/apis/youtubereporting_v1/classes.rb b/generated/google/apis/youtubereporting_v1/classes.rb index b8cd925a4..a11c2a241 100644 --- a/generated/google/apis/youtubereporting_v1/classes.rb +++ b/generated/google/apis/youtubereporting_v1/classes.rb @@ -41,27 +41,72 @@ module Google end end + # A report type. + class ReportType + include Google::Apis::Core::Hashable + + # 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 + + # 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 + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @deprecate_time = args[:deprecate_time] if args.key?(:deprecate_time) + @name = args[:name] if args.key?(:name) + @id = args[:id] if args.key?(:id) + @system_managed = args[:system_managed] if args.key?(:system_managed) + 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 ID of the job that created this report. + # Corresponds to the JSON property `jobId` + # @return [String] + attr_accessor :job_id + # The server-generated ID of the report. # Corresponds to the JSON property `id` # @return [String] attr_accessor :id - # The date/time when the job this report belongs to will expire/expired. - # Corresponds to the JSON property `jobExpireTime` - # @return [String] - attr_accessor :job_expire_time - # 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] @@ -78,24 +123,19 @@ module Google # @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 - def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) + @job_id = args[:job_id] if args.key?(:job_id) @id = args[:id] if args.key?(:id) - @job_expire_time = args[:job_expire_time] if args.key?(:job_expire_time) @end_time = args[:end_time] if args.key?(:end_time) + @job_expire_time = args[:job_expire_time] if args.key?(:job_expire_time) @download_url = args[:download_url] if args.key?(:download_url) @start_time = args[:start_time] if args.key?(:start_time) @create_time = args[:create_time] if args.key?(:create_time) - @job_id = args[:job_id] if args.key?(:job_id) end end @@ -147,46 +187,6 @@ module Google end end - # A report type. - class ReportType - include Google::Apis::Core::Hashable - - # 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 - - # 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 - - def initialize(**args) - update!(**args) - end - - # Update properties of this object - def update!(**args) - @deprecate_time = args[:deprecate_time] if args.key?(:deprecate_time) - @name = args[:name] if args.key?(:name) - @id = args[:id] if args.key?(:id) - @system_managed = args[:system_managed] if args.key?(:system_managed) - end - end - # Response message for ReportingService.ListJobs. class ListJobsResponse include Google::Apis::Core::Hashable @@ -225,18 +225,18 @@ module Google # @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 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] @@ -261,8 +261,8 @@ module Google # Update properties of this object def update!(**args) @create_time = args[:create_time] if args.key?(:create_time) - @expire_time = args[:expire_time] if args.key?(:expire_time) @report_type_id = args[:report_type_id] if args.key?(:report_type_id) + @expire_time = args[:expire_time] if args.key?(:expire_time) @name = args[:name] if args.key?(:name) @system_managed = args[:system_managed] if args.key?(:system_managed) @id = args[:id] if args.key?(:id) @@ -273,11 +273,6 @@ module Google class ListReportsResponse include Google::Apis::Core::Hashable - # The list of report types. - # Corresponds to the JSON property `reports` - # @return [Array] - attr_accessor :reports - # A token to retrieve next page of results. # Pass this value in the # ListReportsRequest.page_token @@ -287,14 +282,19 @@ module Google # @return [String] attr_accessor :next_page_token + # The list of report types. + # Corresponds to the JSON property `reports` + # @return [Array] + attr_accessor :reports + def initialize(**args) update!(**args) end # Update properties of this object def update!(**args) - @reports = args[:reports] if args.key?(:reports) @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @reports = args[:reports] if args.key?(:reports) end end end diff --git a/generated/google/apis/youtubereporting_v1/representations.rb b/generated/google/apis/youtubereporting_v1/representations.rb index ce2fb7334..b0a0a40c6 100644 --- a/generated/google/apis/youtubereporting_v1/representations.rb +++ b/generated/google/apis/youtubereporting_v1/representations.rb @@ -28,6 +28,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class ReportType + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Report class Representation < Google::Apis::Core::JsonRepresentation; end @@ -46,12 +52,6 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class ReportType - class Representation < Google::Apis::Core::JsonRepresentation; end - - include Google::Apis::Core::JsonObjectSupport - end - class ListJobsResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -77,16 +77,26 @@ module Google end end + class ReportType + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :deprecate_time, as: 'deprecateTime' + property :name, as: 'name' + property :id, as: 'id' + property :system_managed, as: 'systemManaged' + end + end + class Report # @private class Representation < Google::Apis::Core::JsonRepresentation + property :job_id, as: 'jobId' property :id, as: 'id' - property :job_expire_time, as: 'jobExpireTime' property :end_time, as: 'endTime' + property :job_expire_time, as: 'jobExpireTime' property :download_url, as: 'downloadUrl' property :start_time, as: 'startTime' property :create_time, as: 'createTime' - property :job_id, as: 'jobId' end end @@ -105,16 +115,6 @@ module Google end end - class ReportType - # @private - class Representation < Google::Apis::Core::JsonRepresentation - property :deprecate_time, as: 'deprecateTime' - property :name, as: 'name' - property :id, as: 'id' - property :system_managed, as: 'systemManaged' - end - end - class ListJobsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -128,8 +128,8 @@ module Google # @private class Representation < Google::Apis::Core::JsonRepresentation property :create_time, as: 'createTime' - property :expire_time, as: 'expireTime' property :report_type_id, as: 'reportTypeId' + property :expire_time, as: 'expireTime' property :name, as: 'name' property :system_managed, as: 'systemManaged' property :id, as: 'id' @@ -139,9 +139,9 @@ module Google 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 - property :next_page_token, as: 'nextPageToken' end end end diff --git a/generated/google/apis/youtubereporting_v1/service.rb b/generated/google/apis/youtubereporting_v1/service.rb index f1b0c15cb..6bb1df4bb 100644 --- a/generated/google/apis/youtubereporting_v1/service.rb +++ b/generated/google/apis/youtubereporting_v1/service.rb @@ -33,30 +33,76 @@ module Google # # @see https://developers.google.com/youtube/reporting/v1/reports/ class YouTubeReportingService < Google::Apis::Core::BaseService - # @return [String] - # API key. Your API key identifies your project and provides you with API access, - # quota, and reports. Required unless you provide an OAuth 2.0 token. - attr_accessor :key - # @return [String] # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. attr_accessor :quota_user + # @return [String] + # API key. Your API key identifies your project and provides you with API access, + # quota, and reports. Required unless you provide an OAuth 2.0 token. + attr_accessor :key + def initialize super('https://youtubereporting.googleapis.com/', '') end + # Lists report types. + # @param [Fixnum] page_size + # Requested page size. Server may return fewer report types than requested. + # If unspecified, server will pick an appropriate default. + # @param [String] on_behalf_of_content_owner + # The content owner's external ID on which behalf the user is acting on. If + # not set, the user is acting for himself (his own channel). + # @param [String] page_token + # A token identifying a page of results the server should return. Typically, + # this is the value of + # ListReportTypesResponse.next_page_token + # returned in response to the previous call to the `ListReportTypes` method. + # @param [Boolean] include_system_managed + # If set to true, also system-managed report types will be returned; + # otherwise only the report types that can be used to create new reporting + # jobs will be returned. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::YoutubereportingV1::ListReportTypesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::YoutubereportingV1::ListReportTypesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_report_types(page_size: nil, on_behalf_of_content_owner: nil, page_token: nil, include_system_managed: nil, quota_user: nil, fields: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/reportTypes', options) + command.response_representation = Google::Apis::YoutubereportingV1::ListReportTypesResponse::Representation + command.response_class = Google::Apis::YoutubereportingV1::ListReportTypesResponse + command.query['pageSize'] = page_size unless page_size.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['includeSystemManaged'] = include_system_managed unless include_system_managed.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + # Method for media download. Download is supported # on the URI `/v1/media/`+name`?alt=media`. # @param [String] resource_name # Name of the media that is being downloaded. See # ReadRequest.resource_name. - # @param [String] fields - # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include in a partial response. # @param [IO, String] download_dest # IO stream or filename to receive content download # @param [Google::Apis::RequestOptions] options @@ -71,7 +117,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, fields: nil, quota_user: nil, download_dest: nil, options: nil, &block) + def download_medium(resource_name, quota_user: nil, fields: nil, download_dest: nil, options: nil, &block) if download_dest.nil? command = make_simple_command(:get, 'v1/media/{+resourceName}', options) else @@ -81,122 +127,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['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Lists jobs. - # @param [String] on_behalf_of_content_owner - # The content owner's external ID on which behalf the user is acting on. If - # not set, the user is acting for himself (his own channel). - # @param [String] page_token - # A token identifying a page of results the server should return. Typically, - # this is the value of - # ListReportTypesResponse.next_page_token - # returned in response to the previous call to the `ListJobs` method. - # @param [Boolean] include_system_managed - # If set to true, also system-managed jobs will be returned; otherwise only - # user-created jobs will be returned. System-managed jobs can neither be - # modified nor deleted. - # @param [Fixnum] page_size - # Requested page size. Server may return fewer jobs than requested. - # If unspecified, server will pick an appropriate default. - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::YoutubereportingV1::ListJobsResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::YoutubereportingV1::ListJobsResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_jobs(on_behalf_of_content_owner: nil, page_token: nil, include_system_managed: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/jobs', options) - command.response_representation = Google::Apis::YoutubereportingV1::ListJobsResponse::Representation - command.response_class = Google::Apis::YoutubereportingV1::ListJobsResponse - command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? - command.query['pageToken'] = page_token unless page_token.nil? - command.query['includeSystemManaged'] = include_system_managed unless include_system_managed.nil? - command.query['pageSize'] = page_size unless page_size.nil? command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Gets a job. - # @param [String] job_id - # The ID of the job to retrieve. - # @param [String] on_behalf_of_content_owner - # The content owner's external ID on which behalf the user is acting on. If - # not set, the user is acting for himself (his own channel). - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::YoutubereportingV1::Job] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::YoutubereportingV1::Job] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_job(job_id, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/jobs/{jobId}', options) - command.response_representation = Google::Apis::YoutubereportingV1::Job::Representation - command.response_class = Google::Apis::YoutubereportingV1::Job - command.params['jobId'] = job_id unless job_id.nil? - command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Creates a job and returns it. - # @param [Google::Apis::YoutubereportingV1::Job] job_object - # @param [String] on_behalf_of_content_owner - # The content owner's external ID on which behalf the user is acting on. If - # not set, the user is acting for himself (his own channel). - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::YoutubereportingV1::Job] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::YoutubereportingV1::Job] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def create_job(job_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'v1/jobs', options) - command.request_representation = Google::Apis::YoutubereportingV1::Job::Representation - command.request_object = job_object - command.response_representation = Google::Apis::YoutubereportingV1::Job::Representation - command.response_class = Google::Apis::YoutubereportingV1::Job - command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? - command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end @@ -206,11 +138,11 @@ module Google # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -223,14 +155,128 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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) + 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['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['fields'] = fields unless fields.nil? + execute_or_queue_command(command, &block) + end + + # Lists jobs. + # @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] 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 [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [String] fields + # Selector specifying which fields to include 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, on_behalf_of_content_owner: nil, page_token: nil, include_system_managed: 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['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['includeSystemManaged'] = include_system_managed unless include_system_managed.nil? + command.query['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 + + # 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 @@ -257,11 +303,11 @@ module Google # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -274,7 +320,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_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) + 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, 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 @@ -285,8 +331,8 @@ module Google 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? + command.query['fields'] = fields unless fields.nil? execute_or_queue_command(command, &block) end @@ -298,11 +344,11 @@ module Google # @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 [String] fields + # Selector specifying which fields to include in a partial response. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -315,69 +361,23 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @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) + 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['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? - execute_or_queue_command(command, &block) - end - - # Lists report types. - # @param [String] page_token - # A token identifying a page of results the server should return. Typically, - # this is the value of - # ListReportTypesResponse.next_page_token - # returned in response to the previous call to the `ListReportTypes` method. - # @param [Boolean] include_system_managed - # If set to true, also system-managed report types will be returned; - # otherwise only the report types that can be used to create new reporting - # jobs will be returned. - # @param [Fixnum] page_size - # Requested page size. Server may return fewer report types than requested. - # If unspecified, server will pick an appropriate default. - # @param [String] on_behalf_of_content_owner - # The content owner's external ID on which behalf the user is acting on. If - # not set, the user is acting for himself (his own channel). - # @param [String] fields - # Selector specifying which fields to include in a partial response. - # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. - # @param [Google::Apis::RequestOptions] options - # Request-specific options - # - # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::YoutubereportingV1::ListReportTypesResponse] parsed result object - # @yieldparam err [StandardError] error object if request failed - # - # @return [Google::Apis::YoutubereportingV1::ListReportTypesResponse] - # - # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried - # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification - # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_report_types(page_token: nil, include_system_managed: nil, page_size: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'v1/reportTypes', options) - command.response_representation = Google::Apis::YoutubereportingV1::ListReportTypesResponse::Representation - command.response_class = Google::Apis::YoutubereportingV1::ListReportTypesResponse - command.query['pageToken'] = page_token unless page_token.nil? - command.query['includeSystemManaged'] = include_system_managed unless include_system_managed.nil? - command.query['pageSize'] = page_size unless page_size.nil? - command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? command.query['fields'] = fields unless fields.nil? - command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end protected def apply_command_defaults(command) - command.query['key'] = key unless key.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['key'] = key unless key.nil? end end end diff --git a/lib/google/apis/version.rb b/lib/google/apis/version.rb index 6f55079f0..d0a0868f0 100644 --- a/lib/google/apis/version.rb +++ b/lib/google/apis/version.rb @@ -15,7 +15,7 @@ module Google module Apis # Client library version - VERSION = '0.10.1' + VERSION = '0.10.2' # Current operating system # @private