From e0d837f35d5a18740958131e06ae10cb56f341ab Mon Sep 17 00:00:00 2001 From: Google APIs Date: Wed, 4 Oct 2017 00:35:08 +0000 Subject: [PATCH] Autogenerated update (2017-10-04) Update: - androidenterprise_v1 - bigquerydatatransfer_v1 - identitytoolkit_v3 - ml_v1 - proximitybeacon_v1beta1 --- api_names_out.yaml | 336 +++ generated/google/apis/androidenterprise_v1.rb | 2 +- .../apis/androidenterprise_v1/classes.rb | 63 + .../androidenterprise_v1/representations.rb | 18 + .../google/apis/bigquerydatatransfer_v1.rb | 2 +- .../apis/bigquerydatatransfer_v1/classes.rb | 78 +- generated/google/apis/firestore_v1beta1.rb | 37 + .../google/apis/firestore_v1beta1/classes.rb | 2115 +++++++++++++++++ .../apis/firestore_v1beta1/representations.rb | 899 +++++++ .../google/apis/firestore_v1beta1/service.rb | 734 ++++++ generated/google/apis/identitytoolkit_v3.rb | 2 +- .../google/apis/identitytoolkit_v3/classes.rb | 93 + .../identitytoolkit_v3/representations.rb | 35 + .../google/apis/identitytoolkit_v3/service.rb | 35 + generated/google/apis/ml_v1.rb | 2 +- generated/google/apis/ml_v1/service.rb | 102 + .../google/apis/proximitybeacon_v1beta1.rb | 2 +- .../apis/proximitybeacon_v1beta1/classes.rb | 17 + .../representations.rb | 1 + 19 files changed, 4518 insertions(+), 55 deletions(-) create mode 100644 generated/google/apis/firestore_v1beta1.rb create mode 100644 generated/google/apis/firestore_v1beta1/classes.rb create mode 100644 generated/google/apis/firestore_v1beta1/representations.rb create mode 100644 generated/google/apis/firestore_v1beta1/service.rb diff --git a/api_names_out.yaml b/api_names_out.yaml index 5ceee274c..160cc296f 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -5043,6 +5043,7 @@ "/androidenterprise:v1/AppUpdateEvent": app_update_event "/androidenterprise:v1/AppUpdateEvent/productId": product_id "/androidenterprise:v1/AppVersion": app_version +"/androidenterprise:v1/AppVersion/track": track "/androidenterprise:v1/AppVersion/versionCode": version_code "/androidenterprise:v1/AppVersion/versionString": version_string "/androidenterprise:v1/ApprovalUrlInfo": approval_url_info @@ -5188,6 +5189,8 @@ "/androidenterprise:v1/Product/appVersion": app_version "/androidenterprise:v1/Product/appVersion/app_version": app_version "/androidenterprise:v1/Product/authorName": author_name +"/androidenterprise:v1/Product/availableTracks": available_tracks +"/androidenterprise:v1/Product/availableTracks/available_track": available_track "/androidenterprise:v1/Product/detailsUrl": details_url "/androidenterprise:v1/Product/distributionChannel": distribution_channel "/androidenterprise:v1/Product/iconUrl": icon_url @@ -5218,9 +5221,15 @@ "/androidenterprise:v1/ProductSet/productId": product_id "/androidenterprise:v1/ProductSet/productId/product_id": product_id "/androidenterprise:v1/ProductSet/productSetBehavior": product_set_behavior +"/androidenterprise:v1/ProductSet/productVisibility": product_visibility +"/androidenterprise:v1/ProductSet/productVisibility/product_visibility": product_visibility "/androidenterprise:v1/ProductSigningCertificate": product_signing_certificate "/androidenterprise:v1/ProductSigningCertificate/certificateHashSha1": certificate_hash_sha1 "/androidenterprise:v1/ProductSigningCertificate/certificateHashSha256": certificate_hash_sha256 +"/androidenterprise:v1/ProductVisibility": product_visibility +"/androidenterprise:v1/ProductVisibility/productId": product_id +"/androidenterprise:v1/ProductVisibility/tracks": tracks +"/androidenterprise:v1/ProductVisibility/tracks/track": track "/androidenterprise:v1/ProductsApproveRequest": approve_product_request "/androidenterprise:v1/ProductsApproveRequest/approvalUrlInfo": approval_url_info "/androidenterprise:v1/ProductsApproveRequest/approvedPermissions": approved_permissions @@ -40868,6 +40877,311 @@ "/firebaserules:v1/firebaserules.projects.test/name": name "/firebaserules:v1/key": key "/firebaserules:v1/quotaUser": quota_user +"/firestore:v1beta1/ArrayValue": array_value +"/firestore:v1beta1/ArrayValue/values": values +"/firestore:v1beta1/ArrayValue/values/value": value +"/firestore:v1beta1/BatchGetDocumentsRequest": batch_get_documents_request +"/firestore:v1beta1/BatchGetDocumentsRequest/documents": documents +"/firestore:v1beta1/BatchGetDocumentsRequest/documents/document": document +"/firestore:v1beta1/BatchGetDocumentsRequest/mask": mask +"/firestore:v1beta1/BatchGetDocumentsRequest/newTransaction": new_transaction +"/firestore:v1beta1/BatchGetDocumentsRequest/readTime": read_time +"/firestore:v1beta1/BatchGetDocumentsRequest/transaction": transaction +"/firestore:v1beta1/BatchGetDocumentsResponse": batch_get_documents_response +"/firestore:v1beta1/BatchGetDocumentsResponse/found": found +"/firestore:v1beta1/BatchGetDocumentsResponse/missing": missing +"/firestore:v1beta1/BatchGetDocumentsResponse/readTime": read_time +"/firestore:v1beta1/BatchGetDocumentsResponse/transaction": transaction +"/firestore:v1beta1/BeginTransactionRequest": begin_transaction_request +"/firestore:v1beta1/BeginTransactionRequest/options": options +"/firestore:v1beta1/BeginTransactionResponse": begin_transaction_response +"/firestore:v1beta1/BeginTransactionResponse/transaction": transaction +"/firestore:v1beta1/CollectionSelector": collection_selector +"/firestore:v1beta1/CollectionSelector/allDescendants": all_descendants +"/firestore:v1beta1/CollectionSelector/collectionId": collection_id +"/firestore:v1beta1/CommitRequest": commit_request +"/firestore:v1beta1/CommitRequest/transaction": transaction +"/firestore:v1beta1/CommitRequest/writes": writes +"/firestore:v1beta1/CommitRequest/writes/write": write +"/firestore:v1beta1/CommitResponse": commit_response +"/firestore:v1beta1/CommitResponse/commitTime": commit_time +"/firestore:v1beta1/CommitResponse/writeResults": write_results +"/firestore:v1beta1/CommitResponse/writeResults/write_result": write_result +"/firestore:v1beta1/CompositeFilter": composite_filter +"/firestore:v1beta1/CompositeFilter/filters": filters +"/firestore:v1beta1/CompositeFilter/filters/filter": filter +"/firestore:v1beta1/CompositeFilter/op": op +"/firestore:v1beta1/Cursor": cursor +"/firestore:v1beta1/Cursor/before": before +"/firestore:v1beta1/Cursor/values": values +"/firestore:v1beta1/Cursor/values/value": value +"/firestore:v1beta1/Document": document +"/firestore:v1beta1/Document/createTime": create_time +"/firestore:v1beta1/Document/fields": fields +"/firestore:v1beta1/Document/fields/field": field +"/firestore:v1beta1/Document/name": name +"/firestore:v1beta1/Document/updateTime": update_time +"/firestore:v1beta1/DocumentChange": document_change +"/firestore:v1beta1/DocumentChange/document": document +"/firestore:v1beta1/DocumentChange/removedTargetIds": removed_target_ids +"/firestore:v1beta1/DocumentChange/removedTargetIds/removed_target_id": removed_target_id +"/firestore:v1beta1/DocumentChange/targetIds": target_ids +"/firestore:v1beta1/DocumentChange/targetIds/target_id": target_id +"/firestore:v1beta1/DocumentDelete": document_delete +"/firestore:v1beta1/DocumentDelete/document": document +"/firestore:v1beta1/DocumentDelete/readTime": read_time +"/firestore:v1beta1/DocumentDelete/removedTargetIds": removed_target_ids +"/firestore:v1beta1/DocumentDelete/removedTargetIds/removed_target_id": removed_target_id +"/firestore:v1beta1/DocumentMask": document_mask +"/firestore:v1beta1/DocumentMask/fieldPaths": field_paths +"/firestore:v1beta1/DocumentMask/fieldPaths/field_path": field_path +"/firestore:v1beta1/DocumentRemove": document_remove +"/firestore:v1beta1/DocumentRemove/document": document +"/firestore:v1beta1/DocumentRemove/readTime": read_time +"/firestore:v1beta1/DocumentRemove/removedTargetIds": removed_target_ids +"/firestore:v1beta1/DocumentRemove/removedTargetIds/removed_target_id": removed_target_id +"/firestore:v1beta1/DocumentTransform": document_transform +"/firestore:v1beta1/DocumentTransform/document": document +"/firestore:v1beta1/DocumentTransform/fieldTransforms": field_transforms +"/firestore:v1beta1/DocumentTransform/fieldTransforms/field_transform": field_transform +"/firestore:v1beta1/DocumentsTarget": documents_target +"/firestore:v1beta1/DocumentsTarget/documents": documents +"/firestore:v1beta1/DocumentsTarget/documents/document": document +"/firestore:v1beta1/Empty": empty +"/firestore:v1beta1/ExistenceFilter": existence_filter +"/firestore:v1beta1/ExistenceFilter/count": count +"/firestore:v1beta1/ExistenceFilter/targetId": target_id +"/firestore:v1beta1/FieldFilter": field_filter +"/firestore:v1beta1/FieldFilter/field": field +"/firestore:v1beta1/FieldFilter/op": op +"/firestore:v1beta1/FieldFilter/value": value +"/firestore:v1beta1/FieldReference": field_reference +"/firestore:v1beta1/FieldReference/fieldPath": field_path +"/firestore:v1beta1/FieldTransform": field_transform +"/firestore:v1beta1/FieldTransform/fieldPath": field_path +"/firestore:v1beta1/FieldTransform/setToServerValue": set_to_server_value +"/firestore:v1beta1/Filter": filter +"/firestore:v1beta1/Filter/compositeFilter": composite_filter +"/firestore:v1beta1/Filter/fieldFilter": field_filter +"/firestore:v1beta1/Filter/unaryFilter": unary_filter +"/firestore:v1beta1/Index": index +"/firestore:v1beta1/Index/collectionId": collection_id +"/firestore:v1beta1/Index/fields": fields +"/firestore:v1beta1/Index/fields/field": field +"/firestore:v1beta1/Index/name": name +"/firestore:v1beta1/Index/state": state +"/firestore:v1beta1/IndexField": index_field +"/firestore:v1beta1/IndexField/fieldPath": field_path +"/firestore:v1beta1/IndexField/mode": mode +"/firestore:v1beta1/IndexOperationMetadata": index_operation_metadata +"/firestore:v1beta1/IndexOperationMetadata/cancelled": cancelled +"/firestore:v1beta1/IndexOperationMetadata/documentProgress": document_progress +"/firestore:v1beta1/IndexOperationMetadata/endTime": end_time +"/firestore:v1beta1/IndexOperationMetadata/index": index +"/firestore:v1beta1/IndexOperationMetadata/operationType": operation_type +"/firestore:v1beta1/IndexOperationMetadata/startTime": start_time +"/firestore:v1beta1/LatLng": lat_lng +"/firestore:v1beta1/LatLng/latitude": latitude +"/firestore:v1beta1/LatLng/longitude": longitude +"/firestore:v1beta1/ListCollectionIdsResponse": list_collection_ids_response +"/firestore:v1beta1/ListCollectionIdsResponse/collectionIds": collection_ids +"/firestore:v1beta1/ListCollectionIdsResponse/collectionIds/collection_id": collection_id +"/firestore:v1beta1/ListCollectionIdsResponse/nextPageToken": next_page_token +"/firestore:v1beta1/ListDocumentsResponse": list_documents_response +"/firestore:v1beta1/ListDocumentsResponse/documents": documents +"/firestore:v1beta1/ListDocumentsResponse/documents/document": document +"/firestore:v1beta1/ListDocumentsResponse/nextPageToken": next_page_token +"/firestore:v1beta1/ListIndexesResponse": list_indexes_response +"/firestore:v1beta1/ListIndexesResponse/indexes": indexes +"/firestore:v1beta1/ListIndexesResponse/indexes/index": index +"/firestore:v1beta1/ListIndexesResponse/nextPageToken": next_page_token +"/firestore:v1beta1/ListenRequest": listen_request +"/firestore:v1beta1/ListenRequest/addTarget": add_target +"/firestore:v1beta1/ListenRequest/labels": labels +"/firestore:v1beta1/ListenRequest/labels/label": label +"/firestore:v1beta1/ListenRequest/removeTarget": remove_target +"/firestore:v1beta1/ListenResponse": listen_response +"/firestore:v1beta1/ListenResponse/documentChange": document_change +"/firestore:v1beta1/ListenResponse/documentDelete": document_delete +"/firestore:v1beta1/ListenResponse/documentRemove": document_remove +"/firestore:v1beta1/ListenResponse/filter": filter +"/firestore:v1beta1/ListenResponse/targetChange": target_change +"/firestore:v1beta1/MapValue": map_value +"/firestore:v1beta1/MapValue/fields": fields +"/firestore:v1beta1/MapValue/fields/field": field +"/firestore:v1beta1/Operation": operation +"/firestore:v1beta1/Operation/done": done +"/firestore:v1beta1/Operation/error": error +"/firestore:v1beta1/Operation/metadata": metadata +"/firestore:v1beta1/Operation/metadata/metadatum": metadatum +"/firestore:v1beta1/Operation/name": name +"/firestore:v1beta1/Operation/response": response +"/firestore:v1beta1/Operation/response/response": response +"/firestore:v1beta1/Order": order +"/firestore:v1beta1/Order/direction": direction +"/firestore:v1beta1/Order/field": field +"/firestore:v1beta1/Precondition": precondition +"/firestore:v1beta1/Precondition/exists": exists +"/firestore:v1beta1/Precondition/updateTime": update_time +"/firestore:v1beta1/Progress": progress +"/firestore:v1beta1/Progress/workCompleted": work_completed +"/firestore:v1beta1/Progress/workEstimated": work_estimated +"/firestore:v1beta1/Projection": projection +"/firestore:v1beta1/Projection/fields": fields +"/firestore:v1beta1/Projection/fields/field": field +"/firestore:v1beta1/QueryTarget": query_target +"/firestore:v1beta1/QueryTarget/parent": parent +"/firestore:v1beta1/QueryTarget/structuredQuery": structured_query +"/firestore:v1beta1/ReadOnly": read_only +"/firestore:v1beta1/ReadOnly/readTime": read_time +"/firestore:v1beta1/ReadWrite": read_write +"/firestore:v1beta1/ReadWrite/retryTransaction": retry_transaction +"/firestore:v1beta1/RollbackRequest": rollback_request +"/firestore:v1beta1/RollbackRequest/transaction": transaction +"/firestore:v1beta1/RunQueryRequest": run_query_request +"/firestore:v1beta1/RunQueryRequest/newTransaction": new_transaction +"/firestore:v1beta1/RunQueryRequest/readTime": read_time +"/firestore:v1beta1/RunQueryRequest/structuredQuery": structured_query +"/firestore:v1beta1/RunQueryRequest/transaction": transaction +"/firestore:v1beta1/RunQueryResponse": run_query_response +"/firestore:v1beta1/RunQueryResponse/document": document +"/firestore:v1beta1/RunQueryResponse/readTime": read_time +"/firestore:v1beta1/RunQueryResponse/skippedResults": skipped_results +"/firestore:v1beta1/RunQueryResponse/transaction": transaction +"/firestore:v1beta1/Status": status +"/firestore:v1beta1/Status/code": code +"/firestore:v1beta1/Status/details": details +"/firestore:v1beta1/Status/details/detail": detail +"/firestore:v1beta1/Status/details/detail/detail": detail +"/firestore:v1beta1/Status/message": message +"/firestore:v1beta1/StructuredQuery": structured_query +"/firestore:v1beta1/StructuredQuery/endAt": end_at +"/firestore:v1beta1/StructuredQuery/from": from +"/firestore:v1beta1/StructuredQuery/from/from": from +"/firestore:v1beta1/StructuredQuery/limit": limit +"/firestore:v1beta1/StructuredQuery/offset": offset +"/firestore:v1beta1/StructuredQuery/orderBy": order_by +"/firestore:v1beta1/StructuredQuery/orderBy/order_by": order_by +"/firestore:v1beta1/StructuredQuery/select": select +"/firestore:v1beta1/StructuredQuery/startAt": start_at +"/firestore:v1beta1/StructuredQuery/where": where +"/firestore:v1beta1/Target": target +"/firestore:v1beta1/Target/documents": documents +"/firestore:v1beta1/Target/once": once +"/firestore:v1beta1/Target/query": query +"/firestore:v1beta1/Target/readTime": read_time +"/firestore:v1beta1/Target/resumeToken": resume_token +"/firestore:v1beta1/Target/targetId": target_id +"/firestore:v1beta1/TargetChange": target_change +"/firestore:v1beta1/TargetChange/cause": cause +"/firestore:v1beta1/TargetChange/readTime": read_time +"/firestore:v1beta1/TargetChange/resumeToken": resume_token +"/firestore:v1beta1/TargetChange/targetChangeType": target_change_type +"/firestore:v1beta1/TargetChange/targetIds": target_ids +"/firestore:v1beta1/TargetChange/targetIds/target_id": target_id +"/firestore:v1beta1/TransactionOptions": transaction_options +"/firestore:v1beta1/TransactionOptions/readOnly": read_only +"/firestore:v1beta1/TransactionOptions/readWrite": read_write +"/firestore:v1beta1/UnaryFilter": unary_filter +"/firestore:v1beta1/UnaryFilter/field": field +"/firestore:v1beta1/UnaryFilter/op": op +"/firestore:v1beta1/Value": value +"/firestore:v1beta1/Value/arrayValue": array_value +"/firestore:v1beta1/Value/booleanValue": boolean_value +"/firestore:v1beta1/Value/bytesValue": bytes_value +"/firestore:v1beta1/Value/doubleValue": double_value +"/firestore:v1beta1/Value/geoPointValue": geo_point_value +"/firestore:v1beta1/Value/integerValue": integer_value +"/firestore:v1beta1/Value/mapValue": map_value +"/firestore:v1beta1/Value/nullValue": null_value +"/firestore:v1beta1/Value/referenceValue": reference_value +"/firestore:v1beta1/Value/stringValue": string_value +"/firestore:v1beta1/Value/timestampValue": timestamp_value +"/firestore:v1beta1/Write": write +"/firestore:v1beta1/Write/currentDocument": current_document +"/firestore:v1beta1/Write/delete": delete +"/firestore:v1beta1/Write/transform": transform +"/firestore:v1beta1/Write/update": update +"/firestore:v1beta1/Write/updateMask": update_mask +"/firestore:v1beta1/WriteRequest": write_request +"/firestore:v1beta1/WriteRequest/labels": labels +"/firestore:v1beta1/WriteRequest/labels/label": label +"/firestore:v1beta1/WriteRequest/streamId": stream_id +"/firestore:v1beta1/WriteRequest/streamToken": stream_token +"/firestore:v1beta1/WriteRequest/writes": writes +"/firestore:v1beta1/WriteRequest/writes/write": write +"/firestore:v1beta1/WriteResponse": write_response +"/firestore:v1beta1/WriteResponse/commitTime": commit_time +"/firestore:v1beta1/WriteResponse/streamId": stream_id +"/firestore:v1beta1/WriteResponse/streamToken": stream_token +"/firestore:v1beta1/WriteResponse/writeResults": write_results +"/firestore:v1beta1/WriteResponse/writeResults/write_result": write_result +"/firestore:v1beta1/WriteResult": write_result +"/firestore:v1beta1/WriteResult/transformResults": transform_results +"/firestore:v1beta1/WriteResult/transformResults/transform_result": transform_result +"/firestore:v1beta1/WriteResult/updateTime": update_time +"/firestore:v1beta1/fields": fields +"/firestore:v1beta1/firestore.projects.databases.documents.batchGet": batch_get_documents +"/firestore:v1beta1/firestore.projects.databases.documents.batchGet/database": database +"/firestore:v1beta1/firestore.projects.databases.documents.beginTransaction": begin_document_transaction +"/firestore:v1beta1/firestore.projects.databases.documents.beginTransaction/database": database +"/firestore:v1beta1/firestore.projects.databases.documents.commit": commit_document +"/firestore:v1beta1/firestore.projects.databases.documents.commit/database": database +"/firestore:v1beta1/firestore.projects.databases.documents.createDocument": create_project_database_document_document +"/firestore:v1beta1/firestore.projects.databases.documents.createDocument/collectionId": collection_id +"/firestore:v1beta1/firestore.projects.databases.documents.createDocument/documentId": document_id +"/firestore:v1beta1/firestore.projects.databases.documents.createDocument/mask.fieldPaths": mask_field_paths +"/firestore:v1beta1/firestore.projects.databases.documents.createDocument/parent": parent +"/firestore:v1beta1/firestore.projects.databases.documents.delete": delete_project_database_document +"/firestore:v1beta1/firestore.projects.databases.documents.delete/currentDocument.exists": current_document_exists +"/firestore:v1beta1/firestore.projects.databases.documents.delete/currentDocument.updateTime": current_document_update_time +"/firestore:v1beta1/firestore.projects.databases.documents.delete/name": name +"/firestore:v1beta1/firestore.projects.databases.documents.get": get_project_database_document +"/firestore:v1beta1/firestore.projects.databases.documents.get/mask.fieldPaths": mask_field_paths +"/firestore:v1beta1/firestore.projects.databases.documents.get/name": name +"/firestore:v1beta1/firestore.projects.databases.documents.get/readTime": read_time +"/firestore:v1beta1/firestore.projects.databases.documents.get/transaction": transaction +"/firestore:v1beta1/firestore.projects.databases.documents.list": list_project_database_documents +"/firestore:v1beta1/firestore.projects.databases.documents.list/collectionId": collection_id +"/firestore:v1beta1/firestore.projects.databases.documents.list/mask.fieldPaths": mask_field_paths +"/firestore:v1beta1/firestore.projects.databases.documents.list/orderBy": order_by +"/firestore:v1beta1/firestore.projects.databases.documents.list/pageSize": page_size +"/firestore:v1beta1/firestore.projects.databases.documents.list/pageToken": page_token +"/firestore:v1beta1/firestore.projects.databases.documents.list/parent": parent +"/firestore:v1beta1/firestore.projects.databases.documents.list/readTime": read_time +"/firestore:v1beta1/firestore.projects.databases.documents.list/showMissing": show_missing +"/firestore:v1beta1/firestore.projects.databases.documents.list/transaction": transaction +"/firestore:v1beta1/firestore.projects.databases.documents.listCollectionIds": list_project_database_document_collection_ids +"/firestore:v1beta1/firestore.projects.databases.documents.listCollectionIds/pageSize": page_size +"/firestore:v1beta1/firestore.projects.databases.documents.listCollectionIds/pageToken": page_token +"/firestore:v1beta1/firestore.projects.databases.documents.listCollectionIds/parent": parent +"/firestore:v1beta1/firestore.projects.databases.documents.listen": listen_document +"/firestore:v1beta1/firestore.projects.databases.documents.listen/database": database +"/firestore:v1beta1/firestore.projects.databases.documents.patch": patch_project_database_document +"/firestore:v1beta1/firestore.projects.databases.documents.patch/currentDocument.exists": current_document_exists +"/firestore:v1beta1/firestore.projects.databases.documents.patch/currentDocument.updateTime": current_document_update_time +"/firestore:v1beta1/firestore.projects.databases.documents.patch/mask.fieldPaths": mask_field_paths +"/firestore:v1beta1/firestore.projects.databases.documents.patch/name": name +"/firestore:v1beta1/firestore.projects.databases.documents.patch/updateMask.fieldPaths": update_mask_field_paths +"/firestore:v1beta1/firestore.projects.databases.documents.rollback": rollback_document +"/firestore:v1beta1/firestore.projects.databases.documents.rollback/database": database +"/firestore:v1beta1/firestore.projects.databases.documents.runQuery": run_document_query +"/firestore:v1beta1/firestore.projects.databases.documents.runQuery/parent": parent +"/firestore:v1beta1/firestore.projects.databases.documents.write": write_document +"/firestore:v1beta1/firestore.projects.databases.documents.write/database": database +"/firestore:v1beta1/firestore.projects.databases.indexes.create": create_project_database_index +"/firestore:v1beta1/firestore.projects.databases.indexes.create/parent": parent +"/firestore:v1beta1/firestore.projects.databases.indexes.delete": delete_project_database_index +"/firestore:v1beta1/firestore.projects.databases.indexes.delete/name": name +"/firestore:v1beta1/firestore.projects.databases.indexes.get": get_project_database_index +"/firestore:v1beta1/firestore.projects.databases.indexes.get/name": name +"/firestore:v1beta1/firestore.projects.databases.indexes.list": list_project_database_indexes +"/firestore:v1beta1/firestore.projects.databases.indexes.list/filter": filter +"/firestore:v1beta1/firestore.projects.databases.indexes.list/pageSize": page_size +"/firestore:v1beta1/firestore.projects.databases.indexes.list/pageToken": page_token +"/firestore:v1beta1/firestore.projects.databases.indexes.list/parent": parent +"/firestore:v1beta1/key": key +"/firestore:v1beta1/quotaUser": quota_user "/fitness:v1/AggregateBucket": aggregate_bucket "/fitness:v1/AggregateBucket/activity": activity "/fitness:v1/AggregateBucket/dataset": dataset @@ -44072,6 +44386,8 @@ "/identitytoolkit:v3/CreateAuthUriResponse/providerId": provider_id "/identitytoolkit:v3/CreateAuthUriResponse/registered": registered "/identitytoolkit:v3/CreateAuthUriResponse/sessionId": session_id +"/identitytoolkit:v3/CreateAuthUriResponse/signinMethods": signin_methods +"/identitytoolkit:v3/CreateAuthUriResponse/signinMethods/signin_method": signin_method "/identitytoolkit:v3/DeleteAccountResponse": delete_account_response "/identitytoolkit:v3/DeleteAccountResponse/kind": kind "/identitytoolkit:v3/DownloadAccountResponse": download_account_response @@ -44079,6 +44395,14 @@ "/identitytoolkit:v3/DownloadAccountResponse/nextPageToken": next_page_token "/identitytoolkit:v3/DownloadAccountResponse/users": users "/identitytoolkit:v3/DownloadAccountResponse/users/user": user +"/identitytoolkit:v3/EmailLinkSigninResponse": email_link_signin_response +"/identitytoolkit:v3/EmailLinkSigninResponse/email": email +"/identitytoolkit:v3/EmailLinkSigninResponse/expiresIn": expires_in +"/identitytoolkit:v3/EmailLinkSigninResponse/idToken": id_token +"/identitytoolkit:v3/EmailLinkSigninResponse/isNewUser": is_new_user +"/identitytoolkit:v3/EmailLinkSigninResponse/kind": kind +"/identitytoolkit:v3/EmailLinkSigninResponse/localId": local_id +"/identitytoolkit:v3/EmailLinkSigninResponse/refreshToken": refresh_token "/identitytoolkit:v3/EmailTemplate": email_template "/identitytoolkit:v3/EmailTemplate/body": body "/identitytoolkit:v3/EmailTemplate/format": format @@ -44123,6 +44447,10 @@ "/identitytoolkit:v3/IdentitytoolkitRelyingpartyDownloadAccountRequest/maxResults": max_results "/identitytoolkit:v3/IdentitytoolkitRelyingpartyDownloadAccountRequest/nextPageToken": next_page_token "/identitytoolkit:v3/IdentitytoolkitRelyingpartyDownloadAccountRequest/targetProjectId": target_project_id +"/identitytoolkit:v3/IdentitytoolkitRelyingpartyEmailLinkSigninRequest": identitytoolkit_relyingparty_email_link_signin_request +"/identitytoolkit:v3/IdentitytoolkitRelyingpartyEmailLinkSigninRequest/email": email +"/identitytoolkit:v3/IdentitytoolkitRelyingpartyEmailLinkSigninRequest/idToken": id_token +"/identitytoolkit:v3/IdentitytoolkitRelyingpartyEmailLinkSigninRequest/oobCode": oob_code "/identitytoolkit:v3/IdentitytoolkitRelyingpartyGetAccountInfoRequest": get_account_info_request "/identitytoolkit:v3/IdentitytoolkitRelyingpartyGetAccountInfoRequest/delegatedProjectNumber": delegated_project_number "/identitytoolkit:v3/IdentitytoolkitRelyingpartyGetAccountInfoRequest/email": email @@ -44438,6 +44766,7 @@ "/identitytoolkit:v3/identitytoolkit.relyingparty.createAuthUri": create_auth_uri "/identitytoolkit:v3/identitytoolkit.relyingparty.deleteAccount": delete_account "/identitytoolkit:v3/identitytoolkit.relyingparty.downloadAccount": download_account +"/identitytoolkit:v3/identitytoolkit.relyingparty.emailLinkSignin": email_relyingparty_link_signin "/identitytoolkit:v3/identitytoolkit.relyingparty.getAccountInfo": get_account_info "/identitytoolkit:v3/identitytoolkit.relyingparty.getOobConfirmationCode": get_oob_confirmation_code "/identitytoolkit:v3/identitytoolkit.relyingparty.getProjectConfig": get_project_config @@ -46078,6 +46407,9 @@ "/ml:v1/ml.projects.models.list/pageSize": page_size "/ml:v1/ml.projects.models.list/pageToken": page_token "/ml:v1/ml.projects.models.list/parent": parent +"/ml:v1/ml.projects.models.patch": patch_project_model +"/ml:v1/ml.projects.models.patch/name": name +"/ml:v1/ml.projects.models.patch/updateMask": update_mask "/ml:v1/ml.projects.models.setIamPolicy": set_project_model_iam_policy "/ml:v1/ml.projects.models.setIamPolicy/resource": resource "/ml:v1/ml.projects.models.testIamPermissions": test_project_model_iam_permissions @@ -46092,6 +46424,9 @@ "/ml:v1/ml.projects.models.versions.list/pageSize": page_size "/ml:v1/ml.projects.models.versions.list/pageToken": page_token "/ml:v1/ml.projects.models.versions.list/parent": parent +"/ml:v1/ml.projects.models.versions.patch": patch_project_model_version +"/ml:v1/ml.projects.models.versions.patch/name": name +"/ml:v1/ml.projects.models.versions.patch/updateMask": update_mask "/ml:v1/ml.projects.models.versions.setDefault": set_project_model_version_default "/ml:v1/ml.projects.models.versions.setDefault/name": name "/ml:v1/ml.projects.operations.cancel": cancel_project_operation @@ -49315,6 +49650,7 @@ "/proximitybeacon:v1beta1/BeaconAttachment/attachmentName": attachment_name "/proximitybeacon:v1beta1/BeaconAttachment/creationTimeMs": creation_time_ms "/proximitybeacon:v1beta1/BeaconAttachment/data": data +"/proximitybeacon:v1beta1/BeaconAttachment/maxDistanceMeters": max_distance_meters "/proximitybeacon:v1beta1/BeaconAttachment/namespacedType": namespaced_type "/proximitybeacon:v1beta1/BeaconInfo": beacon_info "/proximitybeacon:v1beta1/BeaconInfo/advertisedId": advertised_id diff --git a/generated/google/apis/androidenterprise_v1.rb b/generated/google/apis/androidenterprise_v1.rb index def4302fd..5fc94f89b 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 = '20170911' + REVISION = '20170929' # 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 a401a6583..842d24ba1 100644 --- a/generated/google/apis/androidenterprise_v1/classes.rb +++ b/generated/google/apis/androidenterprise_v1/classes.rb @@ -323,6 +323,12 @@ module Google class AppVersion include Google::Apis::Core::Hashable + # The track that this app was published in. For example if track is "alpha", + # this is an alpha version of the app. + # Corresponds to the JSON property `track` + # @return [String] + attr_accessor :track + # Unique increasing identifier for the app version. # Corresponds to the JSON property `versionCode` # @return [Fixnum] @@ -341,6 +347,7 @@ module Google # Update properties of this object def update!(**args) + @track = args[:track] if args.key?(:track) @version_code = args[:version_code] if args.key?(:version_code) @version_string = args[:version_string] if args.key?(:version_string) end @@ -1471,6 +1478,11 @@ module Google # @return [String] attr_accessor :author_name + # The tracks that are visible to the enterprise. + # Corresponds to the JSON property `availableTracks` + # @return [Array] + attr_accessor :available_tracks + # A link to the (consumer) Google Play details page for the product. # Corresponds to the JSON property `detailsUrl` # @return [String] @@ -1547,6 +1559,7 @@ module Google def update!(**args) @app_version = args[:app_version] if args.key?(:app_version) @author_name = args[:author_name] if args.key?(:author_name) + @available_tracks = args[:available_tracks] if args.key?(:available_tracks) @details_url = args[:details_url] if args.key?(:details_url) @distribution_channel = args[:distribution_channel] if args.key?(:distribution_channel) @icon_url = args[:icon_url] if args.key?(:icon_url) @@ -1706,6 +1719,16 @@ module Google # @return [String] attr_accessor :product_set_behavior + # Other products that are part of the set, in addition to those specified in the + # productId array. The only difference between this field and the productId + # array is that it's possible to specify additional information about this + # product visibility, see ProductVisibility and its fields for more information. + # Specifying the same product ID both here and in the productId array is not + # allowed and it will result in an error. + # Corresponds to the JSON property `productVisibility` + # @return [Array] + attr_accessor :product_visibility + def initialize(**args) update!(**args) end @@ -1715,6 +1738,7 @@ module Google @kind = args[:kind] if args.key?(:kind) @product_id = args[:product_id] if args.key?(:product_id) @product_set_behavior = args[:product_set_behavior] if args.key?(:product_set_behavior) + @product_visibility = args[:product_visibility] if args.key?(:product_visibility) end end @@ -1745,6 +1769,45 @@ module Google end end + # A product to be made visible to a user. + class ProductVisibility + include Google::Apis::Core::Hashable + + # The product ID that should be made visible to the user. This is required. + # Corresponds to the JSON property `productId` + # @return [String] + attr_accessor :product_id + + # This allows to only grant visibility to the specified tracks of the app. For + # example, if an app has a prod version, a beta version and an alpha version and + # the enterprise has been granted visibility to both the alpha and beta tracks, + # if tracks is `"beta", "production"` the user will be able to install the app + # and they will get the beta version of the app. If there are no app versions in + # the specified track or if the enterprise wasn't granted visibility for the + # track, adding the "alpha" and "beta" values to the list of tracks will have no + # effect for now; however they will take effect once both conditions are met. + # Note that the enterprise itself needs to be granted access to the alpha and/or + # beta tracks, regardless of whether individual users or admins have access to + # those tracks. + # The allowed sets are: `` (considered equivalent to `"production"`) `" + # production"` `"beta", "production"` `"alpha", "beta", "production"` The order + # of elements is not relevant. Any other set of tracks will be rejected with an + # error. + # Corresponds to the JSON property `tracks` + # @return [Array] + attr_accessor :tracks + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @product_id = args[:product_id] if args.key?(:product_id) + @tracks = args[:tracks] if args.key?(:tracks) + end + end + # class ApproveProductRequest include Google::Apis::Core::Hashable diff --git a/generated/google/apis/androidenterprise_v1/representations.rb b/generated/google/apis/androidenterprise_v1/representations.rb index 287ad6e03..c7977ed49 100644 --- a/generated/google/apis/androidenterprise_v1/representations.rb +++ b/generated/google/apis/androidenterprise_v1/representations.rb @@ -298,6 +298,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class ProductVisibility + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ApproveProductRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -479,6 +485,7 @@ module Google class AppVersion # @private class Representation < Google::Apis::Core::JsonRepresentation + property :track, as: 'track' property :version_code, as: 'versionCode' property :version_string, as: 'versionString' end @@ -777,6 +784,7 @@ module Google collection :app_version, as: 'appVersion', class: Google::Apis::AndroidenterpriseV1::AppVersion, decorator: Google::Apis::AndroidenterpriseV1::AppVersion::Representation property :author_name, as: 'authorName' + collection :available_tracks, as: 'availableTracks' property :details_url, as: 'detailsUrl' property :distribution_channel, as: 'distributionChannel' property :icon_url, as: 'iconUrl' @@ -832,6 +840,8 @@ module Google property :kind, as: 'kind' collection :product_id, as: 'productId' property :product_set_behavior, as: 'productSetBehavior' + collection :product_visibility, as: 'productVisibility', class: Google::Apis::AndroidenterpriseV1::ProductVisibility, decorator: Google::Apis::AndroidenterpriseV1::ProductVisibility::Representation + end end @@ -843,6 +853,14 @@ module Google end end + class ProductVisibility + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :product_id, as: 'productId' + collection :tracks, as: 'tracks' + end + end + class ApproveProductRequest # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/bigquerydatatransfer_v1.rb b/generated/google/apis/bigquerydatatransfer_v1.rb index 9c6619403..27f79182f 100644 --- a/generated/google/apis/bigquerydatatransfer_v1.rb +++ b/generated/google/apis/bigquerydatatransfer_v1.rb @@ -26,7 +26,7 @@ module Google # @see https://cloud.google.com/bigquery/ module BigquerydatatransferV1 VERSION = 'V1' - REVISION = '20170925' + REVISION = '20171002' # View and manage your data in Google BigQuery AUTH_BIGQUERY = 'https://www.googleapis.com/auth/bigquery' diff --git a/generated/google/apis/bigquerydatatransfer_v1/classes.rb b/generated/google/apis/bigquerydatatransfer_v1/classes.rb index c265b8cd0..514445125 100644 --- a/generated/google/apis/bigquerydatatransfer_v1/classes.rb +++ b/generated/google/apis/bigquerydatatransfer_v1/classes.rb @@ -346,11 +346,10 @@ module Google # @return [Array] attr_accessor :data_sources - # The next-pagination token. For multiple-page list results, + # Output only. The next-pagination token. For multiple-page list results, # this token can be used as the # `ListDataSourcesRequest.page_token` # to request the next page of list results. - # Output only. # Corresponds to the JSON property `nextPageToken` # @return [String] attr_accessor :next_page_token @@ -395,17 +394,15 @@ module Google class ListTransferConfigsResponse include Google::Apis::Core::Hashable - # The next-pagination token. For multiple-page list results, + # Output only. The next-pagination token. For multiple-page list results, # this token can be used as the # `ListTransferConfigsRequest.page_token` # to request the next page of list results. - # Output only. # Corresponds to the JSON property `nextPageToken` # @return [String] attr_accessor :next_page_token - # The stored pipeline transfer configurations. - # Output only. + # Output only. The stored pipeline transfer configurations. # Corresponds to the JSON property `transferConfigs` # @return [Array] attr_accessor :transfer_configs @@ -425,17 +422,15 @@ module Google class ListTransferLogsResponse include Google::Apis::Core::Hashable - # The next-pagination token. For multiple-page list results, + # Output only. The next-pagination token. For multiple-page list results, # this token can be used as the # `GetTransferRunLogRequest.page_token` # to request the next page of list results. - # Output only. # Corresponds to the JSON property `nextPageToken` # @return [String] attr_accessor :next_page_token - # The stored pipeline transfer messages. - # Output only. + # Output only. The stored pipeline transfer messages. # Corresponds to the JSON property `transferMessages` # @return [Array] attr_accessor :transfer_messages @@ -455,17 +450,15 @@ module Google class ListTransferRunsResponse include Google::Apis::Core::Hashable - # The next-pagination token. For multiple-page list results, + # Output only. The next-pagination token. For multiple-page list results, # this token can be used as the # `ListTransferRunsRequest.page_token` # to request the next page of list results. - # Output only. # Corresponds to the JSON property `nextPageToken` # @return [String] attr_accessor :next_page_token - # The stored pipeline transfer runs. - # Output only. + # Output only. The stored pipeline transfer runs. # Corresponds to the JSON property `transferRuns` # @return [Array] attr_accessor :transfer_runs @@ -591,9 +584,7 @@ module Google # @return [String] attr_accessor :data_source_id - # Region in which BigQuery dataset is located. Currently possible values are: - # "US" and "EU". - # Output only. + # Output only. Region in which BigQuery dataset is located. # Corresponds to the JSON property `datasetRegion` # @return [String] attr_accessor :dataset_region @@ -625,8 +616,7 @@ module Google # @return [String] attr_accessor :name - # Next time when data transfer will run. - # Output only. + # Output only. Next time when data transfer will run. # Corresponds to the JSON property `nextRunTime` # @return [String] attr_accessor :next_run_time @@ -653,22 +643,19 @@ module Google # @return [String] attr_accessor :schedule - # State of the most recently updated transfer run. - # Output only. + # Output only. State of the most recently updated transfer run. # Corresponds to the JSON property `state` # @return [String] attr_accessor :state - # Data transfer modification time. Ignored by server on input. - # Output only. + # Output only. Data transfer modification time. Ignored by server on input. # Corresponds to the JSON property `updateTime` # @return [String] attr_accessor :update_time - # Unique ID of the user on whose behalf transfer is done. Applicable only - # to data sources that do not support service accounts. When set to 0, - # the data source service account credentials are used. - # Output only. + # Output only. Unique ID of the user on whose behalf transfer is done. + # Applicable only to data sources that do not support service accounts. + # When set to 0, the data source service account credentials are used. # Corresponds to the JSON property `userId` # @return [Fixnum] attr_accessor :user_id @@ -730,15 +717,12 @@ module Google class TransferRun include Google::Apis::Core::Hashable - # Data source id. - # Output only. + # Output only. Data source id. # Corresponds to the JSON property `dataSourceId` # @return [String] attr_accessor :data_source_id - # Region in which BigQuery dataset is located. Currently possible values are: - # "US" and "EU". - # Output only. + # Output only. Region in which BigQuery dataset is located. # Corresponds to the JSON property `datasetRegion` # @return [String] attr_accessor :dataset_region @@ -748,9 +732,8 @@ module Google # @return [String] attr_accessor :destination_dataset_id - # Time when transfer run ended. Parameter ignored by server for input - # requests. - # Output only. + # Output only. Time when transfer run ended. + # Parameter ignored by server for input requests. # Corresponds to the JSON property `endTime` # @return [String] attr_accessor :end_time @@ -775,12 +758,11 @@ module Google # @return [String] attr_accessor :run_time - # Describes the schedule of this transfer run if it was created as part of - # a regular schedule. For batch transfer runs that are directly created, - # this is empty. + # Output only. Describes the schedule of this transfer run if it was + # created as part of a regular schedule. For batch transfer runs that are + # scheduled manually, this is empty. # NOTE: the system might choose to delay the schedule depending on the # current load, so `schedule_time` doesn't always matches this. - # Output only. # Corresponds to the JSON property `schedule` # @return [String] attr_accessor :schedule @@ -790,29 +772,25 @@ module Google # @return [String] attr_accessor :schedule_time - # Time when transfer run was started. Parameter ignored by server for input - # requests. - # Output only. + # Output only. Time when transfer run was started. + # Parameter ignored by server for input requests. # Corresponds to the JSON property `startTime` # @return [String] attr_accessor :start_time - # Data transfer run state. Ignored for input requests. - # Output only. + # Output only. Data transfer run state. Ignored for input requests. # Corresponds to the JSON property `state` # @return [String] attr_accessor :state - # Last time the data transfer run state was updated. - # Output only. + # Output only. Last time the data transfer run state was updated. # Corresponds to the JSON property `updateTime` # @return [String] attr_accessor :update_time - # Unique ID of the user on whose behalf transfer is done. Applicable only - # to data sources that do not support service accounts. When set to 0, - # the data source service account credentials are used. - # Output only. + # Output only. Unique ID of the user on whose behalf transfer is done. + # Applicable only to data sources that do not support service accounts. + # When set to 0, the data source service account credentials are used. # Corresponds to the JSON property `userId` # @return [Fixnum] attr_accessor :user_id diff --git a/generated/google/apis/firestore_v1beta1.rb b/generated/google/apis/firestore_v1beta1.rb new file mode 100644 index 000000000..867172d31 --- /dev/null +++ b/generated/google/apis/firestore_v1beta1.rb @@ -0,0 +1,37 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/firestore_v1beta1/service.rb' +require 'google/apis/firestore_v1beta1/classes.rb' +require 'google/apis/firestore_v1beta1/representations.rb' + +module Google + module Apis + # Google Cloud Firestore API + # + # + # + # @see https://cloud.google.com/firestore + module FirestoreV1beta1 + VERSION = 'V1beta1' + REVISION = '0' + + # View and manage your data across Google Cloud Platform services + AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' + + # View and manage your Google Cloud Datastore data + AUTH_DATASTORE = 'https://www.googleapis.com/auth/datastore' + end + end +end diff --git a/generated/google/apis/firestore_v1beta1/classes.rb b/generated/google/apis/firestore_v1beta1/classes.rb new file mode 100644 index 000000000..91fca0f26 --- /dev/null +++ b/generated/google/apis/firestore_v1beta1/classes.rb @@ -0,0 +1,2115 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module FirestoreV1beta1 + + # An array value. + class ArrayValue + include Google::Apis::Core::Hashable + + # Values in the array. + # 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 request for Firestore.BatchGetDocuments. + class BatchGetDocumentsRequest + include Google::Apis::Core::Hashable + + # The names of the documents to retrieve. In the format: + # `projects/`project_id`/databases/`database_id`/documents/`document_path``. + # The request will fail if any of the document is not a child resource of the + # given `database`. Duplicate names will be elided. + # Corresponds to the JSON property `documents` + # @return [Array] + attr_accessor :documents + + # A set of field paths on a document. + # Used to restrict a get or update operation on a document to a subset of its + # fields. + # This is different from standard field masks, as this is always scoped to a + # Document, and takes in account the dynamic nature of Value. + # Corresponds to the JSON property `mask` + # @return [Google::Apis::FirestoreV1beta1::DocumentMask] + attr_accessor :mask + + # Options for creating a new transaction. + # Corresponds to the JSON property `newTransaction` + # @return [Google::Apis::FirestoreV1beta1::TransactionOptions] + attr_accessor :new_transaction + + # Reads documents as they were at the given time. + # This may not be older than 60 seconds. + # Corresponds to the JSON property `readTime` + # @return [String] + attr_accessor :read_time + + # Reads documents in a transaction. + # Corresponds to the JSON property `transaction` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :transaction + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @documents = args[:documents] if args.key?(:documents) + @mask = args[:mask] if args.key?(:mask) + @new_transaction = args[:new_transaction] if args.key?(:new_transaction) + @read_time = args[:read_time] if args.key?(:read_time) + @transaction = args[:transaction] if args.key?(:transaction) + end + end + + # The streamed response for Firestore.BatchGetDocuments. + class BatchGetDocumentsResponse + include Google::Apis::Core::Hashable + + # A Firestore document. + # Must not exceed 1 MiB - 4 bytes. + # Corresponds to the JSON property `found` + # @return [Google::Apis::FirestoreV1beta1::Document] + attr_accessor :found + + # A document name that was requested but does not exist. In the format: + # `projects/`project_id`/databases/`database_id`/documents/`document_path``. + # Corresponds to the JSON property `missing` + # @return [String] + attr_accessor :missing + + # The time at which the document was read. + # This may be monotically increasing, in this case the previous documents in + # the result stream are guaranteed not to have changed between their + # read_time and this one. + # Corresponds to the JSON property `readTime` + # @return [String] + attr_accessor :read_time + + # The transaction that was started as part of this request. + # Will only be set in the first response, and only if + # BatchGetDocumentsRequest.new_transaction was set in the request. + # Corresponds to the JSON property `transaction` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :transaction + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @found = args[:found] if args.key?(:found) + @missing = args[:missing] if args.key?(:missing) + @read_time = args[:read_time] if args.key?(:read_time) + @transaction = args[:transaction] if args.key?(:transaction) + end + end + + # The request for Firestore.BeginTransaction. + class BeginTransactionRequest + include Google::Apis::Core::Hashable + + # Options for creating a new transaction. + # Corresponds to the JSON property `options` + # @return [Google::Apis::FirestoreV1beta1::TransactionOptions] + attr_accessor :options + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @options = args[:options] if args.key?(:options) + end + end + + # The response for Firestore.BeginTransaction. + class BeginTransactionResponse + include Google::Apis::Core::Hashable + + # The transaction that was started. + # Corresponds to the JSON property `transaction` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :transaction + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @transaction = args[:transaction] if args.key?(:transaction) + end + end + + # A selection of a collection, such as `messages as m1`. + class CollectionSelector + include Google::Apis::Core::Hashable + + # When false, selects only collections that are immediate children of + # the `parent` specified in the containing `RunQueryRequest`. + # When true, selects all descendant collections. + # Corresponds to the JSON property `allDescendants` + # @return [Boolean] + attr_accessor :all_descendants + alias_method :all_descendants?, :all_descendants + + # The collection ID. + # When set, selects only collections with this ID. + # Corresponds to the JSON property `collectionId` + # @return [String] + attr_accessor :collection_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @all_descendants = args[:all_descendants] if args.key?(:all_descendants) + @collection_id = args[:collection_id] if args.key?(:collection_id) + end + end + + # The request for Firestore.Commit. + class CommitRequest + include Google::Apis::Core::Hashable + + # If non-empty, applies all writes in this transaction, and commits it. + # Otherwise, applies the writes as if they were in their own transaction. + # Corresponds to the JSON property `transaction` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :transaction + + # The writes to apply. + # Always executed atomically and in order. + # Corresponds to the JSON property `writes` + # @return [Array] + attr_accessor :writes + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @transaction = args[:transaction] if args.key?(:transaction) + @writes = args[:writes] if args.key?(:writes) + end + end + + # The response for Firestore.Commit. + class CommitResponse + include Google::Apis::Core::Hashable + + # The time at which the commit occurred. + # Corresponds to the JSON property `commitTime` + # @return [String] + attr_accessor :commit_time + + # The result of applying the writes. + # This i-th write result corresponds to the i-th write in the + # request. + # Corresponds to the JSON property `writeResults` + # @return [Array] + attr_accessor :write_results + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @commit_time = args[:commit_time] if args.key?(:commit_time) + @write_results = args[:write_results] if args.key?(:write_results) + end + end + + # A filter that merges multiple other filters using the given operator. + class CompositeFilter + include Google::Apis::Core::Hashable + + # The list of filters to combine. + # Must contain at least one filter. + # Corresponds to the JSON property `filters` + # @return [Array] + attr_accessor :filters + + # The operator for combining multiple filters. + # Corresponds to the JSON property `op` + # @return [String] + attr_accessor :op + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @filters = args[:filters] if args.key?(:filters) + @op = args[:op] if args.key?(:op) + end + end + + # A position in a query result set. + class Cursor + include Google::Apis::Core::Hashable + + # If the position is just before or just after the given values, relative + # to the sort order defined by the query. + # Corresponds to the JSON property `before` + # @return [Boolean] + attr_accessor :before + alias_method :before?, :before + + # The values that represent a position, in the order they appear in + # the order by clause of a query. + # Can contain fewer values than specified in the order by clause. + # 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) + @before = args[:before] if args.key?(:before) + @values = args[:values] if args.key?(:values) + end + end + + # A Firestore document. + # Must not exceed 1 MiB - 4 bytes. + class Document + include Google::Apis::Core::Hashable + + # Output only. The time at which the document was created. + # This value increases monotonically when a document is deleted then + # recreated. It can also be compared to values from other documents and + # the `read_time` of a query. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # The document's fields. + # The map keys represent field names. + # A simple field name contains only characters `a` to `z`, `A` to `Z`, + # `0` to `9`, or `_`, and must not start with `0` to `9` or `_`. For example, + # `foo_bar_17`. + # Field names matching the regular expression `__.*__` are reserved. Reserved + # field names are forbidden except in certain documented contexts. The map + # keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be + # empty. + # Field paths may be used in other contexts to refer to structured fields + # defined here. For `map_value`, the field path is represented by the simple + # or quoted field names of the containing fields, delimited by `.`. For + # example, the structured field + # `"foo" : ` map_value: ` "x&y" : ` string_value: "hello" ```` would be + # represented by the field path `foo.x&y`. + # Within a field path, a quoted field name starts and ends with `` ` `` and + # may contain any character. Some characters, including `` ` ``, must be + # escaped using a `\`. For example, `` `x&y` `` represents `x&y` and + # `` `bak\`tik` `` represents `` bak`tik ``. + # Corresponds to the JSON property `fields` + # @return [Hash] + attr_accessor :fields + + # The resource name of the document, for example + # `projects/`project_id`/databases/`database_id`/documents/`document_path``. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Output only. The time at which the document was last changed. + # This value is initally set to the `create_time` then increases + # monotonically with each change to the document. It can also be + # compared to values from other documents and the `read_time` of a query. + # 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) + @create_time = args[:create_time] if args.key?(:create_time) + @fields = args[:fields] if args.key?(:fields) + @name = args[:name] if args.key?(:name) + @update_time = args[:update_time] if args.key?(:update_time) + end + end + + # A Document has changed. + # May be the result of multiple writes, including deletes, that + # ultimately resulted in a new value for the Document. + # Multiple DocumentChange messages may be returned for the same logical + # change, if multiple targets are affected. + class DocumentChange + include Google::Apis::Core::Hashable + + # A Firestore document. + # Must not exceed 1 MiB - 4 bytes. + # Corresponds to the JSON property `document` + # @return [Google::Apis::FirestoreV1beta1::Document] + attr_accessor :document + + # A set of target IDs for targets that no longer match this document. + # Corresponds to the JSON property `removedTargetIds` + # @return [Array] + attr_accessor :removed_target_ids + + # A set of target IDs of targets that match this document. + # Corresponds to the JSON property `targetIds` + # @return [Array] + attr_accessor :target_ids + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @document = args[:document] if args.key?(:document) + @removed_target_ids = args[:removed_target_ids] if args.key?(:removed_target_ids) + @target_ids = args[:target_ids] if args.key?(:target_ids) + end + end + + # A Document has been deleted. + # May be the result of multiple writes, including updates, the + # last of which deleted the Document. + # Multiple DocumentDelete messages may be returned for the same logical + # delete, if multiple targets are affected. + class DocumentDelete + include Google::Apis::Core::Hashable + + # The resource name of the Document that was deleted. + # Corresponds to the JSON property `document` + # @return [String] + attr_accessor :document + + # The read timestamp at which the delete was observed. + # Greater or equal to the `commit_time` of the delete. + # Corresponds to the JSON property `readTime` + # @return [String] + attr_accessor :read_time + + # A set of target IDs for targets that previously matched this entity. + # Corresponds to the JSON property `removedTargetIds` + # @return [Array] + attr_accessor :removed_target_ids + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @document = args[:document] if args.key?(:document) + @read_time = args[:read_time] if args.key?(:read_time) + @removed_target_ids = args[:removed_target_ids] if args.key?(:removed_target_ids) + end + end + + # A set of field paths on a document. + # Used to restrict a get or update operation on a document to a subset of its + # fields. + # This is different from standard field masks, as this is always scoped to a + # Document, and takes in account the dynamic nature of Value. + class DocumentMask + include Google::Apis::Core::Hashable + + # The list of field paths in the mask. See Document.fields for a field + # path syntax reference. + # Corresponds to the JSON property `fieldPaths` + # @return [Array] + attr_accessor :field_paths + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @field_paths = args[:field_paths] if args.key?(:field_paths) + end + end + + # A Document has been removed from the view of the targets. + # Sent if the document is no longer relevant to a target and is out of view. + # Can be sent instead of a DocumentDelete or a DocumentChange if the server + # can not send the new value of the document. + # Multiple DocumentRemove messages may be returned for the same logical + # write or delete, if multiple targets are affected. + class DocumentRemove + include Google::Apis::Core::Hashable + + # The resource name of the Document that has gone out of view. + # Corresponds to the JSON property `document` + # @return [String] + attr_accessor :document + + # The read timestamp at which the remove was observed. + # Greater or equal to the `commit_time` of the change/delete/remove. + # Corresponds to the JSON property `readTime` + # @return [String] + attr_accessor :read_time + + # A set of target IDs for targets that previously matched this document. + # Corresponds to the JSON property `removedTargetIds` + # @return [Array] + attr_accessor :removed_target_ids + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @document = args[:document] if args.key?(:document) + @read_time = args[:read_time] if args.key?(:read_time) + @removed_target_ids = args[:removed_target_ids] if args.key?(:removed_target_ids) + end + end + + # A transformation of a document. + class DocumentTransform + include Google::Apis::Core::Hashable + + # The name of the document to transform. + # Corresponds to the JSON property `document` + # @return [String] + attr_accessor :document + + # The list of transformations to apply to the fields of the document, in + # order. + # Corresponds to the JSON property `fieldTransforms` + # @return [Array] + attr_accessor :field_transforms + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @document = args[:document] if args.key?(:document) + @field_transforms = args[:field_transforms] if args.key?(:field_transforms) + end + end + + # A target specified by a set of documents names. + class DocumentsTarget + include Google::Apis::Core::Hashable + + # The names of the documents to retrieve. In the format: + # `projects/`project_id`/databases/`database_id`/documents/`document_path``. + # The request will fail if any of the document is not a child resource of + # the given `database`. Duplicate names will be elided. + # Corresponds to the JSON property `documents` + # @return [Array] + attr_accessor :documents + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @documents = args[:documents] if args.key?(:documents) + 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 digest of all the documents that match a given target. + class ExistenceFilter + include Google::Apis::Core::Hashable + + # The total count of documents that match target_id. + # If different from the count of documents in the client that match, the + # client must manually determine which documents no longer match the target. + # Corresponds to the JSON property `count` + # @return [Fixnum] + attr_accessor :count + + # The target ID to which this filter applies. + # Corresponds to the JSON property `targetId` + # @return [Fixnum] + attr_accessor :target_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @count = args[:count] if args.key?(:count) + @target_id = args[:target_id] if args.key?(:target_id) + end + end + + # A filter on a specific field. + class FieldFilter + include Google::Apis::Core::Hashable + + # A reference to a field, such as `max(messages.time) as max_time`. + # Corresponds to the JSON property `field` + # @return [Google::Apis::FirestoreV1beta1::FieldReference] + attr_accessor :field + + # The operator to filter by. + # Corresponds to the JSON property `op` + # @return [String] + attr_accessor :op + + # A message that can hold any of the supported value types. + # Corresponds to the JSON property `value` + # @return [Google::Apis::FirestoreV1beta1::Value] + attr_accessor :value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @field = args[:field] if args.key?(:field) + @op = args[:op] if args.key?(:op) + @value = args[:value] if args.key?(:value) + end + end + + # A reference to a field, such as `max(messages.time) as max_time`. + class FieldReference + include Google::Apis::Core::Hashable + + # + # Corresponds to the JSON property `fieldPath` + # @return [String] + attr_accessor :field_path + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @field_path = args[:field_path] if args.key?(:field_path) + end + end + + # A transformation of a field of the document. + class FieldTransform + include Google::Apis::Core::Hashable + + # The path of the field. See Document.fields for the field path syntax + # reference. + # Corresponds to the JSON property `fieldPath` + # @return [String] + attr_accessor :field_path + + # Sets the field to the given server value. + # Corresponds to the JSON property `setToServerValue` + # @return [String] + attr_accessor :set_to_server_value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @field_path = args[:field_path] if args.key?(:field_path) + @set_to_server_value = args[:set_to_server_value] if args.key?(:set_to_server_value) + end + end + + # A filter. + class Filter + include Google::Apis::Core::Hashable + + # A filter that merges multiple other filters using the given operator. + # Corresponds to the JSON property `compositeFilter` + # @return [Google::Apis::FirestoreV1beta1::CompositeFilter] + attr_accessor :composite_filter + + # A filter on a specific field. + # Corresponds to the JSON property `fieldFilter` + # @return [Google::Apis::FirestoreV1beta1::FieldFilter] + attr_accessor :field_filter + + # A filter with a single operand. + # Corresponds to the JSON property `unaryFilter` + # @return [Google::Apis::FirestoreV1beta1::UnaryFilter] + attr_accessor :unary_filter + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @composite_filter = args[:composite_filter] if args.key?(:composite_filter) + @field_filter = args[:field_filter] if args.key?(:field_filter) + @unary_filter = args[:unary_filter] if args.key?(:unary_filter) + end + end + + # An index definition. + class Index + include Google::Apis::Core::Hashable + + # The collection ID to which this index applies. Required. + # Corresponds to the JSON property `collectionId` + # @return [String] + attr_accessor :collection_id + + # The fields to index. + # Corresponds to the JSON property `fields` + # @return [Array] + attr_accessor :fields + + # The resource name of the index. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The state of the index. + # The state is read-only. + # @OutputOnly + # 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) + @collection_id = args[:collection_id] if args.key?(:collection_id) + @fields = args[:fields] if args.key?(:fields) + @name = args[:name] if args.key?(:name) + @state = args[:state] if args.key?(:state) + end + end + + # A field of an index. + class IndexField + include Google::Apis::Core::Hashable + + # The path of the field. Must match the field path specification described + # by google.firestore.v1beta1.Document.fields. + # Special field path `__name__` may be used by itself or at the end of a + # path. `__type__` may be used only at the end of path. + # Corresponds to the JSON property `fieldPath` + # @return [String] + attr_accessor :field_path + + # The field's mode. + # Corresponds to the JSON property `mode` + # @return [String] + attr_accessor :mode + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @field_path = args[:field_path] if args.key?(:field_path) + @mode = args[:mode] if args.key?(:mode) + end + end + + # Metadata for index operations. This metadata populates + # the metadata field of google.longrunning.Operation. + class IndexOperationMetadata + include Google::Apis::Core::Hashable + + # True if the [google.longrunning.Operation] was cancelled. If the + # cancellation is in progress, cancelled will be true but + # google.longrunning.Operation.done will be false. + # Corresponds to the JSON property `cancelled` + # @return [Boolean] + attr_accessor :cancelled + alias_method :cancelled?, :cancelled + + # Measures the progress of a particular metric. + # Corresponds to the JSON property `documentProgress` + # @return [Google::Apis::FirestoreV1beta1::Progress] + attr_accessor :document_progress + + # The time the operation ended, either successfully or otherwise. Unset if + # the operation is still active. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # The index resource that this operation is acting on. For example: + # `projects/`project_id`/databases/`database_id`/indexes/`index_id`` + # Corresponds to the JSON property `index` + # @return [String] + attr_accessor :index + + # The type of index operation. + # Corresponds to the JSON property `operationType` + # @return [String] + attr_accessor :operation_type + + # The time that work began on the operation. + # Corresponds to the JSON property `startTime` + # @return [String] + attr_accessor :start_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @cancelled = args[:cancelled] if args.key?(:cancelled) + @document_progress = args[:document_progress] if args.key?(:document_progress) + @end_time = args[:end_time] if args.key?(:end_time) + @index = args[:index] if args.key?(:index) + @operation_type = args[:operation_type] if args.key?(:operation_type) + @start_time = args[:start_time] if args.key?(:start_time) + end + end + + # An object representing a latitude/longitude pair. This is expressed as a pair + # of doubles representing degrees latitude and degrees longitude. Unless + # specified otherwise, this must conform to the + # WGS84 + # standard. Values must be within normalized ranges. + # Example of normalization code in Python: + # def NormalizeLongitude(longitude): + # """Wraps decimal degrees longitude to [-180.0, 180.0].""" + # q, r = divmod(longitude, 360.0) + # if r > 180.0 or (r == 180.0 and q <= -1.0): + # return r - 360.0 + # return r + # def NormalizeLatLng(latitude, longitude): + # """Wraps decimal degrees latitude and longitude to + # [-90.0, 90.0] and [-180.0, 180.0], respectively.""" + # r = latitude % 360.0 + # if r <= 90.0: + # return r, NormalizeLongitude(longitude) + # elif r >= 270.0: + # return r - 360, NormalizeLongitude(longitude) + # else: + # return 180 - r, NormalizeLongitude(longitude + 180.0) + # assert 180.0 == NormalizeLongitude(180.0) + # assert -180.0 == NormalizeLongitude(-180.0) + # assert -179.0 == NormalizeLongitude(181.0) + # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) + # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) + # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) + # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) + # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) + # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) + # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) + # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) + # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) + # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) + class LatLng + include Google::Apis::Core::Hashable + + # The latitude in degrees. It must be in the range [-90.0, +90.0]. + # Corresponds to the JSON property `latitude` + # @return [Float] + attr_accessor :latitude + + # The longitude in degrees. It must be in the range [-180.0, +180.0]. + # Corresponds to the JSON property `longitude` + # @return [Float] + attr_accessor :longitude + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @latitude = args[:latitude] if args.key?(:latitude) + @longitude = args[:longitude] if args.key?(:longitude) + end + end + + # The response from Firestore.ListCollectionIds. + class ListCollectionIdsResponse + include Google::Apis::Core::Hashable + + # The collection ids. + # Corresponds to the JSON property `collectionIds` + # @return [Array] + attr_accessor :collection_ids + + # A page token that may be used to continue 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) + @collection_ids = args[:collection_ids] if args.key?(:collection_ids) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # The response for Firestore.ListDocuments. + class ListDocumentsResponse + include Google::Apis::Core::Hashable + + # The Documents found. + # Corresponds to the JSON property `documents` + # @return [Array] + attr_accessor :documents + + # The 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) + @documents = args[:documents] if args.key?(:documents) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # The response for FirestoreAdmin.ListIndexes. + class ListIndexesResponse + include Google::Apis::Core::Hashable + + # The indexes. + # Corresponds to the JSON property `indexes` + # @return [Array] + attr_accessor :indexes + + # 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) + @indexes = args[:indexes] if args.key?(:indexes) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # A request for Firestore.Listen + class ListenRequest + include Google::Apis::Core::Hashable + + # A specification of a set of documents to listen to. + # Corresponds to the JSON property `addTarget` + # @return [Google::Apis::FirestoreV1beta1::Target] + attr_accessor :add_target + + # Labels associated with this target change. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # The ID of a target to remove from this stream. + # Corresponds to the JSON property `removeTarget` + # @return [Fixnum] + attr_accessor :remove_target + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @add_target = args[:add_target] if args.key?(:add_target) + @labels = args[:labels] if args.key?(:labels) + @remove_target = args[:remove_target] if args.key?(:remove_target) + end + end + + # The response for Firestore.Listen. + class ListenResponse + include Google::Apis::Core::Hashable + + # A Document has changed. + # May be the result of multiple writes, including deletes, that + # ultimately resulted in a new value for the Document. + # Multiple DocumentChange messages may be returned for the same logical + # change, if multiple targets are affected. + # Corresponds to the JSON property `documentChange` + # @return [Google::Apis::FirestoreV1beta1::DocumentChange] + attr_accessor :document_change + + # A Document has been deleted. + # May be the result of multiple writes, including updates, the + # last of which deleted the Document. + # Multiple DocumentDelete messages may be returned for the same logical + # delete, if multiple targets are affected. + # Corresponds to the JSON property `documentDelete` + # @return [Google::Apis::FirestoreV1beta1::DocumentDelete] + attr_accessor :document_delete + + # A Document has been removed from the view of the targets. + # Sent if the document is no longer relevant to a target and is out of view. + # Can be sent instead of a DocumentDelete or a DocumentChange if the server + # can not send the new value of the document. + # Multiple DocumentRemove messages may be returned for the same logical + # write or delete, if multiple targets are affected. + # Corresponds to the JSON property `documentRemove` + # @return [Google::Apis::FirestoreV1beta1::DocumentRemove] + attr_accessor :document_remove + + # A digest of all the documents that match a given target. + # Corresponds to the JSON property `filter` + # @return [Google::Apis::FirestoreV1beta1::ExistenceFilter] + attr_accessor :filter + + # Targets being watched have changed. + # Corresponds to the JSON property `targetChange` + # @return [Google::Apis::FirestoreV1beta1::TargetChange] + attr_accessor :target_change + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @document_change = args[:document_change] if args.key?(:document_change) + @document_delete = args[:document_delete] if args.key?(:document_delete) + @document_remove = args[:document_remove] if args.key?(:document_remove) + @filter = args[:filter] if args.key?(:filter) + @target_change = args[:target_change] if args.key?(:target_change) + end + end + + # A map value. + class MapValue + include Google::Apis::Core::Hashable + + # The map's fields. + # The map keys represent field names. Field names matching the regular + # expression `__.*__` are reserved. Reserved field names are forbidden except + # in certain documented contexts. The map keys, represented as UTF-8, must + # not exceed 1,500 bytes and cannot be empty. + # Corresponds to the JSON property `fields` + # @return [Hash] + attr_accessor :fields + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @fields = args[:fields] if args.key?(:fields) + end + end + + # This resource represents a long-running operation that is the result of a + # network API call. + class Operation + include Google::Apis::Core::Hashable + + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # Corresponds to the JSON property `done` + # @return [Boolean] + attr_accessor :done + alias_method :done?, :done + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` that can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + # Corresponds to the JSON property `error` + # @return [Google::Apis::FirestoreV1beta1::Status] + attr_accessor :error + + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # Corresponds to the JSON property `metadata` + # @return [Hash] + attr_accessor :metadata + + # 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 normal response of the operation in case of success. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # Corresponds to the JSON property `response` + # @return [Hash] + attr_accessor :response + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @done = args[:done] if args.key?(:done) + @error = args[:error] if args.key?(:error) + @metadata = args[:metadata] if args.key?(:metadata) + @name = args[:name] if args.key?(:name) + @response = args[:response] if args.key?(:response) + end + end + + # An order on a field. + class Order + include Google::Apis::Core::Hashable + + # The direction to order by. Defaults to `ASCENDING`. + # Corresponds to the JSON property `direction` + # @return [String] + attr_accessor :direction + + # A reference to a field, such as `max(messages.time) as max_time`. + # Corresponds to the JSON property `field` + # @return [Google::Apis::FirestoreV1beta1::FieldReference] + attr_accessor :field + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @direction = args[:direction] if args.key?(:direction) + @field = args[:field] if args.key?(:field) + end + end + + # A precondition on a document, used for conditional operations. + class Precondition + include Google::Apis::Core::Hashable + + # When set to `true`, the target document must exist. + # When set to `false`, the target document must not exist. + # Corresponds to the JSON property `exists` + # @return [Boolean] + attr_accessor :exists + alias_method :exists?, :exists + + # When set, the target document must exist and have been last updated at + # that time. + # 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) + @exists = args[:exists] if args.key?(:exists) + @update_time = args[:update_time] if args.key?(:update_time) + end + end + + # Measures the progress of a particular metric. + class Progress + include Google::Apis::Core::Hashable + + # An estimate of how much work has been completed. Note that this may be + # greater than `work_estimated`. + # Corresponds to the JSON property `workCompleted` + # @return [Fixnum] + attr_accessor :work_completed + + # An estimate of how much work needs to be performed. Zero if the + # work estimate is unavailable. May change as work progresses. + # Corresponds to the JSON property `workEstimated` + # @return [Fixnum] + attr_accessor :work_estimated + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @work_completed = args[:work_completed] if args.key?(:work_completed) + @work_estimated = args[:work_estimated] if args.key?(:work_estimated) + end + end + + # The projection of document's fields to return. + class Projection + include Google::Apis::Core::Hashable + + # The fields to return. + # If empty, all fields are returned. To only return the name + # of the document, use `['__name__']`. + # Corresponds to the JSON property `fields` + # @return [Array] + attr_accessor :fields + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @fields = args[:fields] if args.key?(:fields) + end + end + + # A target specified by a query. + class QueryTarget + include Google::Apis::Core::Hashable + + # The parent resource name. In the format: + # `projects/`project_id`/databases/`database_id`/documents` or + # `projects/`project_id`/databases/`database_id`/documents/`document_path``. + # For example: + # `projects/my-project/databases/my-database/documents` or + # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + # Corresponds to the JSON property `parent` + # @return [String] + attr_accessor :parent + + # A Firestore query. + # Corresponds to the JSON property `structuredQuery` + # @return [Google::Apis::FirestoreV1beta1::StructuredQuery] + attr_accessor :structured_query + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @parent = args[:parent] if args.key?(:parent) + @structured_query = args[:structured_query] if args.key?(:structured_query) + end + end + + # Options for a transaction that can only be used to read documents. + class ReadOnly + include Google::Apis::Core::Hashable + + # Reads documents at the given time. + # This may not be older than 60 seconds. + # Corresponds to the JSON property `readTime` + # @return [String] + attr_accessor :read_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @read_time = args[:read_time] if args.key?(:read_time) + end + end + + # Options for a transaction that can be used to read and write documents. + class ReadWrite + include Google::Apis::Core::Hashable + + # An optional transaction to retry. + # Corresponds to the JSON property `retryTransaction` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :retry_transaction + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @retry_transaction = args[:retry_transaction] if args.key?(:retry_transaction) + end + end + + # The request for Firestore.Rollback. + class RollbackRequest + include Google::Apis::Core::Hashable + + # The transaction to roll back. + # Corresponds to the JSON property `transaction` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :transaction + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @transaction = args[:transaction] if args.key?(:transaction) + end + end + + # The request for Firestore.RunQuery. + class RunQueryRequest + include Google::Apis::Core::Hashable + + # Options for creating a new transaction. + # Corresponds to the JSON property `newTransaction` + # @return [Google::Apis::FirestoreV1beta1::TransactionOptions] + attr_accessor :new_transaction + + # Reads documents as they were at the given time. + # This may not be older than 60 seconds. + # Corresponds to the JSON property `readTime` + # @return [String] + attr_accessor :read_time + + # A Firestore query. + # Corresponds to the JSON property `structuredQuery` + # @return [Google::Apis::FirestoreV1beta1::StructuredQuery] + attr_accessor :structured_query + + # Reads documents in a transaction. + # Corresponds to the JSON property `transaction` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :transaction + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @new_transaction = args[:new_transaction] if args.key?(:new_transaction) + @read_time = args[:read_time] if args.key?(:read_time) + @structured_query = args[:structured_query] if args.key?(:structured_query) + @transaction = args[:transaction] if args.key?(:transaction) + end + end + + # The response for Firestore.RunQuery. + class RunQueryResponse + include Google::Apis::Core::Hashable + + # A Firestore document. + # Must not exceed 1 MiB - 4 bytes. + # Corresponds to the JSON property `document` + # @return [Google::Apis::FirestoreV1beta1::Document] + attr_accessor :document + + # The time at which the document was read. This may be monotonically + # increasing; in this case, the previous documents in the result stream are + # guaranteed not to have changed between their `read_time` and this one. + # If the query returns no results, a response with `read_time` and no + # `document` will be sent, and this represents the time at which the query + # was run. + # Corresponds to the JSON property `readTime` + # @return [String] + attr_accessor :read_time + + # The number of results that have been skipped due to an offset between + # the last response and the current response. + # Corresponds to the JSON property `skippedResults` + # @return [Fixnum] + attr_accessor :skipped_results + + # The transaction that was started as part of this request. + # Can only be set in the first response, and only if + # RunQueryRequest.new_transaction was set in the request. + # If set, no other fields will be set in this response. + # Corresponds to the JSON property `transaction` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :transaction + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @document = args[:document] if args.key?(:document) + @read_time = args[:read_time] if args.key?(:read_time) + @skipped_results = args[:skipped_results] if args.key?(:skipped_results) + @transaction = args[:transaction] if args.key?(:transaction) + end + end + + # The `Status` type defines a logical error model that is suitable for different + # programming environments, including REST APIs and RPC APIs. It is used by + # [gRPC](https://github.com/grpc). The error model is designed to be: + # - Simple to use and understand for most users + # - Flexible enough to meet unexpected needs + # # Overview + # The `Status` message contains three pieces of data: error code, error message, + # and error details. The error code should be an enum value of + # google.rpc.Code, but it may accept additional error codes if needed. The + # error message should be a developer-facing English message that helps + # developers *understand* and *resolve* the error. If a localized user-facing + # error message is needed, put the localized message in the error details or + # localize it in the client. The optional error details may contain arbitrary + # information about the error. There is a predefined set of error detail types + # in the package `google.rpc` that can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + class Status + include Google::Apis::Core::Hashable + + # The status code, which should be an enum value of google.rpc.Code. + # Corresponds to the JSON property `code` + # @return [Fixnum] + attr_accessor :code + + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + # Corresponds to the JSON property `details` + # @return [Array>] + attr_accessor :details + + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # google.rpc.Status.details field, or localized by the client. + # Corresponds to the JSON property `message` + # @return [String] + attr_accessor :message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @code = args[:code] if args.key?(:code) + @details = args[:details] if args.key?(:details) + @message = args[:message] if args.key?(:message) + end + end + + # A Firestore query. + class StructuredQuery + include Google::Apis::Core::Hashable + + # A position in a query result set. + # Corresponds to the JSON property `endAt` + # @return [Google::Apis::FirestoreV1beta1::Cursor] + attr_accessor :end_at + + # The collections to query. + # Corresponds to the JSON property `from` + # @return [Array] + attr_accessor :from + + # The maximum number of results to return. + # Applies after all other constraints. + # Must be >= 0 if specified. + # Corresponds to the JSON property `limit` + # @return [Fixnum] + attr_accessor :limit + + # The number of results to skip. + # Applies before limit, but after all other constraints. Must be >= 0 if + # specified. + # Corresponds to the JSON property `offset` + # @return [Fixnum] + attr_accessor :offset + + # The order to apply to the query results. + # Firestore guarantees a stable ordering through the following rules: + # * Any field required to appear in `order_by`, that is not already + # specified in `order_by`, is appended to the order in field name order + # by default. + # * If an order on `__name__` is not specified, it is appended by default. + # Fields are appended with the same sort direction as the last order + # specified, or 'ASCENDING' if no order was specified. For example: + # * `SELECT * FROM Foo ORDER BY A` becomes + # `SELECT * FROM Foo ORDER BY A, __name__` + # * `SELECT * FROM Foo ORDER BY A DESC` becomes + # `SELECT * FROM Foo ORDER BY A DESC, __name__ DESC` + # * `SELECT * FROM Foo WHERE A > 1` becomes + # `SELECT * FROM Foo WHERE A > 1 ORDER BY A, __name__` + # Corresponds to the JSON property `orderBy` + # @return [Array] + attr_accessor :order_by + + # The projection of document's fields to return. + # Corresponds to the JSON property `select` + # @return [Google::Apis::FirestoreV1beta1::Projection] + attr_accessor :select + + # A position in a query result set. + # Corresponds to the JSON property `startAt` + # @return [Google::Apis::FirestoreV1beta1::Cursor] + attr_accessor :start_at + + # A filter. + # Corresponds to the JSON property `where` + # @return [Google::Apis::FirestoreV1beta1::Filter] + attr_accessor :where + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @end_at = args[:end_at] if args.key?(:end_at) + @from = args[:from] if args.key?(:from) + @limit = args[:limit] if args.key?(:limit) + @offset = args[:offset] if args.key?(:offset) + @order_by = args[:order_by] if args.key?(:order_by) + @select = args[:select] if args.key?(:select) + @start_at = args[:start_at] if args.key?(:start_at) + @where = args[:where] if args.key?(:where) + end + end + + # A specification of a set of documents to listen to. + class Target + include Google::Apis::Core::Hashable + + # A target specified by a set of documents names. + # Corresponds to the JSON property `documents` + # @return [Google::Apis::FirestoreV1beta1::DocumentsTarget] + attr_accessor :documents + + # If the target should be removed once it is current and consistent. + # Corresponds to the JSON property `once` + # @return [Boolean] + attr_accessor :once + alias_method :once?, :once + + # A target specified by a query. + # Corresponds to the JSON property `query` + # @return [Google::Apis::FirestoreV1beta1::QueryTarget] + attr_accessor :query + + # Start listening after a specific `read_time`. + # The client must know the state of matching documents at this time. + # Corresponds to the JSON property `readTime` + # @return [String] + attr_accessor :read_time + + # A resume token from a prior TargetChange for an identical target. + # Using a resume token with a different target is unsupported and may fail. + # Corresponds to the JSON property `resumeToken` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :resume_token + + # A client provided target ID. + # If not set, the server will assign an ID for the target. + # Used for resuming a target without changing IDs. The IDs can either be + # client-assigned or be server-assigned in a previous stream. All targets + # with client provided IDs must be added before adding a target that needs + # a server-assigned id. + # Corresponds to the JSON property `targetId` + # @return [Fixnum] + attr_accessor :target_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @documents = args[:documents] if args.key?(:documents) + @once = args[:once] if args.key?(:once) + @query = args[:query] if args.key?(:query) + @read_time = args[:read_time] if args.key?(:read_time) + @resume_token = args[:resume_token] if args.key?(:resume_token) + @target_id = args[:target_id] if args.key?(:target_id) + end + end + + # Targets being watched have changed. + class TargetChange + 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` that can be used for common error conditions. + # # Language mapping + # The `Status` message is the logical representation of the error model, but it + # is not necessarily the actual wire format. When the `Status` message is + # exposed in different client libraries and different wire protocols, it can be + # mapped differently. For example, it will likely be mapped to some exceptions + # in Java, but more likely mapped to some error codes in C. + # # Other uses + # The error model and the `Status` message can be used in a variety of + # environments, either with or without APIs, to provide a + # consistent developer experience across different environments. + # Example uses of this error model include: + # - Partial errors. If a service needs to return partial errors to the client, + # it may embed the `Status` in the normal response to indicate the partial + # errors. + # - Workflow errors. A typical workflow has multiple steps. Each step may + # have a `Status` message for error reporting. + # - Batch operations. If a client uses batch request and batch response, the + # `Status` message should be used directly inside batch response, one for + # each error sub-response. + # - Asynchronous operations. If an API call embeds asynchronous operation + # results in its response, the status of those operations should be + # represented directly using the `Status` message. + # - Logging. If some API errors are stored in logs, the message `Status` could + # be used directly after any stripping needed for security/privacy reasons. + # Corresponds to the JSON property `cause` + # @return [Google::Apis::FirestoreV1beta1::Status] + attr_accessor :cause + + # The consistent `read_time` for the given `target_ids` (omitted when the + # target_ids are not at a consistent snapshot). + # The stream is guaranteed to send a `read_time` with `target_ids` empty + # whenever the entire stream reaches a new consistent snapshot. ADD, + # CURRENT, and RESET messages are guaranteed to (eventually) result in a + # new consistent snapshot (while NO_CHANGE and REMOVE messages are not). + # For a given stream, `read_time` is guaranteed to be monotonically + # increasing. + # Corresponds to the JSON property `readTime` + # @return [String] + attr_accessor :read_time + + # A token that can be used to resume the stream for the given `target_ids`, + # or all targets if `target_ids` is empty. + # Not set on every target change. + # Corresponds to the JSON property `resumeToken` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :resume_token + + # The type of change that occurred. + # Corresponds to the JSON property `targetChangeType` + # @return [String] + attr_accessor :target_change_type + + # The target IDs of targets that have changed. + # If empty, the change applies to all targets. + # For `target_change_type=ADD`, the order of the target IDs matches the order + # of the requests to add the targets. This allows clients to unambiguously + # associate server-assigned target IDs with added targets. + # For other states, the order of the target IDs is not defined. + # Corresponds to the JSON property `targetIds` + # @return [Array] + attr_accessor :target_ids + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @cause = args[:cause] if args.key?(:cause) + @read_time = args[:read_time] if args.key?(:read_time) + @resume_token = args[:resume_token] if args.key?(:resume_token) + @target_change_type = args[:target_change_type] if args.key?(:target_change_type) + @target_ids = args[:target_ids] if args.key?(:target_ids) + end + end + + # Options for creating a new transaction. + class TransactionOptions + include Google::Apis::Core::Hashable + + # Options for a transaction that can only be used to read documents. + # Corresponds to the JSON property `readOnly` + # @return [Google::Apis::FirestoreV1beta1::ReadOnly] + attr_accessor :read_only + + # Options for a transaction that can be used to read and write documents. + # Corresponds to the JSON property `readWrite` + # @return [Google::Apis::FirestoreV1beta1::ReadWrite] + attr_accessor :read_write + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @read_only = args[:read_only] if args.key?(:read_only) + @read_write = args[:read_write] if args.key?(:read_write) + end + end + + # A filter with a single operand. + class UnaryFilter + include Google::Apis::Core::Hashable + + # A reference to a field, such as `max(messages.time) as max_time`. + # Corresponds to the JSON property `field` + # @return [Google::Apis::FirestoreV1beta1::FieldReference] + attr_accessor :field + + # The unary operator to apply. + # Corresponds to the JSON property `op` + # @return [String] + attr_accessor :op + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @field = args[:field] if args.key?(:field) + @op = args[:op] if args.key?(:op) + end + end + + # A message that can hold any of the supported value types. + class Value + include Google::Apis::Core::Hashable + + # An array value. + # Corresponds to the JSON property `arrayValue` + # @return [Google::Apis::FirestoreV1beta1::ArrayValue] + attr_accessor :array_value + + # A boolean value. + # Corresponds to the JSON property `booleanValue` + # @return [Boolean] + attr_accessor :boolean_value + alias_method :boolean_value?, :boolean_value + + # A bytes value. + # Must not exceed 1 MiB - 89 bytes. + # Only the first 1,500 bytes are considered by queries. + # Corresponds to the JSON property `bytesValue` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :bytes_value + + # A double value. + # Corresponds to the JSON property `doubleValue` + # @return [Float] + attr_accessor :double_value + + # An object representing a latitude/longitude pair. This is expressed as a pair + # of doubles representing degrees latitude and degrees longitude. Unless + # specified otherwise, this must conform to the + # WGS84 + # standard. Values must be within normalized ranges. + # Example of normalization code in Python: + # def NormalizeLongitude(longitude): + # """Wraps decimal degrees longitude to [-180.0, 180.0].""" + # q, r = divmod(longitude, 360.0) + # if r > 180.0 or (r == 180.0 and q <= -1.0): + # return r - 360.0 + # return r + # def NormalizeLatLng(latitude, longitude): + # """Wraps decimal degrees latitude and longitude to + # [-90.0, 90.0] and [-180.0, 180.0], respectively.""" + # r = latitude % 360.0 + # if r <= 90.0: + # return r, NormalizeLongitude(longitude) + # elif r >= 270.0: + # return r - 360, NormalizeLongitude(longitude) + # else: + # return 180 - r, NormalizeLongitude(longitude + 180.0) + # assert 180.0 == NormalizeLongitude(180.0) + # assert -180.0 == NormalizeLongitude(-180.0) + # assert -179.0 == NormalizeLongitude(181.0) + # assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0) + # assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0) + # assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0) + # assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0) + # assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0) + # assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0) + # assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0) + # assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0) + # assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0) + # assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0) + # Corresponds to the JSON property `geoPointValue` + # @return [Google::Apis::FirestoreV1beta1::LatLng] + attr_accessor :geo_point_value + + # An integer value. + # Corresponds to the JSON property `integerValue` + # @return [Fixnum] + attr_accessor :integer_value + + # A map value. + # Corresponds to the JSON property `mapValue` + # @return [Google::Apis::FirestoreV1beta1::MapValue] + attr_accessor :map_value + + # A null value. + # Corresponds to the JSON property `nullValue` + # @return [String] + attr_accessor :null_value + + # A reference to a document. For example: + # `projects/`project_id`/databases/`database_id`/documents/`document_path``. + # Corresponds to the JSON property `referenceValue` + # @return [String] + attr_accessor :reference_value + + # A string value. + # The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. + # Only the first 1,500 bytes of the UTF-8 representation are considered by + # queries. + # Corresponds to the JSON property `stringValue` + # @return [String] + attr_accessor :string_value + + # A timestamp value. + # Precise only to microseconds. When stored, any additional precision is + # rounded down. + # Corresponds to the JSON property `timestampValue` + # @return [String] + attr_accessor :timestamp_value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @array_value = args[:array_value] if args.key?(:array_value) + @boolean_value = args[:boolean_value] if args.key?(:boolean_value) + @bytes_value = args[:bytes_value] if args.key?(:bytes_value) + @double_value = args[:double_value] if args.key?(:double_value) + @geo_point_value = args[:geo_point_value] if args.key?(:geo_point_value) + @integer_value = args[:integer_value] if args.key?(:integer_value) + @map_value = args[:map_value] if args.key?(:map_value) + @null_value = args[:null_value] if args.key?(:null_value) + @reference_value = args[:reference_value] if args.key?(:reference_value) + @string_value = args[:string_value] if args.key?(:string_value) + @timestamp_value = args[:timestamp_value] if args.key?(:timestamp_value) + end + end + + # A write on a document. + class Write + include Google::Apis::Core::Hashable + + # A precondition on a document, used for conditional operations. + # Corresponds to the JSON property `currentDocument` + # @return [Google::Apis::FirestoreV1beta1::Precondition] + attr_accessor :current_document + + # A document name to delete. In the format: + # `projects/`project_id`/databases/`database_id`/documents/`document_path``. + # Corresponds to the JSON property `delete` + # @return [String] + attr_accessor :delete + + # A transformation of a document. + # Corresponds to the JSON property `transform` + # @return [Google::Apis::FirestoreV1beta1::DocumentTransform] + attr_accessor :transform + + # A Firestore document. + # Must not exceed 1 MiB - 4 bytes. + # Corresponds to the JSON property `update` + # @return [Google::Apis::FirestoreV1beta1::Document] + attr_accessor :update + + # A set of field paths on a document. + # Used to restrict a get or update operation on a document to a subset of its + # fields. + # This is different from standard field masks, as this is always scoped to a + # Document, and takes in account the dynamic nature of Value. + # Corresponds to the JSON property `updateMask` + # @return [Google::Apis::FirestoreV1beta1::DocumentMask] + attr_accessor :update_mask + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @current_document = args[:current_document] if args.key?(:current_document) + @delete = args[:delete] if args.key?(:delete) + @transform = args[:transform] if args.key?(:transform) + @update = args[:update] if args.key?(:update) + @update_mask = args[:update_mask] if args.key?(:update_mask) + end + end + + # The request for Firestore.Write. + # The first request creates a stream, or resumes an existing one from a token. + # When creating a new stream, the server replies with a response containing + # only an ID and a token, to use in the next request. + # When resuming a stream, the server first streams any responses later than the + # given token, then a response containing only an up-to-date token, to use in + # the next request. + class WriteRequest + include Google::Apis::Core::Hashable + + # Labels associated with this write request. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # The ID of the write stream to resume. + # This may only be set in the first message. When left empty, a new write + # stream will be created. + # Corresponds to the JSON property `streamId` + # @return [String] + attr_accessor :stream_id + + # A stream token that was previously sent by the server. + # The client should set this field to the token from the most recent + # WriteResponse it has received. This acknowledges that the client has + # received responses up to this token. After sending this token, earlier + # tokens may not be used anymore. + # The server may close the stream if there are too many unacknowledged + # responses. + # Leave this field unset when creating a new stream. To resume a stream at + # a specific point, set this field and the `stream_id` field. + # Leave this field unset when creating a new stream. + # Corresponds to the JSON property `streamToken` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :stream_token + + # The writes to apply. + # Always executed atomically and in order. + # This must be empty on the first request. + # This may be empty on the last request. + # This must not be empty on all other requests. + # Corresponds to the JSON property `writes` + # @return [Array] + attr_accessor :writes + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @labels = args[:labels] if args.key?(:labels) + @stream_id = args[:stream_id] if args.key?(:stream_id) + @stream_token = args[:stream_token] if args.key?(:stream_token) + @writes = args[:writes] if args.key?(:writes) + end + end + + # The response for Firestore.Write. + class WriteResponse + include Google::Apis::Core::Hashable + + # The time at which the commit occurred. + # Corresponds to the JSON property `commitTime` + # @return [String] + attr_accessor :commit_time + + # The ID of the stream. + # Only set on the first message, when a new stream was created. + # Corresponds to the JSON property `streamId` + # @return [String] + attr_accessor :stream_id + + # A token that represents the position of this response in the stream. + # This can be used by a client to resume the stream at this point. + # This field is always set. + # Corresponds to the JSON property `streamToken` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :stream_token + + # The result of applying the writes. + # This i-th write result corresponds to the i-th write in the + # request. + # Corresponds to the JSON property `writeResults` + # @return [Array] + attr_accessor :write_results + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @commit_time = args[:commit_time] if args.key?(:commit_time) + @stream_id = args[:stream_id] if args.key?(:stream_id) + @stream_token = args[:stream_token] if args.key?(:stream_token) + @write_results = args[:write_results] if args.key?(:write_results) + end + end + + # The result of applying a write. + class WriteResult + include Google::Apis::Core::Hashable + + # The results of applying each DocumentTransform.FieldTransform, in the + # same order. + # Corresponds to the JSON property `transformResults` + # @return [Array] + attr_accessor :transform_results + + # The last update time of the document after applying the write. Not set + # after a `delete`. + # If the write did not actually change the document, this will be the + # previous update_time. + # 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) + @transform_results = args[:transform_results] if args.key?(:transform_results) + @update_time = args[:update_time] if args.key?(:update_time) + end + end + end + end +end diff --git a/generated/google/apis/firestore_v1beta1/representations.rb b/generated/google/apis/firestore_v1beta1/representations.rb new file mode 100644 index 000000000..e02fb15e9 --- /dev/null +++ b/generated/google/apis/firestore_v1beta1/representations.rb @@ -0,0 +1,899 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module FirestoreV1beta1 + + class ArrayValue + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BatchGetDocumentsRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BatchGetDocumentsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BeginTransactionRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class BeginTransactionResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CollectionSelector + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CommitRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CommitResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CompositeFilter + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Cursor + 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 DocumentChange + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DocumentDelete + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DocumentMask + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DocumentRemove + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DocumentTransform + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DocumentsTarget + 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 ExistenceFilter + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class FieldFilter + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class FieldReference + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class FieldTransform + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Filter + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Index + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class IndexField + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class IndexOperationMetadata + 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 ListCollectionIdsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListDocumentsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListIndexesResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListenRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListenResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class MapValue + 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 Order + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Precondition + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Progress + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Projection + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class QueryTarget + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ReadOnly + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ReadWrite + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RollbackRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RunQueryRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RunQueryResponse + 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 StructuredQuery + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Target + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TargetChange + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TransactionOptions + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class UnaryFilter + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Value + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Write + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class WriteRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class WriteResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class WriteResult + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ArrayValue + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :values, as: 'values', class: Google::Apis::FirestoreV1beta1::Value, decorator: Google::Apis::FirestoreV1beta1::Value::Representation + + end + end + + class BatchGetDocumentsRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :documents, as: 'documents' + property :mask, as: 'mask', class: Google::Apis::FirestoreV1beta1::DocumentMask, decorator: Google::Apis::FirestoreV1beta1::DocumentMask::Representation + + property :new_transaction, as: 'newTransaction', class: Google::Apis::FirestoreV1beta1::TransactionOptions, decorator: Google::Apis::FirestoreV1beta1::TransactionOptions::Representation + + property :read_time, as: 'readTime' + property :transaction, :base64 => true, as: 'transaction' + end + end + + class BatchGetDocumentsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :found, as: 'found', class: Google::Apis::FirestoreV1beta1::Document, decorator: Google::Apis::FirestoreV1beta1::Document::Representation + + property :missing, as: 'missing' + property :read_time, as: 'readTime' + property :transaction, :base64 => true, as: 'transaction' + end + end + + class BeginTransactionRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :options, as: 'options', class: Google::Apis::FirestoreV1beta1::TransactionOptions, decorator: Google::Apis::FirestoreV1beta1::TransactionOptions::Representation + + end + end + + class BeginTransactionResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :transaction, :base64 => true, as: 'transaction' + end + end + + class CollectionSelector + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :all_descendants, as: 'allDescendants' + property :collection_id, as: 'collectionId' + end + end + + class CommitRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :transaction, :base64 => true, as: 'transaction' + collection :writes, as: 'writes', class: Google::Apis::FirestoreV1beta1::Write, decorator: Google::Apis::FirestoreV1beta1::Write::Representation + + end + end + + class CommitResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :commit_time, as: 'commitTime' + collection :write_results, as: 'writeResults', class: Google::Apis::FirestoreV1beta1::WriteResult, decorator: Google::Apis::FirestoreV1beta1::WriteResult::Representation + + end + end + + class CompositeFilter + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :filters, as: 'filters', class: Google::Apis::FirestoreV1beta1::Filter, decorator: Google::Apis::FirestoreV1beta1::Filter::Representation + + property :op, as: 'op' + end + end + + class Cursor + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :before, as: 'before' + collection :values, as: 'values', class: Google::Apis::FirestoreV1beta1::Value, decorator: Google::Apis::FirestoreV1beta1::Value::Representation + + end + end + + class Document + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + hash :fields, as: 'fields', class: Google::Apis::FirestoreV1beta1::Value, decorator: Google::Apis::FirestoreV1beta1::Value::Representation + + property :name, as: 'name' + property :update_time, as: 'updateTime' + end + end + + class DocumentChange + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :document, as: 'document', class: Google::Apis::FirestoreV1beta1::Document, decorator: Google::Apis::FirestoreV1beta1::Document::Representation + + collection :removed_target_ids, as: 'removedTargetIds' + collection :target_ids, as: 'targetIds' + end + end + + class DocumentDelete + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :document, as: 'document' + property :read_time, as: 'readTime' + collection :removed_target_ids, as: 'removedTargetIds' + end + end + + class DocumentMask + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :field_paths, as: 'fieldPaths' + end + end + + class DocumentRemove + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :document, as: 'document' + property :read_time, as: 'readTime' + collection :removed_target_ids, as: 'removedTargetIds' + end + end + + class DocumentTransform + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :document, as: 'document' + collection :field_transforms, as: 'fieldTransforms', class: Google::Apis::FirestoreV1beta1::FieldTransform, decorator: Google::Apis::FirestoreV1beta1::FieldTransform::Representation + + end + end + + class DocumentsTarget + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :documents, as: 'documents' + end + end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class ExistenceFilter + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :count, as: 'count' + property :target_id, as: 'targetId' + end + end + + class FieldFilter + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :field, as: 'field', class: Google::Apis::FirestoreV1beta1::FieldReference, decorator: Google::Apis::FirestoreV1beta1::FieldReference::Representation + + property :op, as: 'op' + property :value, as: 'value', class: Google::Apis::FirestoreV1beta1::Value, decorator: Google::Apis::FirestoreV1beta1::Value::Representation + + end + end + + class FieldReference + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :field_path, as: 'fieldPath' + end + end + + class FieldTransform + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :field_path, as: 'fieldPath' + property :set_to_server_value, as: 'setToServerValue' + end + end + + class Filter + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :composite_filter, as: 'compositeFilter', class: Google::Apis::FirestoreV1beta1::CompositeFilter, decorator: Google::Apis::FirestoreV1beta1::CompositeFilter::Representation + + property :field_filter, as: 'fieldFilter', class: Google::Apis::FirestoreV1beta1::FieldFilter, decorator: Google::Apis::FirestoreV1beta1::FieldFilter::Representation + + property :unary_filter, as: 'unaryFilter', class: Google::Apis::FirestoreV1beta1::UnaryFilter, decorator: Google::Apis::FirestoreV1beta1::UnaryFilter::Representation + + end + end + + class Index + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :collection_id, as: 'collectionId' + collection :fields, as: 'fields', class: Google::Apis::FirestoreV1beta1::IndexField, decorator: Google::Apis::FirestoreV1beta1::IndexField::Representation + + property :name, as: 'name' + property :state, as: 'state' + end + end + + class IndexField + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :field_path, as: 'fieldPath' + property :mode, as: 'mode' + end + end + + class IndexOperationMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :cancelled, as: 'cancelled' + property :document_progress, as: 'documentProgress', class: Google::Apis::FirestoreV1beta1::Progress, decorator: Google::Apis::FirestoreV1beta1::Progress::Representation + + property :end_time, as: 'endTime' + property :index, as: 'index' + property :operation_type, as: 'operationType' + property :start_time, as: 'startTime' + end + end + + class LatLng + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :latitude, as: 'latitude' + property :longitude, as: 'longitude' + end + end + + class ListCollectionIdsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :collection_ids, as: 'collectionIds' + property :next_page_token, as: 'nextPageToken' + end + end + + class ListDocumentsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :documents, as: 'documents', class: Google::Apis::FirestoreV1beta1::Document, decorator: Google::Apis::FirestoreV1beta1::Document::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ListIndexesResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :indexes, as: 'indexes', class: Google::Apis::FirestoreV1beta1::Index, decorator: Google::Apis::FirestoreV1beta1::Index::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ListenRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :add_target, as: 'addTarget', class: Google::Apis::FirestoreV1beta1::Target, decorator: Google::Apis::FirestoreV1beta1::Target::Representation + + hash :labels, as: 'labels' + property :remove_target, as: 'removeTarget' + end + end + + class ListenResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :document_change, as: 'documentChange', class: Google::Apis::FirestoreV1beta1::DocumentChange, decorator: Google::Apis::FirestoreV1beta1::DocumentChange::Representation + + property :document_delete, as: 'documentDelete', class: Google::Apis::FirestoreV1beta1::DocumentDelete, decorator: Google::Apis::FirestoreV1beta1::DocumentDelete::Representation + + property :document_remove, as: 'documentRemove', class: Google::Apis::FirestoreV1beta1::DocumentRemove, decorator: Google::Apis::FirestoreV1beta1::DocumentRemove::Representation + + property :filter, as: 'filter', class: Google::Apis::FirestoreV1beta1::ExistenceFilter, decorator: Google::Apis::FirestoreV1beta1::ExistenceFilter::Representation + + property :target_change, as: 'targetChange', class: Google::Apis::FirestoreV1beta1::TargetChange, decorator: Google::Apis::FirestoreV1beta1::TargetChange::Representation + + end + end + + class MapValue + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :fields, as: 'fields', class: Google::Apis::FirestoreV1beta1::Value, decorator: Google::Apis::FirestoreV1beta1::Value::Representation + + end + end + + class Operation + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :done, as: 'done' + property :error, as: 'error', class: Google::Apis::FirestoreV1beta1::Status, decorator: Google::Apis::FirestoreV1beta1::Status::Representation + + hash :metadata, as: 'metadata' + property :name, as: 'name' + hash :response, as: 'response' + end + end + + class Order + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :direction, as: 'direction' + property :field, as: 'field', class: Google::Apis::FirestoreV1beta1::FieldReference, decorator: Google::Apis::FirestoreV1beta1::FieldReference::Representation + + end + end + + class Precondition + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :exists, as: 'exists' + property :update_time, as: 'updateTime' + end + end + + class Progress + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :work_completed, :numeric_string => true, as: 'workCompleted' + property :work_estimated, :numeric_string => true, as: 'workEstimated' + end + end + + class Projection + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :fields, as: 'fields', class: Google::Apis::FirestoreV1beta1::FieldReference, decorator: Google::Apis::FirestoreV1beta1::FieldReference::Representation + + end + end + + class QueryTarget + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :parent, as: 'parent' + property :structured_query, as: 'structuredQuery', class: Google::Apis::FirestoreV1beta1::StructuredQuery, decorator: Google::Apis::FirestoreV1beta1::StructuredQuery::Representation + + end + end + + class ReadOnly + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :read_time, as: 'readTime' + end + end + + class ReadWrite + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :retry_transaction, :base64 => true, as: 'retryTransaction' + end + end + + class RollbackRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :transaction, :base64 => true, as: 'transaction' + end + end + + class RunQueryRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :new_transaction, as: 'newTransaction', class: Google::Apis::FirestoreV1beta1::TransactionOptions, decorator: Google::Apis::FirestoreV1beta1::TransactionOptions::Representation + + property :read_time, as: 'readTime' + property :structured_query, as: 'structuredQuery', class: Google::Apis::FirestoreV1beta1::StructuredQuery, decorator: Google::Apis::FirestoreV1beta1::StructuredQuery::Representation + + property :transaction, :base64 => true, as: 'transaction' + end + end + + class RunQueryResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :document, as: 'document', class: Google::Apis::FirestoreV1beta1::Document, decorator: Google::Apis::FirestoreV1beta1::Document::Representation + + property :read_time, as: 'readTime' + property :skipped_results, as: 'skippedResults' + property :transaction, :base64 => true, as: 'transaction' + end + end + + class Status + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :code, as: 'code' + collection :details, as: 'details' + property :message, as: 'message' + end + end + + class StructuredQuery + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :end_at, as: 'endAt', class: Google::Apis::FirestoreV1beta1::Cursor, decorator: Google::Apis::FirestoreV1beta1::Cursor::Representation + + collection :from, as: 'from', class: Google::Apis::FirestoreV1beta1::CollectionSelector, decorator: Google::Apis::FirestoreV1beta1::CollectionSelector::Representation + + property :limit, as: 'limit' + property :offset, as: 'offset' + collection :order_by, as: 'orderBy', class: Google::Apis::FirestoreV1beta1::Order, decorator: Google::Apis::FirestoreV1beta1::Order::Representation + + property :select, as: 'select', class: Google::Apis::FirestoreV1beta1::Projection, decorator: Google::Apis::FirestoreV1beta1::Projection::Representation + + property :start_at, as: 'startAt', class: Google::Apis::FirestoreV1beta1::Cursor, decorator: Google::Apis::FirestoreV1beta1::Cursor::Representation + + property :where, as: 'where', class: Google::Apis::FirestoreV1beta1::Filter, decorator: Google::Apis::FirestoreV1beta1::Filter::Representation + + end + end + + class Target + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :documents, as: 'documents', class: Google::Apis::FirestoreV1beta1::DocumentsTarget, decorator: Google::Apis::FirestoreV1beta1::DocumentsTarget::Representation + + property :once, as: 'once' + property :query, as: 'query', class: Google::Apis::FirestoreV1beta1::QueryTarget, decorator: Google::Apis::FirestoreV1beta1::QueryTarget::Representation + + property :read_time, as: 'readTime' + property :resume_token, :base64 => true, as: 'resumeToken' + property :target_id, as: 'targetId' + end + end + + class TargetChange + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :cause, as: 'cause', class: Google::Apis::FirestoreV1beta1::Status, decorator: Google::Apis::FirestoreV1beta1::Status::Representation + + property :read_time, as: 'readTime' + property :resume_token, :base64 => true, as: 'resumeToken' + property :target_change_type, as: 'targetChangeType' + collection :target_ids, as: 'targetIds' + end + end + + class TransactionOptions + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :read_only, as: 'readOnly', class: Google::Apis::FirestoreV1beta1::ReadOnly, decorator: Google::Apis::FirestoreV1beta1::ReadOnly::Representation + + property :read_write, as: 'readWrite', class: Google::Apis::FirestoreV1beta1::ReadWrite, decorator: Google::Apis::FirestoreV1beta1::ReadWrite::Representation + + end + end + + class UnaryFilter + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :field, as: 'field', class: Google::Apis::FirestoreV1beta1::FieldReference, decorator: Google::Apis::FirestoreV1beta1::FieldReference::Representation + + property :op, as: 'op' + end + end + + class Value + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :array_value, as: 'arrayValue', class: Google::Apis::FirestoreV1beta1::ArrayValue, decorator: Google::Apis::FirestoreV1beta1::ArrayValue::Representation + + property :boolean_value, as: 'booleanValue' + property :bytes_value, :base64 => true, as: 'bytesValue' + property :double_value, as: 'doubleValue' + property :geo_point_value, as: 'geoPointValue', class: Google::Apis::FirestoreV1beta1::LatLng, decorator: Google::Apis::FirestoreV1beta1::LatLng::Representation + + property :integer_value, :numeric_string => true, as: 'integerValue' + property :map_value, as: 'mapValue', class: Google::Apis::FirestoreV1beta1::MapValue, decorator: Google::Apis::FirestoreV1beta1::MapValue::Representation + + property :null_value, as: 'nullValue' + property :reference_value, as: 'referenceValue' + property :string_value, as: 'stringValue' + property :timestamp_value, as: 'timestampValue' + end + end + + class Write + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :current_document, as: 'currentDocument', class: Google::Apis::FirestoreV1beta1::Precondition, decorator: Google::Apis::FirestoreV1beta1::Precondition::Representation + + property :delete, as: 'delete' + property :transform, as: 'transform', class: Google::Apis::FirestoreV1beta1::DocumentTransform, decorator: Google::Apis::FirestoreV1beta1::DocumentTransform::Representation + + property :update, as: 'update', class: Google::Apis::FirestoreV1beta1::Document, decorator: Google::Apis::FirestoreV1beta1::Document::Representation + + property :update_mask, as: 'updateMask', class: Google::Apis::FirestoreV1beta1::DocumentMask, decorator: Google::Apis::FirestoreV1beta1::DocumentMask::Representation + + end + end + + class WriteRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :labels, as: 'labels' + property :stream_id, as: 'streamId' + property :stream_token, :base64 => true, as: 'streamToken' + collection :writes, as: 'writes', class: Google::Apis::FirestoreV1beta1::Write, decorator: Google::Apis::FirestoreV1beta1::Write::Representation + + end + end + + class WriteResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :commit_time, as: 'commitTime' + property :stream_id, as: 'streamId' + property :stream_token, :base64 => true, as: 'streamToken' + collection :write_results, as: 'writeResults', class: Google::Apis::FirestoreV1beta1::WriteResult, decorator: Google::Apis::FirestoreV1beta1::WriteResult::Representation + + end + end + + class WriteResult + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :transform_results, as: 'transformResults', class: Google::Apis::FirestoreV1beta1::Value, decorator: Google::Apis::FirestoreV1beta1::Value::Representation + + property :update_time, as: 'updateTime' + end + end + end + end +end diff --git a/generated/google/apis/firestore_v1beta1/service.rb b/generated/google/apis/firestore_v1beta1/service.rb new file mode 100644 index 000000000..8ba351a08 --- /dev/null +++ b/generated/google/apis/firestore_v1beta1/service.rb @@ -0,0 +1,734 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module FirestoreV1beta1 + # Google Cloud Firestore API + # + # + # + # @example + # require 'google/apis/firestore_v1beta1' + # + # Firestore = Google::Apis::FirestoreV1beta1 # Alias the module + # service = Firestore::FirestoreService.new + # + # @see https://cloud.google.com/firestore + class FirestoreService < Google::Apis::Core::BaseService + # @return [String] + # API key. Your API key identifies your project and provides you with API access, + # quota, and reports. Required unless you provide an OAuth 2.0 token. + attr_accessor :key + + # @return [String] + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + attr_accessor :quota_user + + def initialize + super('https://firestore.googleapis.com/', '') + @batch_path = 'batch' + end + + # Gets multiple documents. + # Documents returned by this method are not guaranteed to be returned in the + # same order that they were requested. + # @param [String] database + # The database name. In the format: + # `projects/`project_id`/databases/`database_id``. + # @param [Google::Apis::FirestoreV1beta1::BatchGetDocumentsRequest] batch_get_documents_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::FirestoreV1beta1::BatchGetDocumentsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::FirestoreV1beta1::BatchGetDocumentsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_documents(database, batch_get_documents_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+database}/documents:batchGet', options) + command.request_representation = Google::Apis::FirestoreV1beta1::BatchGetDocumentsRequest::Representation + command.request_object = batch_get_documents_request_object + command.response_representation = Google::Apis::FirestoreV1beta1::BatchGetDocumentsResponse::Representation + command.response_class = Google::Apis::FirestoreV1beta1::BatchGetDocumentsResponse + command.params['database'] = database unless database.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 new transaction. + # @param [String] database + # The database name. In the format: + # `projects/`project_id`/databases/`database_id``. + # @param [Google::Apis::FirestoreV1beta1::BeginTransactionRequest] begin_transaction_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::FirestoreV1beta1::BeginTransactionResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::FirestoreV1beta1::BeginTransactionResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def begin_document_transaction(database, begin_transaction_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+database}/documents:beginTransaction', options) + command.request_representation = Google::Apis::FirestoreV1beta1::BeginTransactionRequest::Representation + command.request_object = begin_transaction_request_object + command.response_representation = Google::Apis::FirestoreV1beta1::BeginTransactionResponse::Representation + command.response_class = Google::Apis::FirestoreV1beta1::BeginTransactionResponse + command.params['database'] = database unless database.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Commits a transaction, while optionally updating documents. + # @param [String] database + # The database name. In the format: + # `projects/`project_id`/databases/`database_id``. + # @param [Google::Apis::FirestoreV1beta1::CommitRequest] commit_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::FirestoreV1beta1::CommitResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::FirestoreV1beta1::CommitResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def commit_document(database, commit_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+database}/documents:commit', options) + command.request_representation = Google::Apis::FirestoreV1beta1::CommitRequest::Representation + command.request_object = commit_request_object + command.response_representation = Google::Apis::FirestoreV1beta1::CommitResponse::Representation + command.response_class = Google::Apis::FirestoreV1beta1::CommitResponse + command.params['database'] = database unless database.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 document. + # @param [String] parent + # The parent resource. For example: + # `projects/`project_id`/databases/`database_id`/documents` or + # `projects/`project_id`/databases/`database_id`/documents/chatrooms/` + # chatroom_id`` + # @param [String] collection_id + # The collection ID, relative to `parent`, to list. For example: `chatrooms`. + # @param [Google::Apis::FirestoreV1beta1::Document] document_object + # @param [String] document_id + # The client-assigned document ID to use for this document. + # Optional. If not specified, an ID will be assigned by the service. + # @param [Array, String] mask_field_paths + # The list of field paths in the mask. See Document.fields for a field + # path syntax 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::FirestoreV1beta1::Document] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::FirestoreV1beta1::Document] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_database_document_document(parent, collection_id, document_object = nil, document_id: nil, mask_field_paths: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+parent}/{collectionId}', options) + command.request_representation = Google::Apis::FirestoreV1beta1::Document::Representation + command.request_object = document_object + command.response_representation = Google::Apis::FirestoreV1beta1::Document::Representation + command.response_class = Google::Apis::FirestoreV1beta1::Document + command.params['parent'] = parent unless parent.nil? + command.params['collectionId'] = collection_id unless collection_id.nil? + command.query['documentId'] = document_id unless document_id.nil? + command.query['mask.fieldPaths'] = mask_field_paths unless mask_field_paths.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 document. + # @param [String] name + # The resource name of the Document to delete. In the format: + # `projects/`project_id`/databases/`database_id`/documents/`document_path``. + # @param [Boolean] current_document_exists + # When set to `true`, the target document must exist. + # When set to `false`, the target document must not exist. + # @param [String] current_document_update_time + # When set, the target document must exist and have been last updated at + # that time. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::FirestoreV1beta1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::FirestoreV1beta1::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_database_document(name, current_document_exists: nil, current_document_update_time: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::FirestoreV1beta1::Empty::Representation + command.response_class = Google::Apis::FirestoreV1beta1::Empty + command.params['name'] = name unless name.nil? + command.query['currentDocument.exists'] = current_document_exists unless current_document_exists.nil? + command.query['currentDocument.updateTime'] = current_document_update_time unless current_document_update_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 + + # Gets a single document. + # @param [String] name + # The resource name of the Document to get. In the format: + # `projects/`project_id`/databases/`database_id`/documents/`document_path``. + # @param [Array, String] mask_field_paths + # The list of field paths in the mask. See Document.fields for a field + # path syntax reference. + # @param [String] read_time + # Reads the version of the document at the given time. + # This may not be older than 60 seconds. + # @param [String] transaction + # Reads the document in a transaction. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::FirestoreV1beta1::Document] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::FirestoreV1beta1::Document] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @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_database_document(name, mask_field_paths: nil, read_time: nil, transaction: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::FirestoreV1beta1::Document::Representation + command.response_class = Google::Apis::FirestoreV1beta1::Document + command.params['name'] = name unless name.nil? + command.query['mask.fieldPaths'] = mask_field_paths unless mask_field_paths.nil? + command.query['readTime'] = read_time unless read_time.nil? + command.query['transaction'] = transaction unless transaction.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 documents. + # @param [String] parent + # The parent resource name. In the format: + # `projects/`project_id`/databases/`database_id`/documents` or + # `projects/`project_id`/databases/`database_id`/documents/`document_path``. + # For example: + # `projects/my-project/databases/my-database/documents` or + # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + # @param [String] collection_id + # The collection ID, relative to `parent`, to list. For example: `chatrooms` + # or `messages`. + # @param [Array, String] mask_field_paths + # The list of field paths in the mask. See Document.fields for a field + # path syntax reference. + # @param [String] order_by + # The order to sort results by. For example: `priority desc, name`. + # @param [Fixnum] page_size + # The maximum number of documents to return. + # @param [String] page_token + # The `next_page_token` value returned from a previous List request, if any. + # @param [String] read_time + # Reads documents as they were at the given time. + # This may not be older than 60 seconds. + # @param [Boolean] show_missing + # If the list should show missing documents. A missing document is a + # document that does not exist but has sub-documents. These documents will + # be returned with a key but will not have fields, Document.create_time, + # or Document.update_time set. + # Requests with `show_missing` may not specify `where` or + # `order_by`. + # @param [String] transaction + # Reads documents in a transaction. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::FirestoreV1beta1::ListDocumentsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::FirestoreV1beta1::ListDocumentsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @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_database_documents(parent, collection_id, mask_field_paths: nil, order_by: nil, page_size: nil, page_token: nil, read_time: nil, show_missing: nil, transaction: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+parent}/{collectionId}', options) + command.response_representation = Google::Apis::FirestoreV1beta1::ListDocumentsResponse::Representation + command.response_class = Google::Apis::FirestoreV1beta1::ListDocumentsResponse + command.params['parent'] = parent unless parent.nil? + command.params['collectionId'] = collection_id unless collection_id.nil? + command.query['mask.fieldPaths'] = mask_field_paths unless mask_field_paths.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['readTime'] = read_time unless read_time.nil? + command.query['showMissing'] = show_missing unless show_missing.nil? + command.query['transaction'] = transaction unless transaction.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 collection IDs underneath a document. + # @param [String] parent + # The parent document. In the format: + # `projects/`project_id`/databases/`database_id`/documents/`document_path``. + # For example: + # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + # @param [Fixnum] page_size + # The maximum number of results to return. + # @param [String] page_token + # A page token. Must be a value from + # ListCollectionIdsResponse. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::FirestoreV1beta1::ListCollectionIdsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::FirestoreV1beta1::ListCollectionIdsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @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_database_document_collection_ids(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+parent}:listCollectionIds', options) + command.response_representation = Google::Apis::FirestoreV1beta1::ListCollectionIdsResponse::Representation + command.response_class = Google::Apis::FirestoreV1beta1::ListCollectionIdsResponse + 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 + + # Listens to changes. + # @param [String] database + # The database name. In the format: + # `projects/`project_id`/databases/`database_id``. + # @param [Google::Apis::FirestoreV1beta1::ListenRequest] listen_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::FirestoreV1beta1::ListenResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::FirestoreV1beta1::ListenResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def listen_document(database, listen_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+database}/documents:listen', options) + command.request_representation = Google::Apis::FirestoreV1beta1::ListenRequest::Representation + command.request_object = listen_request_object + command.response_representation = Google::Apis::FirestoreV1beta1::ListenResponse::Representation + command.response_class = Google::Apis::FirestoreV1beta1::ListenResponse + command.params['database'] = database unless database.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 or inserts a document. + # @param [String] name + # The resource name of the document, for example + # `projects/`project_id`/databases/`database_id`/documents/`document_path``. + # @param [Google::Apis::FirestoreV1beta1::Document] document_object + # @param [Boolean] current_document_exists + # When set to `true`, the target document must exist. + # When set to `false`, the target document must not exist. + # @param [String] current_document_update_time + # When set, the target document must exist and have been last updated at + # that time. + # @param [Array, String] mask_field_paths + # The list of field paths in the mask. See Document.fields for a field + # path syntax reference. + # @param [Array, String] update_mask_field_paths + # The list of field paths in the mask. See Document.fields for a field + # path syntax 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::FirestoreV1beta1::Document] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::FirestoreV1beta1::Document] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_database_document(name, document_object = nil, current_document_exists: nil, current_document_update_time: nil, mask_field_paths: nil, update_mask_field_paths: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1beta1/{+name}', options) + command.request_representation = Google::Apis::FirestoreV1beta1::Document::Representation + command.request_object = document_object + command.response_representation = Google::Apis::FirestoreV1beta1::Document::Representation + command.response_class = Google::Apis::FirestoreV1beta1::Document + command.params['name'] = name unless name.nil? + command.query['currentDocument.exists'] = current_document_exists unless current_document_exists.nil? + command.query['currentDocument.updateTime'] = current_document_update_time unless current_document_update_time.nil? + command.query['mask.fieldPaths'] = mask_field_paths unless mask_field_paths.nil? + command.query['updateMask.fieldPaths'] = update_mask_field_paths unless update_mask_field_paths.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Rolls back a transaction. + # @param [String] database + # The database name. In the format: + # `projects/`project_id`/databases/`database_id``. + # @param [Google::Apis::FirestoreV1beta1::RollbackRequest] rollback_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::FirestoreV1beta1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::FirestoreV1beta1::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 rollback_document(database, rollback_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+database}/documents:rollback', options) + command.request_representation = Google::Apis::FirestoreV1beta1::RollbackRequest::Representation + command.request_object = rollback_request_object + command.response_representation = Google::Apis::FirestoreV1beta1::Empty::Representation + command.response_class = Google::Apis::FirestoreV1beta1::Empty + command.params['database'] = database unless database.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Runs a query. + # @param [String] parent + # The parent resource name. In the format: + # `projects/`project_id`/databases/`database_id`/documents` or + # `projects/`project_id`/databases/`database_id`/documents/`document_path``. + # For example: + # `projects/my-project/databases/my-database/documents` or + # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + # @param [Google::Apis::FirestoreV1beta1::RunQueryRequest] run_query_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::FirestoreV1beta1::RunQueryResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::FirestoreV1beta1::RunQueryResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def run_document_query(parent, run_query_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+parent}:runQuery', options) + command.request_representation = Google::Apis::FirestoreV1beta1::RunQueryRequest::Representation + command.request_object = run_query_request_object + command.response_representation = Google::Apis::FirestoreV1beta1::RunQueryResponse::Representation + command.response_class = Google::Apis::FirestoreV1beta1::RunQueryResponse + 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 + + # Streams batches of document updates and deletes, in order. + # @param [String] database + # The database name. In the format: + # `projects/`project_id`/databases/`database_id``. + # This is only required in the first message. + # @param [Google::Apis::FirestoreV1beta1::WriteRequest] write_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::FirestoreV1beta1::WriteResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::FirestoreV1beta1::WriteResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_document(database, write_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+database}/documents:write', options) + command.request_representation = Google::Apis::FirestoreV1beta1::WriteRequest::Representation + command.request_object = write_request_object + command.response_representation = Google::Apis::FirestoreV1beta1::WriteResponse::Representation + command.response_class = Google::Apis::FirestoreV1beta1::WriteResponse + command.params['database'] = database unless database.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates the specified index. + # A newly created index's initial state is `CREATING`. On completion of the + # returned google.longrunning.Operation, the state will be `READY`. + # If the index already exists, the call will return an `ALREADY_EXISTS` + # status. + # During creation, the process could result in an error, in which case the + # index will move to the `ERROR` state. The process can be recovered by + # fixing the data that caused the error, removing the index with + # delete, then re-creating the index with + # create. + # Indexes with a single field cannot be created. + # @param [String] parent + # The name of the database this index will apply to. For example: + # `projects/`project_id`/databases/`database_id`` + # @param [Google::Apis::FirestoreV1beta1::Index] index_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::FirestoreV1beta1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::FirestoreV1beta1::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_database_index(parent, index_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1beta1/{+parent}/indexes', options) + command.request_representation = Google::Apis::FirestoreV1beta1::Index::Representation + command.request_object = index_object + command.response_representation = Google::Apis::FirestoreV1beta1::Operation::Representation + command.response_class = Google::Apis::FirestoreV1beta1::Operation + 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 an index. + # @param [String] name + # The index name. For example: + # `projects/`project_id`/databases/`database_id`/indexes/`index_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::FirestoreV1beta1::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::FirestoreV1beta1::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_database_index(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::FirestoreV1beta1::Empty::Representation + command.response_class = Google::Apis::FirestoreV1beta1::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 + + # Gets an index. + # @param [String] name + # The name of the index. For example: + # `projects/`project_id`/databases/`database_id`/indexes/`index_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::FirestoreV1beta1::Index] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::FirestoreV1beta1::Index] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @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_database_index(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+name}', options) + command.response_representation = Google::Apis::FirestoreV1beta1::Index::Representation + command.response_class = Google::Apis::FirestoreV1beta1::Index + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists the indexes that match the specified filters. + # @param [String] parent + # The database name. For example: + # `projects/`project_id`/databases/`database_id`` + # @param [String] filter + # @param [Fixnum] page_size + # The standard List page size. + # @param [String] page_token + # The standard List page token. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::FirestoreV1beta1::ListIndexesResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::FirestoreV1beta1::ListIndexesResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @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_database_indexes(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1beta1/{+parent}/indexes', options) + command.response_representation = Google::Apis::FirestoreV1beta1::ListIndexesResponse::Representation + command.response_class = Google::Apis::FirestoreV1beta1::ListIndexesResponse + command.params['parent'] = parent unless parent.nil? + command.query['filter'] = filter unless filter.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + protected + + def apply_command_defaults(command) + command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + end + end + end + end +end diff --git a/generated/google/apis/identitytoolkit_v3.rb b/generated/google/apis/identitytoolkit_v3.rb index e482ac089..928cab3e6 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 = '20170828' + REVISION = '20170927' # 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 2e3778356..81b7f1c2e 100644 --- a/generated/google/apis/identitytoolkit_v3/classes.rb +++ b/generated/google/apis/identitytoolkit_v3/classes.rb @@ -69,6 +69,11 @@ module Google # @return [String] attr_accessor :session_id + # All sign-in methods this user has used. + # Corresponds to the JSON property `signinMethods` + # @return [Array] + attr_accessor :signin_methods + def initialize(**args) update!(**args) end @@ -83,6 +88,7 @@ module Google @provider_id = args[:provider_id] if args.key?(:provider_id) @registered = args[:registered] if args.key?(:registered) @session_id = args[:session_id] if args.key?(:session_id) + @signin_methods = args[:signin_methods] if args.key?(:signin_methods) end end @@ -137,6 +143,62 @@ module Google end end + # Response of email signIn. + class EmailLinkSigninResponse + include Google::Apis::Core::Hashable + + # The user's email. + # Corresponds to the JSON property `email` + # @return [String] + attr_accessor :email + + # Expiration time of STS id token in seconds. + # Corresponds to the JSON property `expiresIn` + # @return [Fixnum] + attr_accessor :expires_in + + # The STS id token to login the newly signed in user. + # Corresponds to the JSON property `idToken` + # @return [String] + attr_accessor :id_token + + # Whether the user is new. + # Corresponds to the JSON property `isNewUser` + # @return [Boolean] + attr_accessor :is_new_user + alias_method :is_new_user?, :is_new_user + + # The fixed string "identitytoolkit#EmailLinkSigninResponse". + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The RP local ID of the user. + # Corresponds to the JSON property `localId` + # @return [String] + attr_accessor :local_id + + # The refresh token for the signed in user. + # Corresponds to the JSON property `refreshToken` + # @return [String] + attr_accessor :refresh_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @email = args[:email] if args.key?(:email) + @expires_in = args[:expires_in] if args.key?(:expires_in) + @id_token = args[:id_token] if args.key?(:id_token) + @is_new_user = args[:is_new_user] if args.key?(:is_new_user) + @kind = args[:kind] if args.key?(:kind) + @local_id = args[:local_id] if args.key?(:local_id) + @refresh_token = args[:refresh_token] if args.key?(:refresh_token) + end + end + # Template for an email template. class EmailTemplate include Google::Apis::Core::Hashable @@ -451,6 +513,37 @@ module Google end end + # Request to sign in with email. + class IdentitytoolkitRelyingpartyEmailLinkSigninRequest + include Google::Apis::Core::Hashable + + # The email address of the user. + # Corresponds to the JSON property `email` + # @return [String] + attr_accessor :email + + # Token for linking flow. + # Corresponds to the JSON property `idToken` + # @return [String] + attr_accessor :id_token + + # The confirmation code. + # Corresponds to the JSON property `oobCode` + # @return [String] + attr_accessor :oob_code + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @email = args[:email] if args.key?(:email) + @id_token = args[:id_token] if args.key?(:id_token) + @oob_code = args[:oob_code] if args.key?(:oob_code) + end + end + # Request to get the account information. class GetAccountInfoRequest include Google::Apis::Core::Hashable diff --git a/generated/google/apis/identitytoolkit_v3/representations.rb b/generated/google/apis/identitytoolkit_v3/representations.rb index b611e28ab..5abb4b4bb 100644 --- a/generated/google/apis/identitytoolkit_v3/representations.rb +++ b/generated/google/apis/identitytoolkit_v3/representations.rb @@ -40,6 +40,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class EmailLinkSigninResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class EmailTemplate class Representation < Google::Apis::Core::JsonRepresentation; end @@ -82,6 +88,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class IdentitytoolkitRelyingpartyEmailLinkSigninRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class GetAccountInfoRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -273,6 +285,7 @@ module Google property :provider_id, as: 'providerId' property :registered, as: 'registered' property :session_id, as: 'sessionId' + collection :signin_methods, as: 'signinMethods' end end @@ -293,6 +306,19 @@ module Google end end + class EmailLinkSigninResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :email, as: 'email' + property :expires_in, :numeric_string => true, as: 'expiresIn' + property :id_token, as: 'idToken' + property :is_new_user, as: 'isNewUser' + property :kind, as: 'kind' + property :local_id, as: 'localId' + property :refresh_token, as: 'refreshToken' + end + end + class EmailTemplate # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -371,6 +397,15 @@ module Google end end + class IdentitytoolkitRelyingpartyEmailLinkSigninRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :email, as: 'email' + property :id_token, as: 'idToken' + property :oob_code, as: 'oobCode' + end + end + class GetAccountInfoRequest # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/identitytoolkit_v3/service.rb b/generated/google/apis/identitytoolkit_v3/service.rb index 60e123606..11c862deb 100644 --- a/generated/google/apis/identitytoolkit_v3/service.rb +++ b/generated/google/apis/identitytoolkit_v3/service.rb @@ -158,6 +158,41 @@ module Google execute_or_queue_command(command, &block) end + # Reset password for a user. + # @param [Google::Apis::IdentitytoolkitV3::IdentitytoolkitRelyingpartyEmailLinkSigninRequest] identitytoolkit_relyingparty_email_link_signin_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available 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::IdentitytoolkitV3::EmailLinkSigninResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::IdentitytoolkitV3::EmailLinkSigninResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def email_relyingparty_link_signin(identitytoolkit_relyingparty_email_link_signin_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, 'emailLinkSignin', options) + command.request_representation = Google::Apis::IdentitytoolkitV3::IdentitytoolkitRelyingpartyEmailLinkSigninRequest::Representation + command.request_object = identitytoolkit_relyingparty_email_link_signin_request_object + command.response_representation = Google::Apis::IdentitytoolkitV3::EmailLinkSigninResponse::Representation + command.response_class = Google::Apis::IdentitytoolkitV3::EmailLinkSigninResponse + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + # Returns the account info. # @param [Google::Apis::IdentitytoolkitV3::GetAccountInfoRequest] get_account_info_request_object # @param [String] fields diff --git a/generated/google/apis/ml_v1.rb b/generated/google/apis/ml_v1.rb index ce78ae11e..9e8f2699a 100644 --- a/generated/google/apis/ml_v1.rb +++ b/generated/google/apis/ml_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/ml/ module MlV1 VERSION = 'V1' - REVISION = '20170926' + REVISION = '20170928' # View and manage your data across Google Cloud Platform services AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform' diff --git a/generated/google/apis/ml_v1/service.rb b/generated/google/apis/ml_v1/service.rb index bac62f918..305684bc6 100644 --- a/generated/google/apis/ml_v1/service.rb +++ b/generated/google/apis/ml_v1/service.rb @@ -541,6 +541,59 @@ module Google execute_or_queue_command(command, &block) end + # Updates a specific model resource. + # Currently the only supported fields to update are `description` and + # `default_version.name`. + # @param [String] name + # Required. The project name. + # @param [Google::Apis::MlV1::GoogleCloudMlV1Model] google_cloud_ml_v1__model_object + # @param [String] update_mask + # Required. Specifies the path, relative to `Model`, of the field to update. + # For example, to change the description of a model to "foo" and set its + # default version to "version_1", the `update_mask` parameter would be + # specified as `description`, `default_version.name`, and the `PATCH` + # request body would specify the new value, as follows: + # ` + # "description": "foo", + # "defaultVersion": ` + # "name":"version_1" + # ` + # ` + # In this example, the model is blindly overwritten since no etag is given. + # To adopt etag mechanism, include `etag` field in the mask, and include the + # `etag` value in your model resource. + # Currently the supported update masks are `description`, + # `default_version.name`, `labels`, and `etag`. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MlV1::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MlV1::GoogleLongrunningOperation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_project_model(name, google_cloud_ml_v1__model_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/{+name}', options) + command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1Model::Representation + command.request_object = google_cloud_ml_v1__model_object + command.response_representation = Google::Apis::MlV1::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::MlV1::GoogleLongrunningOperation + command.params['name'] = name unless name.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Sets the access control policy on the specified resource. Replaces any # existing policy. # @param [String] resource @@ -771,6 +824,55 @@ module Google execute_or_queue_command(command, &block) end + # Updates the specified Version resource. + # Currently the only supported field to update is `description`. + # @param [String] name + # Required. The name of the model. + # @param [Google::Apis::MlV1::GoogleCloudMlV1Version] google_cloud_ml_v1__version_object + # @param [String] update_mask + # Required. Specifies the path, relative to `Version`, of the field to + # update. Must be present and non-empty. + # For example, to change the description of a version to "foo", the + # `update_mask` parameter would be specified as `description`, and the + # `PATCH` request body would specify the new value, as follows: + # ` + # "description": "foo" + # ` + # In this example, the version is blindly overwritten since no etag is given. + # To adopt etag mechanism, include `etag` field in the mask, and include the + # `etag` value in your version resource. + # Currently the only supported update masks are `description`, `labels`, and + # `etag`. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MlV1::GoogleLongrunningOperation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MlV1::GoogleLongrunningOperation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_project_model_version(name, google_cloud_ml_v1__version_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/{+name}', options) + command.request_representation = Google::Apis::MlV1::GoogleCloudMlV1Version::Representation + command.request_object = google_cloud_ml_v1__version_object + command.response_representation = Google::Apis::MlV1::GoogleLongrunningOperation::Representation + command.response_class = Google::Apis::MlV1::GoogleLongrunningOperation + command.params['name'] = name unless name.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Designates a version to be the default for the model. # The default version is used for prediction requests made against the model # that don't specify a version. diff --git a/generated/google/apis/proximitybeacon_v1beta1.rb b/generated/google/apis/proximitybeacon_v1beta1.rb index 9caef16ef..85f44631a 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 = '20170815' + REVISION = '20171003' # 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 ee8fb29fa..a933a0d40 100644 --- a/generated/google/apis/proximitybeacon_v1beta1/classes.rb +++ b/generated/google/apis/proximitybeacon_v1beta1/classes.rb @@ -266,6 +266,22 @@ module Google # @return [String] attr_accessor :data + # The distance away from the beacon at which this attachment should be + # delivered to a mobile app. + # Setting this to a value greater than zero indicates that the app should + # behave as if the beacon is "seen" when the mobile device is less than this + # distance away from the beacon. + # Different attachments on the same beacon can have different max distances. + # Note that even though this value is expressed with fractional meter + # precision, real-world behavior is likley to be much less precise than one + # meter, due to the nature of current Bluetooth radio technology. + # Optional. When not set or zero, the attachment should be delivered at the + # beacon's outer limit of detection. + # Negative values are invalid and return an error. + # Corresponds to the JSON property `maxDistanceMeters` + # @return [Float] + attr_accessor :max_distance_meters + # 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 @@ -284,6 +300,7 @@ module Google @attachment_name = args[:attachment_name] if args.key?(:attachment_name) @creation_time_ms = args[:creation_time_ms] if args.key?(:creation_time_ms) @data = args[:data] if args.key?(:data) + @max_distance_meters = args[:max_distance_meters] if args.key?(:max_distance_meters) @namespaced_type = args[:namespaced_type] if args.key?(:namespaced_type) end end diff --git a/generated/google/apis/proximitybeacon_v1beta1/representations.rb b/generated/google/apis/proximitybeacon_v1beta1/representations.rb index 5388dc894..a33ce9d5a 100644 --- a/generated/google/apis/proximitybeacon_v1beta1/representations.rb +++ b/generated/google/apis/proximitybeacon_v1beta1/representations.rb @@ -191,6 +191,7 @@ module Google property :attachment_name, as: 'attachmentName' property :creation_time_ms, as: 'creationTimeMs' property :data, :base64 => true, as: 'data' + property :max_distance_meters, as: 'maxDistanceMeters' property :namespaced_type, as: 'namespacedType' end end