You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To use the operations client that you have to go through client._transport. It feels weird to recommend using a variable that looks like it's intended for internal use only.
defget_operation_status(operation_full_id):
"""Get operation status."""# [START automl_get_operation_status]fromgoogle.cloudimportautoml# TODO(developer): Uncomment and set the following variables# operation_full_id = \# "projects/[projectId]/locations/us-central1/operations/[operationId]"client=automl.AutoMlClient()
# Get the latest state of a long-running operation.response=client._transport.operations_client.get_operation(
operation_full_id
)
print("Name: {}".format(response.name))
print("Operation details:")
print(response)
# [END automl_get_operation_status]
To use the operations client that you have to go through
client._transport
. It feels weird to recommend using a variable that looks like it's intended for internal use only.Published AutoML sample: https://github.com/googleapis/python-automl/blob/master/samples/snippets/get_operation_status.py
It looks like the old generator left
transport
public. Was that changed intentionally? https://github.com/googleapis/gapic-generator/blob/17fbb3b38a20d13e69879d845a045dc1f8448a3d/src/test/java/com/google/api/codegen/gapic/testdata/py/python_multiple_services.baseline#L999If we want to keep
transport
private, could we makeoperations_client
public somewhere else?The text was updated successfully, but these errors were encountered: