From 47dceac8f1522a733ab9f5673065824f6706dc22 Mon Sep 17 00:00:00 2001 From: Google APIs Date: Mon, 6 Jul 2020 00:38:05 +0000 Subject: [PATCH] Autogenerated update (2020-07-06) Update: - games_v1 - gameservices_v1 --- api_names_out.yaml | 265 ++ generated/google/apis/games_v1.rb | 8 +- generated/google/apis/games_v1/classes.rb | 2304 +++++++++++++++-- .../google/apis/games_v1/representations.rb | 659 ++++- generated/google/apis/games_v1/service.rb | 1366 ++++++++-- generated/google/apis/gameservices_v1.rb | 2 +- .../google/apis/gameservices_v1/classes.rb | 1260 ++++++++- .../apis/gameservices_v1/representations.rb | 589 +++++ .../google/apis/gameservices_v1/service.rb | 1067 ++++++++ 9 files changed, 7011 insertions(+), 509 deletions(-) diff --git a/api_names_out.yaml b/api_names_out.yaml index 9c258e204..d8abbf43f 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -95433,12 +95433,107 @@ "/gameservices:v1/CustomField/value": value "/gameservices:v1/DataAccessOptions": data_access_options "/gameservices:v1/DataAccessOptions/logMode": log_mode +"/gameservices:v1/DeployedClusterState": deployed_cluster_state +"/gameservices:v1/DeployedClusterState/cluster": cluster +"/gameservices:v1/DeployedClusterState/fleetDetails": fleet_details +"/gameservices:v1/DeployedClusterState/fleetDetails/fleet_detail": fleet_detail +"/gameservices:v1/DeployedFleet": deployed_fleet +"/gameservices:v1/DeployedFleet/fleet": fleet +"/gameservices:v1/DeployedFleet/fleetSpec": fleet_spec +"/gameservices:v1/DeployedFleet/specSource": spec_source +"/gameservices:v1/DeployedFleet/status": status +"/gameservices:v1/DeployedFleetAutoscaler": deployed_fleet_autoscaler +"/gameservices:v1/DeployedFleetAutoscaler/autoscaler": autoscaler +"/gameservices:v1/DeployedFleetAutoscaler/fleetAutoscalerSpec": fleet_autoscaler_spec +"/gameservices:v1/DeployedFleetAutoscaler/specSource": spec_source +"/gameservices:v1/DeployedFleetDetails": deployed_fleet_details +"/gameservices:v1/DeployedFleetDetails/deployedAutoscaler": deployed_autoscaler +"/gameservices:v1/DeployedFleetDetails/deployedFleet": deployed_fleet +"/gameservices:v1/DeployedFleetStatus": deployed_fleet_status +"/gameservices:v1/DeployedFleetStatus/allocatedReplicas": allocated_replicas +"/gameservices:v1/DeployedFleetStatus/readyReplicas": ready_replicas +"/gameservices:v1/DeployedFleetStatus/replicas": replicas +"/gameservices:v1/DeployedFleetStatus/reservedReplicas": reserved_replicas "/gameservices:v1/Empty": empty "/gameservices:v1/Expr": expr "/gameservices:v1/Expr/description": description "/gameservices:v1/Expr/expression": expression "/gameservices:v1/Expr/location": location "/gameservices:v1/Expr/title": title +"/gameservices:v1/FetchDeploymentStateRequest": fetch_deployment_state_request +"/gameservices:v1/FetchDeploymentStateResponse": fetch_deployment_state_response +"/gameservices:v1/FetchDeploymentStateResponse/clusterState": cluster_state +"/gameservices:v1/FetchDeploymentStateResponse/clusterState/cluster_state": cluster_state +"/gameservices:v1/FetchDeploymentStateResponse/unavailable": unavailable +"/gameservices:v1/FetchDeploymentStateResponse/unavailable/unavailable": unavailable +"/gameservices:v1/FleetConfig": fleet_config +"/gameservices:v1/FleetConfig/fleetSpec": fleet_spec +"/gameservices:v1/FleetConfig/name": name +"/gameservices:v1/GameServerCluster": game_server_cluster +"/gameservices:v1/GameServerCluster/connectionInfo": connection_info +"/gameservices:v1/GameServerCluster/createTime": create_time +"/gameservices:v1/GameServerCluster/description": description +"/gameservices:v1/GameServerCluster/etag": etag +"/gameservices:v1/GameServerCluster/labels": labels +"/gameservices:v1/GameServerCluster/labels/label": label +"/gameservices:v1/GameServerCluster/name": name +"/gameservices:v1/GameServerCluster/updateTime": update_time +"/gameservices:v1/GameServerClusterConnectionInfo": game_server_cluster_connection_info +"/gameservices:v1/GameServerClusterConnectionInfo/gkeClusterReference": gke_cluster_reference +"/gameservices:v1/GameServerClusterConnectionInfo/namespace": namespace +"/gameservices:v1/GameServerConfig": game_server_config +"/gameservices:v1/GameServerConfig/createTime": create_time +"/gameservices:v1/GameServerConfig/description": description +"/gameservices:v1/GameServerConfig/fleetConfigs": fleet_configs +"/gameservices:v1/GameServerConfig/fleetConfigs/fleet_config": fleet_config +"/gameservices:v1/GameServerConfig/labels": labels +"/gameservices:v1/GameServerConfig/labels/label": label +"/gameservices:v1/GameServerConfig/name": name +"/gameservices:v1/GameServerConfig/scalingConfigs": scaling_configs +"/gameservices:v1/GameServerConfig/scalingConfigs/scaling_config": scaling_config +"/gameservices:v1/GameServerConfig/updateTime": update_time +"/gameservices:v1/GameServerConfigOverride": game_server_config_override +"/gameservices:v1/GameServerConfigOverride/configVersion": config_version +"/gameservices:v1/GameServerConfigOverride/realmsSelector": realms_selector +"/gameservices:v1/GameServerDeployment": game_server_deployment +"/gameservices:v1/GameServerDeployment/createTime": create_time +"/gameservices:v1/GameServerDeployment/description": description +"/gameservices:v1/GameServerDeployment/etag": etag +"/gameservices:v1/GameServerDeployment/labels": labels +"/gameservices:v1/GameServerDeployment/labels/label": label +"/gameservices:v1/GameServerDeployment/name": name +"/gameservices:v1/GameServerDeployment/updateTime": update_time +"/gameservices:v1/GameServerDeploymentRollout": game_server_deployment_rollout +"/gameservices:v1/GameServerDeploymentRollout/createTime": create_time +"/gameservices:v1/GameServerDeploymentRollout/defaultGameServerConfig": default_game_server_config +"/gameservices:v1/GameServerDeploymentRollout/etag": etag +"/gameservices:v1/GameServerDeploymentRollout/gameServerConfigOverrides": game_server_config_overrides +"/gameservices:v1/GameServerDeploymentRollout/gameServerConfigOverrides/game_server_config_override": game_server_config_override +"/gameservices:v1/GameServerDeploymentRollout/name": name +"/gameservices:v1/GameServerDeploymentRollout/updateTime": update_time +"/gameservices:v1/GkeClusterReference": gke_cluster_reference +"/gameservices:v1/GkeClusterReference/cluster": cluster +"/gameservices:v1/LabelSelector": label_selector +"/gameservices:v1/LabelSelector/labels": labels +"/gameservices:v1/LabelSelector/labels/label": label +"/gameservices:v1/ListGameServerClustersResponse": list_game_server_clusters_response +"/gameservices:v1/ListGameServerClustersResponse/gameServerClusters": game_server_clusters +"/gameservices:v1/ListGameServerClustersResponse/gameServerClusters/game_server_cluster": game_server_cluster +"/gameservices:v1/ListGameServerClustersResponse/nextPageToken": next_page_token +"/gameservices:v1/ListGameServerClustersResponse/unreachable": unreachable +"/gameservices:v1/ListGameServerClustersResponse/unreachable/unreachable": unreachable +"/gameservices:v1/ListGameServerConfigsResponse": list_game_server_configs_response +"/gameservices:v1/ListGameServerConfigsResponse/gameServerConfigs": game_server_configs +"/gameservices:v1/ListGameServerConfigsResponse/gameServerConfigs/game_server_config": game_server_config +"/gameservices:v1/ListGameServerConfigsResponse/nextPageToken": next_page_token +"/gameservices:v1/ListGameServerConfigsResponse/unreachable": unreachable +"/gameservices:v1/ListGameServerConfigsResponse/unreachable/unreachable": unreachable +"/gameservices:v1/ListGameServerDeploymentsResponse": list_game_server_deployments_response +"/gameservices:v1/ListGameServerDeploymentsResponse/gameServerDeployments": game_server_deployments +"/gameservices:v1/ListGameServerDeploymentsResponse/gameServerDeployments/game_server_deployment": game_server_deployment +"/gameservices:v1/ListGameServerDeploymentsResponse/nextPageToken": next_page_token +"/gameservices:v1/ListGameServerDeploymentsResponse/unreachable": unreachable +"/gameservices:v1/ListGameServerDeploymentsResponse/unreachable/unreachable": unreachable "/gameservices:v1/ListLocationsResponse": list_locations_response "/gameservices:v1/ListLocationsResponse/locations": locations "/gameservices:v1/ListLocationsResponse/locations/location": location @@ -95447,6 +95542,12 @@ "/gameservices:v1/ListOperationsResponse/nextPageToken": next_page_token "/gameservices:v1/ListOperationsResponse/operations": operations "/gameservices:v1/ListOperationsResponse/operations/operation": operation +"/gameservices:v1/ListRealmsResponse": list_realms_response +"/gameservices:v1/ListRealmsResponse/nextPageToken": next_page_token +"/gameservices:v1/ListRealmsResponse/realms": realms +"/gameservices:v1/ListRealmsResponse/realms/realm": realm +"/gameservices:v1/ListRealmsResponse/unreachable": unreachable +"/gameservices:v1/ListRealmsResponse/unreachable/unreachable": unreachable "/gameservices:v1/Location": location "/gameservices:v1/Location/displayName": display_name "/gameservices:v1/Location/labels": labels @@ -95467,6 +95568,22 @@ "/gameservices:v1/Operation/name": name "/gameservices:v1/Operation/response": response "/gameservices:v1/Operation/response/response": response +"/gameservices:v1/OperationMetadata": operation_metadata +"/gameservices:v1/OperationMetadata/apiVersion": api_version +"/gameservices:v1/OperationMetadata/createTime": create_time +"/gameservices:v1/OperationMetadata/endTime": end_time +"/gameservices:v1/OperationMetadata/operationStatus": operation_status +"/gameservices:v1/OperationMetadata/operationStatus/operation_status": operation_status +"/gameservices:v1/OperationMetadata/requestedCancellation": requested_cancellation +"/gameservices:v1/OperationMetadata/statusMessage": status_message +"/gameservices:v1/OperationMetadata/target": target +"/gameservices:v1/OperationMetadata/unreachable": unreachable +"/gameservices:v1/OperationMetadata/unreachable/unreachable": unreachable +"/gameservices:v1/OperationMetadata/verb": verb +"/gameservices:v1/OperationStatus": operation_status +"/gameservices:v1/OperationStatus/done": done +"/gameservices:v1/OperationStatus/errorCode": error_code +"/gameservices:v1/OperationStatus/errorMessage": error_message "/gameservices:v1/Policy": policy "/gameservices:v1/Policy/auditConfigs": audit_configs "/gameservices:v1/Policy/auditConfigs/audit_config": audit_config @@ -95477,6 +95594,35 @@ "/gameservices:v1/Policy/rules": rules "/gameservices:v1/Policy/rules/rule": rule "/gameservices:v1/Policy/version": version +"/gameservices:v1/PreviewCreateGameServerClusterResponse": preview_create_game_server_cluster_response +"/gameservices:v1/PreviewCreateGameServerClusterResponse/etag": etag +"/gameservices:v1/PreviewCreateGameServerClusterResponse/targetState": target_state +"/gameservices:v1/PreviewDeleteGameServerClusterResponse": preview_delete_game_server_cluster_response +"/gameservices:v1/PreviewDeleteGameServerClusterResponse/etag": etag +"/gameservices:v1/PreviewDeleteGameServerClusterResponse/targetState": target_state +"/gameservices:v1/PreviewGameServerDeploymentRolloutResponse": preview_game_server_deployment_rollout_response +"/gameservices:v1/PreviewGameServerDeploymentRolloutResponse/etag": etag +"/gameservices:v1/PreviewGameServerDeploymentRolloutResponse/targetState": target_state +"/gameservices:v1/PreviewGameServerDeploymentRolloutResponse/unavailable": unavailable +"/gameservices:v1/PreviewGameServerDeploymentRolloutResponse/unavailable/unavailable": unavailable +"/gameservices:v1/PreviewRealmUpdateResponse": preview_realm_update_response +"/gameservices:v1/PreviewRealmUpdateResponse/etag": etag +"/gameservices:v1/PreviewRealmUpdateResponse/targetState": target_state +"/gameservices:v1/PreviewUpdateGameServerClusterResponse": preview_update_game_server_cluster_response +"/gameservices:v1/PreviewUpdateGameServerClusterResponse/etag": etag +"/gameservices:v1/PreviewUpdateGameServerClusterResponse/targetState": target_state +"/gameservices:v1/Realm": realm +"/gameservices:v1/Realm/createTime": create_time +"/gameservices:v1/Realm/description": description +"/gameservices:v1/Realm/etag": etag +"/gameservices:v1/Realm/labels": labels +"/gameservices:v1/Realm/labels/label": label +"/gameservices:v1/Realm/name": name +"/gameservices:v1/Realm/timeZone": time_zone +"/gameservices:v1/Realm/updateTime": update_time +"/gameservices:v1/RealmSelector": realm_selector +"/gameservices:v1/RealmSelector/realms": realms +"/gameservices:v1/RealmSelector/realms/realm": realm "/gameservices:v1/Rule": rule "/gameservices:v1/Rule/action": action "/gameservices:v1/Rule/conditions": conditions @@ -95490,15 +95636,47 @@ "/gameservices:v1/Rule/notIn/not_in": not_in "/gameservices:v1/Rule/permissions": permissions "/gameservices:v1/Rule/permissions/permission": permission +"/gameservices:v1/ScalingConfig": scaling_config +"/gameservices:v1/ScalingConfig/fleetAutoscalerSpec": fleet_autoscaler_spec +"/gameservices:v1/ScalingConfig/name": name +"/gameservices:v1/ScalingConfig/schedules": schedules +"/gameservices:v1/ScalingConfig/schedules/schedule": schedule +"/gameservices:v1/ScalingConfig/selectors": selectors +"/gameservices:v1/ScalingConfig/selectors/selector": selector +"/gameservices:v1/Schedule": schedule +"/gameservices:v1/Schedule/cronJobDuration": cron_job_duration +"/gameservices:v1/Schedule/cronSpec": cron_spec +"/gameservices:v1/Schedule/endTime": end_time +"/gameservices:v1/Schedule/startTime": start_time "/gameservices:v1/SetIamPolicyRequest": set_iam_policy_request "/gameservices:v1/SetIamPolicyRequest/policy": policy "/gameservices:v1/SetIamPolicyRequest/updateMask": update_mask +"/gameservices:v1/SpecSource": spec_source +"/gameservices:v1/SpecSource/gameServerConfigName": game_server_config_name +"/gameservices:v1/SpecSource/name": name "/gameservices:v1/Status": status "/gameservices:v1/Status/code": code "/gameservices:v1/Status/details": details "/gameservices:v1/Status/details/detail": detail "/gameservices:v1/Status/details/detail/detail": detail "/gameservices:v1/Status/message": message +"/gameservices:v1/TargetDetails": target_details +"/gameservices:v1/TargetDetails/fleetDetails": fleet_details +"/gameservices:v1/TargetDetails/fleetDetails/fleet_detail": fleet_detail +"/gameservices:v1/TargetDetails/gameServerClusterName": game_server_cluster_name +"/gameservices:v1/TargetDetails/gameServerDeploymentName": game_server_deployment_name +"/gameservices:v1/TargetFleet": target_fleet +"/gameservices:v1/TargetFleet/name": name +"/gameservices:v1/TargetFleet/specSource": spec_source +"/gameservices:v1/TargetFleetAutoscaler": target_fleet_autoscaler +"/gameservices:v1/TargetFleetAutoscaler/name": name +"/gameservices:v1/TargetFleetAutoscaler/specSource": spec_source +"/gameservices:v1/TargetFleetDetails": target_fleet_details +"/gameservices:v1/TargetFleetDetails/autoscaler": autoscaler +"/gameservices:v1/TargetFleetDetails/fleet": fleet +"/gameservices:v1/TargetState": target_state +"/gameservices:v1/TargetState/details": details +"/gameservices:v1/TargetState/details/detail": detail "/gameservices:v1/TestIamPermissionsRequest": test_iam_permissions_request "/gameservices:v1/TestIamPermissionsRequest/permissions": permissions "/gameservices:v1/TestIamPermissionsRequest/permissions/permission": permission @@ -95506,13 +95684,53 @@ "/gameservices:v1/TestIamPermissionsResponse/permissions": permissions "/gameservices:v1/TestIamPermissionsResponse/permissions/permission": permission "/gameservices:v1/fields": fields +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.configs.create": create_project_location_game_server_deployment_config +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.configs.create/configId": config_id +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.configs.create/parent": parent +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.configs.delete": delete_project_location_game_server_deployment_config +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.configs.delete/name": name +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.configs.get": get_project_location_game_server_deployment_config +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.configs.get/name": name +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.configs.list": list_project_location_game_server_deployment_configs +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.configs.list/filter": filter +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.configs.list/orderBy": order_by +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.configs.list/pageSize": page_size +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.configs.list/pageToken": page_token +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.configs.list/parent": parent +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.create": create_project_location_game_server_deployment +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.create/deploymentId": deployment_id +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.create/parent": parent +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.delete": delete_project_location_game_server_deployment +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.delete/name": name +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.fetchDeploymentState": fetch_game_server_deployment_deployment_state +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.fetchDeploymentState/name": name +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.get": get_project_location_game_server_deployment +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.get/name": name "/gameservices:v1/gameservices.projects.locations.gameServerDeployments.getIamPolicy": get_project_location_game_server_deployment_iam_policy "/gameservices:v1/gameservices.projects.locations.gameServerDeployments.getIamPolicy/options.requestedPolicyVersion": options_requested_policy_version "/gameservices:v1/gameservices.projects.locations.gameServerDeployments.getIamPolicy/resource": resource +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.getRollout": get_project_location_game_server_deployment_rollout +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.getRollout/name": name +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.list": list_project_location_game_server_deployments +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.list/filter": filter +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.list/orderBy": order_by +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.list/pageSize": page_size +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.list/pageToken": page_token +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.list/parent": parent +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.patch": patch_project_location_game_server_deployment +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.patch/name": name +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.patch/updateMask": update_mask +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.previewRollout": preview_project_location_game_server_deployment_rollout +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.previewRollout/name": name +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.previewRollout/previewTime": preview_time +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.previewRollout/updateMask": update_mask "/gameservices:v1/gameservices.projects.locations.gameServerDeployments.setIamPolicy": set_game_server_deployment_iam_policy "/gameservices:v1/gameservices.projects.locations.gameServerDeployments.setIamPolicy/resource": resource "/gameservices:v1/gameservices.projects.locations.gameServerDeployments.testIamPermissions": test_game_server_deployment_iam_permissions "/gameservices:v1/gameservices.projects.locations.gameServerDeployments.testIamPermissions/resource": resource +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.updateRollout": update_project_location_game_server_deployment_rollout +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.updateRollout/name": name +"/gameservices:v1/gameservices.projects.locations.gameServerDeployments.updateRollout/updateMask": update_mask "/gameservices:v1/gameservices.projects.locations.get": get_project_location "/gameservices:v1/gameservices.projects.locations.get/name": name "/gameservices:v1/gameservices.projects.locations.list": list_project_locations @@ -95532,6 +95750,53 @@ "/gameservices:v1/gameservices.projects.locations.operations.list/name": name "/gameservices:v1/gameservices.projects.locations.operations.list/pageSize": page_size "/gameservices:v1/gameservices.projects.locations.operations.list/pageToken": page_token +"/gameservices:v1/gameservices.projects.locations.realms.create": create_project_location_realm +"/gameservices:v1/gameservices.projects.locations.realms.create/parent": parent +"/gameservices:v1/gameservices.projects.locations.realms.create/realmId": realm_id +"/gameservices:v1/gameservices.projects.locations.realms.delete": delete_project_location_realm +"/gameservices:v1/gameservices.projects.locations.realms.delete/name": name +"/gameservices:v1/gameservices.projects.locations.realms.gameServerClusters.create": create_project_location_realm_game_server_cluster +"/gameservices:v1/gameservices.projects.locations.realms.gameServerClusters.create/gameServerClusterId": game_server_cluster_id +"/gameservices:v1/gameservices.projects.locations.realms.gameServerClusters.create/parent": parent +"/gameservices:v1/gameservices.projects.locations.realms.gameServerClusters.delete": delete_project_location_realm_game_server_cluster +"/gameservices:v1/gameservices.projects.locations.realms.gameServerClusters.delete/name": name +"/gameservices:v1/gameservices.projects.locations.realms.gameServerClusters.get": get_project_location_realm_game_server_cluster +"/gameservices:v1/gameservices.projects.locations.realms.gameServerClusters.get/name": name +"/gameservices:v1/gameservices.projects.locations.realms.gameServerClusters.list": list_project_location_realm_game_server_clusters +"/gameservices:v1/gameservices.projects.locations.realms.gameServerClusters.list/filter": filter +"/gameservices:v1/gameservices.projects.locations.realms.gameServerClusters.list/orderBy": order_by +"/gameservices:v1/gameservices.projects.locations.realms.gameServerClusters.list/pageSize": page_size +"/gameservices:v1/gameservices.projects.locations.realms.gameServerClusters.list/pageToken": page_token +"/gameservices:v1/gameservices.projects.locations.realms.gameServerClusters.list/parent": parent +"/gameservices:v1/gameservices.projects.locations.realms.gameServerClusters.patch": patch_project_location_realm_game_server_cluster +"/gameservices:v1/gameservices.projects.locations.realms.gameServerClusters.patch/name": name +"/gameservices:v1/gameservices.projects.locations.realms.gameServerClusters.patch/updateMask": update_mask +"/gameservices:v1/gameservices.projects.locations.realms.gameServerClusters.previewCreate": preview_project_location_realm_game_server_cluster_create +"/gameservices:v1/gameservices.projects.locations.realms.gameServerClusters.previewCreate/gameServerClusterId": game_server_cluster_id +"/gameservices:v1/gameservices.projects.locations.realms.gameServerClusters.previewCreate/parent": parent +"/gameservices:v1/gameservices.projects.locations.realms.gameServerClusters.previewCreate/previewTime": preview_time +"/gameservices:v1/gameservices.projects.locations.realms.gameServerClusters.previewDelete": preview_project_location_realm_game_server_cluster_delete +"/gameservices:v1/gameservices.projects.locations.realms.gameServerClusters.previewDelete/name": name +"/gameservices:v1/gameservices.projects.locations.realms.gameServerClusters.previewDelete/previewTime": preview_time +"/gameservices:v1/gameservices.projects.locations.realms.gameServerClusters.previewUpdate": preview_project_location_realm_game_server_cluster_update +"/gameservices:v1/gameservices.projects.locations.realms.gameServerClusters.previewUpdate/name": name +"/gameservices:v1/gameservices.projects.locations.realms.gameServerClusters.previewUpdate/previewTime": preview_time +"/gameservices:v1/gameservices.projects.locations.realms.gameServerClusters.previewUpdate/updateMask": update_mask +"/gameservices:v1/gameservices.projects.locations.realms.get": get_project_location_realm +"/gameservices:v1/gameservices.projects.locations.realms.get/name": name +"/gameservices:v1/gameservices.projects.locations.realms.list": list_project_location_realms +"/gameservices:v1/gameservices.projects.locations.realms.list/filter": filter +"/gameservices:v1/gameservices.projects.locations.realms.list/orderBy": order_by +"/gameservices:v1/gameservices.projects.locations.realms.list/pageSize": page_size +"/gameservices:v1/gameservices.projects.locations.realms.list/pageToken": page_token +"/gameservices:v1/gameservices.projects.locations.realms.list/parent": parent +"/gameservices:v1/gameservices.projects.locations.realms.patch": patch_project_location_realm +"/gameservices:v1/gameservices.projects.locations.realms.patch/name": name +"/gameservices:v1/gameservices.projects.locations.realms.patch/updateMask": update_mask +"/gameservices:v1/gameservices.projects.locations.realms.previewUpdate": preview_project_location_realm_update +"/gameservices:v1/gameservices.projects.locations.realms.previewUpdate/name": name +"/gameservices:v1/gameservices.projects.locations.realms.previewUpdate/previewTime": preview_time +"/gameservices:v1/gameservices.projects.locations.realms.previewUpdate/updateMask": update_mask "/gameservices:v1/key": key "/gameservices:v1/quotaUser": quota_user "/gameservices:v1beta/AuditConfig": audit_config diff --git a/generated/google/apis/games_v1.rb b/generated/google/apis/games_v1.rb index 90373aac9..36644c736 100644 --- a/generated/google/apis/games_v1.rb +++ b/generated/google/apis/games_v1.rb @@ -18,13 +18,11 @@ require 'google/apis/games_v1/representations.rb' module Google module Apis - # Google Play Game Services + # Google Play Game Services API # - # The Google Play games service allows developers to enhance games with social - # leaderboards, - # achievements, game state, sign-in with Google, and more. + # The API for Google Play Game Services. # - # @see https://developers.google.com/games/ + # @see https://developers.google.com/games/services/ module GamesV1 VERSION = 'V1' REVISION = '20200625' diff --git a/generated/google/apis/games_v1/classes.rb b/generated/google/apis/games_v1/classes.rb index 1603fa066..19c010b6d 100644 --- a/generated/google/apis/games_v1/classes.rb +++ b/generated/google/apis/games_v1/classes.rb @@ -22,11 +22,14 @@ module Google module Apis module GamesV1 - # An achievement definition object. + # This is a JSON template for an achievement definition object. class AchievementDefinition include Google::Apis::Core::Hashable # The type of the achievement. + # Possible values are: + # - "STANDARD" - Achievement is either locked or unlocked. + # - "INCREMENTAL" - Achievement is incremental. # Corresponds to the JSON property `achievementType` # @return [String] attr_accessor :achievement_type @@ -52,26 +55,30 @@ module Google attr_accessor :id # The initial state of the achievement. + # Possible values are: + # - "HIDDEN" - Achievement is hidden. + # - "REVEALED" - Achievement is revealed. + # - "UNLOCKED" - Achievement is unlocked. # Corresponds to the JSON property `initialState` # @return [String] attr_accessor :initial_state - # Indicates whether the revealed icon image being returned is a default - # image, or is provided by the game. + # Indicates whether the revealed icon image being returned is a default image, + # or is provided by the game. # Corresponds to the JSON property `isRevealedIconUrlDefault` # @return [Boolean] attr_accessor :is_revealed_icon_url_default alias_method :is_revealed_icon_url_default?, :is_revealed_icon_url_default - # Indicates whether the unlocked icon image being returned is a default - # image, or is game-provided. + # Indicates whether the unlocked icon image being returned is a default image, + # or is game-provided. # Corresponds to the JSON property `isUnlockedIconUrlDefault` # @return [Boolean] attr_accessor :is_unlocked_icon_url_default alias_method :is_unlocked_icon_url_default?, :is_unlocked_icon_url_default # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#achievementDefinition`. + # string games#achievementDefinition. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -118,7 +125,7 @@ module Google end end - # A list of achievement definition objects. + # This is a JSON template for a list of achievement definition objects. class ListAchievementDefinitionsResponse include Google::Apis::Core::Hashable @@ -128,7 +135,7 @@ module Google attr_accessor :items # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#achievementDefinitionsListResponse`. + # string games#achievementDefinitionsListResponse. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -150,7 +157,7 @@ module Google end end - # An achievement increment response + # This is a JSON template for an achievement increment response class AchievementIncrementResponse include Google::Apis::Core::Hashable @@ -160,13 +167,13 @@ module Google attr_accessor :current_steps # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#achievementIncrementResponse`. + # string games#achievementIncrementResponse. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind - # Whether the current steps for the achievement has reached the number of - # steps required to unlock. + # Whether the current steps for the achievement has reached the number of steps + # required to unlock. # Corresponds to the JSON property `newlyUnlocked` # @return [Boolean] attr_accessor :newly_unlocked @@ -184,18 +191,21 @@ module Google end end - # An achievement reveal response + # This is a JSON template for an achievement reveal response class AchievementRevealResponse include Google::Apis::Core::Hashable # The current state of the achievement for which a reveal was attempted. This - # might be `UNLOCKED` if the achievement was already unlocked. + # might be UNLOCKED if the achievement was already unlocked. + # Possible values are: + # - "REVEALED" - Achievement is revealed. + # - "UNLOCKED" - Achievement is unlocked. # Corresponds to the JSON property `currentState` # @return [String] attr_accessor :current_state # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#achievementRevealResponse`. + # string games#achievementRevealResponse. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -211,7 +221,7 @@ module Google end end - # An achievement set steps at least response. + # This is a JSON template for an achievement set steps at least response. class AchievementSetStepsAtLeastResponse include Google::Apis::Core::Hashable @@ -221,12 +231,12 @@ module Google attr_accessor :current_steps # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#achievementSetStepsAtLeastResponse`. + # string games#achievementSetStepsAtLeastResponse. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind - # Whether the current steps for the achievement has reached the number of + # Whether the the current steps for the achievement has reached the number of # steps required to unlock. # Corresponds to the JSON property `newlyUnlocked` # @return [Boolean] @@ -245,12 +255,12 @@ module Google end end - # An achievement unlock response + # This is a JSON template for an achievement unlock response class AchievementUnlockResponse include Google::Apis::Core::Hashable # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#achievementUnlockResponse`. + # string games#achievementUnlockResponse. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -273,12 +283,12 @@ module Google end end - # A list of achievement update requests. + # This is a JSON template for a list of achievement update requests. class AchievementUpdateMultipleRequest include Google::Apis::Core::Hashable # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#achievementUpdateMultipleRequest`. + # string games#achievementUpdateMultipleRequest. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -299,12 +309,12 @@ module Google end end - # + # This is a JSON template for an achievement unlock response. class AchievementUpdateMultipleResponse include Google::Apis::Core::Hashable # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#achievementUpdateMultipleResponse`. + # string games#achievementUpdateMultipleResponse. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -325,7 +335,7 @@ module Google end end - # A request to update an achievement. + # This is a JSON template for a request to update an achievement. class UpdateAchievementRequest include Google::Apis::Core::Hashable @@ -334,25 +344,29 @@ module Google # @return [String] attr_accessor :achievement_id - # The payload to request to increment an - # achievement. + # This is a JSON template for the payload to request to increment an achievement. # Corresponds to the JSON property `incrementPayload` # @return [Google::Apis::GamesV1::GamesAchievementIncrement] attr_accessor :increment_payload # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#achievementUpdateRequest`. + # string games#achievementUpdateRequest. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind - # The payload to request to increment an - # achievement. + # This is a JSON template for the payload to request to increment an achievement. # Corresponds to the JSON property `setStepsAtLeastPayload` # @return [Google::Apis::GamesV1::GamesAchievementSetStepsAtLeast] attr_accessor :set_steps_at_least_payload # The type of update being applied. + # Possible values are: + # - "REVEAL" - Achievement is revealed. + # - "UNLOCK" - Achievement is unlocked. + # - "INCREMENT" - Achievement is incremented. + # - "SET_STEPS_AT_LEAST" - Achievement progress is set to at least the passed + # value. # Corresponds to the JSON property `updateType` # @return [String] attr_accessor :update_type @@ -371,7 +385,7 @@ module Google end end - # An updated achievement. + # This is a JSON template for an achievement update response. class UpdateAchievementResponse include Google::Apis::Core::Hashable @@ -381,6 +395,10 @@ module Google attr_accessor :achievement_id # The current state of the achievement. + # Possible values are: + # - "HIDDEN" - Achievement is hidden. + # - "REVEALED" - Achievement is revealed. + # - "UNLOCKED" - Achievement is unlocked. # Corresponds to the JSON property `currentState` # @return [String] attr_accessor :current_state @@ -391,7 +409,7 @@ module Google attr_accessor :current_steps # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#achievementUpdateResponse`. + # string games#achievementUpdateResponse. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -424,7 +442,83 @@ module Google end end - # The Application resource. + # This is a JSON template for aggregate stats. + class AggregateStats + include Google::Apis::Core::Hashable + + # The number of messages sent between a pair of peers. + # Corresponds to the JSON property `count` + # @return [Fixnum] + attr_accessor :count + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#aggregateStats. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The maximum amount. + # Corresponds to the JSON property `max` + # @return [Fixnum] + attr_accessor :max + + # The minimum amount. + # Corresponds to the JSON property `min` + # @return [Fixnum] + attr_accessor :min + + # The total number of bytes sent for messages between a pair of peers. + # Corresponds to the JSON property `sum` + # @return [Fixnum] + attr_accessor :sum + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @count = args[:count] if args.key?(:count) + @kind = args[:kind] if args.key?(:kind) + @max = args[:max] if args.key?(:max) + @min = args[:min] if args.key?(:min) + @sum = args[:sum] if args.key?(:sum) + end + end + + # This is a JSON template for an anonymous player + class AnonymousPlayer + include Google::Apis::Core::Hashable + + # The base URL for the image to display for the anonymous player. + # Corresponds to the JSON property `avatarImageUrl` + # @return [String] + attr_accessor :avatar_image_url + + # The name to display for the anonymous player. + # Corresponds to the JSON property `displayName` + # @return [String] + attr_accessor :display_name + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#anonymousPlayer. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @avatar_image_url = args[:avatar_image_url] if args.key?(:avatar_image_url) + @display_name = args[:display_name] if args.key?(:display_name) + @kind = args[:kind] if args.key?(:kind) + end + end + + # This is a JSON template for the Application resource. class Application include Google::Apis::Core::Hashable @@ -443,7 +537,7 @@ module Google # @return [String] attr_accessor :author - # An application category object. + # This is a JSON template for an application category object. # Corresponds to the JSON property `category` # @return [Google::Apis::GamesV1::ApplicationCategory] attr_accessor :category @@ -454,6 +548,8 @@ module Google attr_accessor :description # A list of features that have been enabled for the application. + # Possible values are: + # - "SNAPSHOTS" - Snapshots has been enabled # Corresponds to the JSON property `enabledFeatures` # @return [Array] attr_accessor :enabled_features @@ -469,7 +565,7 @@ module Google attr_accessor :instances # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#application`. + # string games#application. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -517,12 +613,12 @@ module Google end end - # An application category object. + # This is a JSON template for an application category object. class ApplicationCategory include Google::Apis::Core::Hashable # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#applicationCategory`. + # string games#applicationCategory. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -549,7 +645,8 @@ module Google end end - # A third party application verification response resource. + # This is a JSON template for a third party application verification response + # resource. class ApplicationVerifyResponse include Google::Apis::Core::Hashable @@ -560,7 +657,7 @@ module Google attr_accessor :alternate_player_id # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#applicationVerifyResponse`. + # string games#applicationVerifyResponse. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -582,7 +679,7 @@ module Google end end - # Data related to individual game categories. + # This is a JSON template for data related to individual game categories. class Category include Google::Apis::Core::Hashable @@ -597,7 +694,7 @@ module Google attr_accessor :experience_points # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#category`. + # string games#category. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -614,7 +711,7 @@ module Google end end - # A third party list metagame categories response. + # This is a JSON template for a list of category data objects. class ListCategoryResponse include Google::Apis::Core::Hashable @@ -624,7 +721,7 @@ module Google attr_accessor :items # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#categoryListResponse`. + # string games#categoryListResponse. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -646,22 +743,33 @@ module Google end end - # A batch update failure resource. + # This is a JSON template for a batch update failure resource. class EventBatchRecordFailure include Google::Apis::Core::Hashable # The cause for the update failure. + # Possible values are: + # - "TOO_LARGE": A batch request was issued with more events than are allowed in + # a single batch. + # - "TIME_PERIOD_EXPIRED": A batch was sent with data too far in the past to + # record. + # - "TIME_PERIOD_SHORT": A batch was sent with a time range that was too short. + # - "TIME_PERIOD_LONG": A batch was sent with a time range that was too long. + # - "ALREADY_UPDATED": An attempt was made to record a batch of data which was + # already seen. + # - "RECORD_RATE_HIGH": An attempt was made to record data faster than the + # server will apply updates. # Corresponds to the JSON property `failureCause` # @return [String] attr_accessor :failure_cause # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#eventBatchRecordFailure`. + # string games#eventBatchRecordFailure. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind - # An event period time range. + # This is a JSON template for an event period time range. # Corresponds to the JSON property `range` # @return [Google::Apis::GamesV1::EventPeriodRange] attr_accessor :range @@ -678,7 +786,7 @@ module Google end end - # An event child relationship resource. + # This is a JSON template for an event child relationship resource. class EventChild include Google::Apis::Core::Hashable @@ -688,7 +796,7 @@ module Google attr_accessor :child_id # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#eventChild`. + # string games#eventChild. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -704,7 +812,7 @@ module Google end end - # An event definition resource. + # This is a JSON template for an event definition resource. class EventDefinition include Google::Apis::Core::Hashable @@ -733,20 +841,24 @@ module Google # @return [String] attr_accessor :image_url - # Indicates whether the icon image being returned is a default image, or is - # game-provided. + # Indicates whether the icon image being returned is a default image, or is game- + # provided. # Corresponds to the JSON property `isDefaultImageUrl` # @return [Boolean] attr_accessor :is_default_image_url alias_method :is_default_image_url?, :is_default_image_url # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#eventDefinition`. + # string games#eventDefinition. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind # The visibility of event being tracked in this definition. + # Possible values are: + # - "REVEALED": This event should be visible to all users. + # - "HIDDEN": This event should only be shown to users that have recorded this + # event at least once. # Corresponds to the JSON property `visibility` # @return [String] attr_accessor :visibility @@ -768,7 +880,7 @@ module Google end end - # A ListDefinitions response. + # This is a JSON template for a ListDefinitions response. class ListEventDefinitionResponse include Google::Apis::Core::Hashable @@ -778,7 +890,7 @@ module Google attr_accessor :items # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#eventDefinitionListResponse`. + # string games#eventDefinitionListResponse. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -800,24 +912,23 @@ module Google end end - # An event period time range. + # This is a JSON template for an event period time range. class EventPeriodRange include Google::Apis::Core::Hashable # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#eventPeriodRange`. + # string games#eventPeriodRange. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind - # The time when this update period ends, in millis, since 1970 UTC (Unix - # Epoch). + # The time when this update period ends, in millis, since 1970 UTC (Unix Epoch). # Corresponds to the JSON property `periodEndMillis` # @return [Fixnum] attr_accessor :period_end_millis - # The time when this update period begins, in millis, since 1970 UTC (Unix - # Epoch). + # The time when this update period begins, in millis, since 1970 UTC (Unix Epoch) + # . # Corresponds to the JSON property `periodStartMillis` # @return [Fixnum] attr_accessor :period_start_millis @@ -834,17 +945,17 @@ module Google end end - # An event period update resource. + # This is a JSON template for an event period update resource. class EventPeriodUpdate include Google::Apis::Core::Hashable # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#eventPeriodUpdate`. + # string games#eventPeriodUpdate. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind - # An event period time range. + # This is a JSON template for an event period time range. # Corresponds to the JSON property `timePeriod` # @return [Google::Apis::GamesV1::EventPeriodRange] attr_accessor :time_period @@ -866,7 +977,7 @@ module Google end end - # An event update failure resource. + # This is a JSON template for an event update failure resource. class EventRecordFailure include Google::Apis::Core::Hashable @@ -876,12 +987,16 @@ module Google attr_accessor :event_id # The cause for the update failure. + # Possible values are: + # - "NOT_FOUND" - An attempt was made to set an event that was not defined. + # - "INVALID_UPDATE_VALUE" - An attempt was made to increment an event by a non- + # positive value. # Corresponds to the JSON property `failureCause` # @return [String] attr_accessor :failure_cause # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#eventRecordFailure`. + # string games#eventRecordFailure. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -898,18 +1013,18 @@ module Google end end - # An event period update resource. + # This is a JSON template for an event period update resource. class EventRecordRequest include Google::Apis::Core::Hashable - # The current time when this update was sent, in milliseconds, since 1970 UTC - # (Unix Epoch). + # The current time when this update was sent, in milliseconds, since 1970 UTC ( + # Unix Epoch). # Corresponds to the JSON property `currentTimeMillis` # @return [Fixnum] attr_accessor :current_time_millis # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#eventRecordRequest`. + # string games#eventRecordRequest. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -937,7 +1052,7 @@ module Google end end - # An event period update resource. + # This is a JSON template for an event period update resource. class UpdateEventRequest include Google::Apis::Core::Hashable @@ -947,7 +1062,7 @@ module Google attr_accessor :definition_id # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#eventUpdateRequest`. + # string games#eventUpdateRequest. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -969,7 +1084,7 @@ module Google end end - # An event period update resource. + # This is a JSON template for an event period update resource. class UpdateEventResponse include Google::Apis::Core::Hashable @@ -984,7 +1099,7 @@ module Google attr_accessor :event_failures # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#eventUpdateResponse`. + # string games#eventUpdateResponse. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -1007,13 +1122,12 @@ module Google end end - # The payload to request to increment an - # achievement. + # This is a JSON template for the payload to request to increment an achievement. class GamesAchievementIncrement include Google::Apis::Core::Hashable # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#GamesAchievementIncrement`. + # string games#GamesAchievementIncrement. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -1040,13 +1154,12 @@ module Google end end - # The payload to request to increment an - # achievement. + # This is a JSON template for the payload to request to increment an achievement. class GamesAchievementSetStepsAtLeast include Google::Apis::Core::Hashable # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#GamesAchievementSetStepsAtLeast`. + # string games#GamesAchievementSetStepsAtLeast. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -1067,7 +1180,7 @@ module Google end end - # An image asset object. + # This is a JSON template for an image asset object. class ImageAsset include Google::Apis::Core::Hashable @@ -1077,7 +1190,7 @@ module Google attr_accessor :height # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#imageAsset`. + # string games#imageAsset. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -1111,7 +1224,7 @@ module Google end end - # The Instance resource. + # This is a JSON template for the Instance resource. class Instance include Google::Apis::Core::Hashable @@ -1120,18 +1233,18 @@ module Google # @return [String] attr_accessor :acquisition_uri - # The Android instance details resource. + # This is a JSON template for the Android instance details resource. # Corresponds to the JSON property `androidInstance` # @return [Google::Apis::GamesV1::InstanceAndroidDetails] attr_accessor :android_instance - # The iOS details resource. + # This is a JSON template for the iOS details resource. # Corresponds to the JSON property `iosInstance` # @return [Google::Apis::GamesV1::InstanceIosDetails] attr_accessor :ios_instance # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#instance`. + # string games#instance. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -1142,6 +1255,10 @@ module Google attr_accessor :name # The platform type. + # Possible values are: + # - "ANDROID" - Instance is for Android. + # - "IOS" - Instance is for iOS + # - "WEB_APP" - Instance is for Web App. # Corresponds to the JSON property `platformType` # @return [String] attr_accessor :platform_type @@ -1158,7 +1275,7 @@ module Google attr_accessor :turn_based_play alias_method :turn_based_play?, :turn_based_play - # The Web details resource. + # This is a JSON template for the Web details resource. # Corresponds to the JSON property `webInstance` # @return [Google::Apis::GamesV1::InstanceWebDetails] attr_accessor :web_instance @@ -1181,7 +1298,7 @@ module Google end end - # The Android instance details resource. + # This is a JSON template for the Android instance details resource. class InstanceAndroidDetails include Google::Apis::Core::Hashable @@ -1192,7 +1309,7 @@ module Google alias_method :enable_piracy_check?, :enable_piracy_check # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#instanceAndroidDetails`. + # string games#instanceAndroidDetails. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -1221,7 +1338,7 @@ module Google end end - # The iOS details resource. + # This is a JSON template for the iOS details resource. class InstanceIosDetails include Google::Apis::Core::Hashable @@ -1236,7 +1353,7 @@ module Google attr_accessor :itunes_app_id # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#instanceIosDetails`. + # string games#instanceIosDetails. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -1283,12 +1400,12 @@ module Google end end - # The Web details resource. + # This is a JSON template for the Web details resource. class InstanceWebDetails include Google::Apis::Core::Hashable # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#instanceWebDetails`. + # string games#instanceWebDetails. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -1316,7 +1433,7 @@ module Google end end - # The Leaderboard resource. + # This is a JSON template for the Leaderboard resource. class Leaderboard include Google::Apis::Core::Hashable @@ -1330,15 +1447,15 @@ module Google # @return [String] attr_accessor :id - # Indicates whether the icon image being returned is a default image, or is - # game-provided. + # Indicates whether the icon image being returned is a default image, or is game- + # provided. # Corresponds to the JSON property `isIconUrlDefault` # @return [Boolean] attr_accessor :is_icon_url_default alias_method :is_icon_url_default?, :is_icon_url_default # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#leaderboard`. + # string games#leaderboard. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -1349,6 +1466,11 @@ module Google attr_accessor :name # How scores are ordered. + # Possible values are: + # - "LARGER_IS_BETTER" - Larger values are better; scores are sorted in + # descending order. + # - "SMALLER_IS_BETTER" - Smaller values are better; scores are sorted in + # ascending order. # Corresponds to the JSON property `order` # @return [String] attr_accessor :order @@ -1368,7 +1490,7 @@ module Google end end - # The Leaderboard Entry resource. + # This is a JSON template for the Leaderboard Entry resource. class LeaderboardEntry include Google::Apis::Core::Hashable @@ -1383,12 +1505,12 @@ module Google attr_accessor :formatted_score_rank # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#leaderboardEntry`. + # string games#leaderboardEntry. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind - # A Player resource. + # This is a JSON template for a Player resource. # Corresponds to the JSON property `player` # @return [Google::Apis::GamesV1::Player] attr_accessor :player @@ -1398,8 +1520,8 @@ module Google # @return [Fixnum] attr_accessor :score_rank - # Additional information about the score. Values must contain no more than - # 64 URI-safe characters as defined by section 2.3 of RFC 3986. + # Additional information about the score. Values must contain no more than 64 + # URI-safe characters as defined by section 2.3 of RFC 3986. # Corresponds to the JSON property `scoreTag` # @return [String] attr_accessor :score_tag @@ -1410,6 +1532,10 @@ module Google attr_accessor :score_value # The time span of this high score. + # Possible values are: + # - "ALL_TIME" - The score is an all-time high score. + # - "WEEKLY" - The score is a weekly high score. + # - "DAILY" - The score is a daily high score. # Corresponds to the JSON property `timeSpan` # @return [String] attr_accessor :time_span @@ -1438,7 +1564,7 @@ module Google end end - # A list of leaderboard objects. + # This is a JSON template for a list of leaderboard objects. class ListLeaderboardResponse include Google::Apis::Core::Hashable @@ -1448,7 +1574,7 @@ module Google attr_accessor :items # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#leaderboardListResponse`. + # string games#leaderboardListResponse. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -1470,7 +1596,7 @@ module Google end end - # A score rank in a leaderboard. + # This is a JSON template for a score rank in a leaderboard. class LeaderboardScoreRank include Google::Apis::Core::Hashable @@ -1485,7 +1611,7 @@ module Google attr_accessor :formatted_rank # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#leaderboardScoreRank`. + # string games#leaderboardScoreRank. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -1514,7 +1640,7 @@ module Google end end - # A ListScores response. + # This is a JSON template for a ListScores response. class LeaderboardScores include Google::Apis::Core::Hashable @@ -1524,7 +1650,7 @@ module Google attr_accessor :items # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#leaderboardScores`. + # string games#leaderboardScores. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -1539,7 +1665,7 @@ module Google # @return [Fixnum] attr_accessor :num_scores - # The Leaderboard Entry resource. + # This is a JSON template for the Leaderboard Entry resource. # Corresponds to the JSON property `playerScore` # @return [Google::Apis::GamesV1::LeaderboardEntry] attr_accessor :player_score @@ -1564,18 +1690,18 @@ module Google end end - # The metagame config resource + # This is a JSON template for the metagame config resource class MetagameConfig include Google::Apis::Core::Hashable - # Current version of the metagame configuration data. When this data is - # updated, the version number will be increased by one. + # Current version of the metagame configuration data. When this data is updated, + # the version number will be increased by one. # Corresponds to the JSON property `currentVersion` # @return [Fixnum] attr_accessor :current_version # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#metagameConfig`. + # string games#metagameConfig. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -1597,7 +1723,262 @@ module Google end end - # A Player resource. + # This is a JSON template for network diagnostics reported for a client. + class NetworkDiagnostics + include Google::Apis::Core::Hashable + + # The Android network subtype. + # Corresponds to the JSON property `androidNetworkSubtype` + # @return [Fixnum] + attr_accessor :android_network_subtype + + # The Android network type. + # Corresponds to the JSON property `androidNetworkType` + # @return [Fixnum] + attr_accessor :android_network_type + + # iOS network type as defined in Reachability.h. + # Corresponds to the JSON property `iosNetworkType` + # @return [Fixnum] + attr_accessor :ios_network_type + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#networkDiagnostics. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The MCC+MNC code for the client's network connection. On Android: http:// + # developer.android.com/reference/android/telephony/TelephonyManager.html# + # getNetworkOperator() On iOS, see: https://developer.apple.com/library/ios/ + # documentation/NetworkingInternet/Reference/CTCarrier/Reference/Reference.html + # Corresponds to the JSON property `networkOperatorCode` + # @return [String] + attr_accessor :network_operator_code + + # The name of the carrier of the client's network connection. On Android: http:// + # developer.android.com/reference/android/telephony/TelephonyManager.html# + # getNetworkOperatorName() On iOS: https://developer.apple.com/library/ios/ + # documentation/NetworkingInternet/Reference/CTCarrier/Reference/Reference.html#/ + # /apple_ref/occ/instp/CTCarrier/carrierName + # Corresponds to the JSON property `networkOperatorName` + # @return [String] + attr_accessor :network_operator_name + + # The amount of time in milliseconds it took for the client to establish a + # connection with the XMPP server. + # Corresponds to the JSON property `registrationLatencyMillis` + # @return [Fixnum] + attr_accessor :registration_latency_millis + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @android_network_subtype = args[:android_network_subtype] if args.key?(:android_network_subtype) + @android_network_type = args[:android_network_type] if args.key?(:android_network_type) + @ios_network_type = args[:ios_network_type] if args.key?(:ios_network_type) + @kind = args[:kind] if args.key?(:kind) + @network_operator_code = args[:network_operator_code] if args.key?(:network_operator_code) + @network_operator_name = args[:network_operator_name] if args.key?(:network_operator_name) + @registration_latency_millis = args[:registration_latency_millis] if args.key?(:registration_latency_millis) + end + end + + # This is a JSON template for a result for a match participant. + class ParticipantResult + include Google::Apis::Core::Hashable + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#participantResult. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The ID of the participant. + # Corresponds to the JSON property `participantId` + # @return [String] + attr_accessor :participant_id + + # The placement or ranking of the participant in the match results; a number + # from one to the number of participants in the match. Multiple participants may + # have the same placing value in case of a type. + # Corresponds to the JSON property `placing` + # @return [Fixnum] + attr_accessor :placing + + # The result of the participant for this match. + # Possible values are: + # - "MATCH_RESULT_WIN" - The participant won the match. + # - "MATCH_RESULT_LOSS" - The participant lost the match. + # - "MATCH_RESULT_TIE" - The participant tied the match. + # - "MATCH_RESULT_NONE" - There was no winner for the match (nobody wins or + # loses this kind of game.) + # - "MATCH_RESULT_DISCONNECT" - The participant disconnected / left during the + # match. + # - "MATCH_RESULT_DISAGREED" - Different clients reported different results for + # this participant. + # Corresponds to the JSON property `result` + # @return [String] + attr_accessor :result + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @kind = args[:kind] if args.key?(:kind) + @participant_id = args[:participant_id] if args.key?(:participant_id) + @placing = args[:placing] if args.key?(:placing) + @result = args[:result] if args.key?(:result) + end + end + + # This is a JSON template for peer channel diagnostics. + class PeerChannelDiagnostics + include Google::Apis::Core::Hashable + + # This is a JSON template for aggregate stats. + # Corresponds to the JSON property `bytesReceived` + # @return [Google::Apis::GamesV1::AggregateStats] + attr_accessor :bytes_received + + # This is a JSON template for aggregate stats. + # Corresponds to the JSON property `bytesSent` + # @return [Google::Apis::GamesV1::AggregateStats] + attr_accessor :bytes_sent + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#peerChannelDiagnostics. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # Number of messages lost. + # Corresponds to the JSON property `numMessagesLost` + # @return [Fixnum] + attr_accessor :num_messages_lost + + # Number of messages received. + # Corresponds to the JSON property `numMessagesReceived` + # @return [Fixnum] + attr_accessor :num_messages_received + + # Number of messages sent. + # Corresponds to the JSON property `numMessagesSent` + # @return [Fixnum] + attr_accessor :num_messages_sent + + # Number of send failures. + # Corresponds to the JSON property `numSendFailures` + # @return [Fixnum] + attr_accessor :num_send_failures + + # This is a JSON template for aggregate stats. + # Corresponds to the JSON property `roundtripLatencyMillis` + # @return [Google::Apis::GamesV1::AggregateStats] + attr_accessor :roundtrip_latency_millis + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @bytes_received = args[:bytes_received] if args.key?(:bytes_received) + @bytes_sent = args[:bytes_sent] if args.key?(:bytes_sent) + @kind = args[:kind] if args.key?(:kind) + @num_messages_lost = args[:num_messages_lost] if args.key?(:num_messages_lost) + @num_messages_received = args[:num_messages_received] if args.key?(:num_messages_received) + @num_messages_sent = args[:num_messages_sent] if args.key?(:num_messages_sent) + @num_send_failures = args[:num_send_failures] if args.key?(:num_send_failures) + @roundtrip_latency_millis = args[:roundtrip_latency_millis] if args.key?(:roundtrip_latency_millis) + end + end + + # This is a JSON template for peer session diagnostics. + class PeerSessionDiagnostics + include Google::Apis::Core::Hashable + + # Connected time in milliseconds. + # Corresponds to the JSON property `connectedTimestampMillis` + # @return [Fixnum] + attr_accessor :connected_timestamp_millis + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#peerSessionDiagnostics. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The participant ID of the peer. + # Corresponds to the JSON property `participantId` + # @return [String] + attr_accessor :participant_id + + # This is a JSON template for peer channel diagnostics. + # Corresponds to the JSON property `reliableChannel` + # @return [Google::Apis::GamesV1::PeerChannelDiagnostics] + attr_accessor :reliable_channel + + # This is a JSON template for peer channel diagnostics. + # Corresponds to the JSON property `unreliableChannel` + # @return [Google::Apis::GamesV1::PeerChannelDiagnostics] + attr_accessor :unreliable_channel + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @connected_timestamp_millis = args[:connected_timestamp_millis] if args.key?(:connected_timestamp_millis) + @kind = args[:kind] if args.key?(:kind) + @participant_id = args[:participant_id] if args.key?(:participant_id) + @reliable_channel = args[:reliable_channel] if args.key?(:reliable_channel) + @unreliable_channel = args[:unreliable_channel] if args.key?(:unreliable_channel) + end + end + + # This is a JSON template for metadata about a player playing a game with the + # currently authenticated user. + class Played + include Google::Apis::Core::Hashable + + # True if the player was auto-matched with the currently authenticated user. + # Corresponds to the JSON property `autoMatched` + # @return [Boolean] + attr_accessor :auto_matched + alias_method :auto_matched?, :auto_matched + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#played. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The last time the player played the game in milliseconds since the epoch in + # UTC. + # Corresponds to the JSON property `timeMillis` + # @return [Fixnum] + attr_accessor :time_millis + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @auto_matched = args[:auto_matched] if args.key?(:auto_matched) + @kind = args[:kind] if args.key?(:kind) + @time_millis = args[:time_millis] if args.key?(:time_millis) + end + end + + # This is a JSON template for a Player resource. class Player include Google::Apis::Core::Hashable @@ -1621,7 +2002,7 @@ module Google # @return [String] attr_accessor :display_name - # 1P/3P metadata about the player's experience. + # This is a JSON template for 1P/3P metadata about the player's experience. # Corresponds to the JSON property `experienceInfo` # @return [Google::Apis::GamesV1::PlayerExperienceInfo] attr_accessor :experience_info @@ -1633,20 +2014,27 @@ module Google attr_accessor :friend_status # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#player` + # string games#player. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind - # A representation of the individual components of the name. + # This is a JSON template for metadata about a player playing a game with the + # currently authenticated user. + # Corresponds to the JSON property `lastPlayedWith` + # @return [Google::Apis::GamesV1::Played] + attr_accessor :last_played_with + + # An object representation of the individual components of the player's name. + # For some players, these fields may not be present. # Corresponds to the JSON property `name` # @return [Google::Apis::GamesV1::Player::Name] attr_accessor :name # The player ID that was used for this player the first time they signed into - # the game in question. This is only populated for calls to player.get for - # the requesting player, only if the player ID has subsequently changed, and - # only to clients that support remapping player IDs. + # the game in question. This is only populated for calls to player.get for the + # requesting player, only if the player ID has subsequently changed, and only to + # clients that support remapping player IDs. # Corresponds to the JSON property `originalPlayerId` # @return [String] attr_accessor :original_player_id @@ -1656,7 +2044,7 @@ module Google # @return [String] attr_accessor :player_id - # Profile settings + # This is a JSON template for profile settings # Corresponds to the JSON property `profileSettings` # @return [Google::Apis::GamesV1::ProfileSettings] attr_accessor :profile_settings @@ -1679,6 +2067,7 @@ module Google @experience_info = args[:experience_info] if args.key?(:experience_info) @friend_status = args[:friend_status] if args.key?(:friend_status) @kind = args[:kind] if args.key?(:kind) + @last_played_with = args[:last_played_with] if args.key?(:last_played_with) @name = args[:name] if args.key?(:name) @original_player_id = args[:original_player_id] if args.key?(:original_player_id) @player_id = args[:player_id] if args.key?(:player_id) @@ -1686,18 +2075,17 @@ module Google @title = args[:title] if args.key?(:title) end - # A representation of the individual components of the name. + # An object representation of the individual components of the player's name. + # For some players, these fields may not be present. class Name include Google::Apis::Core::Hashable - # The family name of this player. In some places, this is known as the last - # name. + # The family name of this player. In some places, this is known as the last name. # Corresponds to the JSON property `familyName` # @return [String] attr_accessor :family_name - # The given name of this player. In some places, this is known as the first - # name. + # The given name of this player. In some places, this is known as the first name. # Corresponds to the JSON property `givenName` # @return [String] attr_accessor :given_name @@ -1714,11 +2102,15 @@ module Google end end - # An achievement object. + # This is a JSON template for an achievement object. class PlayerAchievement include Google::Apis::Core::Hashable # The state of the achievement. + # Possible values are: + # - "HIDDEN" - Achievement is hidden. + # - "REVEALED" - Achievement is revealed. + # - "UNLOCKED" - Achievement is unlocked. # Corresponds to the JSON property `achievementState` # @return [String] attr_accessor :achievement_state @@ -1729,8 +2121,8 @@ module Google attr_accessor :current_steps # Experience points earned for the achievement. This field is absent for - # achievements that have not yet been unlocked and 0 for achievements that - # have been unlocked by testers but that are unpublished. + # achievements that have not yet been unlocked and 0 for achievements that have + # been unlocked by testers but that are unpublished. # Corresponds to the JSON property `experiencePoints` # @return [Fixnum] attr_accessor :experience_points @@ -1746,7 +2138,7 @@ module Google attr_accessor :id # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#playerAchievement`. + # string games#playerAchievement. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -1772,7 +2164,7 @@ module Google end end - # A list of achievement objects. + # This is a JSON template for a list of achievement objects. class ListPlayerAchievementResponse include Google::Apis::Core::Hashable @@ -1782,7 +2174,7 @@ module Google attr_accessor :items # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#playerAchievementListResponse`. + # string games#playerAchievementListResponse. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -1804,7 +2196,7 @@ module Google end end - # An event status resource. + # This is a JSON template for an event status resource. class PlayerEvent include Google::Apis::Core::Hashable @@ -1821,7 +2213,7 @@ module Google attr_accessor :formatted_num_events # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#playerEvent`. + # string games#playerEvent. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -1850,7 +2242,7 @@ module Google end end - # A ListByPlayer response. + # This is a JSON template for a ListByPlayer response. class ListPlayerEventResponse include Google::Apis::Core::Hashable @@ -1860,7 +2252,7 @@ module Google attr_accessor :items # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#playerEventListResponse`. + # string games#playerEventListResponse. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -1882,7 +2274,7 @@ module Google end end - # 1P/3P metadata about the player's experience. + # This is a JSON template for 1P/3P metadata about the player's experience. class PlayerExperienceInfo include Google::Apis::Core::Hashable @@ -1891,24 +2283,23 @@ module Google # @return [Fixnum] attr_accessor :current_experience_points - # 1P/3P metadata about a user's level. + # This is a JSON template for 1P/3P metadata about a user's level. # Corresponds to the JSON property `currentLevel` # @return [Google::Apis::GamesV1::PlayerLevel] attr_accessor :current_level # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#playerExperienceInfo`. + # string games#playerExperienceInfo. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind - # The timestamp when the player was leveled up, in millis since Unix epoch - # UTC. + # The timestamp when the player was leveled up, in millis since Unix epoch UTC. # Corresponds to the JSON property `lastLevelUpTimestampMillis` # @return [Fixnum] attr_accessor :last_level_up_timestamp_millis - # 1P/3P metadata about a user's level. + # This is a JSON template for 1P/3P metadata about a user's level. # Corresponds to the JSON property `nextLevel` # @return [Google::Apis::GamesV1::PlayerLevel] attr_accessor :next_level @@ -1927,12 +2318,12 @@ module Google end end - # A player leaderboard score object. + # This is a JSON template for a player leaderboard score object. class PlayerLeaderboardScore include Google::Apis::Core::Hashable # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#playerLeaderboardScore`. + # string games#playerLeaderboardScore. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -1942,7 +2333,7 @@ module Google # @return [String] attr_accessor :leaderboard_id - # A score rank in a leaderboard. + # This is a JSON template for a score rank in a leaderboard. # Corresponds to the JSON property `publicRank` # @return [Google::Apis::GamesV1::LeaderboardScoreRank] attr_accessor :public_rank @@ -1952,8 +2343,8 @@ module Google # @return [String] attr_accessor :score_string - # Additional information about the score. Values must contain no more than - # 64 URI-safe characters as defined by section 2.3 of RFC 3986. + # Additional information about the score. Values must contain no more than 64 + # URI-safe characters as defined by section 2.3 of RFC 3986. # Corresponds to the JSON property `scoreTag` # @return [String] attr_accessor :score_tag @@ -1963,12 +2354,16 @@ module Google # @return [Fixnum] attr_accessor :score_value - # A score rank in a leaderboard. + # This is a JSON template for a score rank in a leaderboard. # Corresponds to the JSON property `socialRank` # @return [Google::Apis::GamesV1::LeaderboardScoreRank] attr_accessor :social_rank # The time span of this score. + # Possible values are: + # - "ALL_TIME" - The score is an all-time score. + # - "WEEKLY" - The score is a weekly score. + # - "DAILY" - The score is a daily score. # Corresponds to the JSON property `timeSpan` # @return [String] attr_accessor :time_span @@ -1997,7 +2392,7 @@ module Google end end - # A list of player leaderboard scores. + # This is a JSON template for a list of player leaderboard scores. class ListPlayerLeaderboardScoreResponse include Google::Apis::Core::Hashable @@ -2007,7 +2402,7 @@ module Google attr_accessor :items # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#playerLeaderboardScoreListResponse`. + # string games#playerLeaderboardScoreListResponse. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -2017,7 +2412,7 @@ module Google # @return [String] attr_accessor :next_page_token - # A Player resource. + # This is a JSON template for a Player resource. # Corresponds to the JSON property `player` # @return [Google::Apis::GamesV1::Player] attr_accessor :player @@ -2035,12 +2430,12 @@ module Google end end - # 1P/3P metadata about a user's level. + # This is a JSON template for 1P/3P metadata about a user's level. class PlayerLevel include Google::Apis::Core::Hashable # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#playerLevel`. + # string games#playerLevel. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -2073,7 +2468,7 @@ module Google end end - # A third party player list response. + # This is a JSON template for a third party player list response. class ListPlayerResponse include Google::Apis::Core::Hashable @@ -2083,7 +2478,7 @@ module Google attr_accessor :items # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#playerListResponse`. + # string games#playerListResponse. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -2105,7 +2500,7 @@ module Google end end - # A player score. + # This is a JSON template for a player score. class PlayerScore include Google::Apis::Core::Hashable @@ -2115,7 +2510,7 @@ module Google attr_accessor :formatted_score # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#playerScore`. + # string games#playerScore. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -2125,13 +2520,17 @@ module Google # @return [Fixnum] attr_accessor :score - # Additional information about this score. Values will contain no more than - # 64 URI-safe characters as defined by section 2.3 of RFC 3986. + # Additional information about this score. Values will contain no more than 64 + # URI-safe characters as defined by section 2.3 of RFC 3986. # Corresponds to the JSON property `scoreTag` # @return [String] attr_accessor :score_tag # The time span for this player score. + # Possible values are: + # - "ALL_TIME" - The score is an all-time score. + # - "WEEKLY" - The score is a weekly score. + # - "DAILY" - The score is a daily score. # Corresponds to the JSON property `timeSpan` # @return [String] attr_accessor :time_span @@ -2150,12 +2549,12 @@ module Google end end - # A list of score submission statuses. + # This is a JSON template for a list of score submission statuses. class ListPlayerScoreResponse include Google::Apis::Core::Hashable # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#playerScoreListResponse`. + # string games#playerScoreListResponse. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -2176,12 +2575,16 @@ module Google end end - # A list of leaderboard entry resources. + # This is a JSON template for a list of leaderboard entry resources. class PlayerScoreResponse include Google::Apis::Core::Hashable - # The time spans where the submitted score is better than the existing score - # for that time span. + # The time spans where the submitted score is better than the existing score for + # that time span. + # Possible values are: + # - "ALL_TIME" - The score is an all-time score. + # - "WEEKLY" - The score is a weekly score. + # - "DAILY" - The score is a daily score. # Corresponds to the JSON property `beatenScoreTimeSpans` # @return [Array] attr_accessor :beaten_score_time_spans @@ -2192,7 +2595,7 @@ module Google attr_accessor :formatted_score # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#playerScoreResponse`. + # string games#playerScoreResponse. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -2202,16 +2605,15 @@ module Google # @return [String] attr_accessor :leaderboard_id - # Additional information about this score. Values will contain no more than - # 64 URI-safe characters as defined by section 2.3 of RFC 3986. + # Additional information about this score. Values will contain no more than 64 + # URI-safe characters as defined by section 2.3 of RFC 3986. # Corresponds to the JSON property `scoreTag` # @return [String] attr_accessor :score_tag - # The scores in time spans that have not been beaten. As an example, the - # submitted score may be better than the - # player's `DAILY` score, but not better than the player's scores - # for the `WEEKLY` or `ALL_TIME` time spans. + # The scores in time spans that have not been beaten. As an example, the + # submitted score may be better than the player's DAILY score, but not better + # than the player's scores for the WEEKLY or ALL_TIME time spans. # Corresponds to the JSON property `unbeatenScores` # @return [Array] attr_accessor :unbeaten_scores @@ -2231,12 +2633,12 @@ module Google end end - # A list of score submission requests. + # This is a JSON template for a list of score submission requests class PlayerScoreSubmissionList include Google::Apis::Core::Hashable # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#playerScoreSubmissionList`. + # string games#playerScoreSubmissionList. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -2257,22 +2659,22 @@ module Google end end - # Profile settings + # This is a JSON template for profile settings class ProfileSettings include Google::Apis::Core::Hashable - # + # Whether the player's friends list is visible to the game. # Corresponds to the JSON property `friendsListVisibility` # @return [String] attr_accessor :friends_list_visibility # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#profileSettings`. + # string games#profileSettings. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind - # Whether the player's profile is visible to the currently signed in player. + # # Corresponds to the JSON property `profileVisible` # @return [Boolean] attr_accessor :profile_visible @@ -2290,7 +2692,103 @@ module Google end end - # A third party checking a revision response. + # This is a JSON template for a push token resource. + class PushToken + include Google::Apis::Core::Hashable + + # The revision of the client SDK used by your application, in the same format + # that's used by revisions.check. Used to send backward compatible messages. + # Format: [PLATFORM_TYPE]:[VERSION_NUMBER]. Possible values of PLATFORM_TYPE are: + # + # - IOS - Push token is for iOS + # Corresponds to the JSON property `clientRevision` + # @return [String] + attr_accessor :client_revision + + # This is a JSON template for a push token ID resource. + # Corresponds to the JSON property `id` + # @return [Google::Apis::GamesV1::PushTokenId] + attr_accessor :id + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#pushToken. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The preferred language for notifications that are sent using this token. + # Corresponds to the JSON property `language` + # @return [String] + attr_accessor :language + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @client_revision = args[:client_revision] if args.key?(:client_revision) + @id = args[:id] if args.key?(:id) + @kind = args[:kind] if args.key?(:kind) + @language = args[:language] if args.key?(:language) + end + end + + # This is a JSON template for a push token ID resource. + class PushTokenId + include Google::Apis::Core::Hashable + + # A push token ID for iOS devices. + # Corresponds to the JSON property `ios` + # @return [Google::Apis::GamesV1::PushTokenId::Ios] + attr_accessor :ios + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#pushTokenId. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @ios = args[:ios] if args.key?(:ios) + @kind = args[:kind] if args.key?(:kind) + end + + # A push token ID for iOS devices. + class Ios + include Google::Apis::Core::Hashable + + # Device token supplied by an iOS system call to register for remote + # notifications. Encode this field as web-safe base64. + # Corresponds to the JSON property `apns_device_token` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :apns_device_token + + # Indicates whether this token should be used for the production or sandbox APNS + # server. + # Corresponds to the JSON property `apns_environment` + # @return [String] + attr_accessor :apns_environment + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @apns_device_token = args[:apns_device_token] if args.key?(:apns_device_token) + @apns_environment = args[:apns_environment] if args.key?(:apns_environment) + end + end + end + + # This is a JSON template for the result of checking a revision. class CheckRevisionResponse include Google::Apis::Core::Hashable @@ -2301,12 +2799,17 @@ module Google attr_accessor :api_version # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#revisionCheckResponse`. + # string games#revisionCheckResponse. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind # The result of the revision check. + # Possible values are: + # - "OK" - The revision being used is current. + # - "DEPRECATED" - There is currently a newer version available, but the + # revision being used still works. + # - "INVALID" - The revision being used is not supported in any released version. # Corresponds to the JSON property `revisionStatus` # @return [String] attr_accessor :revision_status @@ -2323,12 +2826,760 @@ module Google end end - # A request to submit a score to leaderboards. + # This is a JSON template for a room resource object. + class Room + include Google::Apis::Core::Hashable + + # The ID of the application being played. + # Corresponds to the JSON property `applicationId` + # @return [String] + attr_accessor :application_id + + # This is a JSON template for a room auto-match criteria object. + # Corresponds to the JSON property `autoMatchingCriteria` + # @return [Google::Apis::GamesV1::RoomAutoMatchingCriteria] + attr_accessor :auto_matching_criteria + + # This is a JSON template for status of room automatching that is in progress. + # Corresponds to the JSON property `autoMatchingStatus` + # @return [Google::Apis::GamesV1::RoomAutoMatchStatus] + attr_accessor :auto_matching_status + + # This is a JSON template for room modification metadata. + # Corresponds to the JSON property `creationDetails` + # @return [Google::Apis::GamesV1::RoomModification] + attr_accessor :creation_details + + # This short description is generated by our servers and worded relative to the + # player requesting the room. It is intended to be displayed when the room is + # shown in a list (that is, an invitation to a room.) + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The ID of the participant that invited the user to the room. Not set if the + # user was not invited to the room. + # Corresponds to the JSON property `inviterId` + # @return [String] + attr_accessor :inviter_id + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#room. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # This is a JSON template for room modification metadata. + # Corresponds to the JSON property `lastUpdateDetails` + # @return [Google::Apis::GamesV1::RoomModification] + attr_accessor :last_update_details + + # The participants involved in the room, along with their statuses. Includes + # participants who have left or declined invitations. + # Corresponds to the JSON property `participants` + # @return [Array] + attr_accessor :participants + + # Globally unique ID for a room. + # Corresponds to the JSON property `roomId` + # @return [String] + attr_accessor :room_id + + # The version of the room status: an increasing counter, used by the client to + # ignore out-of-order updates to room status. + # Corresponds to the JSON property `roomStatusVersion` + # @return [Fixnum] + attr_accessor :room_status_version + + # The status of the room. + # Possible values are: + # - "ROOM_INVITING" - One or more players have been invited and not responded. + # - "ROOM_AUTO_MATCHING" - One or more slots need to be filled by auto-matching. + # - "ROOM_CONNECTING" - Players have joined and are connecting to each other ( + # either before or after auto-matching). + # - "ROOM_ACTIVE" - All players have joined and connected to each other. + # - "ROOM_DELETED" - The room should no longer be shown on the client. Returned + # in sync calls when a player joins a room (as a tombstone), or for rooms where + # all joined participants have left. + # Corresponds to the JSON property `status` + # @return [String] + attr_accessor :status + + # The variant / mode of the application being played; can be any integer value, + # or left blank. + # Corresponds to the JSON property `variant` + # @return [Fixnum] + attr_accessor :variant + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @application_id = args[:application_id] if args.key?(:application_id) + @auto_matching_criteria = args[:auto_matching_criteria] if args.key?(:auto_matching_criteria) + @auto_matching_status = args[:auto_matching_status] if args.key?(:auto_matching_status) + @creation_details = args[:creation_details] if args.key?(:creation_details) + @description = args[:description] if args.key?(:description) + @inviter_id = args[:inviter_id] if args.key?(:inviter_id) + @kind = args[:kind] if args.key?(:kind) + @last_update_details = args[:last_update_details] if args.key?(:last_update_details) + @participants = args[:participants] if args.key?(:participants) + @room_id = args[:room_id] if args.key?(:room_id) + @room_status_version = args[:room_status_version] if args.key?(:room_status_version) + @status = args[:status] if args.key?(:status) + @variant = args[:variant] if args.key?(:variant) + end + end + + # This is a JSON template for status of room automatching that is in progress. + class RoomAutoMatchStatus + include Google::Apis::Core::Hashable + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#roomAutoMatchStatus. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # An estimate for the amount of time (in seconds) that auto-matching is expected + # to take to complete. + # Corresponds to the JSON property `waitEstimateSeconds` + # @return [Fixnum] + attr_accessor :wait_estimate_seconds + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @kind = args[:kind] if args.key?(:kind) + @wait_estimate_seconds = args[:wait_estimate_seconds] if args.key?(:wait_estimate_seconds) + end + end + + # This is a JSON template for a room auto-match criteria object. + class RoomAutoMatchingCriteria + include Google::Apis::Core::Hashable + + # A bitmask indicating when auto-matches are valid. When ANDed with other + # exclusive bitmasks, the result must be zero. Can be used to support exclusive + # roles within a game. + # Corresponds to the JSON property `exclusiveBitmask` + # @return [Fixnum] + attr_accessor :exclusive_bitmask + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#roomAutoMatchingCriteria. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The maximum number of players that should be added to the room by auto- + # matching. + # Corresponds to the JSON property `maxAutoMatchingPlayers` + # @return [Fixnum] + attr_accessor :max_auto_matching_players + + # The minimum number of players that should be added to the room by auto- + # matching. + # Corresponds to the JSON property `minAutoMatchingPlayers` + # @return [Fixnum] + attr_accessor :min_auto_matching_players + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @exclusive_bitmask = args[:exclusive_bitmask] if args.key?(:exclusive_bitmask) + @kind = args[:kind] if args.key?(:kind) + @max_auto_matching_players = args[:max_auto_matching_players] if args.key?(:max_auto_matching_players) + @min_auto_matching_players = args[:min_auto_matching_players] if args.key?(:min_auto_matching_players) + end + end + + # This is a JSON template for the client address when setting up a room. + class RoomClientAddress + include Google::Apis::Core::Hashable + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#roomClientAddress. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The XMPP address of the client on the Google Games XMPP network. + # Corresponds to the JSON property `xmppAddress` + # @return [String] + attr_accessor :xmpp_address + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @kind = args[:kind] if args.key?(:kind) + @xmpp_address = args[:xmpp_address] if args.key?(:xmpp_address) + end + end + + # This is a JSON template for a room creation request. + class CreateRoomRequest + include Google::Apis::Core::Hashable + + # This is a JSON template for a room auto-match criteria object. + # Corresponds to the JSON property `autoMatchingCriteria` + # @return [Google::Apis::GamesV1::RoomAutoMatchingCriteria] + attr_accessor :auto_matching_criteria + + # The capabilities that this client supports for realtime communication. + # Corresponds to the JSON property `capabilities` + # @return [Array] + attr_accessor :capabilities + + # This is a JSON template for the client address when setting up a room. + # Corresponds to the JSON property `clientAddress` + # @return [Google::Apis::GamesV1::RoomClientAddress] + attr_accessor :client_address + + # The player IDs to invite to the room. + # Corresponds to the JSON property `invitedPlayerIds` + # @return [Array] + attr_accessor :invited_player_ids + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#roomCreateRequest. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # This is a JSON template for network diagnostics reported for a client. + # Corresponds to the JSON property `networkDiagnostics` + # @return [Google::Apis::GamesV1::NetworkDiagnostics] + attr_accessor :network_diagnostics + + # A randomly generated numeric ID. This number is used at the server to ensure + # that the request is handled correctly across retries. + # Corresponds to the JSON property `requestId` + # @return [Fixnum] + attr_accessor :request_id + + # The variant / mode of the application to be played. This can be any integer + # value, or left blank. You should use a small number of variants to keep the + # auto-matching pool as large as possible. + # Corresponds to the JSON property `variant` + # @return [Fixnum] + attr_accessor :variant + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @auto_matching_criteria = args[:auto_matching_criteria] if args.key?(:auto_matching_criteria) + @capabilities = args[:capabilities] if args.key?(:capabilities) + @client_address = args[:client_address] if args.key?(:client_address) + @invited_player_ids = args[:invited_player_ids] if args.key?(:invited_player_ids) + @kind = args[:kind] if args.key?(:kind) + @network_diagnostics = args[:network_diagnostics] if args.key?(:network_diagnostics) + @request_id = args[:request_id] if args.key?(:request_id) + @variant = args[:variant] if args.key?(:variant) + end + end + + # This is a JSON template for a join room request. + class JoinRoomRequest + include Google::Apis::Core::Hashable + + # The capabilities that this client supports for realtime communication. + # Corresponds to the JSON property `capabilities` + # @return [Array] + attr_accessor :capabilities + + # This is a JSON template for the client address when setting up a room. + # Corresponds to the JSON property `clientAddress` + # @return [Google::Apis::GamesV1::RoomClientAddress] + attr_accessor :client_address + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#roomJoinRequest. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # This is a JSON template for network diagnostics reported for a client. + # Corresponds to the JSON property `networkDiagnostics` + # @return [Google::Apis::GamesV1::NetworkDiagnostics] + attr_accessor :network_diagnostics + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @capabilities = args[:capabilities] if args.key?(:capabilities) + @client_address = args[:client_address] if args.key?(:client_address) + @kind = args[:kind] if args.key?(:kind) + @network_diagnostics = args[:network_diagnostics] if args.key?(:network_diagnostics) + end + end + + # This is a JSON template for room leave diagnostics. + class RoomLeaveDiagnostics + include Google::Apis::Core::Hashable + + # Android network subtype. http://developer.android.com/reference/android/net/ + # NetworkInfo.html#getSubtype() + # Corresponds to the JSON property `androidNetworkSubtype` + # @return [Fixnum] + attr_accessor :android_network_subtype + + # Android network type. http://developer.android.com/reference/android/net/ + # NetworkInfo.html#getType() + # Corresponds to the JSON property `androidNetworkType` + # @return [Fixnum] + attr_accessor :android_network_type + + # iOS network type as defined in Reachability.h. + # Corresponds to the JSON property `iosNetworkType` + # @return [Fixnum] + attr_accessor :ios_network_type + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#roomLeaveDiagnostics. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The MCC+MNC code for the client's network connection. On Android: http:// + # developer.android.com/reference/android/telephony/TelephonyManager.html# + # getNetworkOperator() On iOS, see: https://developer.apple.com/library/ios/ + # documentation/NetworkingInternet/Reference/CTCarrier/Reference/Reference.html + # Corresponds to the JSON property `networkOperatorCode` + # @return [String] + attr_accessor :network_operator_code + + # The name of the carrier of the client's network connection. On Android: http:// + # developer.android.com/reference/android/telephony/TelephonyManager.html# + # getNetworkOperatorName() On iOS: https://developer.apple.com/library/ios/ + # documentation/NetworkingInternet/Reference/CTCarrier/Reference/Reference.html#/ + # /apple_ref/occ/instp/CTCarrier/carrierName + # Corresponds to the JSON property `networkOperatorName` + # @return [String] + attr_accessor :network_operator_name + + # Diagnostics about all peer sessions. + # Corresponds to the JSON property `peerSession` + # @return [Array] + attr_accessor :peer_session + + # Whether or not sockets were used. + # Corresponds to the JSON property `socketsUsed` + # @return [Boolean] + attr_accessor :sockets_used + alias_method :sockets_used?, :sockets_used + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @android_network_subtype = args[:android_network_subtype] if args.key?(:android_network_subtype) + @android_network_type = args[:android_network_type] if args.key?(:android_network_type) + @ios_network_type = args[:ios_network_type] if args.key?(:ios_network_type) + @kind = args[:kind] if args.key?(:kind) + @network_operator_code = args[:network_operator_code] if args.key?(:network_operator_code) + @network_operator_name = args[:network_operator_name] if args.key?(:network_operator_name) + @peer_session = args[:peer_session] if args.key?(:peer_session) + @sockets_used = args[:sockets_used] if args.key?(:sockets_used) + end + end + + # This is a JSON template for a leave room request. + class LeaveRoomRequest + include Google::Apis::Core::Hashable + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#roomLeaveRequest. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # This is a JSON template for room leave diagnostics. + # Corresponds to the JSON property `leaveDiagnostics` + # @return [Google::Apis::GamesV1::RoomLeaveDiagnostics] + attr_accessor :leave_diagnostics + + # Reason for leaving the match. + # Possible values are: + # - "PLAYER_LEFT" - The player chose to leave the room.. + # - "GAME_LEFT" - The game chose to remove the player from the room. + # - "REALTIME_ABANDONED" - The player switched to another application and + # abandoned the room. + # - "REALTIME_PEER_CONNECTION_FAILURE" - The client was unable to establish a + # connection to other peer(s). + # - "REALTIME_SERVER_CONNECTION_FAILURE" - The client was unable to communicate + # with the server. + # - "REALTIME_SERVER_ERROR" - The client received an error response when it + # tried to communicate with the server. + # - "REALTIME_TIMEOUT" - The client timed out while waiting for a room. + # - "REALTIME_CLIENT_DISCONNECTING" - The client disconnects without first + # calling Leave. + # - "REALTIME_SIGN_OUT" - The user signed out of G+ while in the room. + # - "REALTIME_GAME_CRASHED" - The game crashed. + # - "REALTIME_ROOM_SERVICE_CRASHED" - RoomAndroidService crashed. + # - "REALTIME_DIFFERENT_CLIENT_ROOM_OPERATION" - Another client is trying to + # enter a room. + # - "REALTIME_SAME_CLIENT_ROOM_OPERATION" - The same client is trying to enter a + # new room. + # Corresponds to the JSON property `reason` + # @return [String] + attr_accessor :reason + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @kind = args[:kind] if args.key?(:kind) + @leave_diagnostics = args[:leave_diagnostics] if args.key?(:leave_diagnostics) + @reason = args[:reason] if args.key?(:reason) + end + end + + # This is a JSON template for a list of rooms. + class RoomList + include Google::Apis::Core::Hashable + + # The rooms. + # Corresponds to the JSON property `items` + # @return [Array] + attr_accessor :items + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#roomList. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The pagination token for the next page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @items = args[:items] if args.key?(:items) + @kind = args[:kind] if args.key?(:kind) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # This is a JSON template for room modification metadata. + class RoomModification + include Google::Apis::Core::Hashable + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#roomModification. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The timestamp at which they modified the room, in milliseconds since the epoch + # in UTC. + # Corresponds to the JSON property `modifiedTimestampMillis` + # @return [Fixnum] + attr_accessor :modified_timestamp_millis + + # The ID of the participant that modified the room. + # Corresponds to the JSON property `participantId` + # @return [String] + attr_accessor :participant_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @kind = args[:kind] if args.key?(:kind) + @modified_timestamp_millis = args[:modified_timestamp_millis] if args.key?(:modified_timestamp_millis) + @participant_id = args[:participant_id] if args.key?(:participant_id) + end + end + + # This is a JSON template for an update on the status of a peer in a room. + class RoomP2PStatus + include Google::Apis::Core::Hashable + + # The amount of time in milliseconds it took to establish connections with this + # peer. + # Corresponds to the JSON property `connectionSetupLatencyMillis` + # @return [Fixnum] + attr_accessor :connection_setup_latency_millis + + # The error code in event of a failure. + # Possible values are: + # - "P2P_FAILED" - The client failed to establish a P2P connection with the peer. + # + # - "PRESENCE_FAILED" - The client failed to register to receive P2P connections. + # + # - "RELAY_SERVER_FAILED" - The client received an error when trying to use the + # relay server to establish a P2P connection with the peer. + # Corresponds to the JSON property `error` + # @return [String] + attr_accessor :error + + # More detailed diagnostic message returned in event of a failure. + # Corresponds to the JSON property `error_reason` + # @return [String] + attr_accessor :error_reason + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#roomP2PStatus. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The ID of the participant. + # Corresponds to the JSON property `participantId` + # @return [String] + attr_accessor :participant_id + + # The status of the peer in the room. + # Possible values are: + # - "CONNECTION_ESTABLISHED" - The client established a P2P connection with the + # peer. + # - "CONNECTION_FAILED" - The client failed to establish directed presence with + # the peer. + # Corresponds to the JSON property `status` + # @return [String] + attr_accessor :status + + # The amount of time in milliseconds it took to send packets back and forth on + # the unreliable channel with this peer. + # Corresponds to the JSON property `unreliableRoundtripLatencyMillis` + # @return [Fixnum] + attr_accessor :unreliable_roundtrip_latency_millis + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @connection_setup_latency_millis = args[:connection_setup_latency_millis] if args.key?(:connection_setup_latency_millis) + @error = args[:error] if args.key?(:error) + @error_reason = args[:error_reason] if args.key?(:error_reason) + @kind = args[:kind] if args.key?(:kind) + @participant_id = args[:participant_id] if args.key?(:participant_id) + @status = args[:status] if args.key?(:status) + @unreliable_roundtrip_latency_millis = args[:unreliable_roundtrip_latency_millis] if args.key?(:unreliable_roundtrip_latency_millis) + end + end + + # This is a JSON template for an update on the status of peers in a room. + class RoomP2PStatuses + include Google::Apis::Core::Hashable + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#roomP2PStatuses. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The updates for the peers. + # Corresponds to the JSON property `updates` + # @return [Array] + attr_accessor :updates + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @kind = args[:kind] if args.key?(:kind) + @updates = args[:updates] if args.key?(:updates) + end + end + + # This is a JSON template for a participant in a room. + class RoomParticipant + include Google::Apis::Core::Hashable + + # True if this participant was auto-matched with the requesting player. + # Corresponds to the JSON property `autoMatched` + # @return [Boolean] + attr_accessor :auto_matched + alias_method :auto_matched?, :auto_matched + + # This is a JSON template for an anonymous player + # Corresponds to the JSON property `autoMatchedPlayer` + # @return [Google::Apis::GamesV1::AnonymousPlayer] + attr_accessor :auto_matched_player + + # The capabilities which can be used when communicating with this participant. + # Corresponds to the JSON property `capabilities` + # @return [Array] + attr_accessor :capabilities + + # This is a JSON template for the client address when setting up a room. + # Corresponds to the JSON property `clientAddress` + # @return [Google::Apis::GamesV1::RoomClientAddress] + attr_accessor :client_address + + # True if this participant is in the fully connected set of peers in the room. + # Corresponds to the JSON property `connected` + # @return [Boolean] + attr_accessor :connected + alias_method :connected?, :connected + + # An identifier for the participant in the scope of the room. Cannot be used to + # identify a player across rooms or in other contexts. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#roomParticipant. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The reason the participant left the room; populated if the participant status + # is PARTICIPANT_LEFT. + # Possible values are: + # - "PLAYER_LEFT" - The player explicitly chose to leave the room. + # - "GAME_LEFT" - The game chose to remove the player from the room. + # - "ABANDONED" - The player switched to another application and abandoned the + # room. + # - "PEER_CONNECTION_FAILURE" - The client was unable to establish or maintain a + # connection to other peer(s) in the room. + # - "SERVER_ERROR" - The client received an error response when it tried to + # communicate with the server. + # - "TIMEOUT" - The client timed out while waiting for players to join and + # connect. + # - "PRESENCE_FAILURE" - The client's XMPP connection ended abruptly. + # Corresponds to the JSON property `leaveReason` + # @return [String] + attr_accessor :leave_reason + + # This is a JSON template for a Player resource. + # Corresponds to the JSON property `player` + # @return [Google::Apis::GamesV1::Player] + attr_accessor :player + + # The status of the participant with respect to the room. + # Possible values are: + # - "PARTICIPANT_INVITED" - The participant has been invited to join the room, + # but has not yet responded. + # - "PARTICIPANT_JOINED" - The participant has joined the room (either after + # creating it or accepting an invitation.) + # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the + # room. + # - "PARTICIPANT_LEFT" - The participant joined the room and then left it. + # Corresponds to the JSON property `status` + # @return [String] + attr_accessor :status + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @auto_matched = args[:auto_matched] if args.key?(:auto_matched) + @auto_matched_player = args[:auto_matched_player] if args.key?(:auto_matched_player) + @capabilities = args[:capabilities] if args.key?(:capabilities) + @client_address = args[:client_address] if args.key?(:client_address) + @connected = args[:connected] if args.key?(:connected) + @id = args[:id] if args.key?(:id) + @kind = args[:kind] if args.key?(:kind) + @leave_reason = args[:leave_reason] if args.key?(:leave_reason) + @player = args[:player] if args.key?(:player) + @status = args[:status] if args.key?(:status) + end + end + + # This is a JSON template for the status of a room that the player has joined. + class RoomStatus + include Google::Apis::Core::Hashable + + # This is a JSON template for status of room automatching that is in progress. + # Corresponds to the JSON property `autoMatchingStatus` + # @return [Google::Apis::GamesV1::RoomAutoMatchStatus] + attr_accessor :auto_matching_status + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#roomStatus. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The participants involved in the room, along with their statuses. Includes + # participants who have left or declined invitations. + # Corresponds to the JSON property `participants` + # @return [Array] + attr_accessor :participants + + # Globally unique ID for a room. + # Corresponds to the JSON property `roomId` + # @return [String] + attr_accessor :room_id + + # The status of the room. + # Possible values are: + # - "ROOM_INVITING" - One or more players have been invited and not responded. + # - "ROOM_AUTO_MATCHING" - One or more slots need to be filled by auto-matching. + # - "ROOM_CONNECTING" - Players have joined are connecting to each other (either + # before or after auto-matching). + # - "ROOM_ACTIVE" - All players have joined and connected to each other. + # - "ROOM_DELETED" - All joined players have left. + # Corresponds to the JSON property `status` + # @return [String] + attr_accessor :status + + # The version of the status for the room: an increasing counter, used by the + # client to ignore out-of-order updates to room status. + # Corresponds to the JSON property `statusVersion` + # @return [Fixnum] + attr_accessor :status_version + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @auto_matching_status = args[:auto_matching_status] if args.key?(:auto_matching_status) + @kind = args[:kind] if args.key?(:kind) + @participants = args[:participants] if args.key?(:participants) + @room_id = args[:room_id] if args.key?(:room_id) + @status = args[:status] if args.key?(:status) + @status_version = args[:status_version] if args.key?(:status_version) + end + end + + # This is a JSON template for a request to submit a score to leaderboards. class ScoreSubmission include Google::Apis::Core::Hashable # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#scoreSubmission`. + # string games#scoreSubmission. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -2343,14 +3594,14 @@ module Google # @return [Fixnum] attr_accessor :score - # Additional information about this score. Values will contain no more than - # 64 URI-safe characters as defined by section 2.3 of RFC 3986. + # Additional information about this score. Values will contain no more than 64 + # URI-safe characters as defined by section 2.3 of RFC 3986. # Corresponds to the JSON property `scoreTag` # @return [String] attr_accessor :score_tag - # Signature Values will contain URI-safe characters as defined by section 2.3 - # of RFC 3986. + # Signature Values will contain URI-safe characters as defined by section 2.3 of + # RFC 3986. # Corresponds to the JSON property `signature` # @return [String] attr_accessor :signature @@ -2369,11 +3620,11 @@ module Google end end - # An snapshot object. + # This is a JSON template for an snapshot object. class Snapshot include Google::Apis::Core::Hashable - # An image of a snapshot. + # This is a JSON template for an image of a snapshot. # Corresponds to the JSON property `coverImage` # @return [Google::Apis::GamesV1::SnapshotImage] attr_accessor :cover_image @@ -2383,9 +3634,8 @@ module Google # @return [String] attr_accessor :description - # The ID of the file underlying this snapshot in the Drive API. Only present - # if the snapshot is a view on a Drive file and the file is owned by the - # caller. + # The ID of the file underlying this snapshot in the Drive API. Only present if + # the snapshot is a view on a Drive file and the file is owned by the caller. # Corresponds to the JSON property `driveId` # @return [String] attr_accessor :drive_id @@ -2401,7 +3651,7 @@ module Google attr_accessor :id # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#snapshot`. + # string games#snapshot. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -2424,6 +3674,8 @@ module Google attr_accessor :title # The type of this snapshot. + # Possible values are: + # - "SAVE_GAME" - A snapshot representing a save game. # Corresponds to the JSON property `type` # @return [String] attr_accessor :type @@ -2453,7 +3705,7 @@ module Google end end - # An image of a snapshot. + # This is a JSON template for an image of a snapshot. class SnapshotImage include Google::Apis::Core::Hashable @@ -2463,7 +3715,7 @@ module Google attr_accessor :height # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#snapshotImage`. + # string games#snapshotImage. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind @@ -2473,8 +3725,8 @@ module Google # @return [String] attr_accessor :mime_type - # The URL of the image. This URL may be invalidated at any time and should - # not be cached. + # The URL of the image. This URL may be invalidated at any time and should not + # be cached. # Corresponds to the JSON property `url` # @return [String] attr_accessor :url @@ -2498,7 +3750,7 @@ module Google end end - # A third party list snapshots response. + # This is a JSON template for a list of snapshot objects. class ListSnapshotResponse include Google::Apis::Core::Hashable @@ -2508,13 +3760,13 @@ module Google attr_accessor :items # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#snapshotListResponse`. + # string games#snapshotListResponse. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind - # Token corresponding to the next page of results. If there are no more - # results, the token is omitted. + # Token corresponding to the next page of results. If there are no more results, + # the token is omitted. # Corresponds to the JSON property `nextPageToken` # @return [String] attr_accessor :next_page_token @@ -2531,83 +3783,34 @@ module Google end end - # A third party stats resource. - class StatsResponse + # This is a JSON template for an turn-based auto-match criteria object. + class TurnBasedAutoMatchingCriteria include Google::Apis::Core::Hashable - # Average session length in minutes of the player. E.g., 1, 30, 60, ... . Not - # populated if there is not enough information. - # Corresponds to the JSON property `avg_session_length_minutes` - # @return [Float] - attr_accessor :avg_session_length_minutes - - # The probability of the player not returning to play the game in the next - # day. E.g., 0, 0.1, 0.5, ..., 1.0. Not populated if there is not enough - # information. - # Corresponds to the JSON property `churn_probability` - # @return [Float] - attr_accessor :churn_probability - - # Number of days since the player last played this game. E.g., 0, 1, 5, 10, - # ... . Not populated if there is not enough information. - # Corresponds to the JSON property `days_since_last_played` + # A bitmask indicating when auto-matches are valid. When ANDed with other + # exclusive bitmasks, the result must be zero. Can be used to support exclusive + # roles within a game. + # Corresponds to the JSON property `exclusiveBitmask` # @return [Fixnum] - attr_accessor :days_since_last_played - - # The probability of the player going to spend beyond a threshold amount of - # money. E.g., 0, 0.25, 0.50, 0.75. Not populated if there is not enough - # information. - # Corresponds to the JSON property `high_spender_probability` - # @return [Float] - attr_accessor :high_spender_probability + attr_accessor :exclusive_bitmask # Uniquely identifies the type of this resource. Value is always the fixed - # string `games#statsResponse`. + # string games#turnBasedAutoMatchingCriteria. # Corresponds to the JSON property `kind` # @return [String] attr_accessor :kind - # Number of in-app purchases made by the player in this game. E.g., 0, 1, 5, - # 10, ... . Not populated if there is not enough information. - # Corresponds to the JSON property `num_purchases` + # The maximum number of players that should be added to the match by auto- + # matching. + # Corresponds to the JSON property `maxAutoMatchingPlayers` # @return [Fixnum] - attr_accessor :num_purchases + attr_accessor :max_auto_matching_players - # The approximate number of sessions of the player within the last 28 days, - # where a session begins when the player is connected to Play Games Services - # and ends when they are disconnected. E.g., 0, 1, 5, 10, ... . Not populated - # if there is not enough information. - # Corresponds to the JSON property `num_sessions` + # The minimum number of players that should be added to the match by auto- + # matching. + # Corresponds to the JSON property `minAutoMatchingPlayers` # @return [Fixnum] - attr_accessor :num_sessions - - # The approximation of the sessions percentile of the player within the last - # 30 days, where a session begins when the player is connected to Play Games - # Services and ends when they are disconnected. E.g., 0, 0.25, 0.5, 0.75. Not - # populated if there is not enough information. - # Corresponds to the JSON property `num_sessions_percentile` - # @return [Float] - attr_accessor :num_sessions_percentile - - # The approximate spend percentile of the player in this game. E.g., 0, 0.25, - # 0.5, 0.75. Not populated if there is not enough information. - # Corresponds to the JSON property `spend_percentile` - # @return [Float] - attr_accessor :spend_percentile - - # The probability of the player going to spend the game in the next seven - # days. E.g., 0, 0.25, 0.50, 0.75. Not populated if there is not enough - # information. - # Corresponds to the JSON property `spend_probability` - # @return [Float] - attr_accessor :spend_probability - - # The predicted amount of money that the player going to spend in the next 28 - # days. E.g., 1, 30, 60, ... . Not populated if there is not enough - # information. - # Corresponds to the JSON property `total_spend_next_28_days` - # @return [Float] - attr_accessor :total_spend_next_28_days + attr_accessor :min_auto_matching_players def initialize(**args) update!(**args) @@ -2615,17 +3818,572 @@ module Google # Update properties of this object def update!(**args) - @avg_session_length_minutes = args[:avg_session_length_minutes] if args.key?(:avg_session_length_minutes) - @churn_probability = args[:churn_probability] if args.key?(:churn_probability) - @days_since_last_played = args[:days_since_last_played] if args.key?(:days_since_last_played) - @high_spender_probability = args[:high_spender_probability] if args.key?(:high_spender_probability) + @exclusive_bitmask = args[:exclusive_bitmask] if args.key?(:exclusive_bitmask) @kind = args[:kind] if args.key?(:kind) - @num_purchases = args[:num_purchases] if args.key?(:num_purchases) - @num_sessions = args[:num_sessions] if args.key?(:num_sessions) - @num_sessions_percentile = args[:num_sessions_percentile] if args.key?(:num_sessions_percentile) - @spend_percentile = args[:spend_percentile] if args.key?(:spend_percentile) - @spend_probability = args[:spend_probability] if args.key?(:spend_probability) - @total_spend_next_28_days = args[:total_spend_next_28_days] if args.key?(:total_spend_next_28_days) + @max_auto_matching_players = args[:max_auto_matching_players] if args.key?(:max_auto_matching_players) + @min_auto_matching_players = args[:min_auto_matching_players] if args.key?(:min_auto_matching_players) + end + end + + # This is a JSON template for a turn-based match resource object. + class TurnBasedMatch + include Google::Apis::Core::Hashable + + # The ID of the application being played. + # Corresponds to the JSON property `applicationId` + # @return [String] + attr_accessor :application_id + + # This is a JSON template for an turn-based auto-match criteria object. + # Corresponds to the JSON property `autoMatchingCriteria` + # @return [Google::Apis::GamesV1::TurnBasedAutoMatchingCriteria] + attr_accessor :auto_matching_criteria + + # This is a JSON template for turn-based match modification metadata. + # Corresponds to the JSON property `creationDetails` + # @return [Google::Apis::GamesV1::TurnBasedMatchModification] + attr_accessor :creation_details + + # This is a JSON template for a turn-based match data object. + # Corresponds to the JSON property `data` + # @return [Google::Apis::GamesV1::TurnBasedMatchData] + attr_accessor :data + + # This short description is generated by our servers based on turn state and is + # localized and worded relative to the player requesting the match. It is + # intended to be displayed when the match is shown in a list. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # The ID of the participant that invited the user to the match. Not set if the + # user was not invited to the match. + # Corresponds to the JSON property `inviterId` + # @return [String] + attr_accessor :inviter_id + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#turnBasedMatch. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # This is a JSON template for turn-based match modification metadata. + # Corresponds to the JSON property `lastUpdateDetails` + # @return [Google::Apis::GamesV1::TurnBasedMatchModification] + attr_accessor :last_update_details + + # Globally unique ID for a turn-based match. + # Corresponds to the JSON property `matchId` + # @return [String] + attr_accessor :match_id + + # The number of the match in a chain of rematches. Will be set to 1 for the + # first match and incremented by 1 for each rematch. + # Corresponds to the JSON property `matchNumber` + # @return [Fixnum] + attr_accessor :match_number + + # The version of this match: an increasing counter, used to avoid out-of-date + # updates to the match. + # Corresponds to the JSON property `matchVersion` + # @return [Fixnum] + attr_accessor :match_version + + # The participants involved in the match, along with their statuses. Includes + # participants who have left or declined invitations. + # Corresponds to the JSON property `participants` + # @return [Array] + attr_accessor :participants + + # The ID of the participant that is taking a turn. + # Corresponds to the JSON property `pendingParticipantId` + # @return [String] + attr_accessor :pending_participant_id + + # This is a JSON template for a turn-based match data object. + # Corresponds to the JSON property `previousMatchData` + # @return [Google::Apis::GamesV1::TurnBasedMatchData] + attr_accessor :previous_match_data + + # The ID of a rematch of this match. Only set for completed matches that have + # been rematched. + # Corresponds to the JSON property `rematchId` + # @return [String] + attr_accessor :rematch_id + + # The results reported for this match. + # Corresponds to the JSON property `results` + # @return [Array] + attr_accessor :results + + # The status of the match. + # Possible values are: + # - "MATCH_AUTO_MATCHING" - One or more slots need to be filled by auto-matching; + # the match cannot be established until they are filled. + # - "MATCH_ACTIVE" - The match has started. + # - "MATCH_COMPLETE" - The match has finished. + # - "MATCH_CANCELED" - The match was canceled. + # - "MATCH_EXPIRED" - The match expired due to inactivity. + # - "MATCH_DELETED" - The match should no longer be shown on the client. + # Returned only for tombstones for matches when sync is called. + # Corresponds to the JSON property `status` + # @return [String] + attr_accessor :status + + # The status of the current user in the match. Derived from the match type, + # match status, the user's participant status, and the pending participant for + # the match. + # Possible values are: + # - "USER_INVITED" - The user has been invited to join the match and has not + # responded yet. + # - "USER_AWAITING_TURN" - The user is waiting for their turn. + # - "USER_TURN" - The user has an action to take in the match. + # - "USER_MATCH_COMPLETED" - The match has ended (it is completed, canceled, or + # expired.) + # Corresponds to the JSON property `userMatchStatus` + # @return [String] + attr_accessor :user_match_status + + # The variant / mode of the application being played; can be any integer value, + # or left blank. + # Corresponds to the JSON property `variant` + # @return [Fixnum] + attr_accessor :variant + + # The ID of another participant in the match that can be used when describing + # the participants the user is playing with. + # Corresponds to the JSON property `withParticipantId` + # @return [String] + attr_accessor :with_participant_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @application_id = args[:application_id] if args.key?(:application_id) + @auto_matching_criteria = args[:auto_matching_criteria] if args.key?(:auto_matching_criteria) + @creation_details = args[:creation_details] if args.key?(:creation_details) + @data = args[:data] if args.key?(:data) + @description = args[:description] if args.key?(:description) + @inviter_id = args[:inviter_id] if args.key?(:inviter_id) + @kind = args[:kind] if args.key?(:kind) + @last_update_details = args[:last_update_details] if args.key?(:last_update_details) + @match_id = args[:match_id] if args.key?(:match_id) + @match_number = args[:match_number] if args.key?(:match_number) + @match_version = args[:match_version] if args.key?(:match_version) + @participants = args[:participants] if args.key?(:participants) + @pending_participant_id = args[:pending_participant_id] if args.key?(:pending_participant_id) + @previous_match_data = args[:previous_match_data] if args.key?(:previous_match_data) + @rematch_id = args[:rematch_id] if args.key?(:rematch_id) + @results = args[:results] if args.key?(:results) + @status = args[:status] if args.key?(:status) + @user_match_status = args[:user_match_status] if args.key?(:user_match_status) + @variant = args[:variant] if args.key?(:variant) + @with_participant_id = args[:with_participant_id] if args.key?(:with_participant_id) + end + end + + # This is a JSON template for a turn-based match creation request. + class CreateTurnBasedMatchRequest + include Google::Apis::Core::Hashable + + # This is a JSON template for an turn-based auto-match criteria object. + # Corresponds to the JSON property `autoMatchingCriteria` + # @return [Google::Apis::GamesV1::TurnBasedAutoMatchingCriteria] + attr_accessor :auto_matching_criteria + + # The player ids to invite to the match. + # Corresponds to the JSON property `invitedPlayerIds` + # @return [Array] + attr_accessor :invited_player_ids + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#turnBasedMatchCreateRequest. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # A randomly generated numeric ID. This number is used at the server to ensure + # that the request is handled correctly across retries. + # Corresponds to the JSON property `requestId` + # @return [Fixnum] + attr_accessor :request_id + + # The variant / mode of the application to be played. This can be any integer + # value, or left blank. You should use a small number of variants to keep the + # auto-matching pool as large as possible. + # Corresponds to the JSON property `variant` + # @return [Fixnum] + attr_accessor :variant + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @auto_matching_criteria = args[:auto_matching_criteria] if args.key?(:auto_matching_criteria) + @invited_player_ids = args[:invited_player_ids] if args.key?(:invited_player_ids) + @kind = args[:kind] if args.key?(:kind) + @request_id = args[:request_id] if args.key?(:request_id) + @variant = args[:variant] if args.key?(:variant) + end + end + + # This is a JSON template for a turn-based match data object. + class TurnBasedMatchData + include Google::Apis::Core::Hashable + + # The byte representation of the data (limited to 128 kB), as a Base64-encoded + # string with the URL_SAFE encoding option. + # Corresponds to the JSON property `data` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :data + + # True if this match has data available but it wasn't returned in a list + # response; fetching the match individually will retrieve this data. + # Corresponds to the JSON property `dataAvailable` + # @return [Boolean] + attr_accessor :data_available + alias_method :data_available?, :data_available + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#turnBasedMatchData. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @data = args[:data] if args.key?(:data) + @data_available = args[:data_available] if args.key?(:data_available) + @kind = args[:kind] if args.key?(:kind) + end + end + + # This is a JSON template for sending a turn-based match data object. + class TurnBasedMatchDataRequest + include Google::Apis::Core::Hashable + + # The byte representation of the data (limited to 128 kB), as a Base64-encoded + # string with the URL_SAFE encoding option. + # Corresponds to the JSON property `data` + # NOTE: Values are automatically base64 encoded/decoded in the client library. + # @return [String] + attr_accessor :data + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#turnBasedMatchDataRequest. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @data = args[:data] if args.key?(:data) + @kind = args[:kind] if args.key?(:kind) + end + end + + # This is a JSON template for a list of turn-based matches. + class TurnBasedMatchList + include Google::Apis::Core::Hashable + + # The matches. + # Corresponds to the JSON property `items` + # @return [Array] + attr_accessor :items + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#turnBasedMatchList. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The pagination token for the next page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @items = args[:items] if args.key?(:items) + @kind = args[:kind] if args.key?(:kind) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # This is a JSON template for turn-based match modification metadata. + class TurnBasedMatchModification + include Google::Apis::Core::Hashable + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#turnBasedMatchModification. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The timestamp at which they modified the match, in milliseconds since the + # epoch in UTC. + # Corresponds to the JSON property `modifiedTimestampMillis` + # @return [Fixnum] + attr_accessor :modified_timestamp_millis + + # The ID of the participant that modified the match. + # Corresponds to the JSON property `participantId` + # @return [String] + attr_accessor :participant_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @kind = args[:kind] if args.key?(:kind) + @modified_timestamp_millis = args[:modified_timestamp_millis] if args.key?(:modified_timestamp_millis) + @participant_id = args[:participant_id] if args.key?(:participant_id) + end + end + + # This is a JSON template for a participant in a turn-based match. + class TurnBasedMatchParticipant + include Google::Apis::Core::Hashable + + # True if this participant was auto-matched with the requesting player. + # Corresponds to the JSON property `autoMatched` + # @return [Boolean] + attr_accessor :auto_matched + alias_method :auto_matched?, :auto_matched + + # This is a JSON template for an anonymous player + # Corresponds to the JSON property `autoMatchedPlayer` + # @return [Google::Apis::GamesV1::AnonymousPlayer] + attr_accessor :auto_matched_player + + # An identifier for the participant in the scope of the match. Cannot be used to + # identify a player across matches or in other contexts. + # Corresponds to the JSON property `id` + # @return [String] + attr_accessor :id + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#turnBasedMatchParticipant. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # This is a JSON template for a Player resource. + # Corresponds to the JSON property `player` + # @return [Google::Apis::GamesV1::Player] + attr_accessor :player + + # The status of the participant with respect to the match. + # Possible values are: + # - "PARTICIPANT_NOT_INVITED_YET" - The participant is slated to be invited to + # the match, but the invitation has not been sent; the invite will be sent when + # it becomes their turn. + # - "PARTICIPANT_INVITED" - The participant has been invited to join the match, + # but has not yet responded. + # - "PARTICIPANT_JOINED" - The participant has joined the match (either after + # creating it or accepting an invitation.) + # - "PARTICIPANT_DECLINED" - The participant declined an invitation to join the + # match. + # - "PARTICIPANT_LEFT" - The participant joined the match and then left it. + # - "PARTICIPANT_FINISHED" - The participant finished playing in the match. + # - "PARTICIPANT_UNRESPONSIVE" - The participant did not take their turn in the + # allotted time. + # Corresponds to the JSON property `status` + # @return [String] + attr_accessor :status + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @auto_matched = args[:auto_matched] if args.key?(:auto_matched) + @auto_matched_player = args[:auto_matched_player] if args.key?(:auto_matched_player) + @id = args[:id] if args.key?(:id) + @kind = args[:kind] if args.key?(:kind) + @player = args[:player] if args.key?(:player) + @status = args[:status] if args.key?(:status) + end + end + + # This is a JSON template for a rematch response. + class TurnBasedMatchRematch + include Google::Apis::Core::Hashable + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#turnBasedMatchRematch. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # This is a JSON template for a turn-based match resource object. + # Corresponds to the JSON property `previousMatch` + # @return [Google::Apis::GamesV1::TurnBasedMatch] + attr_accessor :previous_match + + # This is a JSON template for a turn-based match resource object. + # Corresponds to the JSON property `rematch` + # @return [Google::Apis::GamesV1::TurnBasedMatch] + attr_accessor :rematch + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @kind = args[:kind] if args.key?(:kind) + @previous_match = args[:previous_match] if args.key?(:previous_match) + @rematch = args[:rematch] if args.key?(:rematch) + end + end + + # This is a JSON template for a turn-based match results object. + class TurnBasedMatchResults + include Google::Apis::Core::Hashable + + # This is a JSON template for sending a turn-based match data object. + # Corresponds to the JSON property `data` + # @return [Google::Apis::GamesV1::TurnBasedMatchDataRequest] + attr_accessor :data + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#turnBasedMatchResults. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The version of the match being updated. + # Corresponds to the JSON property `matchVersion` + # @return [Fixnum] + attr_accessor :match_version + + # The match results for the participants in the match. + # Corresponds to the JSON property `results` + # @return [Array] + attr_accessor :results + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @data = args[:data] if args.key?(:data) + @kind = args[:kind] if args.key?(:kind) + @match_version = args[:match_version] if args.key?(:match_version) + @results = args[:results] if args.key?(:results) + end + end + + # This is a JSON template for a list of turn-based matches returned from a sync. + class TurnBasedMatchSync + include Google::Apis::Core::Hashable + + # The matches. + # Corresponds to the JSON property `items` + # @return [Array] + attr_accessor :items + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#turnBasedMatchSync. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # True if there were more matches available to fetch at the time the response + # was generated (which were not returned due to page size limits.) + # Corresponds to the JSON property `moreAvailable` + # @return [Boolean] + attr_accessor :more_available + alias_method :more_available?, :more_available + + # The pagination token for the next page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @items = args[:items] if args.key?(:items) + @kind = args[:kind] if args.key?(:kind) + @more_available = args[:more_available] if args.key?(:more_available) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # This is a JSON template for the object representing a turn. + class TurnBasedMatchTurn + include Google::Apis::Core::Hashable + + # This is a JSON template for sending a turn-based match data object. + # Corresponds to the JSON property `data` + # @return [Google::Apis::GamesV1::TurnBasedMatchDataRequest] + attr_accessor :data + + # Uniquely identifies the type of this resource. Value is always the fixed + # string games#turnBasedMatchTurn. + # Corresponds to the JSON property `kind` + # @return [String] + attr_accessor :kind + + # The version of this match: an increasing counter, used to avoid out-of-date + # updates to the match. + # Corresponds to the JSON property `matchVersion` + # @return [Fixnum] + attr_accessor :match_version + + # The ID of the participant who should take their turn next. May be set to the + # current player's participant ID to update match state without changing the + # turn. If not set, the match will wait for other player(s) to join via + # automatching; this is only valid if automatch criteria is set on the match + # with remaining slots for automatched players. + # Corresponds to the JSON property `pendingParticipantId` + # @return [String] + attr_accessor :pending_participant_id + + # The match results for the participants in the match. + # Corresponds to the JSON property `results` + # @return [Array] + attr_accessor :results + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @data = args[:data] if args.key?(:data) + @kind = args[:kind] if args.key?(:kind) + @match_version = args[:match_version] if args.key?(:match_version) + @pending_participant_id = args[:pending_participant_id] if args.key?(:pending_participant_id) + @results = args[:results] if args.key?(:results) end end end diff --git a/generated/google/apis/games_v1/representations.rb b/generated/google/apis/games_v1/representations.rb index 75ecd3888..8c47c37d8 100644 --- a/generated/google/apis/games_v1/representations.rb +++ b/generated/google/apis/games_v1/representations.rb @@ -82,6 +82,18 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class AggregateStats + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class AnonymousPlayer + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Application class Representation < Google::Apis::Core::JsonRepresentation; end @@ -250,6 +262,36 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class NetworkDiagnostics + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ParticipantResult + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PeerChannelDiagnostics + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PeerSessionDiagnostics + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Played + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Player class Representation < Google::Apis::Core::JsonRepresentation; end @@ -346,12 +388,114 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class PushToken + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PushTokenId + class Representation < Google::Apis::Core::JsonRepresentation; end + + class Ios + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + include Google::Apis::Core::JsonObjectSupport + end + class CheckRevisionResponse class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class Room + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RoomAutoMatchStatus + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RoomAutoMatchingCriteria + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RoomClientAddress + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CreateRoomRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class JoinRoomRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RoomLeaveDiagnostics + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class LeaveRoomRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RoomList + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RoomModification + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RoomP2PStatus + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RoomP2PStatuses + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RoomParticipant + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RoomStatus + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ScoreSubmission class Representation < Google::Apis::Core::JsonRepresentation; end @@ -376,7 +520,73 @@ module Google include Google::Apis::Core::JsonObjectSupport end - class StatsResponse + class TurnBasedAutoMatchingCriteria + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TurnBasedMatch + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CreateTurnBasedMatchRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TurnBasedMatchData + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TurnBasedMatchDataRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TurnBasedMatchList + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TurnBasedMatchModification + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TurnBasedMatchParticipant + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TurnBasedMatchRematch + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TurnBasedMatchResults + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TurnBasedMatchSync + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TurnBasedMatchTurn class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport @@ -488,6 +698,26 @@ module Google end end + class AggregateStats + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :count, :numeric_string => true, as: 'count' + property :kind, as: 'kind' + property :max, :numeric_string => true, as: 'max' + property :min, :numeric_string => true, as: 'min' + property :sum, :numeric_string => true, as: 'sum' + end + end + + class AnonymousPlayer + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :avatar_image_url, as: 'avatarImageUrl' + property :display_name, as: 'displayName' + property :kind, as: 'kind' + end + end + class Application # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -803,6 +1033,68 @@ module Google end end + class NetworkDiagnostics + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :android_network_subtype, as: 'androidNetworkSubtype' + property :android_network_type, as: 'androidNetworkType' + property :ios_network_type, as: 'iosNetworkType' + property :kind, as: 'kind' + property :network_operator_code, as: 'networkOperatorCode' + property :network_operator_name, as: 'networkOperatorName' + property :registration_latency_millis, as: 'registrationLatencyMillis' + end + end + + class ParticipantResult + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :kind, as: 'kind' + property :participant_id, as: 'participantId' + property :placing, as: 'placing' + property :result, as: 'result' + end + end + + class PeerChannelDiagnostics + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :bytes_received, as: 'bytesReceived', class: Google::Apis::GamesV1::AggregateStats, decorator: Google::Apis::GamesV1::AggregateStats::Representation + + property :bytes_sent, as: 'bytesSent', class: Google::Apis::GamesV1::AggregateStats, decorator: Google::Apis::GamesV1::AggregateStats::Representation + + property :kind, as: 'kind' + property :num_messages_lost, as: 'numMessagesLost' + property :num_messages_received, as: 'numMessagesReceived' + property :num_messages_sent, as: 'numMessagesSent' + property :num_send_failures, as: 'numSendFailures' + property :roundtrip_latency_millis, as: 'roundtripLatencyMillis', class: Google::Apis::GamesV1::AggregateStats, decorator: Google::Apis::GamesV1::AggregateStats::Representation + + end + end + + class PeerSessionDiagnostics + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :connected_timestamp_millis, :numeric_string => true, as: 'connectedTimestampMillis' + property :kind, as: 'kind' + property :participant_id, as: 'participantId' + property :reliable_channel, as: 'reliableChannel', class: Google::Apis::GamesV1::PeerChannelDiagnostics, decorator: Google::Apis::GamesV1::PeerChannelDiagnostics::Representation + + property :unreliable_channel, as: 'unreliableChannel', class: Google::Apis::GamesV1::PeerChannelDiagnostics, decorator: Google::Apis::GamesV1::PeerChannelDiagnostics::Representation + + end + end + + class Played + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :auto_matched, as: 'autoMatched' + property :kind, as: 'kind' + property :time_millis, :numeric_string => true, as: 'timeMillis' + end + end + class Player # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -814,6 +1106,8 @@ module Google property :friend_status, as: 'friendStatus' property :kind, as: 'kind' + property :last_played_with, as: 'lastPlayedWith', class: Google::Apis::GamesV1::Played, decorator: Google::Apis::GamesV1::Played::Representation + property :name, as: 'name', class: Google::Apis::GamesV1::Player::Name, decorator: Google::Apis::GamesV1::Player::Name::Representation property :original_player_id, as: 'originalPlayerId' @@ -989,6 +1283,34 @@ module Google end end + class PushToken + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :client_revision, as: 'clientRevision' + property :id, as: 'id', class: Google::Apis::GamesV1::PushTokenId, decorator: Google::Apis::GamesV1::PushTokenId::Representation + + property :kind, as: 'kind' + property :language, as: 'language' + end + end + + class PushTokenId + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :ios, as: 'ios', class: Google::Apis::GamesV1::PushTokenId::Ios, decorator: Google::Apis::GamesV1::PushTokenId::Ios::Representation + + property :kind, as: 'kind' + end + + class Ios + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :apns_device_token, :base64 => true, as: 'apns_device_token' + property :apns_environment, as: 'apns_environment' + end + end + end + class CheckRevisionResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -998,6 +1320,184 @@ module Google end end + class Room + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :application_id, as: 'applicationId' + property :auto_matching_criteria, as: 'autoMatchingCriteria', class: Google::Apis::GamesV1::RoomAutoMatchingCriteria, decorator: Google::Apis::GamesV1::RoomAutoMatchingCriteria::Representation + + property :auto_matching_status, as: 'autoMatchingStatus', class: Google::Apis::GamesV1::RoomAutoMatchStatus, decorator: Google::Apis::GamesV1::RoomAutoMatchStatus::Representation + + property :creation_details, as: 'creationDetails', class: Google::Apis::GamesV1::RoomModification, decorator: Google::Apis::GamesV1::RoomModification::Representation + + property :description, as: 'description' + property :inviter_id, as: 'inviterId' + property :kind, as: 'kind' + property :last_update_details, as: 'lastUpdateDetails', class: Google::Apis::GamesV1::RoomModification, decorator: Google::Apis::GamesV1::RoomModification::Representation + + collection :participants, as: 'participants', class: Google::Apis::GamesV1::RoomParticipant, decorator: Google::Apis::GamesV1::RoomParticipant::Representation + + property :room_id, as: 'roomId' + property :room_status_version, as: 'roomStatusVersion' + property :status, as: 'status' + property :variant, as: 'variant' + end + end + + class RoomAutoMatchStatus + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :kind, as: 'kind' + property :wait_estimate_seconds, as: 'waitEstimateSeconds' + end + end + + class RoomAutoMatchingCriteria + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :exclusive_bitmask, :numeric_string => true, as: 'exclusiveBitmask' + property :kind, as: 'kind' + property :max_auto_matching_players, as: 'maxAutoMatchingPlayers' + property :min_auto_matching_players, as: 'minAutoMatchingPlayers' + end + end + + class RoomClientAddress + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :kind, as: 'kind' + property :xmpp_address, as: 'xmppAddress' + end + end + + class CreateRoomRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :auto_matching_criteria, as: 'autoMatchingCriteria', class: Google::Apis::GamesV1::RoomAutoMatchingCriteria, decorator: Google::Apis::GamesV1::RoomAutoMatchingCriteria::Representation + + collection :capabilities, as: 'capabilities' + property :client_address, as: 'clientAddress', class: Google::Apis::GamesV1::RoomClientAddress, decorator: Google::Apis::GamesV1::RoomClientAddress::Representation + + collection :invited_player_ids, as: 'invitedPlayerIds' + property :kind, as: 'kind' + property :network_diagnostics, as: 'networkDiagnostics', class: Google::Apis::GamesV1::NetworkDiagnostics, decorator: Google::Apis::GamesV1::NetworkDiagnostics::Representation + + property :request_id, :numeric_string => true, as: 'requestId' + property :variant, as: 'variant' + end + end + + class JoinRoomRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :capabilities, as: 'capabilities' + property :client_address, as: 'clientAddress', class: Google::Apis::GamesV1::RoomClientAddress, decorator: Google::Apis::GamesV1::RoomClientAddress::Representation + + property :kind, as: 'kind' + property :network_diagnostics, as: 'networkDiagnostics', class: Google::Apis::GamesV1::NetworkDiagnostics, decorator: Google::Apis::GamesV1::NetworkDiagnostics::Representation + + end + end + + class RoomLeaveDiagnostics + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :android_network_subtype, as: 'androidNetworkSubtype' + property :android_network_type, as: 'androidNetworkType' + property :ios_network_type, as: 'iosNetworkType' + property :kind, as: 'kind' + property :network_operator_code, as: 'networkOperatorCode' + property :network_operator_name, as: 'networkOperatorName' + collection :peer_session, as: 'peerSession', class: Google::Apis::GamesV1::PeerSessionDiagnostics, decorator: Google::Apis::GamesV1::PeerSessionDiagnostics::Representation + + property :sockets_used, as: 'socketsUsed' + end + end + + class LeaveRoomRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :kind, as: 'kind' + property :leave_diagnostics, as: 'leaveDiagnostics', class: Google::Apis::GamesV1::RoomLeaveDiagnostics, decorator: Google::Apis::GamesV1::RoomLeaveDiagnostics::Representation + + property :reason, as: 'reason' + end + end + + class RoomList + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :items, as: 'items', class: Google::Apis::GamesV1::Room, decorator: Google::Apis::GamesV1::Room::Representation + + property :kind, as: 'kind' + property :next_page_token, as: 'nextPageToken' + end + end + + class RoomModification + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :kind, as: 'kind' + property :modified_timestamp_millis, :numeric_string => true, as: 'modifiedTimestampMillis' + property :participant_id, as: 'participantId' + end + end + + class RoomP2PStatus + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :connection_setup_latency_millis, as: 'connectionSetupLatencyMillis' + property :error, as: 'error' + property :error_reason, as: 'error_reason' + property :kind, as: 'kind' + property :participant_id, as: 'participantId' + property :status, as: 'status' + property :unreliable_roundtrip_latency_millis, as: 'unreliableRoundtripLatencyMillis' + end + end + + class RoomP2PStatuses + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :kind, as: 'kind' + collection :updates, as: 'updates', class: Google::Apis::GamesV1::RoomP2PStatus, decorator: Google::Apis::GamesV1::RoomP2PStatus::Representation + + end + end + + class RoomParticipant + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :auto_matched, as: 'autoMatched' + property :auto_matched_player, as: 'autoMatchedPlayer', class: Google::Apis::GamesV1::AnonymousPlayer, decorator: Google::Apis::GamesV1::AnonymousPlayer::Representation + + collection :capabilities, as: 'capabilities' + property :client_address, as: 'clientAddress', class: Google::Apis::GamesV1::RoomClientAddress, decorator: Google::Apis::GamesV1::RoomClientAddress::Representation + + property :connected, as: 'connected' + property :id, as: 'id' + property :kind, as: 'kind' + property :leave_reason, as: 'leaveReason' + property :player, as: 'player', class: Google::Apis::GamesV1::Player, decorator: Google::Apis::GamesV1::Player::Representation + + property :status, as: 'status' + end + end + + class RoomStatus + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :auto_matching_status, as: 'autoMatchingStatus', class: Google::Apis::GamesV1::RoomAutoMatchStatus, decorator: Google::Apis::GamesV1::RoomAutoMatchStatus::Representation + + property :kind, as: 'kind' + collection :participants, as: 'participants', class: Google::Apis::GamesV1::RoomParticipant, decorator: Google::Apis::GamesV1::RoomParticipant::Representation + + property :room_id, as: 'roomId' + property :status, as: 'status' + property :status_version, as: 'statusVersion' + end + end + class ScoreSubmission # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -1048,20 +1548,155 @@ module Google end end - class StatsResponse + class TurnBasedAutoMatchingCriteria # @private class Representation < Google::Apis::Core::JsonRepresentation - property :avg_session_length_minutes, as: 'avg_session_length_minutes' - property :churn_probability, as: 'churn_probability' - property :days_since_last_played, as: 'days_since_last_played' - property :high_spender_probability, as: 'high_spender_probability' + property :exclusive_bitmask, :numeric_string => true, as: 'exclusiveBitmask' property :kind, as: 'kind' - property :num_purchases, as: 'num_purchases' - property :num_sessions, as: 'num_sessions' - property :num_sessions_percentile, as: 'num_sessions_percentile' - property :spend_percentile, as: 'spend_percentile' - property :spend_probability, as: 'spend_probability' - property :total_spend_next_28_days, as: 'total_spend_next_28_days' + property :max_auto_matching_players, as: 'maxAutoMatchingPlayers' + property :min_auto_matching_players, as: 'minAutoMatchingPlayers' + end + end + + class TurnBasedMatch + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :application_id, as: 'applicationId' + property :auto_matching_criteria, as: 'autoMatchingCriteria', class: Google::Apis::GamesV1::TurnBasedAutoMatchingCriteria, decorator: Google::Apis::GamesV1::TurnBasedAutoMatchingCriteria::Representation + + property :creation_details, as: 'creationDetails', class: Google::Apis::GamesV1::TurnBasedMatchModification, decorator: Google::Apis::GamesV1::TurnBasedMatchModification::Representation + + property :data, as: 'data', class: Google::Apis::GamesV1::TurnBasedMatchData, decorator: Google::Apis::GamesV1::TurnBasedMatchData::Representation + + property :description, as: 'description' + property :inviter_id, as: 'inviterId' + property :kind, as: 'kind' + property :last_update_details, as: 'lastUpdateDetails', class: Google::Apis::GamesV1::TurnBasedMatchModification, decorator: Google::Apis::GamesV1::TurnBasedMatchModification::Representation + + property :match_id, as: 'matchId' + property :match_number, as: 'matchNumber' + property :match_version, as: 'matchVersion' + collection :participants, as: 'participants', class: Google::Apis::GamesV1::TurnBasedMatchParticipant, decorator: Google::Apis::GamesV1::TurnBasedMatchParticipant::Representation + + property :pending_participant_id, as: 'pendingParticipantId' + property :previous_match_data, as: 'previousMatchData', class: Google::Apis::GamesV1::TurnBasedMatchData, decorator: Google::Apis::GamesV1::TurnBasedMatchData::Representation + + property :rematch_id, as: 'rematchId' + collection :results, as: 'results', class: Google::Apis::GamesV1::ParticipantResult, decorator: Google::Apis::GamesV1::ParticipantResult::Representation + + property :status, as: 'status' + property :user_match_status, as: 'userMatchStatus' + property :variant, as: 'variant' + property :with_participant_id, as: 'withParticipantId' + end + end + + class CreateTurnBasedMatchRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :auto_matching_criteria, as: 'autoMatchingCriteria', class: Google::Apis::GamesV1::TurnBasedAutoMatchingCriteria, decorator: Google::Apis::GamesV1::TurnBasedAutoMatchingCriteria::Representation + + collection :invited_player_ids, as: 'invitedPlayerIds' + property :kind, as: 'kind' + property :request_id, :numeric_string => true, as: 'requestId' + property :variant, as: 'variant' + end + end + + class TurnBasedMatchData + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :data, :base64 => true, as: 'data' + property :data_available, as: 'dataAvailable' + property :kind, as: 'kind' + end + end + + class TurnBasedMatchDataRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :data, :base64 => true, as: 'data' + property :kind, as: 'kind' + end + end + + class TurnBasedMatchList + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :items, as: 'items', class: Google::Apis::GamesV1::TurnBasedMatch, decorator: Google::Apis::GamesV1::TurnBasedMatch::Representation + + property :kind, as: 'kind' + property :next_page_token, as: 'nextPageToken' + end + end + + class TurnBasedMatchModification + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :kind, as: 'kind' + property :modified_timestamp_millis, :numeric_string => true, as: 'modifiedTimestampMillis' + property :participant_id, as: 'participantId' + end + end + + class TurnBasedMatchParticipant + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :auto_matched, as: 'autoMatched' + property :auto_matched_player, as: 'autoMatchedPlayer', class: Google::Apis::GamesV1::AnonymousPlayer, decorator: Google::Apis::GamesV1::AnonymousPlayer::Representation + + property :id, as: 'id' + property :kind, as: 'kind' + property :player, as: 'player', class: Google::Apis::GamesV1::Player, decorator: Google::Apis::GamesV1::Player::Representation + + property :status, as: 'status' + end + end + + class TurnBasedMatchRematch + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :kind, as: 'kind' + property :previous_match, as: 'previousMatch', class: Google::Apis::GamesV1::TurnBasedMatch, decorator: Google::Apis::GamesV1::TurnBasedMatch::Representation + + property :rematch, as: 'rematch', class: Google::Apis::GamesV1::TurnBasedMatch, decorator: Google::Apis::GamesV1::TurnBasedMatch::Representation + + end + end + + class TurnBasedMatchResults + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :data, as: 'data', class: Google::Apis::GamesV1::TurnBasedMatchDataRequest, decorator: Google::Apis::GamesV1::TurnBasedMatchDataRequest::Representation + + property :kind, as: 'kind' + property :match_version, as: 'matchVersion' + collection :results, as: 'results', class: Google::Apis::GamesV1::ParticipantResult, decorator: Google::Apis::GamesV1::ParticipantResult::Representation + + end + end + + class TurnBasedMatchSync + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :items, as: 'items', class: Google::Apis::GamesV1::TurnBasedMatch, decorator: Google::Apis::GamesV1::TurnBasedMatch::Representation + + property :kind, as: 'kind' + property :more_available, as: 'moreAvailable' + property :next_page_token, as: 'nextPageToken' + end + end + + class TurnBasedMatchTurn + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :data, as: 'data', class: Google::Apis::GamesV1::TurnBasedMatchDataRequest, decorator: Google::Apis::GamesV1::TurnBasedMatchDataRequest::Representation + + property :kind, as: 'kind' + property :match_version, as: 'matchVersion' + property :pending_participant_id, as: 'pendingParticipantId' + collection :results, as: 'results', class: Google::Apis::GamesV1::ParticipantResult, decorator: Google::Apis::GamesV1::ParticipantResult::Representation + end end end diff --git a/generated/google/apis/games_v1/service.rb b/generated/google/apis/games_v1/service.rb index d61c75cd1..5835fbace 100644 --- a/generated/google/apis/games_v1/service.rb +++ b/generated/google/apis/games_v1/service.rb @@ -20,11 +20,9 @@ require 'google/apis/errors' module Google module Apis module GamesV1 - # Google Play Game Services + # Google Play Game Services API # - # The Google Play games service allows developers to enhance games with social - # leaderboards, - # achievements, game state, sign-in with Google, and more. + # The API for Google Play Game Services. # # @example # require 'google/apis/games_v1' @@ -32,7 +30,7 @@ module Google # Games = Google::Apis::GamesV1 # Alias the module # service = Games::GamesService.new # - # @see https://developers.google.com/games/ + # @see https://developers.google.com/games/services/ class GamesService < Google::Apis::Core::BaseService # @return [String] # API key. Your API key identifies your project and provides you with API access, @@ -40,12 +38,16 @@ module Google 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. + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. attr_accessor :quota_user + # @return [String] + # Deprecated. Please use quotaUser instead. + attr_accessor :user_ip + def initialize - super('https://www.googleapis.com/', '') + super('https://www.googleapis.com/', 'games/v1/') @batch_path = 'batch/games/v1' end @@ -55,14 +57,16 @@ module Google # @param [Fixnum] max_results # The maximum number of achievement resources to return in the response, used # for paging. For any response, the actual number of achievement resources - # returned may be less than the specified `maxResults`. + # returned may be less than the specified maxResults. # @param [String] page_token # The token returned by the previous request. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -75,8 +79,8 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_achievement_definitions(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'games/v1/achievements', options) + def list_achievement_definitions(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, 'achievements', options) command.response_representation = Google::Apis::GamesV1::ListAchievementDefinitionsResponse::Representation command.response_class = Google::Apis::GamesV1::ListAchievementDefinitionsResponse command.query['language'] = language unless language.nil? @@ -84,6 +88,7 @@ module Google command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end @@ -94,14 +99,16 @@ module Google # @param [Fixnum] steps_to_increment # The number of steps to increment. # @param [Fixnum] request_id - # A randomly generated numeric ID for each request specified by the caller. - # This number is used at the server to ensure that the request is handled - # correctly across retries. + # A randomly generated numeric ID for each request specified by the caller. This + # number is used at the server to ensure that the request is handled correctly + # across retries. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -114,8 +121,8 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def increment_achievement(achievement_id, steps_to_increment, request_id: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'games/v1/achievements/{achievementId}/increment', options) + def increment_achievement(achievement_id, steps_to_increment, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, 'achievements/{achievementId}/increment', options) command.response_representation = Google::Apis::GamesV1::AchievementIncrementResponse::Representation command.response_class = Google::Apis::GamesV1::AchievementIncrementResponse command.params['achievementId'] = achievement_id unless achievement_id.nil? @@ -123,30 +130,33 @@ module Google command.query['stepsToIncrement'] = steps_to_increment unless steps_to_increment.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end - # Lists the progress for all your application's achievements for the - # currently authenticated player. + # Lists the progress for all your application's achievements for the currently + # authenticated player. # @param [String] player_id - # A player ID. A value of `me` may be used in place of the - # authenticated player's ID. + # A player ID. A value of me may be used in place of the authenticated player's + # ID. # @param [String] language # The preferred language to use for strings returned by this method. # @param [Fixnum] max_results # The maximum number of achievement resources to return in the response, used # for paging. For any response, the actual number of achievement resources - # returned may be less than the specified `maxResults`. + # returned may be less than the specified maxResults. # @param [String] page_token # The token returned by the previous request. # @param [String] state - # Tells the server to return only achievements with the specified state. If - # this parameter isn't specified, all achievements are returned. + # Tells the server to return only achievements with the specified state. If this + # parameter isn't specified, all achievements are returned. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -159,8 +169,8 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_achievements(player_id, language: nil, max_results: nil, page_token: nil, state: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'games/v1/players/{playerId}/achievements', options) + def list_achievements(player_id, language: nil, max_results: nil, page_token: nil, state: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, 'players/{playerId}/achievements', options) command.response_representation = Google::Apis::GamesV1::ListPlayerAchievementResponse::Representation command.response_class = Google::Apis::GamesV1::ListPlayerAchievementResponse command.params['playerId'] = player_id unless player_id.nil? @@ -170,18 +180,21 @@ module Google command.query['state'] = state unless state.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end - # Sets the state of the achievement with the given ID to - # `REVEALED` for the currently authenticated player. + # Sets the state of the achievement with the given ID to REVEALED for the + # currently authenticated player. # @param [String] achievement_id # The ID of the achievement used by this method. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -194,20 +207,21 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def reveal_achievement(achievement_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'games/v1/achievements/{achievementId}/reveal', options) + def reveal_achievement(achievement_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, 'achievements/{achievementId}/reveal', options) command.response_representation = Google::Apis::GamesV1::AchievementRevealResponse::Representation command.response_class = Google::Apis::GamesV1::AchievementRevealResponse command.params['achievementId'] = achievement_id unless achievement_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Sets the steps for the currently authenticated player towards unlocking an - # achievement. If the steps parameter is less than the current number of - # steps that the player already gained for the achievement, the achievement - # is not modified. + # achievement. If the steps parameter is less than the current number of steps + # that the player already gained for the achievement, the achievement is not + # modified. # @param [String] achievement_id # The ID of the achievement used by this method. # @param [Fixnum] steps @@ -215,8 +229,10 @@ module Google # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -229,14 +245,15 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def set_achievement_steps_at_least(achievement_id, steps, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'games/v1/achievements/{achievementId}/setStepsAtLeast', options) + def set_achievement_steps_at_least(achievement_id, steps, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, 'achievements/{achievementId}/setStepsAtLeast', options) command.response_representation = Google::Apis::GamesV1::AchievementSetStepsAtLeastResponse::Representation command.response_class = Google::Apis::GamesV1::AchievementSetStepsAtLeastResponse command.params['achievementId'] = achievement_id unless achievement_id.nil? command.query['steps'] = steps unless steps.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end @@ -246,8 +263,10 @@ module Google # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -260,13 +279,14 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def unlock_achievement(achievement_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'games/v1/achievements/{achievementId}/unlock', options) + def unlock_achievement(achievement_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, 'achievements/{achievementId}/unlock', options) command.response_representation = Google::Apis::GamesV1::AchievementUnlockResponse::Representation command.response_class = Google::Apis::GamesV1::AchievementUnlockResponse command.params['achievementId'] = achievement_id unless achievement_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end @@ -275,8 +295,10 @@ module Google # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -289,21 +311,21 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def update_multiple_achievements(achievement_update_multiple_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'games/v1/achievements/updateMultiple', options) + def update_multiple_achievements(achievement_update_multiple_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, 'achievements/updateMultiple', options) command.request_representation = Google::Apis::GamesV1::AchievementUpdateMultipleRequest::Representation command.request_object = achievement_update_multiple_request_object command.response_representation = Google::Apis::GamesV1::AchievementUpdateMultipleResponse::Representation command.response_class = Google::Apis::GamesV1::AchievementUpdateMultipleResponse command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end - # Retrieves the metadata of the application with the given ID. If the - # requested application is not available for the specified - # `platformType`, the returned response will not include any - # instance data. + # Retrieves the metadata of the application with the given ID. If the requested + # application is not available for the specified platformType, the returned + # response will not include any instance data. # @param [String] application_id # The application ID from the Google Play developer console. # @param [String] language @@ -313,8 +335,10 @@ module Google # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -327,8 +351,8 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_application(application_id, language: nil, platform_type: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'games/v1/applications/{applicationId}', options) + def get_application(application_id, language: nil, platform_type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, 'applications/{applicationId}', options) command.response_representation = Google::Apis::GamesV1::Application::Representation command.response_class = Google::Apis::GamesV1::Application command.params['applicationId'] = application_id unless application_id.nil? @@ -336,16 +360,18 @@ module Google command.query['platformType'] = platform_type unless platform_type.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end - # Indicate that the currently authenticated user is playing your - # application. + # Indicate that the the currently authenticated user is playing your application. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -358,22 +384,25 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def played_application(fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'games/v1/applications/played', options) + def played_application(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, 'applications/played', options) 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 - # Verifies the auth token provided with this request is for the application - # with the specified ID, and returns the ID of the player it was granted for. + # Verifies the auth token provided with this request is for the application with + # the specified ID, and returns the ID of the player it was granted for. # @param [String] application_id # The application ID from the Google Play developer console. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -386,31 +415,34 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def verify_application(application_id, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'games/v1/applications/{applicationId}/verify', options) + def verify_application(application_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, 'applications/{applicationId}/verify', options) command.response_representation = Google::Apis::GamesV1::ApplicationVerifyResponse::Representation command.response_class = Google::Apis::GamesV1::ApplicationVerifyResponse command.params['applicationId'] = application_id unless application_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end - # Returns a list showing the current progress on events in this application - # for the currently authenticated user. + # Returns a list showing the current progress on events in this application for + # the currently authenticated user. # @param [String] language # The preferred language to use for strings returned by this method. # @param [Fixnum] max_results - # The maximum number of events to return in the response, used for paging. - # For any response, the actual number of events to return may be less than - # the specified maxResults. + # The maximum number of events to return in the response, used for paging. For + # any response, the actual number of events to return may be less than the + # specified maxResults. # @param [String] page_token # The token returned by the previous request. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -423,8 +455,8 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_event_by_player(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'games/v1/events', options) + def list_event_by_player(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, 'events', options) command.response_representation = Google::Apis::GamesV1::ListPlayerEventResponse::Representation command.response_class = Google::Apis::GamesV1::ListPlayerEventResponse command.query['language'] = language unless language.nil? @@ -432,6 +464,7 @@ module Google command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end @@ -440,15 +473,17 @@ module Google # The preferred language to use for strings returned by this method. # @param [Fixnum] max_results # The maximum number of event definitions to return in the response, used for - # paging. For any response, the actual number of event definitions to return - # may be less than the specified `maxResults`. + # paging. For any response, the actual number of event definitions to return may + # be less than the specified maxResults. # @param [String] page_token # The token returned by the previous request. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -461,8 +496,8 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_event_definitions(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'games/v1/eventDefinitions', options) + def list_event_definitions(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, 'eventDefinitions', options) command.response_representation = Google::Apis::GamesV1::ListEventDefinitionResponse::Representation command.response_class = Google::Apis::GamesV1::ListEventDefinitionResponse command.query['language'] = language unless language.nil? @@ -470,19 +505,22 @@ module Google command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end - # Records a batch of changes to the number of times events have occurred for - # the currently authenticated user of this application. + # Records a batch of changes to the number of times events have occurred for the + # currently authenticated user of this application. # @param [Google::Apis::GamesV1::EventRecordRequest] event_record_request_object # @param [String] language # The preferred language to use for strings returned by this method. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -495,8 +533,8 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def record_event(event_record_request_object = nil, language: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'games/v1/events', options) + def record_event(event_record_request_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, 'events', options) command.request_representation = Google::Apis::GamesV1::EventRecordRequest::Representation command.request_object = event_record_request_object command.response_representation = Google::Apis::GamesV1::UpdateEventResponse::Representation @@ -504,6 +542,7 @@ module Google command.query['language'] = language unless language.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end @@ -515,8 +554,10 @@ module Google # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -529,14 +570,15 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_leaderboard(leaderboard_id, language: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'games/v1/leaderboards/{leaderboardId}', options) + def get_leaderboard(leaderboard_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, 'leaderboards/{leaderboardId}', options) command.response_representation = Google::Apis::GamesV1::Leaderboard::Representation command.response_class = Google::Apis::GamesV1::Leaderboard command.params['leaderboardId'] = leaderboard_id unless leaderboard_id.nil? command.query['language'] = language unless language.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end @@ -544,16 +586,18 @@ module Google # @param [String] language # The preferred language to use for strings returned by this method. # @param [Fixnum] max_results - # The maximum number of leaderboards to return in the response. For any - # response, the actual number of leaderboards returned may be less than the - # specified `maxResults`. + # The maximum number of leaderboards to return in the response. For any response, + # the actual number of leaderboards returned may be less than the specified + # maxResults. # @param [String] page_token # The token returned by the previous request. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -566,8 +610,8 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_leaderboards(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'games/v1/leaderboards', options) + def list_leaderboards(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, 'leaderboards', options) command.response_representation = Google::Apis::GamesV1::ListLeaderboardResponse::Representation command.response_class = Google::Apis::GamesV1::ListLeaderboardResponse command.query['language'] = language unless language.nil? @@ -575,6 +619,7 @@ module Google command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end @@ -582,8 +627,10 @@ module Google # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -596,35 +643,38 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_metagame_config(fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'games/v1/metagameConfig', options) + def get_metagame_config(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, 'metagameConfig', options) command.response_representation = Google::Apis::GamesV1::MetagameConfig::Representation command.response_class = Google::Apis::GamesV1::MetagameConfig command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # List play data aggregated per category for the player corresponding to - # `playerId`. + # playerId. # @param [String] player_id - # A player ID. A value of `me` may be used in place of the - # authenticated player's ID. + # A player ID. A value of me may be used in place of the authenticated player's + # ID. # @param [String] collection # The collection of categories for which data will be returned. # @param [String] language # The preferred language to use for strings returned by this method. # @param [Fixnum] max_results - # The maximum number of category resources to return in the response, used - # for paging. For any response, the actual number of category resources - # returned may be less than the specified `maxResults`. + # The maximum number of category resources to return in the response, used for + # paging. For any response, the actual number of category resources returned may + # be less than the specified maxResults. # @param [String] page_token # The token returned by the previous request. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -637,8 +687,8 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_metagame_categories_by_player(player_id, collection, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'games/v1/players/{playerId}/categories/{collection}', options) + def list_metagame_categories_by_player(player_id, collection, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, 'players/{playerId}/categories/{collection}', options) command.response_representation = Google::Apis::GamesV1::ListCategoryResponse::Representation command.response_class = Google::Apis::GamesV1::ListCategoryResponse command.params['playerId'] = player_id unless player_id.nil? @@ -648,21 +698,24 @@ module Google command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end - # Retrieves the Player resource with the given ID. To retrieve the player - # for the currently authenticated user, set `playerId` to `me`. + # Retrieves the Player resource with the given ID. To retrieve the player for + # the currently authenticated user, set playerId to me. # @param [String] player_id - # A player ID. A value of `me` may be used in place of the - # authenticated player's ID. + # A player ID. A value of me may be used in place of the authenticated player's + # ID. # @param [String] language # The preferred language to use for strings returned by this method. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -675,14 +728,15 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_player(player_id, language: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'games/v1/players/{playerId}', options) + def get_player(player_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, 'players/{playerId}', options) command.response_representation = Google::Apis::GamesV1::Player::Representation command.response_class = Google::Apis::GamesV1::Player command.params['playerId'] = player_id unless player_id.nil? command.query['language'] = language unless language.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end @@ -693,15 +747,17 @@ module Google # The preferred language to use for strings returned by this method. # @param [Fixnum] max_results # The maximum number of player resources to return in the response, used for - # paging. For any response, the actual number of player resources returned - # may be less than the specified `maxResults`. + # paging. For any response, the actual number of player resources returned may + # be less than the specified maxResults. # @param [String] page_token # The token returned by the previous request. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -714,8 +770,8 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_players(collection, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'games/v1/players/me/players/{collection}', options) + def list_players(collection, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, 'players/me/players/{collection}', options) command.response_representation = Google::Apis::GamesV1::ListPlayerResponse::Representation command.response_class = Google::Apis::GamesV1::ListPlayerResponse command.params['collection'] = collection unless collection.nil? @@ -724,21 +780,88 @@ module Google command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Removes a push token for the current user and application. Removing a non- + # existent push token will report success. + # @param [Google::Apis::GamesV1::PushTokenId] push_token_id_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [NilClass] No result returned for this method + # @yieldparam err [StandardError] error object if request failed + # + # @return [void] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def remove_pushtoken(push_token_id_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, 'pushtokens/remove', options) + command.request_representation = Google::Apis::GamesV1::PushTokenId::Representation + command.request_object = push_token_id_object + 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 + + # Registers a push token for the current user and application. + # @param [Google::Apis::GamesV1::PushToken] push_token_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [NilClass] No result returned for this method + # @yieldparam err [StandardError] error object if request failed + # + # @return [void] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def update_pushtoken(push_token_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:put, 'pushtokens', options) + command.request_representation = Google::Apis::GamesV1::PushToken::Representation + command.request_object = push_token_object + 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 # Checks whether the games client is out of date. # @param [String] client_revision # The revision of the client SDK used by your application. Format: - # `[PLATFORM_TYPE]:[VERSION_NUMBER]`. Possible values of `PLATFORM_TYPE` are: - # * `ANDROID` - Client is running the Android SDK. - # * `IOS` - Client is running the iOS SDK. - # * `WEB_APP` - Client is running as a Web App. + # [PLATFORM_TYPE]:[VERSION_NUMBER]. Possible values of PLATFORM_TYPE are: + # + # - "ANDROID" - Client is running the Android SDK. + # - "IOS" - Client is running the iOS SDK. + # - "WEB_APP" - Client is running as a Web App. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -751,27 +874,330 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def check_revision(client_revision, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'games/v1/revisions/check', options) + def check_revision(client_revision, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, 'revisions/check', options) command.response_representation = Google::Apis::GamesV1::CheckRevisionResponse::Representation command.response_class = Google::Apis::GamesV1::CheckRevisionResponse command.query['clientRevision'] = client_revision unless client_revision.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Create a room. For internal use by the Games SDK only. Calling this method + # directly is unsupported. + # @param [Google::Apis::GamesV1::CreateRoomRequest] create_room_request_object + # @param [String] language + # The preferred language to use for strings returned by this method. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GamesV1::Room] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GamesV1::Room] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_room(create_room_request_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, 'rooms/create', options) + command.request_representation = Google::Apis::GamesV1::CreateRoomRequest::Representation + command.request_object = create_room_request_object + command.response_representation = Google::Apis::GamesV1::Room::Representation + command.response_class = Google::Apis::GamesV1::Room + command.query['language'] = language unless language.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Decline an invitation to join a room. For internal use by the Games SDK only. + # Calling this method directly is unsupported. + # @param [String] room_id + # The ID of the room. + # @param [String] language + # The preferred language to use for strings returned by this method. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GamesV1::Room] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GamesV1::Room] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def decline_room(room_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, 'rooms/{roomId}/decline', options) + command.response_representation = Google::Apis::GamesV1::Room::Representation + command.response_class = Google::Apis::GamesV1::Room + command.params['roomId'] = room_id unless room_id.nil? + command.query['language'] = language unless language.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Dismiss an invitation to join a room. For internal use by the Games SDK only. + # Calling this method directly is unsupported. + # @param [String] room_id + # The ID of the room. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [NilClass] No result returned for this method + # @yieldparam err [StandardError] error object if request failed + # + # @return [void] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def dismiss_room(room_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, 'rooms/{roomId}/dismiss', options) + command.params['roomId'] = room_id unless room_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Get the data for a room. + # @param [String] room_id + # The ID of the room. + # @param [String] language + # The preferred language to use for strings returned by this method. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GamesV1::Room] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GamesV1::Room] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_room(room_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, 'rooms/{roomId}', options) + command.response_representation = Google::Apis::GamesV1::Room::Representation + command.response_class = Google::Apis::GamesV1::Room + command.params['roomId'] = room_id unless room_id.nil? + command.query['language'] = language unless language.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Join a room. For internal use by the Games SDK only. Calling this method + # directly is unsupported. + # @param [String] room_id + # The ID of the room. + # @param [Google::Apis::GamesV1::JoinRoomRequest] join_room_request_object + # @param [String] language + # The preferred language to use for strings returned by this method. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GamesV1::Room] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GamesV1::Room] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def join_room(room_id, join_room_request_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, 'rooms/{roomId}/join', options) + command.request_representation = Google::Apis::GamesV1::JoinRoomRequest::Representation + command.request_object = join_room_request_object + command.response_representation = Google::Apis::GamesV1::Room::Representation + command.response_class = Google::Apis::GamesV1::Room + command.params['roomId'] = room_id unless room_id.nil? + command.query['language'] = language unless language.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Leave a room. For internal use by the Games SDK only. Calling this method + # directly is unsupported. + # @param [String] room_id + # The ID of the room. + # @param [Google::Apis::GamesV1::LeaveRoomRequest] leave_room_request_object + # @param [String] language + # The preferred language to use for strings returned by this method. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GamesV1::Room] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GamesV1::Room] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def leave_room(room_id, leave_room_request_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, 'rooms/{roomId}/leave', options) + command.request_representation = Google::Apis::GamesV1::LeaveRoomRequest::Representation + command.request_object = leave_room_request_object + command.response_representation = Google::Apis::GamesV1::Room::Representation + command.response_class = Google::Apis::GamesV1::Room + command.params['roomId'] = room_id unless room_id.nil? + command.query['language'] = language unless language.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Returns invitations to join rooms. + # @param [String] language + # The preferred language to use for strings returned by this method. + # @param [Fixnum] max_results + # The maximum number of rooms to return in the response, used for paging. For + # any response, the actual number of rooms to return may be less than the + # specified maxResults. + # @param [String] page_token + # The token returned by the previous request. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GamesV1::RoomList] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GamesV1::RoomList] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_rooms(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, 'rooms', options) + command.response_representation = Google::Apis::GamesV1::RoomList::Representation + command.response_class = Google::Apis::GamesV1::RoomList + command.query['language'] = language unless language.nil? + command.query['maxResults'] = max_results unless max_results.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Updates sent by a client reporting the status of peers in a room. For internal + # use by the Games SDK only. Calling this method directly is unsupported. + # @param [String] room_id + # The ID of the room. + # @param [Google::Apis::GamesV1::RoomP2PStatuses] room_p2_p_statuses_object + # @param [String] language + # The preferred language to use for strings returned by this method. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GamesV1::RoomStatus] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GamesV1::RoomStatus] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def report_room_status(room_id, room_p2_p_statuses_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, 'rooms/{roomId}/reportstatus', options) + command.request_representation = Google::Apis::GamesV1::RoomP2PStatuses::Representation + command.request_object = room_p2_p_statuses_object + command.response_representation = Google::Apis::GamesV1::RoomStatus::Representation + command.response_class = Google::Apis::GamesV1::RoomStatus + command.params['roomId'] = room_id unless room_id.nil? + command.query['language'] = language unless language.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Get high scores, and optionally ranks, in leaderboards for the currently - # authenticated player. For a specific time span, `leaderboardId` - # can be set to `ALL` to retrieve data for all leaderboards in a - # given time span. `NOTE: You cannot ask for 'ALL' leaderboards and - # 'ALL' timeSpans in the same request; only one parameter may be set to - # 'ALL'. + # authenticated player. For a specific time span, leaderboardId can be set to + # ALL to retrieve data for all leaderboards in a given time span. + # NOTE: You cannot ask for 'ALL' leaderboards and 'ALL' timeSpans in the same + # request; only one parameter may be set to 'ALL'. # @param [String] player_id - # A player ID. A value of `me` may be used in place of the - # authenticated player's ID. + # A player ID. A value of me may be used in place of the authenticated player's + # ID. # @param [String] leaderboard_id - # The ID of the leaderboard. Can be set to 'ALL' to retrieve data for all + # The ID of the leaderboard. Can be set to 'ALL' to retrieve data for all # leaderboards for this application. # @param [String] time_span # The time span for the scores and ranks you're requesting. @@ -781,16 +1207,18 @@ module Google # @param [String] language # The preferred language to use for strings returned by this method. # @param [Fixnum] max_results - # The maximum number of leaderboard scores to return in the response. For - # any response, the actual number of leaderboard scores returned may be less - # than the specified `maxResults`. + # The maximum number of leaderboard scores to return in the response. For any + # response, the actual number of leaderboard scores returned may be less than + # the specified maxResults. # @param [String] page_token # The token returned by the previous request. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -803,8 +1231,8 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_score(player_id, leaderboard_id, time_span, include_rank_type: nil, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'games/v1/players/{playerId}/leaderboards/{leaderboardId}/scores/{timeSpan}', options) + def get_score(player_id, leaderboard_id, time_span, include_rank_type: nil, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, 'players/{playerId}/leaderboards/{leaderboardId}/scores/{timeSpan}', options) command.response_representation = Google::Apis::GamesV1::ListPlayerLeaderboardScoreResponse::Representation command.response_class = Google::Apis::GamesV1::ListPlayerLeaderboardScoreResponse command.params['playerId'] = player_id unless player_id.nil? @@ -816,6 +1244,7 @@ module Google command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end @@ -829,16 +1258,18 @@ module Google # @param [String] language # The preferred language to use for strings returned by this method. # @param [Fixnum] max_results - # The maximum number of leaderboard scores to return in the response. For - # any response, the actual number of leaderboard scores returned may be less - # than the specified `maxResults`. + # The maximum number of leaderboard scores to return in the response. For any + # response, the actual number of leaderboard scores returned may be less than + # the specified maxResults. # @param [String] page_token # The token returned by the previous request. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -851,8 +1282,8 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_scores(leaderboard_id, collection, time_span, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'games/v1/leaderboards/{leaderboardId}/scores/{collection}', options) + def list_scores(leaderboard_id, collection, time_span, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, 'leaderboards/{leaderboardId}/scores/{collection}', options) command.response_representation = Google::Apis::GamesV1::LeaderboardScores::Representation command.response_class = Google::Apis::GamesV1::LeaderboardScores command.params['leaderboardId'] = leaderboard_id unless leaderboard_id.nil? @@ -863,6 +1294,7 @@ module Google command.query['timeSpan'] = time_span unless time_span.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end @@ -876,24 +1308,26 @@ module Google # @param [String] language # The preferred language to use for strings returned by this method. # @param [Fixnum] max_results - # The maximum number of leaderboard scores to return in the response. For - # any response, the actual number of leaderboard scores returned may be less - # than the specified `maxResults`. + # The maximum number of leaderboard scores to return in the response. For any + # response, the actual number of leaderboard scores returned may be less than + # the specified maxResults. # @param [String] page_token # The token returned by the previous request. # @param [Fixnum] results_above - # The preferred number of scores to return above the player's score. More - # scores may be returned if the player is at the bottom of the leaderboard; - # fewer may be returned if the player is at the top. Must be less than or - # equal to maxResults. + # The preferred number of scores to return above the player's score. More scores + # may be returned if the player is at the bottom of the leaderboard; fewer may + # be returned if the player is at the top. Must be less than or equal to + # maxResults. # @param [Boolean] return_top_if_absent # True if the top scores should be returned when the player is not in the # leaderboard. Defaults to true. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -906,8 +1340,8 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_score_window(leaderboard_id, collection, time_span, language: nil, max_results: nil, page_token: nil, results_above: nil, return_top_if_absent: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'games/v1/leaderboards/{leaderboardId}/window/{collection}', options) + def list_score_window(leaderboard_id, collection, time_span, language: nil, max_results: nil, page_token: nil, results_above: nil, return_top_if_absent: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, 'leaderboards/{leaderboardId}/window/{collection}', options) command.response_representation = Google::Apis::GamesV1::LeaderboardScores::Representation command.response_class = Google::Apis::GamesV1::LeaderboardScores command.params['leaderboardId'] = leaderboard_id unless leaderboard_id.nil? @@ -920,6 +1354,7 @@ module Google command.query['timeSpan'] = time_span unless time_span.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end @@ -928,22 +1363,23 @@ module Google # The ID of the leaderboard. # @param [Fixnum] score # The score you're submitting. The submitted score is ignored if it is worse - # than a previously submitted score, where worse depends on the leaderboard - # sort order. The meaning of the score value depends on the leaderboard - # format type. For fixed-point, the score represents the raw value. For - # time, the score represents elapsed time in milliseconds. For currency, the - # score represents a value in micro units. + # than a previously submitted score, where worse depends on the leaderboard sort + # order. The meaning of the score value depends on the leaderboard format type. + # For fixed-point, the score represents the raw value. For time, the score + # represents elapsed time in milliseconds. For currency, the score represents a + # value in micro units. # @param [String] language # The preferred language to use for strings returned by this method. # @param [String] score_tag - # Additional information about the score you're submitting. Values must - # contain no more than 64 URI-safe characters as defined by section 2.3 of - # RFC 3986. + # Additional information about the score you're submitting. Values must contain + # no more than 64 URI-safe characters as defined by section 2.3 of RFC 3986. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -956,8 +1392,8 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def submit_score(leaderboard_id, score, language: nil, score_tag: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'games/v1/leaderboards/{leaderboardId}/scores', options) + def submit_score(leaderboard_id, score, language: nil, score_tag: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, 'leaderboards/{leaderboardId}/scores', options) command.response_representation = Google::Apis::GamesV1::PlayerScoreResponse::Representation command.response_class = Google::Apis::GamesV1::PlayerScoreResponse command.params['leaderboardId'] = leaderboard_id unless leaderboard_id.nil? @@ -966,6 +1402,7 @@ module Google command.query['scoreTag'] = score_tag unless score_tag.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end @@ -976,8 +1413,10 @@ module Google # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -990,8 +1429,8 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def submit_score_multiple(player_score_submission_list_object = nil, language: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:post, 'games/v1/leaderboards/scores', options) + def submit_score_multiple(player_score_submission_list_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, 'leaderboards/scores', options) command.request_representation = Google::Apis::GamesV1::PlayerScoreSubmissionList::Representation command.request_object = player_score_submission_list_object command.response_representation = Google::Apis::GamesV1::ListPlayerScoreResponse::Representation @@ -999,6 +1438,7 @@ module Google command.query['language'] = language unless language.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end @@ -1010,8 +1450,10 @@ module Google # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1024,35 +1466,38 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_snapshot(snapshot_id, language: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'games/v1/snapshots/{snapshotId}', options) + def get_snapshot(snapshot_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, 'snapshots/{snapshotId}', options) command.response_representation = Google::Apis::GamesV1::Snapshot::Representation command.response_class = Google::Apis::GamesV1::Snapshot command.params['snapshotId'] = snapshot_id unless snapshot_id.nil? command.query['language'] = language unless language.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of snapshots created by your application for the player # corresponding to the player ID. # @param [String] player_id - # A player ID. A value of `me` may be used in place of the authenticated - # player's ID. + # A player ID. A value of me may be used in place of the authenticated player's + # ID. # @param [String] language # The preferred language to use for strings returned by this method. # @param [Fixnum] max_results - # The maximum number of snapshot resources to return in the response, used - # for paging. For any response, the actual number of snapshot resources - # returned may be less than the specified `maxResults`. + # The maximum number of snapshot resources to return in the response, used for + # paging. For any response, the actual number of snapshot resources returned may + # be less than the specified maxResults. # @param [String] page_token # The token returned by the previous request. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # @@ -1065,8 +1510,8 @@ module Google # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def list_snapshots(player_id, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'games/v1/players/{playerId}/snapshots', options) + def list_snapshots(player_id, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, 'players/{playerId}/snapshots', options) command.response_representation = Google::Apis::GamesV1::ListSnapshotResponse::Representation command.response_class = Google::Apis::GamesV1::ListSnapshotResponse command.params['playerId'] = player_id unless player_id.nil? @@ -1075,34 +1520,530 @@ module Google command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end - # Returns engagement and spend statistics in this application for the - # currently authenticated user. + # Cancel a turn-based match. + # @param [String] match_id + # The ID of the match. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user - # Available to use for quota purposes for server-side applications. Can be any - # arbitrary string assigned to a user, but should not exceed 40 characters. + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied - # @yieldparam result [Google::Apis::GamesV1::StatsResponse] parsed result object + # @yieldparam result [NilClass] No result returned for this method # @yieldparam err [StandardError] error object if request failed # - # @return [Google::Apis::GamesV1::StatsResponse] + # @return [void] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required - def get_stat(fields: nil, quota_user: nil, options: nil, &block) - command = make_simple_command(:get, 'games/v1/stats', options) - command.response_representation = Google::Apis::GamesV1::StatsResponse::Representation - command.response_class = Google::Apis::GamesV1::StatsResponse + def cancel_turn_based_match(match_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:put, 'turnbasedmatches/{matchId}/cancel', options) + command.params['matchId'] = match_id unless match_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Create a turn-based match. + # @param [Google::Apis::GamesV1::CreateTurnBasedMatchRequest] create_turn_based_match_request_object + # @param [String] language + # The preferred language to use for strings returned by this method. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GamesV1::TurnBasedMatch] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GamesV1::TurnBasedMatch] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_turn_based_match(create_turn_based_match_request_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, 'turnbasedmatches/create', options) + command.request_representation = Google::Apis::GamesV1::CreateTurnBasedMatchRequest::Representation + command.request_object = create_turn_based_match_request_object + command.response_representation = Google::Apis::GamesV1::TurnBasedMatch::Representation + command.response_class = Google::Apis::GamesV1::TurnBasedMatch + command.query['language'] = language unless language.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Decline an invitation to play a turn-based match. + # @param [String] match_id + # The ID of the match. + # @param [String] language + # The preferred language to use for strings returned by this method. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GamesV1::TurnBasedMatch] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GamesV1::TurnBasedMatch] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def decline_turn_based_match(match_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:put, 'turnbasedmatches/{matchId}/decline', options) + command.response_representation = Google::Apis::GamesV1::TurnBasedMatch::Representation + command.response_class = Google::Apis::GamesV1::TurnBasedMatch + command.params['matchId'] = match_id unless match_id.nil? + command.query['language'] = language unless language.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Dismiss a turn-based match from the match list. The match will no longer show + # up in the list and will not generate notifications. + # @param [String] match_id + # The ID of the match. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [NilClass] No result returned for this method + # @yieldparam err [StandardError] error object if request failed + # + # @return [void] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def dismiss_turn_based_match(match_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:put, 'turnbasedmatches/{matchId}/dismiss', options) + command.params['matchId'] = match_id unless match_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Finish a turn-based match. Each player should make this call once, after all + # results are in. Only the player whose turn it is may make the first call to + # Finish, and can pass in the final match state. + # @param [String] match_id + # The ID of the match. + # @param [Google::Apis::GamesV1::TurnBasedMatchResults] turn_based_match_results_object + # @param [String] language + # The preferred language to use for strings returned by this method. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GamesV1::TurnBasedMatch] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GamesV1::TurnBasedMatch] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def finish_turn_based_match(match_id, turn_based_match_results_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:put, 'turnbasedmatches/{matchId}/finish', options) + command.request_representation = Google::Apis::GamesV1::TurnBasedMatchResults::Representation + command.request_object = turn_based_match_results_object + command.response_representation = Google::Apis::GamesV1::TurnBasedMatch::Representation + command.response_class = Google::Apis::GamesV1::TurnBasedMatch + command.params['matchId'] = match_id unless match_id.nil? + command.query['language'] = language unless language.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Get the data for a turn-based match. + # @param [String] match_id + # The ID of the match. + # @param [Boolean] include_match_data + # Get match data along with metadata. + # @param [String] language + # The preferred language to use for strings returned by this method. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GamesV1::TurnBasedMatch] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GamesV1::TurnBasedMatch] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_turn_based_match(match_id, include_match_data: nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, 'turnbasedmatches/{matchId}', options) + command.response_representation = Google::Apis::GamesV1::TurnBasedMatch::Representation + command.response_class = Google::Apis::GamesV1::TurnBasedMatch + command.params['matchId'] = match_id unless match_id.nil? + command.query['includeMatchData'] = include_match_data unless include_match_data.nil? + command.query['language'] = language unless language.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Join a turn-based match. + # @param [String] match_id + # The ID of the match. + # @param [String] language + # The preferred language to use for strings returned by this method. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GamesV1::TurnBasedMatch] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GamesV1::TurnBasedMatch] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def join_turn_based_match(match_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:put, 'turnbasedmatches/{matchId}/join', options) + command.response_representation = Google::Apis::GamesV1::TurnBasedMatch::Representation + command.response_class = Google::Apis::GamesV1::TurnBasedMatch + command.params['matchId'] = match_id unless match_id.nil? + command.query['language'] = language unless language.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Leave a turn-based match when it is not the current player's turn, without + # canceling the match. + # @param [String] match_id + # The ID of the match. + # @param [String] language + # The preferred language to use for strings returned by this method. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GamesV1::TurnBasedMatch] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GamesV1::TurnBasedMatch] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def leave_turn_based_match(match_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:put, 'turnbasedmatches/{matchId}/leave', options) + command.response_representation = Google::Apis::GamesV1::TurnBasedMatch::Representation + command.response_class = Google::Apis::GamesV1::TurnBasedMatch + command.params['matchId'] = match_id unless match_id.nil? + command.query['language'] = language unless language.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Leave a turn-based match during the current player's turn, without canceling + # the match. + # @param [String] match_id + # The ID of the match. + # @param [Fixnum] match_version + # The version of the match being updated. + # @param [String] language + # The preferred language to use for strings returned by this method. + # @param [String] pending_participant_id + # The ID of another participant who should take their turn next. If not set, the + # match will wait for other player(s) to join via automatching; this is only + # valid if automatch criteria is set on the match with remaining slots for + # automatched players. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GamesV1::TurnBasedMatch] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GamesV1::TurnBasedMatch] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def leave_turn(match_id, match_version, language: nil, pending_participant_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:put, 'turnbasedmatches/{matchId}/leaveTurn', options) + command.response_representation = Google::Apis::GamesV1::TurnBasedMatch::Representation + command.response_class = Google::Apis::GamesV1::TurnBasedMatch + command.params['matchId'] = match_id unless match_id.nil? + command.query['language'] = language unless language.nil? + command.query['matchVersion'] = match_version unless match_version.nil? + command.query['pendingParticipantId'] = pending_participant_id unless pending_participant_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Returns turn-based matches the player is or was involved in. + # @param [Boolean] include_match_data + # True if match data should be returned in the response. Note that not all data + # will necessarily be returned if include_match_data is true; the server may + # decide to only return data for some of the matches to limit download size for + # the client. The remainder of the data for these matches will be retrievable on + # request. + # @param [String] language + # The preferred language to use for strings returned by this method. + # @param [Fixnum] max_completed_matches + # The maximum number of completed or canceled matches to return in the response. + # If not set, all matches returned could be completed or canceled. + # @param [Fixnum] max_results + # The maximum number of matches to return in the response, used for paging. For + # any response, the actual number of matches to return may be less than the + # specified maxResults. + # @param [String] page_token + # The token returned by the previous request. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GamesV1::TurnBasedMatchList] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GamesV1::TurnBasedMatchList] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be 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_turn_based_matches(include_match_data: nil, language: nil, max_completed_matches: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, 'turnbasedmatches', options) + command.response_representation = Google::Apis::GamesV1::TurnBasedMatchList::Representation + command.response_class = Google::Apis::GamesV1::TurnBasedMatchList + command.query['includeMatchData'] = include_match_data unless include_match_data.nil? + command.query['language'] = language unless language.nil? + command.query['maxCompletedMatches'] = max_completed_matches unless max_completed_matches.nil? + command.query['maxResults'] = max_results unless max_results.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Create a rematch of a match that was previously completed, with the same + # participants. This can be called by only one player on a match still in their + # list; the player must have called Finish first. Returns the newly created + # match; it will be the caller's turn. + # @param [String] match_id + # The ID of the match. + # @param [String] language + # The preferred language to use for strings returned by this method. + # @param [Fixnum] request_id + # A randomly generated numeric ID for each request specified by the caller. This + # number is used at the server to ensure that the request is handled correctly + # across retries. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GamesV1::TurnBasedMatchRematch] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GamesV1::TurnBasedMatchRematch] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def rematch_turn_based_match(match_id, language: nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, 'turnbasedmatches/{matchId}/rematch', options) + command.response_representation = Google::Apis::GamesV1::TurnBasedMatchRematch::Representation + command.response_class = Google::Apis::GamesV1::TurnBasedMatchRematch + command.params['matchId'] = match_id unless match_id.nil? + command.query['language'] = language unless language.nil? + command.query['requestId'] = request_id unless request_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Returns turn-based matches the player is or was involved in that changed since + # the last sync call, with the least recent changes coming first. Matches that + # should be removed from the local cache will have a status of MATCH_DELETED. + # @param [Boolean] include_match_data + # True if match data should be returned in the response. Note that not all data + # will necessarily be returned if include_match_data is true; the server may + # decide to only return data for some of the matches to limit download size for + # the client. The remainder of the data for these matches will be retrievable on + # request. + # @param [String] language + # The preferred language to use for strings returned by this method. + # @param [Fixnum] max_completed_matches + # The maximum number of completed or canceled matches to return in the response. + # If not set, all matches returned could be completed or canceled. + # @param [Fixnum] max_results + # The maximum number of matches to return in the response, used for paging. For + # any response, the actual number of matches to return may be less than the + # specified maxResults. + # @param [String] page_token + # The token returned by the previous request. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GamesV1::TurnBasedMatchSync] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GamesV1::TurnBasedMatchSync] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def sync_turn_based_match(include_match_data: nil, language: nil, max_completed_matches: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:get, 'turnbasedmatches/sync', options) + command.response_representation = Google::Apis::GamesV1::TurnBasedMatchSync::Representation + command.response_class = Google::Apis::GamesV1::TurnBasedMatchSync + command.query['includeMatchData'] = include_match_data unless include_match_data.nil? + command.query['language'] = language unless language.nil? + command.query['maxCompletedMatches'] = max_completed_matches unless max_completed_matches.nil? + command.query['maxResults'] = max_results unless max_results.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Commit the results of a player turn. + # @param [String] match_id + # The ID of the match. + # @param [Google::Apis::GamesV1::TurnBasedMatchTurn] turn_based_match_turn_object + # @param [String] language + # The preferred language to use for strings returned by this method. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GamesV1::TurnBasedMatch] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GamesV1::TurnBasedMatch] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def take_turn(match_id, turn_based_match_turn_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:put, 'turnbasedmatches/{matchId}/turn', options) + command.request_representation = Google::Apis::GamesV1::TurnBasedMatchTurn::Representation + command.request_object = turn_based_match_turn_object + command.response_representation = Google::Apis::GamesV1::TurnBasedMatch::Representation + command.response_class = Google::Apis::GamesV1::TurnBasedMatch + command.params['matchId'] = match_id unless match_id.nil? + command.query['language'] = language unless language.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end @@ -1111,6 +2052,7 @@ module Google def apply_command_defaults(command) command.query['key'] = key unless key.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? end end end diff --git a/generated/google/apis/gameservices_v1.rb b/generated/google/apis/gameservices_v1.rb index 3d36103c5..657ab6756 100644 --- a/generated/google/apis/gameservices_v1.rb +++ b/generated/google/apis/gameservices_v1.rb @@ -25,7 +25,7 @@ module Google # @see https://cloud.google.com/solutions/gaming/ module GameservicesV1 VERSION = 'V1' - REVISION = '20200528' + REVISION = '20200630' # 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/gameservices_v1/classes.rb b/generated/google/apis/gameservices_v1/classes.rb index 5d88524d3..0bf99916e 100644 --- a/generated/google/apis/gameservices_v1/classes.rb +++ b/generated/google/apis/gameservices_v1/classes.rb @@ -34,7 +34,7 @@ module Google # ` # "audit_configs": [ # ` - # "service": "allServices" + # "service": "allServices", # "audit_log_configs": [ # ` # "log_type": "DATA_READ", @@ -43,18 +43,18 @@ module Google # ] # `, # ` - # "log_type": "DATA_WRITE", + # "log_type": "DATA_WRITE" # `, # ` - # "log_type": "ADMIN_READ", + # "log_type": "ADMIN_READ" # ` # ] # `, # ` - # "service": "sampleservice.googleapis.com" + # "service": "sampleservice.googleapis.com", # "audit_log_configs": [ # ` - # "log_type": "DATA_READ", + # "log_type": "DATA_READ" # `, # ` # "log_type": "DATA_WRITE", @@ -112,7 +112,7 @@ module Google # ] # `, # ` - # "log_type": "DATA_WRITE", + # "log_type": "DATA_WRITE" # ` # ] # ` @@ -431,6 +431,166 @@ module Google end end + # The game server cluster changes made by the game server deployment. + class DeployedClusterState + include Google::Apis::Core::Hashable + + # The name of the cluster. + # Corresponds to the JSON property `cluster` + # @return [String] + attr_accessor :cluster + + # The details about the Agones fleets and autoscalers created in the + # game server cluster. + # Corresponds to the JSON property `fleetDetails` + # @return [Array] + attr_accessor :fleet_details + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @cluster = args[:cluster] if args.key?(:cluster) + @fleet_details = args[:fleet_details] if args.key?(:fleet_details) + end + end + + # Agones fleet specification and details. + class DeployedFleet + include Google::Apis::Core::Hashable + + # The name of the Agones fleet. + # Corresponds to the JSON property `fleet` + # @return [String] + attr_accessor :fleet + + # The fleet spec retrieved from the Agones fleet. + # Corresponds to the JSON property `fleetSpec` + # @return [String] + attr_accessor :fleet_spec + + # Encapsulates Agones fleet spec and Agones autoscaler spec sources. + # Corresponds to the JSON property `specSource` + # @return [Google::Apis::GameservicesV1::SpecSource] + attr_accessor :spec_source + + # DeployedFleetStatus has details about the Agones fleets such as how many + # are running, how many allocated, and so on. + # Corresponds to the JSON property `status` + # @return [Google::Apis::GameservicesV1::DeployedFleetStatus] + attr_accessor :status + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @fleet = args[:fleet] if args.key?(:fleet) + @fleet_spec = args[:fleet_spec] if args.key?(:fleet_spec) + @spec_source = args[:spec_source] if args.key?(:spec_source) + @status = args[:status] if args.key?(:status) + end + end + + # Details about the Agones autoscaler. + class DeployedFleetAutoscaler + include Google::Apis::Core::Hashable + + # The name of the Agones autoscaler. + # Corresponds to the JSON property `autoscaler` + # @return [String] + attr_accessor :autoscaler + + # The autoscaler spec retrieved from Agones. + # Corresponds to the JSON property `fleetAutoscalerSpec` + # @return [String] + attr_accessor :fleet_autoscaler_spec + + # Encapsulates Agones fleet spec and Agones autoscaler spec sources. + # Corresponds to the JSON property `specSource` + # @return [Google::Apis::GameservicesV1::SpecSource] + attr_accessor :spec_source + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @autoscaler = args[:autoscaler] if args.key?(:autoscaler) + @fleet_autoscaler_spec = args[:fleet_autoscaler_spec] if args.key?(:fleet_autoscaler_spec) + @spec_source = args[:spec_source] if args.key?(:spec_source) + end + end + + # Details of the deployed Agones fleet. + class DeployedFleetDetails + include Google::Apis::Core::Hashable + + # Details about the Agones autoscaler. + # Corresponds to the JSON property `deployedAutoscaler` + # @return [Google::Apis::GameservicesV1::DeployedFleetAutoscaler] + attr_accessor :deployed_autoscaler + + # Agones fleet specification and details. + # Corresponds to the JSON property `deployedFleet` + # @return [Google::Apis::GameservicesV1::DeployedFleet] + attr_accessor :deployed_fleet + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @deployed_autoscaler = args[:deployed_autoscaler] if args.key?(:deployed_autoscaler) + @deployed_fleet = args[:deployed_fleet] if args.key?(:deployed_fleet) + end + end + + # DeployedFleetStatus has details about the Agones fleets such as how many + # are running, how many allocated, and so on. + class DeployedFleetStatus + include Google::Apis::Core::Hashable + + # The number of GameServer replicas in the ALLOCATED state in this fleet. + # Corresponds to the JSON property `allocatedReplicas` + # @return [Fixnum] + attr_accessor :allocated_replicas + + # The number of GameServer replicas in the READY state in this fleet. + # Corresponds to the JSON property `readyReplicas` + # @return [Fixnum] + attr_accessor :ready_replicas + + # The total number of current GameServer replicas in this fleet. + # Corresponds to the JSON property `replicas` + # @return [Fixnum] + attr_accessor :replicas + + # The number of GameServer replicas in the RESERVED state in this fleet. + # Reserved instances won't be deleted on scale down, but won't cause + # an autoscaler to scale up. + # Corresponds to the JSON property `reservedReplicas` + # @return [Fixnum] + attr_accessor :reserved_replicas + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @allocated_replicas = args[:allocated_replicas] if args.key?(:allocated_replicas) + @ready_replicas = args[:ready_replicas] if args.key?(:ready_replicas) + @replicas = args[:replicas] if args.key?(:replicas) + @reserved_replicas = args[:reserved_replicas] if args.key?(:reserved_replicas) + 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: @@ -513,6 +673,499 @@ module Google end end + # Request message for GameServerDeploymentsService.FetchDeploymentState. + class FetchDeploymentStateRequest + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Response message for GameServerDeploymentsService.FetchDeploymentState. + class FetchDeploymentStateResponse + include Google::Apis::Core::Hashable + + # The state of the game server deployment in each game server cluster. + # Corresponds to the JSON property `clusterState` + # @return [Array] + attr_accessor :cluster_state + + # List of locations that could not be reached. + # Corresponds to the JSON property `unavailable` + # @return [Array] + attr_accessor :unavailable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @cluster_state = args[:cluster_state] if args.key?(:cluster_state) + @unavailable = args[:unavailable] if args.key?(:unavailable) + end + end + + # Fleet configs for Agones. + class FleetConfig + include Google::Apis::Core::Hashable + + # Agones fleet spec. Example spec: + # `https://agones.dev/site/docs/reference/fleet/`. + # Corresponds to the JSON property `fleetSpec` + # @return [String] + attr_accessor :fleet_spec + + # The name of the FleetConfig. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @fleet_spec = args[:fleet_spec] if args.key?(:fleet_spec) + @name = args[:name] if args.key?(:name) + end + end + + # A game server cluster resource. + class GameServerCluster + include Google::Apis::Core::Hashable + + # The game server cluster connection information. + # Corresponds to the JSON property `connectionInfo` + # @return [Google::Apis::GameservicesV1::GameServerClusterConnectionInfo] + attr_accessor :connection_info + + # Output only. The creation time. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Human readable description of the cluster. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # ETag of the resource. + # Corresponds to the JSON property `etag` + # @return [String] + attr_accessor :etag + + # The labels associated with this game server cluster. Each label is a + # key-value pair. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # Required. The resource name of the game server cluster. Uses the form: + # `projects/`project`/locations/`location`/realms/`realm`/gameServerClusters/` + # cluster``. + # For example, + # `projects/my-project/locations/`location`/realms/zanzibar/gameServerClusters/ + # my-onprem-cluster`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Output only. The last-modified 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) + @connection_info = args[:connection_info] if args.key?(:connection_info) + @create_time = args[:create_time] if args.key?(:create_time) + @description = args[:description] if args.key?(:description) + @etag = args[:etag] if args.key?(:etag) + @labels = args[:labels] if args.key?(:labels) + @name = args[:name] if args.key?(:name) + @update_time = args[:update_time] if args.key?(:update_time) + end + end + + # The game server cluster connection information. + class GameServerClusterConnectionInfo + include Google::Apis::Core::Hashable + + # A reference to a GKE cluster. + # Corresponds to the JSON property `gkeClusterReference` + # @return [Google::Apis::GameservicesV1::GkeClusterReference] + attr_accessor :gke_cluster_reference + + # Namespace designated on the game server cluster where the Agones game + # server instances will be created. Existence of the namespace will be + # validated during creation. + # Corresponds to the JSON property `namespace` + # @return [String] + attr_accessor :namespace + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @gke_cluster_reference = args[:gke_cluster_reference] if args.key?(:gke_cluster_reference) + @namespace = args[:namespace] if args.key?(:namespace) + end + end + + # A game server config resource. + class GameServerConfig + include Google::Apis::Core::Hashable + + # Output only. The creation time. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # The description of the game server config. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # FleetConfig contains a list of Agones fleet specs. Only one FleetConfig + # is allowed. + # Corresponds to the JSON property `fleetConfigs` + # @return [Array] + attr_accessor :fleet_configs + + # The labels associated with this game server config. Each label is a + # key-value pair. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # The resource name of the game server config. Uses the form: + # `projects/`project`/locations/`location`/gameServerDeployments/`deployment`/ + # configs/`config``. + # For example, + # `projects/my-project/locations/global/gameServerDeployments/my-game/configs/my- + # config`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The autoscaling settings. + # Corresponds to the JSON property `scalingConfigs` + # @return [Array] + attr_accessor :scaling_configs + + # Output only. The last-modified 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) + @create_time = args[:create_time] if args.key?(:create_time) + @description = args[:description] if args.key?(:description) + @fleet_configs = args[:fleet_configs] if args.key?(:fleet_configs) + @labels = args[:labels] if args.key?(:labels) + @name = args[:name] if args.key?(:name) + @scaling_configs = args[:scaling_configs] if args.key?(:scaling_configs) + @update_time = args[:update_time] if args.key?(:update_time) + end + end + + # A game server config override. + class GameServerConfigOverride + include Google::Apis::Core::Hashable + + # The game server config for this override. + # Corresponds to the JSON property `configVersion` + # @return [String] + attr_accessor :config_version + + # The realm selector, used to match realm resources. + # Corresponds to the JSON property `realmsSelector` + # @return [Google::Apis::GameservicesV1::RealmSelector] + attr_accessor :realms_selector + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @config_version = args[:config_version] if args.key?(:config_version) + @realms_selector = args[:realms_selector] if args.key?(:realms_selector) + end + end + + # A game server deployment resource. + class GameServerDeployment + include Google::Apis::Core::Hashable + + # Output only. The creation time. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Human readable description of the game server delpoyment. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # ETag of the resource. + # Corresponds to the JSON property `etag` + # @return [String] + attr_accessor :etag + + # The labels associated with this game server deployment. Each label is a + # key-value pair. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # The resource name of the game server deployment. Uses the form: + # `projects/`project`/locations/`location`/gameServerDeployments/`deployment``. + # For example, + # `projects/my-project/locations/`location`/gameServerDeployments/my-deployment`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Output only. The last-modified 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) + @create_time = args[:create_time] if args.key?(:create_time) + @description = args[:description] if args.key?(:description) + @etag = args[:etag] if args.key?(:etag) + @labels = args[:labels] if args.key?(:labels) + @name = args[:name] if args.key?(:name) + @update_time = args[:update_time] if args.key?(:update_time) + end + end + + # The game server deployment rollout which represents the desired rollout + # state. + class GameServerDeploymentRollout + include Google::Apis::Core::Hashable + + # Output only. The creation time. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # The default game server config is applied to all realms unless overridden + # in the rollout. For example, + # `projects/my-project/locations/global/gameServerDeployments/my-game/configs/my- + # config`. + # Corresponds to the JSON property `defaultGameServerConfig` + # @return [String] + attr_accessor :default_game_server_config + + # ETag of the resource. + # Corresponds to the JSON property `etag` + # @return [String] + attr_accessor :etag + + # Contains the game server config rollout overrides. Overrides are processed + # in the order they are listed. Once a match is found for a realm, the rest + # of the list is not processed. + # Corresponds to the JSON property `gameServerConfigOverrides` + # @return [Array] + attr_accessor :game_server_config_overrides + + # The resource name of the game server deployment rollout. Uses the form: + # `projects/`project`/locations/`location`/gameServerDeployments/`deployment`/ + # rollout`. + # For example, + # `projects/my-project/locations/`location`/gameServerDeployments/my-deployment/ + # rollout`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Output only. The last-modified 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) + @create_time = args[:create_time] if args.key?(:create_time) + @default_game_server_config = args[:default_game_server_config] if args.key?(:default_game_server_config) + @etag = args[:etag] if args.key?(:etag) + @game_server_config_overrides = args[:game_server_config_overrides] if args.key?(:game_server_config_overrides) + @name = args[:name] if args.key?(:name) + @update_time = args[:update_time] if args.key?(:update_time) + end + end + + # A reference to a GKE cluster. + class GkeClusterReference + include Google::Apis::Core::Hashable + + # The full or partial name of a GKE cluster, using one of the following + # forms: + # * `projects/`project`/locations/`location`/clusters/`cluster`` + # * `locations/`location`/clusters/`cluster`` + # * ``cluster`` + # If project and location are not specified, the project and location of the + # GameServerCluster resource are used to generate the full name of the + # GKE cluster. + # Corresponds to the JSON property `cluster` + # @return [String] + attr_accessor :cluster + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @cluster = args[:cluster] if args.key?(:cluster) + end + end + + # The label selector, used to group labels on the resources. + class LabelSelector + include Google::Apis::Core::Hashable + + # Resource labels for this selector. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @labels = args[:labels] if args.key?(:labels) + end + end + + # Response message for GameServerClustersService.ListGameServerClusters. + class ListGameServerClustersResponse + include Google::Apis::Core::Hashable + + # The list of game server clusters. + # Corresponds to the JSON property `gameServerClusters` + # @return [Array] + attr_accessor :game_server_clusters + + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # List of locations that could not be reached. + # Corresponds to the JSON property `unreachable` + # @return [Array] + attr_accessor :unreachable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @game_server_clusters = args[:game_server_clusters] if args.key?(:game_server_clusters) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @unreachable = args[:unreachable] if args.key?(:unreachable) + end + end + + # Response message for GameServerConfigsService.ListGameServerConfigs. + class ListGameServerConfigsResponse + include Google::Apis::Core::Hashable + + # The list of game server configs. + # Corresponds to the JSON property `gameServerConfigs` + # @return [Array] + attr_accessor :game_server_configs + + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # List of locations that could not be reached. + # Corresponds to the JSON property `unreachable` + # @return [Array] + attr_accessor :unreachable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @game_server_configs = args[:game_server_configs] if args.key?(:game_server_configs) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @unreachable = args[:unreachable] if args.key?(:unreachable) + end + end + + # Response message for GameServerDeploymentsService.ListGameServerDeployments. + class ListGameServerDeploymentsResponse + include Google::Apis::Core::Hashable + + # The list of game server deployments. + # Corresponds to the JSON property `gameServerDeployments` + # @return [Array] + attr_accessor :game_server_deployments + + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # List of locations that could not be reached. + # Corresponds to the JSON property `unreachable` + # @return [Array] + attr_accessor :unreachable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @game_server_deployments = args[:game_server_deployments] if args.key?(:game_server_deployments) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @unreachable = args[:unreachable] if args.key?(:unreachable) + end + end + # The response message for Locations.ListLocations. class ListLocationsResponse include Google::Apis::Core::Hashable @@ -563,6 +1216,38 @@ module Google end end + # Response message for RealmsService.ListRealms. + class ListRealmsResponse + include Google::Apis::Core::Hashable + + # Token to retrieve the next page of results, or empty if there are no more + # results in the list. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The list of realms. + # Corresponds to the JSON property `realms` + # @return [Array] + attr_accessor :realms + + # List of locations that could not be reached. + # Corresponds to the JSON property `unreachable` + # @return [Array] + attr_accessor :unreachable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @realms = args[:realms] if args.key?(:realms) + @unreachable = args[:unreachable] if args.key?(:unreachable) + end + end + # A resource that represents Google Cloud Platform location. class Location include Google::Apis::Core::Hashable @@ -721,6 +1406,113 @@ module Google end end + # Represents the metadata of the long-running operation. + class OperationMetadata + include Google::Apis::Core::Hashable + + # Output only. API version used to start the operation. + # Corresponds to the JSON property `apiVersion` + # @return [String] + attr_accessor :api_version + + # Output only. The time the operation was created. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Output only. The time the operation finished running. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # Output only. Operation status for Game Services API operations. Operation + # status is in + # the form of key-value pairs where keys are resource IDs and the values show + # the status of the operation. In case of failures, the value includes an + # error code and error message. + # Corresponds to the JSON property `operationStatus` + # @return [Hash] + attr_accessor :operation_status + + # Output only. Identifies whether the user has requested cancellation + # of the operation. Operations that have successfully been cancelled + # have Operation.error value with a google.rpc.Status.code of 1, + # corresponding to `Code.CANCELLED`. + # Corresponds to the JSON property `requestedCancellation` + # @return [Boolean] + attr_accessor :requested_cancellation + alias_method :requested_cancellation?, :requested_cancellation + + # Output only. Human-readable status of the operation, if any. + # Corresponds to the JSON property `statusMessage` + # @return [String] + attr_accessor :status_message + + # Output only. Server-defined resource path for the target of the operation. + # Corresponds to the JSON property `target` + # @return [String] + attr_accessor :target + + # Output only. List of Locations that could not be reached. + # Corresponds to the JSON property `unreachable` + # @return [Array] + attr_accessor :unreachable + + # Output only. Name of the verb executed by the operation. + # Corresponds to the JSON property `verb` + # @return [String] + attr_accessor :verb + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @api_version = args[:api_version] if args.key?(:api_version) + @create_time = args[:create_time] if args.key?(:create_time) + @end_time = args[:end_time] if args.key?(:end_time) + @operation_status = args[:operation_status] if args.key?(:operation_status) + @requested_cancellation = args[:requested_cancellation] if args.key?(:requested_cancellation) + @status_message = args[:status_message] if args.key?(:status_message) + @target = args[:target] if args.key?(:target) + @unreachable = args[:unreachable] if args.key?(:unreachable) + @verb = args[:verb] if args.key?(:verb) + end + end + + # + class OperationStatus + include Google::Apis::Core::Hashable + + # Output only. Whether the operation is done or still in progress. + # Corresponds to the JSON property `done` + # @return [Boolean] + attr_accessor :done + alias_method :done?, :done + + # The error code in case of failures. + # Corresponds to the JSON property `errorCode` + # @return [String] + attr_accessor :error_code + + # The human-readable error message. + # Corresponds to the JSON property `errorMessage` + # @return [String] + attr_accessor :error_message + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @done = args[:done] if args.key?(:done) + @error_code = args[:error_code] if args.key?(:error_code) + @error_message = args[:error_message] if args.key?(:error_message) + end + end + # An Identity and Access Management (IAM) policy, which specifies access # controls for Google Cloud resources. # A `Policy` is a collection of `bindings`. A `binding` binds one or more @@ -870,6 +1662,219 @@ module Google end end + # Response message for + # GameServerClustersService.PreviewCreateGameServerCluster. + class PreviewCreateGameServerClusterResponse + include Google::Apis::Core::Hashable + + # The ETag of the game server cluster. + # Corresponds to the JSON property `etag` + # @return [String] + attr_accessor :etag + + # Encapsulates the Target state. + # Corresponds to the JSON property `targetState` + # @return [Google::Apis::GameservicesV1::TargetState] + attr_accessor :target_state + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @etag = args[:etag] if args.key?(:etag) + @target_state = args[:target_state] if args.key?(:target_state) + end + end + + # Response message for + # GameServerClustersService.PreviewDeleteGameServerCluster. + class PreviewDeleteGameServerClusterResponse + include Google::Apis::Core::Hashable + + # The ETag of the game server cluster. + # Corresponds to the JSON property `etag` + # @return [String] + attr_accessor :etag + + # Encapsulates the Target state. + # Corresponds to the JSON property `targetState` + # @return [Google::Apis::GameservicesV1::TargetState] + attr_accessor :target_state + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @etag = args[:etag] if args.key?(:etag) + @target_state = args[:target_state] if args.key?(:target_state) + end + end + + # Response message for PreviewGameServerDeploymentRollout. + # This has details about the Agones fleet and autoscaler to be actuated. + class PreviewGameServerDeploymentRolloutResponse + include Google::Apis::Core::Hashable + + # ETag of the game server deployment. + # Corresponds to the JSON property `etag` + # @return [String] + attr_accessor :etag + + # Encapsulates the Target state. + # Corresponds to the JSON property `targetState` + # @return [Google::Apis::GameservicesV1::TargetState] + attr_accessor :target_state + + # Locations that could not be reached on this request. + # Corresponds to the JSON property `unavailable` + # @return [Array] + attr_accessor :unavailable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @etag = args[:etag] if args.key?(:etag) + @target_state = args[:target_state] if args.key?(:target_state) + @unavailable = args[:unavailable] if args.key?(:unavailable) + end + end + + # Response message for RealmsService.PreviewRealmUpdate. + class PreviewRealmUpdateResponse + include Google::Apis::Core::Hashable + + # ETag of the realm. + # Corresponds to the JSON property `etag` + # @return [String] + attr_accessor :etag + + # Encapsulates the Target state. + # Corresponds to the JSON property `targetState` + # @return [Google::Apis::GameservicesV1::TargetState] + attr_accessor :target_state + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @etag = args[:etag] if args.key?(:etag) + @target_state = args[:target_state] if args.key?(:target_state) + end + end + + # Response message for GameServerClustersService.PreviewUpdateGameServerCluster + class PreviewUpdateGameServerClusterResponse + include Google::Apis::Core::Hashable + + # The ETag of the game server cluster. + # Corresponds to the JSON property `etag` + # @return [String] + attr_accessor :etag + + # Encapsulates the Target state. + # Corresponds to the JSON property `targetState` + # @return [Google::Apis::GameservicesV1::TargetState] + attr_accessor :target_state + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @etag = args[:etag] if args.key?(:etag) + @target_state = args[:target_state] if args.key?(:target_state) + end + end + + # A realm resource. + class Realm + include Google::Apis::Core::Hashable + + # Output only. The creation time. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Human readable description of the realm. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # ETag of the resource. + # Corresponds to the JSON property `etag` + # @return [String] + attr_accessor :etag + + # The labels associated with this realm. Each label is a key-value pair. + # Corresponds to the JSON property `labels` + # @return [Hash] + attr_accessor :labels + + # The resource name of the realm. Uses the form: + # `projects/`project`/locations/`location`/realms/`realm``. For + # example, `projects/my-project/locations/`location`/realms/my-realm`. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Required. Time zone where all policies targeting this realm are evaluated. The + # value + # of this field must be from the IANA time zone database: + # https://www.iana.org/time-zones. + # Corresponds to the JSON property `timeZone` + # @return [String] + attr_accessor :time_zone + + # Output only. The last-modified 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) + @create_time = args[:create_time] if args.key?(:create_time) + @description = args[:description] if args.key?(:description) + @etag = args[:etag] if args.key?(:etag) + @labels = args[:labels] if args.key?(:labels) + @name = args[:name] if args.key?(:name) + @time_zone = args[:time_zone] if args.key?(:time_zone) + @update_time = args[:update_time] if args.key?(:update_time) + end + end + + # The realm selector, used to match realm resources. + class RealmSelector + include Google::Apis::Core::Hashable + + # List of realms to match. + # Corresponds to the JSON property `realms` + # @return [Array] + attr_accessor :realms + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @realms = args[:realms] if args.key?(:realms) + end + end + # A rule to be applied in a Policy. class Rule include Google::Apis::Core::Hashable @@ -933,6 +1938,92 @@ module Google end end + # Autoscaling config for an Agones fleet. + class ScalingConfig + include Google::Apis::Core::Hashable + + # Required. Agones fleet autoscaler spec. Example spec: + # https://agones.dev/site/docs/reference/fleetautoscaler/ + # Corresponds to the JSON property `fleetAutoscalerSpec` + # @return [String] + attr_accessor :fleet_autoscaler_spec + + # Required. The name of the Scaling Config + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The schedules to which this Scaling Config applies. + # Corresponds to the JSON property `schedules` + # @return [Array] + attr_accessor :schedules + + # Labels used to identify the game server clusters to which this Agones + # scaling config applies. A game server cluster is subject to this Agones + # scaling config if its labels match any of the selector entries. + # Corresponds to the JSON property `selectors` + # @return [Array] + attr_accessor :selectors + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @fleet_autoscaler_spec = args[:fleet_autoscaler_spec] if args.key?(:fleet_autoscaler_spec) + @name = args[:name] if args.key?(:name) + @schedules = args[:schedules] if args.key?(:schedules) + @selectors = args[:selectors] if args.key?(:selectors) + end + end + + # The schedule of a recurring or one time event. The event's time span is + # specified by start_time and end_time. If the scheduled event's timespan is + # larger than the cron_spec + cron_job_duration, the event will be recurring. + # If only cron_spec + cron_job_duration are specified, the event is effective + # starting at the local time specified by cron_spec, and is recurring. + # start_time|-------[cron job]-------[cron job]-------[cron job]---|end_time + # cron job: cron spec start time + duration + class Schedule + include Google::Apis::Core::Hashable + + # The duration for the cron job event. The duration of the event is effective + # after the cron job's start time. + # Corresponds to the JSON property `cronJobDuration` + # @return [String] + attr_accessor :cron_job_duration + + # The cron definition of the scheduled event. See + # https://en.wikipedia.org/wiki/Cron. Cron spec specifies the local time as + # defined by the realm. + # Corresponds to the JSON property `cronSpec` + # @return [String] + attr_accessor :cron_spec + + # The end time of the event. + # Corresponds to the JSON property `endTime` + # @return [String] + attr_accessor :end_time + + # The start time of the event. + # 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) + @cron_job_duration = args[:cron_job_duration] if args.key?(:cron_job_duration) + @cron_spec = args[:cron_spec] if args.key?(:cron_spec) + @end_time = args[:end_time] if args.key?(:end_time) + @start_time = args[:start_time] if args.key?(:start_time) + end + end + # Request message for `SetIamPolicy` method. class SetIamPolicyRequest include Google::Apis::Core::Hashable @@ -1021,6 +2112,34 @@ module Google end end + # Encapsulates Agones fleet spec and Agones autoscaler spec sources. + class SpecSource + include Google::Apis::Core::Hashable + + # The game server config resource. Uses the form: + # `projects/`project`/locations/`location`/gameServerDeployments/`deployment_id`/ + # configs/`config_id``. + # Corresponds to the JSON property `gameServerConfigName` + # @return [String] + attr_accessor :game_server_config_name + + # The name of the Agones leet config or Agones scaling config used to derive + # the Agones fleet or Agones autoscaler spec. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @game_server_config_name = args[:game_server_config_name] if args.key?(:game_server_config_name) + @name = args[:name] if args.key?(:name) + 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). Each `Status` message contains @@ -1060,6 +2179,135 @@ module Google end end + # Details about the Agones resources. + class TargetDetails + include Google::Apis::Core::Hashable + + # Agones fleet details for game server clusters and game server deployments. + # Corresponds to the JSON property `fleetDetails` + # @return [Array] + attr_accessor :fleet_details + + # The game server cluster name. Uses the form: + # `projects/`project`/locations/`location`/realms/`realm`/gameServerClusters/` + # cluster``. + # Corresponds to the JSON property `gameServerClusterName` + # @return [String] + attr_accessor :game_server_cluster_name + + # The game server deployment name. Uses the form: + # `projects/`project`/locations/`location`/gameServerDeployments/`deployment_id`` + # . + # Corresponds to the JSON property `gameServerDeploymentName` + # @return [String] + attr_accessor :game_server_deployment_name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @fleet_details = args[:fleet_details] if args.key?(:fleet_details) + @game_server_cluster_name = args[:game_server_cluster_name] if args.key?(:game_server_cluster_name) + @game_server_deployment_name = args[:game_server_deployment_name] if args.key?(:game_server_deployment_name) + end + end + + # Target Agones fleet specification. + class TargetFleet + include Google::Apis::Core::Hashable + + # The name of the Agones fleet. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Encapsulates Agones fleet spec and Agones autoscaler spec sources. + # Corresponds to the JSON property `specSource` + # @return [Google::Apis::GameservicesV1::SpecSource] + attr_accessor :spec_source + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + @spec_source = args[:spec_source] if args.key?(:spec_source) + end + end + + # Target Agones autoscaler policy reference. + class TargetFleetAutoscaler + include Google::Apis::Core::Hashable + + # The name of the Agones autoscaler. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Encapsulates Agones fleet spec and Agones autoscaler spec sources. + # Corresponds to the JSON property `specSource` + # @return [Google::Apis::GameservicesV1::SpecSource] + attr_accessor :spec_source + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @name = args[:name] if args.key?(:name) + @spec_source = args[:spec_source] if args.key?(:spec_source) + end + end + + # Details of the target Agones fleet. + class TargetFleetDetails + include Google::Apis::Core::Hashable + + # Target Agones autoscaler policy reference. + # Corresponds to the JSON property `autoscaler` + # @return [Google::Apis::GameservicesV1::TargetFleetAutoscaler] + attr_accessor :autoscaler + + # Target Agones fleet specification. + # Corresponds to the JSON property `fleet` + # @return [Google::Apis::GameservicesV1::TargetFleet] + attr_accessor :fleet + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @autoscaler = args[:autoscaler] if args.key?(:autoscaler) + @fleet = args[:fleet] if args.key?(:fleet) + end + end + + # Encapsulates the Target state. + class TargetState + include Google::Apis::Core::Hashable + + # Details about Agones fleets. + # Corresponds to the JSON property `details` + # @return [Array] + attr_accessor :details + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @details = args[:details] if args.key?(:details) + end + end + # Request message for `TestIamPermissions` method. class TestIamPermissionsRequest include Google::Apis::Core::Hashable diff --git a/generated/google/apis/gameservices_v1/representations.rb b/generated/google/apis/gameservices_v1/representations.rb index 791a71571..ea1c15b55 100644 --- a/generated/google/apis/gameservices_v1/representations.rb +++ b/generated/google/apis/gameservices_v1/representations.rb @@ -82,6 +82,36 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class DeployedClusterState + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DeployedFleet + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DeployedFleetAutoscaler + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DeployedFleetDetails + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class DeployedFleetStatus + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Empty class Representation < Google::Apis::Core::JsonRepresentation; end @@ -94,6 +124,90 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class FetchDeploymentStateRequest + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class FetchDeploymentStateResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class FleetConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GameServerCluster + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GameServerClusterConnectionInfo + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GameServerConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GameServerConfigOverride + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GameServerDeployment + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GameServerDeploymentRollout + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class GkeClusterReference + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class LabelSelector + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListGameServerClustersResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListGameServerConfigsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListGameServerDeploymentsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class ListLocationsResponse class Representation < Google::Apis::Core::JsonRepresentation; end @@ -106,6 +220,12 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class ListRealmsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Location class Representation < Google::Apis::Core::JsonRepresentation; end @@ -124,30 +244,132 @@ module Google include Google::Apis::Core::JsonObjectSupport end + class OperationMetadata + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class OperationStatus + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Policy class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class PreviewCreateGameServerClusterResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PreviewDeleteGameServerClusterResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PreviewGameServerDeploymentRolloutResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PreviewRealmUpdateResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class PreviewUpdateGameServerClusterResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Realm + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class RealmSelector + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class Rule class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class ScalingConfig + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Schedule + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class SetIamPolicyRequest class Representation < Google::Apis::Core::JsonRepresentation; end include Google::Apis::Core::JsonObjectSupport end + class SpecSource + 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 TargetDetails + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TargetFleet + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TargetFleetAutoscaler + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TargetFleetDetails + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class TargetState + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + class TestIamPermissionsRequest class Representation < Google::Apis::Core::JsonRepresentation; end @@ -247,6 +469,57 @@ module Google end end + class DeployedClusterState + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :cluster, as: 'cluster' + collection :fleet_details, as: 'fleetDetails', class: Google::Apis::GameservicesV1::DeployedFleetDetails, decorator: Google::Apis::GameservicesV1::DeployedFleetDetails::Representation + + end + end + + class DeployedFleet + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :fleet, as: 'fleet' + property :fleet_spec, as: 'fleetSpec' + property :spec_source, as: 'specSource', class: Google::Apis::GameservicesV1::SpecSource, decorator: Google::Apis::GameservicesV1::SpecSource::Representation + + property :status, as: 'status', class: Google::Apis::GameservicesV1::DeployedFleetStatus, decorator: Google::Apis::GameservicesV1::DeployedFleetStatus::Representation + + end + end + + class DeployedFleetAutoscaler + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :autoscaler, as: 'autoscaler' + property :fleet_autoscaler_spec, as: 'fleetAutoscalerSpec' + property :spec_source, as: 'specSource', class: Google::Apis::GameservicesV1::SpecSource, decorator: Google::Apis::GameservicesV1::SpecSource::Representation + + end + end + + class DeployedFleetDetails + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :deployed_autoscaler, as: 'deployedAutoscaler', class: Google::Apis::GameservicesV1::DeployedFleetAutoscaler, decorator: Google::Apis::GameservicesV1::DeployedFleetAutoscaler::Representation + + property :deployed_fleet, as: 'deployedFleet', class: Google::Apis::GameservicesV1::DeployedFleet, decorator: Google::Apis::GameservicesV1::DeployedFleet::Representation + + end + end + + class DeployedFleetStatus + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :allocated_replicas, :numeric_string => true, as: 'allocatedReplicas' + property :ready_replicas, :numeric_string => true, as: 'readyReplicas' + property :replicas, :numeric_string => true, as: 'replicas' + property :reserved_replicas, :numeric_string => true, as: 'reservedReplicas' + end + end + class Empty # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -263,6 +536,145 @@ module Google end end + class FetchDeploymentStateRequest + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class FetchDeploymentStateResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :cluster_state, as: 'clusterState', class: Google::Apis::GameservicesV1::DeployedClusterState, decorator: Google::Apis::GameservicesV1::DeployedClusterState::Representation + + collection :unavailable, as: 'unavailable' + end + end + + class FleetConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :fleet_spec, as: 'fleetSpec' + property :name, as: 'name' + end + end + + class GameServerCluster + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :connection_info, as: 'connectionInfo', class: Google::Apis::GameservicesV1::GameServerClusterConnectionInfo, decorator: Google::Apis::GameservicesV1::GameServerClusterConnectionInfo::Representation + + property :create_time, as: 'createTime' + property :description, as: 'description' + property :etag, as: 'etag' + hash :labels, as: 'labels' + property :name, as: 'name' + property :update_time, as: 'updateTime' + end + end + + class GameServerClusterConnectionInfo + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :gke_cluster_reference, as: 'gkeClusterReference', class: Google::Apis::GameservicesV1::GkeClusterReference, decorator: Google::Apis::GameservicesV1::GkeClusterReference::Representation + + property :namespace, as: 'namespace' + end + end + + class GameServerConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + property :description, as: 'description' + collection :fleet_configs, as: 'fleetConfigs', class: Google::Apis::GameservicesV1::FleetConfig, decorator: Google::Apis::GameservicesV1::FleetConfig::Representation + + hash :labels, as: 'labels' + property :name, as: 'name' + collection :scaling_configs, as: 'scalingConfigs', class: Google::Apis::GameservicesV1::ScalingConfig, decorator: Google::Apis::GameservicesV1::ScalingConfig::Representation + + property :update_time, as: 'updateTime' + end + end + + class GameServerConfigOverride + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :config_version, as: 'configVersion' + property :realms_selector, as: 'realmsSelector', class: Google::Apis::GameservicesV1::RealmSelector, decorator: Google::Apis::GameservicesV1::RealmSelector::Representation + + end + end + + class GameServerDeployment + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + property :description, as: 'description' + property :etag, as: 'etag' + hash :labels, as: 'labels' + property :name, as: 'name' + property :update_time, as: 'updateTime' + end + end + + class GameServerDeploymentRollout + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + property :default_game_server_config, as: 'defaultGameServerConfig' + property :etag, as: 'etag' + collection :game_server_config_overrides, as: 'gameServerConfigOverrides', class: Google::Apis::GameservicesV1::GameServerConfigOverride, decorator: Google::Apis::GameservicesV1::GameServerConfigOverride::Representation + + property :name, as: 'name' + property :update_time, as: 'updateTime' + end + end + + class GkeClusterReference + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :cluster, as: 'cluster' + end + end + + class LabelSelector + # @private + class Representation < Google::Apis::Core::JsonRepresentation + hash :labels, as: 'labels' + end + end + + class ListGameServerClustersResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :game_server_clusters, as: 'gameServerClusters', class: Google::Apis::GameservicesV1::GameServerCluster, decorator: Google::Apis::GameservicesV1::GameServerCluster::Representation + + property :next_page_token, as: 'nextPageToken' + collection :unreachable, as: 'unreachable' + end + end + + class ListGameServerConfigsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :game_server_configs, as: 'gameServerConfigs', class: Google::Apis::GameservicesV1::GameServerConfig, decorator: Google::Apis::GameservicesV1::GameServerConfig::Representation + + property :next_page_token, as: 'nextPageToken' + collection :unreachable, as: 'unreachable' + end + end + + class ListGameServerDeploymentsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :game_server_deployments, as: 'gameServerDeployments', class: Google::Apis::GameservicesV1::GameServerDeployment, decorator: Google::Apis::GameservicesV1::GameServerDeployment::Representation + + property :next_page_token, as: 'nextPageToken' + collection :unreachable, as: 'unreachable' + end + end + class ListLocationsResponse # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -281,6 +693,16 @@ module Google end end + class ListRealmsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :realms, as: 'realms', class: Google::Apis::GameservicesV1::Realm, decorator: Google::Apis::GameservicesV1::Realm::Representation + + collection :unreachable, as: 'unreachable' + end + end + class Location # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -316,6 +738,31 @@ module Google end end + class OperationMetadata + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :api_version, as: 'apiVersion' + property :create_time, as: 'createTime' + property :end_time, as: 'endTime' + hash :operation_status, as: 'operationStatus', class: Google::Apis::GameservicesV1::OperationStatus, decorator: Google::Apis::GameservicesV1::OperationStatus::Representation + + property :requested_cancellation, as: 'requestedCancellation' + property :status_message, as: 'statusMessage' + property :target, as: 'target' + collection :unreachable, as: 'unreachable' + property :verb, as: 'verb' + end + end + + class OperationStatus + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :done, as: 'done' + property :error_code, as: 'errorCode' + property :error_message, as: 'errorMessage' + end + end + class Policy # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -331,6 +778,72 @@ module Google end end + class PreviewCreateGameServerClusterResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :etag, as: 'etag' + property :target_state, as: 'targetState', class: Google::Apis::GameservicesV1::TargetState, decorator: Google::Apis::GameservicesV1::TargetState::Representation + + end + end + + class PreviewDeleteGameServerClusterResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :etag, as: 'etag' + property :target_state, as: 'targetState', class: Google::Apis::GameservicesV1::TargetState, decorator: Google::Apis::GameservicesV1::TargetState::Representation + + end + end + + class PreviewGameServerDeploymentRolloutResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :etag, as: 'etag' + property :target_state, as: 'targetState', class: Google::Apis::GameservicesV1::TargetState, decorator: Google::Apis::GameservicesV1::TargetState::Representation + + collection :unavailable, as: 'unavailable' + end + end + + class PreviewRealmUpdateResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :etag, as: 'etag' + property :target_state, as: 'targetState', class: Google::Apis::GameservicesV1::TargetState, decorator: Google::Apis::GameservicesV1::TargetState::Representation + + end + end + + class PreviewUpdateGameServerClusterResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :etag, as: 'etag' + property :target_state, as: 'targetState', class: Google::Apis::GameservicesV1::TargetState, decorator: Google::Apis::GameservicesV1::TargetState::Representation + + end + end + + class Realm + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + property :description, as: 'description' + property :etag, as: 'etag' + hash :labels, as: 'labels' + property :name, as: 'name' + property :time_zone, as: 'timeZone' + property :update_time, as: 'updateTime' + end + end + + class RealmSelector + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :realms, as: 'realms' + end + end + class Rule # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -346,6 +859,28 @@ module Google end end + class ScalingConfig + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :fleet_autoscaler_spec, as: 'fleetAutoscalerSpec' + property :name, as: 'name' + collection :schedules, as: 'schedules', class: Google::Apis::GameservicesV1::Schedule, decorator: Google::Apis::GameservicesV1::Schedule::Representation + + collection :selectors, as: 'selectors', class: Google::Apis::GameservicesV1::LabelSelector, decorator: Google::Apis::GameservicesV1::LabelSelector::Representation + + end + end + + class Schedule + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :cron_job_duration, as: 'cronJobDuration' + property :cron_spec, as: 'cronSpec' + property :end_time, as: 'endTime' + property :start_time, as: 'startTime' + end + end + class SetIamPolicyRequest # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -355,6 +890,14 @@ module Google end end + class SpecSource + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :game_server_config_name, as: 'gameServerConfigName' + property :name, as: 'name' + end + end + class Status # @private class Representation < Google::Apis::Core::JsonRepresentation @@ -364,6 +907,52 @@ module Google end end + class TargetDetails + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :fleet_details, as: 'fleetDetails', class: Google::Apis::GameservicesV1::TargetFleetDetails, decorator: Google::Apis::GameservicesV1::TargetFleetDetails::Representation + + property :game_server_cluster_name, as: 'gameServerClusterName' + property :game_server_deployment_name, as: 'gameServerDeploymentName' + end + end + + class TargetFleet + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + property :spec_source, as: 'specSource', class: Google::Apis::GameservicesV1::SpecSource, decorator: Google::Apis::GameservicesV1::SpecSource::Representation + + end + end + + class TargetFleetAutoscaler + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :name, as: 'name' + property :spec_source, as: 'specSource', class: Google::Apis::GameservicesV1::SpecSource, decorator: Google::Apis::GameservicesV1::SpecSource::Representation + + end + end + + class TargetFleetDetails + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :autoscaler, as: 'autoscaler', class: Google::Apis::GameservicesV1::TargetFleetAutoscaler, decorator: Google::Apis::GameservicesV1::TargetFleetAutoscaler::Representation + + property :fleet, as: 'fleet', class: Google::Apis::GameservicesV1::TargetFleet, decorator: Google::Apis::GameservicesV1::TargetFleet::Representation + + end + end + + class TargetState + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :details, as: 'details', class: Google::Apis::GameservicesV1::TargetDetails, decorator: Google::Apis::GameservicesV1::TargetDetails::Representation + + end + end + class TestIamPermissionsRequest # @private class Representation < Google::Apis::Core::JsonRepresentation diff --git a/generated/google/apis/gameservices_v1/service.rb b/generated/google/apis/gameservices_v1/service.rb index 718cdf657..a8e705ae4 100644 --- a/generated/google/apis/gameservices_v1/service.rb +++ b/generated/google/apis/gameservices_v1/service.rb @@ -120,6 +120,141 @@ module Google execute_or_queue_command(command, &block) end + # Creates a new game server deployment in a given project and location. + # @param [String] parent + # Required. The parent resource name. Uses the form: + # `projects/`project`/locations/`location``. + # @param [Google::Apis::GameservicesV1::GameServerDeployment] game_server_deployment_object + # @param [String] deployment_id + # Required. The ID of the game server delpoyment resource to be created. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GameservicesV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GameservicesV1::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_location_game_server_deployment(parent, game_server_deployment_object = nil, deployment_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+parent}/gameServerDeployments', options) + command.request_representation = Google::Apis::GameservicesV1::GameServerDeployment::Representation + command.request_object = game_server_deployment_object + command.response_representation = Google::Apis::GameservicesV1::Operation::Representation + command.response_class = Google::Apis::GameservicesV1::Operation + command.params['parent'] = parent unless parent.nil? + command.query['deploymentId'] = deployment_id unless deployment_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a single game server deployment. + # @param [String] name + # Required. The name of the game server delpoyment to delete. Uses the form: + # `projects/`project`/locations/`location`/gameServerDeployments/`deployment``. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GameservicesV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GameservicesV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_location_game_server_deployment(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/{+name}', options) + command.response_representation = Google::Apis::GameservicesV1::Operation::Representation + command.response_class = Google::Apis::GameservicesV1::Operation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Retrieves information about the current state of the game server + # deployment. Gathers all the Agones fleets and Agones autoscalers, + # including fleets running an older version of the game server deployment. + # @param [String] name + # Required. The name of the game server delpoyment. Uses the form: + # `projects/`project`/locations/`location`/gameServerDeployments/`deployment``. + # @param [Google::Apis::GameservicesV1::FetchDeploymentStateRequest] fetch_deployment_state_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::GameservicesV1::FetchDeploymentStateResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GameservicesV1::FetchDeploymentStateResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def fetch_game_server_deployment_deployment_state(name, fetch_deployment_state_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+name}:fetchDeploymentState', options) + command.request_representation = Google::Apis::GameservicesV1::FetchDeploymentStateRequest::Representation + command.request_object = fetch_deployment_state_request_object + command.response_representation = Google::Apis::GameservicesV1::FetchDeploymentStateResponse::Representation + command.response_class = Google::Apis::GameservicesV1::FetchDeploymentStateResponse + 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 details of a single game server deployment. + # @param [String] name + # Required. The name of the game server delpoyment to retrieve. Uses the form: + # `projects/`project`/locations/`location`/gameServerDeployments/`deployment``. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GameservicesV1::GameServerDeployment] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GameservicesV1::GameServerDeployment] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_game_server_deployment(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::GameservicesV1::GameServerDeployment::Representation + command.response_class = Google::Apis::GameservicesV1::GameServerDeployment + 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 the access control policy for a resource. # Returns an empty policy if the resource exists and does not have a policy # set. @@ -164,6 +299,181 @@ module Google execute_or_queue_command(command, &block) end + # Gets details a single game server deployment rollout. + # @param [String] name + # Required. The name of the game server delpoyment to retrieve. Uses the form: + # `projects/`project`/locations/`location`/gameServerDeployments/`deployment`/ + # rollout`. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GameservicesV1::GameServerDeploymentRollout] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GameservicesV1::GameServerDeploymentRollout] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_game_server_deployment_rollout(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}/rollout', options) + command.response_representation = Google::Apis::GameservicesV1::GameServerDeploymentRollout::Representation + command.response_class = Google::Apis::GameservicesV1::GameServerDeploymentRollout + 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 game server deployments in a given project and location. + # @param [String] parent + # Required. The parent resource name. Uses the form: + # `projects/`project`/locations/`location``. + # @param [String] filter + # Optional. The filter to apply to list results. + # @param [String] order_by + # Optional. Specifies the ordering of results following syntax at + # https://cloud.google.com/apis/design/design_patterns#sorting_order. + # @param [Fixnum] page_size + # Optional. The maximum number of items to return. If unspecified, the server + # will pick an appropriate default. The server may return fewer items than + # requested. A caller should only rely on response's + # next_page_token to + # determine if there are more GameServerDeployments left to be queried. + # @param [String] page_token + # Optional. The next_page_token value returned from a previous List request, + # if any. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GameservicesV1::ListGameServerDeploymentsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GameservicesV1::ListGameServerDeploymentsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_game_server_deployments(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+parent}/gameServerDeployments', options) + command.response_representation = Google::Apis::GameservicesV1::ListGameServerDeploymentsResponse::Representation + command.response_class = Google::Apis::GameservicesV1::ListGameServerDeploymentsResponse + command.params['parent'] = parent unless parent.nil? + command.query['filter'] = filter unless filter.nil? + command.query['orderBy'] = order_by unless order_by.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Patches a game server deployment. + # @param [String] name + # The resource name of the game server deployment. Uses the form: + # `projects/`project`/locations/`location`/gameServerDeployments/`deployment``. + # For example, + # `projects/my-project/locations/`location`/gameServerDeployments/my-deployment`. + # @param [Google::Apis::GameservicesV1::GameServerDeployment] game_server_deployment_object + # @param [String] update_mask + # Required. Mask of fields to update. At least one path must be supplied in + # this field. For the `FieldMask` definition, see + # https: + # //developers.google.com/protocol-buffers + # // /docs/reference/google.protobuf#fieldmask + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GameservicesV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GameservicesV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_project_location_game_server_deployment(name, game_server_deployment_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::GameservicesV1::GameServerDeployment::Representation + command.request_object = game_server_deployment_object + command.response_representation = Google::Apis::GameservicesV1::Operation::Representation + command.response_class = Google::Apis::GameservicesV1::Operation + 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 + + # Previews the game server deployment rollout. This API does not mutate the + # rollout resource. + # @param [String] name + # The resource name of the game server deployment rollout. Uses the form: + # `projects/`project`/locations/`location`/gameServerDeployments/`deployment`/ + # rollout`. + # For example, + # `projects/my-project/locations/`location`/gameServerDeployments/my-deployment/ + # rollout`. + # @param [Google::Apis::GameservicesV1::GameServerDeploymentRollout] game_server_deployment_rollout_object + # @param [String] preview_time + # Optional. The target timestamp to compute the preview. Defaults to the + # immediately + # after the proposed rollout completes. + # @param [String] update_mask + # Optional. Mask of fields to update. At least one path must be supplied in + # this field. For the `FieldMask` definition, see + # https: + # //developers.google.com/protocol-buffers + # // /docs/reference/google.protobuf#fieldmask + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GameservicesV1::PreviewGameServerDeploymentRolloutResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GameservicesV1::PreviewGameServerDeploymentRolloutResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def preview_project_location_game_server_deployment_rollout(name, game_server_deployment_rollout_object = nil, preview_time: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/{+name}/rollout:preview', options) + command.request_representation = Google::Apis::GameservicesV1::GameServerDeploymentRollout::Representation + command.request_object = game_server_deployment_rollout_object + command.response_representation = Google::Apis::GameservicesV1::PreviewGameServerDeploymentRolloutResponse::Representation + command.response_class = Google::Apis::GameservicesV1::PreviewGameServerDeploymentRolloutResponse + command.params['name'] = name unless name.nil? + command.query['previewTime'] = preview_time unless preview_time.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. # Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. @@ -239,6 +549,211 @@ module Google execute_or_queue_command(command, &block) end + # Patches a single game server deployment rollout. + # The method will not return an error if the update does not affect any + # existing realms. For example - if the default_game_server_config is changed + # but all existing realms use the override, that is valid. Similarly, if a + # non existing realm is explicitly called out in game_server_config_overrides + # field, that will also not result in an error. + # @param [String] name + # The resource name of the game server deployment rollout. Uses the form: + # `projects/`project`/locations/`location`/gameServerDeployments/`deployment`/ + # rollout`. + # For example, + # `projects/my-project/locations/`location`/gameServerDeployments/my-deployment/ + # rollout`. + # @param [Google::Apis::GameservicesV1::GameServerDeploymentRollout] game_server_deployment_rollout_object + # @param [String] update_mask + # Required. Mask of fields to update. At least one path must be supplied in + # this field. For the `FieldMask` definition, see + # https: + # //developers.google.com/protocol-buffers + # // /docs/reference/google.protobuf#fieldmask + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GameservicesV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GameservicesV1::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 update_project_location_game_server_deployment_rollout(name, game_server_deployment_rollout_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/{+name}/rollout', options) + command.request_representation = Google::Apis::GameservicesV1::GameServerDeploymentRollout::Representation + command.request_object = game_server_deployment_rollout_object + command.response_representation = Google::Apis::GameservicesV1::Operation::Representation + command.response_class = Google::Apis::GameservicesV1::Operation + 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 + + # Creates a new game server config in a given project, location, and game + # server deployment. Game server configs are immutable, and are not applied + # until referenced in the game server deployment rollout resource. + # @param [String] parent + # Required. The parent resource name. Uses the form: + # `projects/`project`/locations/`location`/gameServerDeployments/`deployment`/`. + # @param [Google::Apis::GameservicesV1::GameServerConfig] game_server_config_object + # @param [String] config_id + # Required. The ID of the game server config resource to be created. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GameservicesV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GameservicesV1::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_location_game_server_deployment_config(parent, game_server_config_object = nil, config_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+parent}/configs', options) + command.request_representation = Google::Apis::GameservicesV1::GameServerConfig::Representation + command.request_object = game_server_config_object + command.response_representation = Google::Apis::GameservicesV1::Operation::Representation + command.response_class = Google::Apis::GameservicesV1::Operation + command.params['parent'] = parent unless parent.nil? + command.query['configId'] = config_id unless config_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a single game server config. The deletion will fail if the game + # server config is referenced in a game server deployment rollout. + # @param [String] name + # Required. The name of the game server config to delete. Uses the form: + # `projects/`project`/locations/`location`/gameServerDeployments/`deployment`/ + # configs/`config``. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GameservicesV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GameservicesV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_location_game_server_deployment_config(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/{+name}', options) + command.response_representation = Google::Apis::GameservicesV1::Operation::Representation + command.response_class = Google::Apis::GameservicesV1::Operation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets details of a single game server config. + # @param [String] name + # Required. The name of the game server config to retrieve. Uses the form: + # `projects/`project`/locations/`location`/gameServerDeployments/`deployment`/ + # configs/`config``. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GameservicesV1::GameServerConfig] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GameservicesV1::GameServerConfig] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_game_server_deployment_config(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::GameservicesV1::GameServerConfig::Representation + command.response_class = Google::Apis::GameservicesV1::GameServerConfig + 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 game server configs in a given project, location, and game server + # deployment. + # @param [String] parent + # Required. The parent resource name. Uses the form: + # `projects/`project`/locations/`location`/gameServerDeployments/`deployment`/ + # configs/*`. + # @param [String] filter + # Optional. The filter to apply to list results. + # @param [String] order_by + # Optional. Specifies the ordering of results following syntax at + # https://cloud.google.com/apis/design/design_patterns#sorting_order. + # @param [Fixnum] page_size + # Optional. The maximum number of items to return. If unspecified, server + # will pick an appropriate default. Server may return fewer items than + # requested. A caller should only rely on response's + # next_page_token to + # determine if there are more GameServerConfigs left to be queried. + # @param [String] page_token + # Optional. The next_page_token value returned from a previous list request, if + # any. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GameservicesV1::ListGameServerConfigsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GameservicesV1::ListGameServerConfigsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_game_server_deployment_configs(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+parent}/configs', options) + command.response_representation = Google::Apis::GameservicesV1::ListGameServerConfigsResponse::Representation + command.response_class = Google::Apis::GameservicesV1::ListGameServerConfigsResponse + command.params['parent'] = parent unless parent.nil? + command.query['filter'] = filter unless filter.nil? + command.query['orderBy'] = order_by unless order_by.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + # Starts asynchronous cancellation on a long-running operation. The server # makes a best effort to cancel the operation, but success is not # guaranteed. If the server doesn't support this method, it returns @@ -392,6 +907,558 @@ module Google command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end + + # Creates a new realm in a given project and location. + # @param [String] parent + # Required. The parent resource name. Uses the form: + # `projects/`project`/locations/`location``. + # @param [Google::Apis::GameservicesV1::Realm] realm_object + # @param [String] realm_id + # Required. The ID of the realm resource to be created. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GameservicesV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GameservicesV1::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_location_realm(parent, realm_object = nil, realm_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+parent}/realms', options) + command.request_representation = Google::Apis::GameservicesV1::Realm::Representation + command.request_object = realm_object + command.response_representation = Google::Apis::GameservicesV1::Operation::Representation + command.response_class = Google::Apis::GameservicesV1::Operation + command.params['parent'] = parent unless parent.nil? + command.query['realmId'] = realm_id unless realm_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a single realm. + # @param [String] name + # Required. The name of the realm to delete. Uses the form: + # `projects/`project`/locations/`location`/realms/`realm``. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GameservicesV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GameservicesV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_location_realm(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/{+name}', options) + command.response_representation = Google::Apis::GameservicesV1::Operation::Representation + command.response_class = Google::Apis::GameservicesV1::Operation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets details of a single realm. + # @param [String] name + # Required. The name of the realm to retrieve. Uses the form: + # `projects/`project`/locations/`location`/realms/`realm``. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GameservicesV1::Realm] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GameservicesV1::Realm] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_realm(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::GameservicesV1::Realm::Representation + command.response_class = Google::Apis::GameservicesV1::Realm + 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 realms in a given project and location. + # @param [String] parent + # Required. The parent resource name. Uses the form: + # `projects/`project`/locations/`location``. + # @param [String] filter + # Optional. The filter to apply to list results. + # @param [String] order_by + # Optional. Specifies the ordering of results following syntax at + # https://cloud.google.com/apis/design/design_patterns#sorting_order. + # @param [Fixnum] page_size + # Optional. The maximum number of items to return. If unspecified, server + # will pick an appropriate default. Server may return fewer items than + # requested. A caller should only rely on response's + # next_page_token to + # determine if there are more realms left to be queried. + # @param [String] page_token + # Optional. The next_page_token value returned from a previous List request, + # if any. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GameservicesV1::ListRealmsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GameservicesV1::ListRealmsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_realms(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+parent}/realms', options) + command.response_representation = Google::Apis::GameservicesV1::ListRealmsResponse::Representation + command.response_class = Google::Apis::GameservicesV1::ListRealmsResponse + command.params['parent'] = parent unless parent.nil? + command.query['filter'] = filter unless filter.nil? + command.query['orderBy'] = order_by unless order_by.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Patches a single realm. + # @param [String] name + # The resource name of the realm. Uses the form: + # `projects/`project`/locations/`location`/realms/`realm``. For + # example, `projects/my-project/locations/`location`/realms/my-realm`. + # @param [Google::Apis::GameservicesV1::Realm] realm_object + # @param [String] update_mask + # Required. The update mask applies to the resource. For the `FieldMask` + # definition, see + # https: + # //developers.google.com/protocol-buffers + # // /docs/reference/google.protobuf#fieldmask + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GameservicesV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GameservicesV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_project_location_realm(name, realm_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::GameservicesV1::Realm::Representation + command.request_object = realm_object + command.response_representation = Google::Apis::GameservicesV1::Operation::Representation + command.response_class = Google::Apis::GameservicesV1::Operation + 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 + + # Previews patches to a single realm. + # @param [String] name + # The resource name of the realm. Uses the form: + # `projects/`project`/locations/`location`/realms/`realm``. For + # example, `projects/my-project/locations/`location`/realms/my-realm`. + # @param [Google::Apis::GameservicesV1::Realm] realm_object + # @param [String] preview_time + # Optional. The target timestamp to compute the preview. + # @param [String] update_mask + # Required. The update mask applies to the resource. For the `FieldMask` + # definition, see + # https: + # //developers.google.com/protocol-buffers + # // /docs/reference/google.protobuf#fieldmask + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GameservicesV1::PreviewRealmUpdateResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GameservicesV1::PreviewRealmUpdateResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def preview_project_location_realm_update(name, realm_object = nil, preview_time: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/{+name}:previewUpdate', options) + command.request_representation = Google::Apis::GameservicesV1::Realm::Representation + command.request_object = realm_object + command.response_representation = Google::Apis::GameservicesV1::PreviewRealmUpdateResponse::Representation + command.response_class = Google::Apis::GameservicesV1::PreviewRealmUpdateResponse + command.params['name'] = name unless name.nil? + command.query['previewTime'] = preview_time unless preview_time.nil? + command.query['updateMask'] = update_mask unless update_mask.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Creates a new game server cluster in a given project and location. + # @param [String] parent + # Required. The parent resource name. Uses the form: + # `projects/`project`/locations/`location`/realms/`realm-id``. + # @param [Google::Apis::GameservicesV1::GameServerCluster] game_server_cluster_object + # @param [String] game_server_cluster_id + # Required. The ID of the game server cluster resource to be created. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GameservicesV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GameservicesV1::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_location_realm_game_server_cluster(parent, game_server_cluster_object = nil, game_server_cluster_id: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+parent}/gameServerClusters', options) + command.request_representation = Google::Apis::GameservicesV1::GameServerCluster::Representation + command.request_object = game_server_cluster_object + command.response_representation = Google::Apis::GameservicesV1::Operation::Representation + command.response_class = Google::Apis::GameservicesV1::Operation + command.params['parent'] = parent unless parent.nil? + command.query['gameServerClusterId'] = game_server_cluster_id unless game_server_cluster_id.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a single game server cluster. + # @param [String] name + # Required. The name of the game server cluster to delete. Uses the form: + # `projects/`project`/locations/`location`/gameServerClusters/`cluster``. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GameservicesV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GameservicesV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_project_location_realm_game_server_cluster(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/{+name}', options) + command.response_representation = Google::Apis::GameservicesV1::Operation::Representation + command.response_class = Google::Apis::GameservicesV1::Operation + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets details of a single game server cluster. + # @param [String] name + # Required. The name of the game server cluster to retrieve. Uses the form: + # `projects/`project`/locations/`location`/realms/`realm-id`/gameServerClusters/` + # cluster``. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GameservicesV1::GameServerCluster] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GameservicesV1::GameServerCluster] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_project_location_realm_game_server_cluster(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+name}', options) + command.response_representation = Google::Apis::GameservicesV1::GameServerCluster::Representation + command.response_class = Google::Apis::GameservicesV1::GameServerCluster + 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 game server clusters in a given project and location. + # @param [String] parent + # Required. The parent resource name. Uses the form: + # "projects/`project`/locations/`location`/realms/`realm`". + # @param [String] filter + # Optional. The filter to apply to list results. + # @param [String] order_by + # Optional. Specifies the ordering of results following syntax at + # https://cloud.google.com/apis/design/design_patterns#sorting_order. + # @param [Fixnum] page_size + # Optional. The maximum number of items to return. If unspecified, the server + # will pick an appropriate default. The server may return fewer items than + # requested. A caller should only rely on response's + # next_page_token to + # determine if there are more GameServerClusters left to be queried. + # @param [String] page_token + # Optional. The next_page_token value returned from a previous List request, if + # any. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GameservicesV1::ListGameServerClustersResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GameservicesV1::ListGameServerClustersResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_project_location_realm_game_server_clusters(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'v1/{+parent}/gameServerClusters', options) + command.response_representation = Google::Apis::GameservicesV1::ListGameServerClustersResponse::Representation + command.response_class = Google::Apis::GameservicesV1::ListGameServerClustersResponse + command.params['parent'] = parent unless parent.nil? + command.query['filter'] = filter unless filter.nil? + command.query['orderBy'] = order_by unless order_by.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Patches a single game server cluster. + # @param [String] name + # Required. The resource name of the game server cluster. Uses the form: + # `projects/`project`/locations/`location`/realms/`realm`/gameServerClusters/` + # cluster``. + # For example, + # `projects/my-project/locations/`location`/realms/zanzibar/gameServerClusters/ + # my-onprem-cluster`. + # @param [Google::Apis::GameservicesV1::GameServerCluster] game_server_cluster_object + # @param [String] update_mask + # Required. Mask of fields to update. At least one path must be supplied in + # this field. For the `FieldMask` definition, see + # https: + # //developers.google.com/protocol-buffers + # // /docs/reference/google.protobuf#fieldmask + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GameservicesV1::Operation] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GameservicesV1::Operation] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def patch_project_location_realm_game_server_cluster(name, game_server_cluster_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::GameservicesV1::GameServerCluster::Representation + command.request_object = game_server_cluster_object + command.response_representation = Google::Apis::GameservicesV1::Operation::Representation + command.response_class = Google::Apis::GameservicesV1::Operation + 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 + + # Previews creation of a new game server cluster in a given project and + # location. + # @param [String] parent + # Required. The parent resource name. Uses the form: + # `projects/`project`/locations/`location`/realms/`realm``. + # @param [Google::Apis::GameservicesV1::GameServerCluster] game_server_cluster_object + # @param [String] game_server_cluster_id + # Required. The ID of the game server cluster resource to be created. + # @param [String] preview_time + # Optional. The target timestamp to compute the preview. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GameservicesV1::PreviewCreateGameServerClusterResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GameservicesV1::PreviewCreateGameServerClusterResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def preview_project_location_realm_game_server_cluster_create(parent, game_server_cluster_object = nil, game_server_cluster_id: nil, preview_time: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'v1/{+parent}/gameServerClusters:previewCreate', options) + command.request_representation = Google::Apis::GameservicesV1::GameServerCluster::Representation + command.request_object = game_server_cluster_object + command.response_representation = Google::Apis::GameservicesV1::PreviewCreateGameServerClusterResponse::Representation + command.response_class = Google::Apis::GameservicesV1::PreviewCreateGameServerClusterResponse + command.params['parent'] = parent unless parent.nil? + command.query['gameServerClusterId'] = game_server_cluster_id unless game_server_cluster_id.nil? + command.query['previewTime'] = preview_time unless preview_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 + + # Previews deletion of a single game server cluster. + # @param [String] name + # Required. The name of the game server cluster to delete. Uses the form: + # `projects/`project`/locations/`location`/gameServerClusters/`cluster``. + # @param [String] preview_time + # Optional. The target timestamp to compute the preview. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GameservicesV1::PreviewDeleteGameServerClusterResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GameservicesV1::PreviewDeleteGameServerClusterResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def preview_project_location_realm_game_server_cluster_delete(name, preview_time: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'v1/{+name}:previewDelete', options) + command.response_representation = Google::Apis::GameservicesV1::PreviewDeleteGameServerClusterResponse::Representation + command.response_class = Google::Apis::GameservicesV1::PreviewDeleteGameServerClusterResponse + command.params['name'] = name unless name.nil? + command.query['previewTime'] = preview_time unless preview_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 + + # Previews updating a GameServerCluster. + # @param [String] name + # Required. The resource name of the game server cluster. Uses the form: + # `projects/`project`/locations/`location`/realms/`realm`/gameServerClusters/` + # cluster``. + # For example, + # `projects/my-project/locations/`location`/realms/zanzibar/gameServerClusters/ + # my-onprem-cluster`. + # @param [Google::Apis::GameservicesV1::GameServerCluster] game_server_cluster_object + # @param [String] preview_time + # Optional. The target timestamp to compute the preview. + # @param [String] update_mask + # Required. Mask of fields to update. At least one path must be supplied in + # this field. For the `FieldMask` definition, see + # https: + # //developers.google.com/protocol-buffers + # // /docs/reference/google.protobuf#fieldmask + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # Available to use for quota purposes for server-side applications. Can be any + # arbitrary string assigned to a user, but should not exceed 40 characters. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::GameservicesV1::PreviewUpdateGameServerClusterResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::GameservicesV1::PreviewUpdateGameServerClusterResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def preview_project_location_realm_game_server_cluster_update(name, game_server_cluster_object = nil, preview_time: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:patch, 'v1/{+name}:previewUpdate', options) + command.request_representation = Google::Apis::GameservicesV1::GameServerCluster::Representation + command.request_object = game_server_cluster_object + command.response_representation = Google::Apis::GameservicesV1::PreviewUpdateGameServerClusterResponse::Representation + command.response_class = Google::Apis::GameservicesV1::PreviewUpdateGameServerClusterResponse + command.params['name'] = name unless name.nil? + command.query['previewTime'] = preview_time unless preview_time.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 protected