Sends a request to compute a value. Args: obj: A ComputedObject whose value is desired. Returns: The result of evaluating that object on the server.
(obj: computedobject.ComputedObject)
| 1066 | |
| 1067 | |
| 1068 | def computeValue(obj: computedobject.ComputedObject) -> Any: |
| 1069 | """Sends a request to compute a value. |
| 1070 | |
| 1071 | Args: |
| 1072 | obj: A ComputedObject whose value is desired. |
| 1073 | |
| 1074 | Returns: |
| 1075 | The result of evaluating that object on the server. |
| 1076 | """ |
| 1077 | body = {'expression': serializer.encode(obj, for_cloud_api=True)} |
| 1078 | _maybe_populate_workload_tag(body) |
| 1079 | |
| 1080 | return _execute_cloud_call( |
| 1081 | _get_cloud_projects() |
| 1082 | .value() |
| 1083 | .compute(body=body, project=_get_projects_path(), prettyPrint=False) |
| 1084 | )['result'] |
| 1085 | |
| 1086 | |
| 1087 | @deprecation.Deprecated('Use getThumbId and makeThumbUrl') |
nothing calls this directly
no test coverage detected